Homework on Stale Blocks

  1. What happens in the bitcoin network when two miners solve a block at the same time?
    two blocks will be added until the network recognizes one of the blocks (the longest chain will remain). the disregarded block will be the stale block --> transactions will return to the mempool

  2. What is a stale block?
    a block that used to be valid but was however disregarded by the network because it was not part of the longest chain

  3. How do stale blocks occur?
    when two miners mine a block at the same time

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

to be sure that your transaction is going through and accepted on the blockchain and not disregarded as a stale block

1 Like

The miner with the most blocks or the most proof of work will be the acceptable block and the once with shorter blocks or that were generated will less difficulty will be dropped.

A stale block is a block that was confirmed but has now been put back into the mempool.

Because a block might be in the blockchain that might be dropped, so the 10 minute block time decreases the chances of stale block and so waiting for more confirmations limits the prabability of your transaction being in a stale block

1 Like

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

The chain will split into two chains. The longest chain will win, and the shortest chain will end up back in the mempool.

2. What is a stale block?

A stale, or orphaned block occurs when a valid block is not accepted by the network (Due to the occurrence of a fork)
This stale block will move back to the mempool.

3. How do stale blocks occur?

A stale, or orphaned block occures after a fork (When e.g two miners solve the same problem at the same time) but only one block will be accepted as the true one, so only 1 can win!

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

It’s best to have as a rule to wait for at least 6 confirmations, in case a stale block happens, if it happens then your transaction gets moved back to the mempool.

1 Like

I was wondering what would happen in the following situation:

I know it is possible for two blocks to be formed using some of the same transactions from the mempool. Lets say block 1 was selected to be the verified blockchain, and block 2 became stale, hence, the transactions were returned to the mempool. How would it be confirmed that the some of the transactions returned to the mempool were already processed by block 1?

Cheers!

Two blocks mined at approximately the same time may have 90-95% of the same transaction, so only the 5% that didn’t make need to go back in the mempool for inclusion in the next block.

How would one block know which 5% to return to the mempool. I guess my question is, what is the way they check which transactions need to be returned to the mempool?

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

A fork of the two chains will happen. The longest chain will win and then the other transations in the stale blocks will be written back in the mempool.

  1. What is a stale block?

This is the orphaned block that is dropped from the blockchain and whose transactions are written back to the mempool.

  1. How do stale blocks occur?

When two or more miners mine the same a block at the same time.

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

Only after 6 confirmations is it clear that the transaction is confirmed. Before that, the transaction may end up back in the mempool and have to be recalculated by a miner.

2 Likes

I must confuse you Sorry, All transactions in the stale block will be sent to the mempool but the transactions included in the other block will be invalid in the next block since the transactions are in the blockchain So only the 5% will be included in the next block. They can’t spent twice. Hope this make senses.

  1. initially both blocks are propagated through the network, this is when a fork happens.
  2. a stale block is a block that is discarded by the network if it was produced at exactly the same time as another block.
  3. when miners mine blocks at exactly the same time
  4. you have to wait in order to minimize stale/orphaned blocks and give time for the new blocks to proprage through the network.
1 Like
  1. A blockchain fork will be created. Each miner node will have it’s own version of what the main blockchain is and propagate it to its neighbours. As a result, two sections of the network will have a different version of the blockchain. When one of these sections receives the new block from the other sections on top of the same height, it will keep it in stale mode but still keep their previous block as the main blockchain as that is the one they have received first. The main principle that applies here is that any node will consider that the branch with the highest proof of work (meaning that it has the most consecutive blocks) will win. On the next round of mining, this stalemate situation will most likely cease to exist because it would be very rare that again two miners, one in each branch, mints a new block at about the same time and that block is not propagated quickly enough before one of the forks has the time to mint a valid block and win the race to the longest chain.

  2. A stale block is a valid block (the nonce produces a hash that is a valid solution to the current height) that is not part of the main blockchain because it was received on that node later on. The stale block will be kept in the node for as long as the stale blockchain and the main blockchain have the same proof of work (the same number of consecutive blocks).

  3. Stale blocks happen because two nodes of the blockchain have produced a valid solution to the mining problem of the current block in the network at about the same time. When that heppens, those nodes will propagate their block to the next neighbour (and so on and so forth from node to node) until one of the two forked blockchains receives the alternative block. Since the alternative block is received after the first one, the block is considered by the protocol to be stale.

  4. Waiting for one block to be confirmed when sending or receiving a transaction is a handy rule of thumb that greatly diminishes the probability of your transaction from not having it accidentally made it only into a stale branch. The longer you wait, the more unlikely it is that your node is connected to a fork that will later on not be part of the consensued main blockchain. Usually waiting for one block is enough, but of course you can wait two, three or more to be even more certain about it.

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

  2. What is a stale block?
    It is a verified block that gets placed back into the mempool after being on the shorter chain

  3. How do stale blocks occur?
    If a block gets placed on a split chain and there is no other block that gets confirmed after it then the block becomes stale or dropped into the mempool.

  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
    So that you are sure that your transaction will not be dropped.

