Homework on Stale Blocks

1 they will continue to be accepted by some nodes until a third miners block chooses one to continue making it longer and the other will become stale return to mempool waiting to be picked up again
2 a stale block is a one that is rejected and returned to mempool after a fork occurs
3 when 2 blocks enter the chain at the same time and are recognized by nodes around them they continue on till a third block occurs and attaches to one or the other this creates a longer chain and the other is dropped back into the mempool they call the one dropped a stale block
4 the system uses 10 min intervals as a safety valve so if a fork does occur it does not become clogged with blocks …it is easier to drop few blocks than drop few hundred therefore they say wait for 6 blocks before you can be sure of confirmation that your transaction has been accepted

1 Like

No problem. I am glad I could help you. :slight_smile:

1 Like
  1. It was always a valid block. It became stale because the other chain found a new block faster, essentially overwriting the other block.

  2. Its not about speed. Its about a coincidence, in which 2 miners find a new block at the almost the same time. If there was no internet latency we wouldn’t have stale blocks. :slight_smile:

1 Like

A block becomes stale only after the accidental fork gets resolved. :smiley:

1 Like

Great observation. If we had shorter intervals there would be so many accidental forks, that the network would never resolve itself. :smiley:

1 Like

you are right thank you i did not write it correctly

1 Like

No worries. Keep up the great work. :muscle:

2 Likes
  1. In this case the we wait until the next miner pull up another block and see to which one it connects. After that we all know that network always choose the blockchain with more blocks or more PoW. And the other block simply ignored.

  2. Stale block is the one that is ignored beceause network choose another one.

3.They appear after we have a situation when two miners solve a block at the same time, then by the luck i guess one of them appears to become stale beacuse network choose another one.

  1. Because it could happen that after 4th or 3rd suddenly two miners solve block simultaniusly and one of the chain could be deleted or ignored.
1 Like
  1. What happens in the bitcoin network when two miners solve a block at the same time?
    Those two miners append their block to the blockchain and propagate it to the network. For some time there will be two possible “true” blockchains in existence where each node takes either new block1 or new block2 depending on which block has arrived a node first. In the next cycle, some minder finds the next block in one of the two blockchains. In this example I assume there will be only one next miner after the same time event. This next miner appends the found block to his true blockchain and makes his blockchain longer as the other true blockchain. Following the consensus rule of the bitcoin network that the longer chain wins, the TXs of the shorter chain return to the mempool and the shorter chain is then being dropped by the nodes.

  2. What is a stale block?
    A stale block belongs to the shorter new found chain if two versions of the blockchain exists on the network.

  3. How do stale blocks occur?
    In case two miners finding a hash below the target value at the same time and creating two possible blockchains which they propagate. Depending on the arrival time of the new blocks, the nodes divides them self either to one version of blockchain or the other. After this event, miners will continue to mine and find new blocks. So it causes both blockchains continue to grow. If a node is confronted with the both versions of the blockchain, it will always keep the longest blockchain.

  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
    For every fresh mined block, there is a possibility of miners finding hashes at the same time, therefore the possibility of the new block being an stale block belonging to the shorter chain. This possibility is getting lower with each child block being added.

1 Like

Proof of work continues on both blocks and the longest chain is chosen.

A stale block is the block that loses the longest chain race. Transactions are returned to the mem pool,

A stale block occurs when it is not included in the longest chain.

Because you want the transaction propagated throughout the network and not in a stale block.

1 Like

1: If 2 miners solve a block at the same time, the next miner will choose a chain to join, making it the longer chain.

2: A stale block is the block that is orphaned on the now shorter of the 2 chains from the scenario above.

3: A stale block will occur when the above scenario happens (2 miners solving a block at the same time) and the shorter of the chain is left void, with the transactions in that block returned to the Mempool.

4: Confirmations are important to ensure the block is processed and not orphaned / stale.

1 Like

I am a bit confused about your answer. We wait for 6 confirmations as it would be very unlikely that 2 miners solve the block at the same time 6 times in a row. :smiley:

1 Like

Great and detailed answers. I really enjoyed reading them. Keep up the great work. :slight_smile:

2 Likes

I am not sure if they can choose to which chain to add. They add to the chain that they got before. :slight_smile:

1 Like
  1. If two miners solve for a block at the same time then both blocks are considered to be good. Difficulty adjustments probably need to be made.

  2. A stale block is a block that was produced at the same time as another block but subsequent blocks were not produced following it. This block gets removed and transactions get put back into the mempool.

  3. Stale blocks can occur when miners complete blocks at the same time. Changing up the difficulty will help prevent stale blocks.

  4. You should wait for 6 further block confirmations when sending or receiving a transaction to make sure then transaction is securely in the blockchain.

Changing difficulties doesn’t really prevent stale blocks. They occur from time to time due to the nature of the mining process. Though I would imagine with higher difficulty stale blocks do become less possible it is not the reason why we change it :slight_smile:

2 Likes

Then is the main reason for changing the difficulty to keep the block production time as close to 10 minutes as possible?

1 Like

Yes :slight_smile: it adjusts every 2016 blocks or approximately every 2 weeks

2 Likes

haha, I read it again and I’m confused also :smile:

As per community answers, I understand that we should wait for 6 conf to make sure that blocks are in the chain and not stale. Am I right?

1 Like
  1. When two miners solve a block at the same time the chain forks until another block is mined and added to one or the other to determine the longest chain.

  2. A stale block is a block which the transactions have been mined but become invalidated as the chain is overtaken by a new longer chain. These transactions go back to the mempool.

Question: is the block reward given to both miners when a block is mined simultaneously?

  1. Stale blocks are the result of two blocks being mined simultaneously creating a fork in the chain. The block becomes stale when it is no longer part of the longest chain.

  2. It is important to wait for more than one confirmation to ensure the transaction is not part of a stale block. If the transaction goes back into the mempool it may be possible for those funds to be spent in another transaction invalidating the older one.

1 Like