Homework on Stale Blocks

Homework on Stale Blocks - Questions

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

The chain forks temporarily until the longest chain win and gets fully propagated in the network.
The blocks that are not part of the longest chain gets rejected. They are called stale or orphan blocks.

** 2. What is a stale block?**

A stale block or an orphan block is a block that is rejected by the network because it’s not part of the longest chain.

** 3. How do stale blocks occur?**

A stale block occur when the miners solve a block at the same time and are competing for the network to validate them in the longest chain of blocks. When the network is fully synchronized with the longest chain data and detects that some blocks are not part of the that chain the network ignores them and the transactions from the stale block returns to the mempool.

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

To prevent the transaction to occur before the network validates your block as part of the longest chain.

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

There will be temporarily two valid versions of the blockchain until the network reaches consensus and only the longest chain remains, discarding the concurring portion created at that “collision” time where two valid blocks were appended to the blockchain.

  1. What is a stale block?

It is a block that was removed from the blockchain since it did not belong to the longest (valid) chain.

  1. How do stale blocks occur?

Nodes will probably get information from the closest miner. When different groups of nodes get different versions of the blockchain, one of the chains will have to be discarded (shortest one). The blocks in this rejected portion of the blockchain 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?

To minimize the possibility to rely on a transaction that may be returned to the mempool in case it belongs to a stale block.

1 Like
  1. The block which the next miner bases his block on is accepted to the Blockchain and the other block transactions is returned to the mempool.
  2. A stale block is one with the shorter version of the blockchain.
  3. When two blocks are generated simultaneously, the one with the longer Blockchain is accepted and the other is rejected making it a stale block.
  4. To prevent stale blocks.
1 Like
  1. What happens in the bitcoin network when two miners solve a block at the same time?
    A fork is created and two blockchains manifest at the point of the fork.

  2. What is a stale block?
    Another miner continues the blockchain from one of the two blocks that created a fork. This creates a blockchain that is longer than the blockchain that the new miner did not choose. Because the longer blockchain always wins, the blockchain that the miner did not choose goes dormant and they call this a stale block.

  3. How do stale blocks occur?
    See number two.

  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
    It appears the magic number is six. wait for six blocks to be confirmed before sending or receiving transactions. This is so you avoid creating a stale block.

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

They both propagate their blocks to neighbouring nodes, which means that for a period of time, two valid but different blockchains will exist on the network. This is usually resolved when the next block is added to the blockchain - one variant of the blockchain will now be difficulty wise longer that the other and will be accepted by all of the nodes, while the block mined on the now shorter chain will be discarded - it will become a stale block.

  1. What is a stale block?

A once valid block that was discarded due to another valid variant of the blockchain without that block becoming the longest variant of the blockchain and therefore being accepted by the network.

  1. How do stale blocks occur?

When two or more competing variants of the blockchain exist, one of them will eventually become difficulty wise longer than the others and supersede the shorter variants. The blocks not part of the longest chain become stale blocks.

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

If you wait for six confirmations, it pretty much eliminates the risk that the block the transaction was in will become stale. For example, if you sent someone goods after their BTC payment only had one confirmation and the block ended up becoming stale, you would be out of your UTXOs.

2 Likes
  1. What happens in the bitcoin network when two miners solve a block at the same time? They are both valid with two different versions of the truth. Then depending on which of these two blocks the next minor chooses will determine how the blockchain continues. The 2nd block will be returned to the mempool.
  2. What is a stale block? Blocks that were in the blockchain at one time but dropped due to it being on a shorter blockchain.
  3. How do stale blocks occur? When the blocks are removed to the mempool due to it being formed at the same time as another block and then by chance, the next miner chose the other one and not this one.
  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction? To minimize the chance of that block being dropped therefore invalidating your transaction.
1 Like

Waiting does not prevent stale blocks. It merely insures that your tx is not part of it. :slight_smile:

2 Likes
  1. What happens in the bitcoin network when two miners solve a block at the same time?
    They can both be added to the blockchain. Both blocks are valid; however, the nodes communicate to each other and the miners. The nodes that are in direct communication with the miners working on the current block will validate one version of the block chain, resulting in a new block added to only one version making that version of the block chain longer and thus the version that all other nodes agree with.
  2. What is a stale block?
    A stale block is a block that was mined and added to the shorter version of the block chain. The blocks present on the shorter version of the blockchain will eventually be dropped after all nodes have communicated that there is actually a longer version already running. These dropped blocks are stale blocks and all transaction will be returned to the mempool.
  3. How do stale blocks occur?
    Stale blocks occur when blocks are generated and upended too quickly before all nodes have had a chance to read the blockchain and realize there is already a longer version produced.
  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
    Because the block could end up potentially being a stale block and the transactions on that block will be added back to the mempool to be mined again. A general rule is to wait for at least 6 blocks to be confirmed following the block in question. This can help to make you fairly positive that your block is indeed upended to the correct version of the blockchain.