1 Like
  1. One of those miner’s block will be chosen by the next miner to propagate, while the other’s block will be dropped.
  2. A stale block is one that on the blockchain for a time, but was dropped from the network.
  3. Stale blocks occur in the event that two blocks were mined at same time, one was chosen to propagate through the network, creating a longer chain and the other one drops.
  4. It’s important to wait for more than one block to be confirmed so that you can make sure that the your transaction doesn’t become part of a stale block, thus returning it to the mempool.
1 Like
  • What happens in the bitcoin network when two miners solve a block at the same time?
  • If in this case its a draw, the winner is the one whose block is picked by another miner therefore making that chain of block longer than the other.
  • What is a stale block?
  • A stale block is a block that was previously a confirmed transaction but that it has been rejected due to the fact that another one equally similar has surpassed it for mining purposes.
  • How do stale blocks occur?
  • Stale blocks occur when two miners solved a block at the same time, being that the one with the longer chain moves on and the other one gets rejected after.
  • Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
  • Because there is still a possibility that you can get rejected if there was another chain that completed the puzzle at the same time as you do and it was rather selected to be the right one being it a longer chain if it was picked up first by another miner.
1 Like

What happens in the bitcoin network when two miners solve a block at the same time?
they will both propagate their block to the network and wich is picked up by an other miner the network will always choose the longest chain of blocks
What is a stale block?
also called orphaned block, is a block who found the nonce at the same time but is not picked up by the network because he is not the longest
Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
It is best to wait for the 6 next blocks to be sure he is confirmed because the block can become a orphaned block and than it is rejected by the network.

1 Like
  1. They will propagate throughout the network, but at a certain moment one chain will be longer in the sense of POW which makes the other blocks become obsolete (although they could have been valid blocks)
  2. It’s a block that eventually gets removed because of 1.
  3. because data needs to travel and propagate which takes time. Meanwhile, a chain that was chosen by other nodes might be longer making the other blocks obsolete
  4. To be sure your transaction has proceeded. It’s possible your transaction is part of an orphaned block which then is returned to the mempool
1 Like
  1. What happens in the bitcoin network when two miners solve a block at the same time?
    A fork occurs when two or more miners find a block at nearly the same time. The fork is resolved when subsequent block(s) are added and one of the chains becomes longer than the alternative(s). The network abandons the blocks that are not in the longest chain.

  2. What is a stale block?
    A stale block is a block that was previously been added to the blockchain that is dropped as a result of it being on the smaller fork of a split chain

  3. How do stale blocks occur?
    When two or more miners mine a block at almost the same time and propagate that block over the neighboring blockchain network, a temporary fork occurs. The next blocks will define which is the longest chain, and the other will be discarded.

  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
    To ensure that your transaction is part of the longer blockchain and that it wasnt returned due to being part of a stale block.

1 Like
  1. They are both implemented as half of the new chain with half of the code from the previous hash, if another block is added onto any one of those two blocks the other will be dropped due to the other being the longer code.
  2. A stale block is when an orphan block on the shorter blockchain with another version has been accepted as the main block of the chain and it is dropped.
  3. They occur when two Blocks that are competing to be the next block on a chain end up getting the same nonce at the same time and this causes a split of information creating to valid blocks that are divergent of one another on the same line of a blockchain.
  4. The reason it is better to wait for more than one block to be confirmed before send or receiving a new transaction is because to see if a chain is running properly and is following the rules and confirmations allowing the code to become more accepted as the better blockchain.
1 Like
  1. Both blocks will be on the blockchain but the one with the shorter chain will be dropped from the blockchain and be sent to the mempool.

  2. a block that was on the blockchain but got dropped from the blockchain.

  3. when two miners mine blocks, the one with the shorter chain will be dropped and thus becomes a stale block.

  4. so you can be sure that the block won’t get dropped.

1 Like
  1. An accidental fork happens eventually more blocks are added to the chain, the one that becomes the longest eventually gets rewarded

  2. Blocks that are not accepted into the blockchain because of time lag.

  3. When 2 miners produce valid blocks at the same time, the one that produces the slowest ends up being the stale block.

  4. The more blocks that are confirmed the harder it is for blocks to be hacked and also the small chance that the transaction won’t be reversed.

1 Like
  1. when that happens, for a brief moment there are two versions of the blockchain, then whatever is linked faster and gets a longer chain of transactions will be the accepted version and the other one will have the transactions in the invalidated blocks dropped, when that happens the block is called orphaned block and the transactions go back to the mempool.
  2. a stale block is a block that got invalidated due to a new version of the blockchain that developed faster.
  3. If two slightly different blocks are propagated at the same time and accepted as valid, the nodes might include two blocks in the same position because they are not completely synced, that creates multiple variations of the cain, after some time, the longest one is the accepted one and the other one has the blocks dropped(stale blocks) and the txs are put back in the mempool
  4. because doing so lowers the risk of having to solve stale blocks all the time, losing efficiency and speed
1 Like