1 Like
  1. In that case longest chain would win and the the last block of shortest chain would be dropped/orphaned. Longest chain would be the chain next block is built on.
  2. Stale blocks are blocks that are not part of the current best blockchain anymore, they were overridden by a longer chain.
  3. Stale blocks occur if they were competing blocks and chain of competing blocks became the longest.
  4. Just to make sure that your transaction won’t be dropped in an orphaned block.
1 Like

Thanks. Interpreted it wrongly. Now I get it. So my trx is not returned to the mempool because it is part of stale block.

If the transaction is not also part of the winning block, then it gets returned to the mempool.

Maybe I misinterpreted your answer, you only wrote that waiting for more confirmations prevents stale blocks. :slight_smile:

That’s right it gets returned to the mempool(Pardon my typo in the previous post).
Awaiting for more confirmations is to ensure that my transaction is not part of a stale block as I was made to understand by @StevenM which I now fully understand.

  1. What happens in the bitcoin network when two miners solve a block at the same time?
    Both blocks get on blockchain. But, later one block will be dropped depending from next blocks lining up.
  2. What is a stale block?
    Block which is withdrawn from blockchain and all transactions in it added to mempool
  3. How do stale blocks occur?
    In result of other block lining up in another chain, stale blocks been dropped
  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
    To make sure your block is not dropped out from blockchain in result of not getting other blocks lining up after.
1 Like
  • What happens in the bitcoin network when two miners solve a block at the same time?
    The system will continue as normal and the longest chain will eventually become the trusted accepted version with the short chain blocks being removed and Tx’s added to the mempool

  • What is a stale block?
    A block that is not accepted by all nodes and returns to the mempool

  • How do stale blocks occur?
    They occur when two miners satisfy they difficulty requirement at the same time

  • Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
    Because one chain will eventually be accepted and the other will be orphaned

1 Like
  1. What happens in the bitcoin network when two miners solve a block at the same time?
  • then it depends on which of those two blocks will be first added a new block. This block with a new block will be accepted to a blockchain and the second block will be dropped.
  1. What is a stale block?
  • it is a block which was already in blockchain but was dropped and his Txs goes to mempool.
  1. How do stale blocks occur?
  • because there are two blocks made at the same time and one of them is the new version of longer blockchain and cause the one of those two blocks to drop.
  1. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
  • because that block with this Tx can be dropped from the blockchain.
1 Like
  • What happens in the bitcoin network when two miners solve a block at the same time?
    The Longest Blockchain wins the other one will be stale and the data of that shorter Blockchain gets back to the mempool
  • What is a stale block?
    The block that has not been chosen by the following block and therefore part of the shorter chain
  • How do stale blocks occur?
    If there are two competing versions of the same Block information the blockchain decides which Block two attach the next block.The other version will be discarded as the stale blockchain
  • Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction
    6 confirmations are recommended to prevent to be orphaned
1 Like
  1. When two miners solve a block at the same time in the Bitcoin Network the network is then split temporarily into two separate truths - the path for the future of the blockchain will be determined only after 6 more confirmed blocks in the same chain of one of these two original blocks - the longest chain wins, the loser blocks are removed from the chain (stale blocks)

  2. Stale blocks are blocks that are dropped from the blockchain because there is a longer version of the blockchain without those blocks in it.

  3. Combine answers 1 & 2

  4. In the case of two miners solving a block at the same time, it is then important to wait for at least 6 further confirmations to ensure that your transaction will not be invalidated due to a stale block.

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

– They both start propagating their blocks to surrounding nodes. The following block will correct the path of the chain by opting for the longest chain / chain of blocks with the most POW. The original blocks that’s now over ruled becomes orphans and the transactions that still needs to be processed goes to the mempool to be mined.

  1. What is a stale block?

– A stale block is a block that is not accepted by the network

  1. How do stale blocks occur?

When two miners solve a block at the same time and they both start propagating surrounding blocks.

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

To give the network a chance to unchain :face_with_raised_eyebrow: orphan or stale blocks.

[/quote]

1 Like
  1. When 2 miners solve a block at the same time, then 2 branches of the Bitcoin blockchain are initially created. Then according to which branch is prolonged during the sub-sequent blocks’ creation, one sub-branch or the other is kept.

  2. A stale block is a block which was added to the Bitcoin blockchain, when 2 miners solved the block at the same time, and later on dropped out with all its associated transactions being returned to the mempool.

  3. A stale block occurs when 2 miners solved the block at the same time and that 2 branches are created and be part of the branch that will be dropped later on.

  4. Waiting 6 blocks creation, that is to say 1 hour, brings quasi-certainty that a transaction is fully confirmed, since this lets 6 cycles to assure that the “initially” confirmed transaction was not part of an orphaned branch.

1 Like
  1. accidental fork / you get two versions of the truth
  2. a dropped/orphaned block / when there is another version of truth/ another block that has more POW
  3. when we have two versions of the truth. Two versions of one block and eventually one block with the most POW will be chosen and the other block becomes stale
  4. because a fork could happen therefore your tx could be in the stale block and end up back in the mempool to be confirmed again.
2 Likes