Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Amphenomenon on November 04, 2023, 10:23:15 AM



Title: Explanation on the orphan and stale block
Post by: Amphenomenon on November 04, 2023, 10:23:15 AM
Was reading about Blockchain on Wikipedia to know more historically about it but I stumbled upon something new to Me, which was about the orphan block, which are not included on the main chain of the blockchain. During my research I discovered it's also referred to as stale block then later found out that there is a difference between them. Please what is the difference?
https://www.talkimg.com/images/2023/11/04/tGifC.png
Also, according to the image above, why is the orphan block still added to the blockchain though is not on main chain of the blockchain?


Title: Re: Explanation on the orphan and stale block
Post by: Zaguru12 on November 04, 2023, 10:57:36 AM
Orphaned block are those block which are valid but are not added first to the blockchain because in the block header the parent block detail included in it is yet to be received. Example is when block 2 is propagated and block 1 is yet to be received, block 1 is the parent block for 2 and as such block 2 is dropped first till after the confirmation of the parent block which is 1.

Stale block is that block which is propagated the simultaneously with another block and the nodes each accept any of the two blocks but the one which another block is built on top it becomes the accepted block because the longest chain is considered valid transaction and the other one is a stale block which it’s transactions are rendered invalid and can’t be spent because they are not in a valid block


Title: Re: Explanation on the orphan and stale block
Post by: hosseinimr93 on November 04, 2023, 11:01:10 AM
Orphan blocks and stale blocks are different from each other, however many people use the terms interchangeably. You can click here (https://en.bitcoin.it/wiki/Orphan_Block) to visit an article on Bitcoin Wiki about the difference between orphan blocks and stale blocks.


The image you posted is trying to explain stale blocks.

Also, according to the image above, why is the orphan block still added to the blockchain though is not on main chain of the blockchain?
The image isn't displaying a single chain.
The image is displaying multiple chains. The blocks that are shown in purple have become invalid because the other chain have more work.


Title: Re: Explanation on the orphan and stale block
Post by: cafter on November 04, 2023, 12:52:31 PM
Orphan Block:It's a valid block that's left out of the main chain because of a temporary issue when multiple blocks are created at the same time.
Key Point: It's a good block, but it doesn't make it into the main chain immediately.

Stale Block:It's a block that was once valid but becomes outdated and irrelevant because another chain in the network becomes longer.
Key Point: It was good before but got replaced by a longer chain.

orphan blocks don't initially make it into the main chain, while stale blocks become outdated due to a longer chain taking precedence.

Also, according to the image above, why is the orphan block still added to the blockchain though is not on main chain of the blockchain?
orphan blocks are good blocks made at the same time, but they don't join the main chain right away. They're added to the blockchain but might be replaced out later for a longer, more accepted chain.


Title: Re: Explanation on the orphan and stale block
Post by: Sinzu_ on November 04, 2023, 03:40:42 PM
Was reading about Blockchain on Wikipedia to know more historically about it but I stumbled upon something new to Me, which was about the orphan block, which are not included on the main chain of the blockchain. During my research I discovered it's also referred to as stale block then later found out that there is a difference between them. Please what is the difference?
https://www.talkimg.com/images/2023/11/04/tGifC.png
Also, according to the image above, why is the orphan block still added to the blockchain though is not on main chain of the blockchain?

so I also did a little digging and both don't seem that much different although depends on the concept of the blockchain...Orphan blocks are valid blocks, that can be mined but may not be accepted by the network as the next block in the chain.  they also are in blockchain networks that use a Proof of Work (PoW) consensus algorithm. on the other hand, stale blocks are more related to PoS or DPoS networks.


Title: Re: Explanation on the orphan and stale block
Post by: satscraper on November 04, 2023, 04:07:53 PM
~

I would advocate the  reading of  Pieter Wuille explanation  (https://bitcoin.stackexchange.com/questions/5859/what-are-orphaned-and-stale-blocks/5869#5869)on the difference between  orphan and stale blocks. In short: orphan block is a block which has no parent, stale block is a block the  transactions of which  can be seen in the following blocks.

BTW, according to  https://www.blockchain.com/explorer/charts/n-orphaned-blocks the last orphans were dated  back  as far as June 14th, 2017


Title: Re: Explanation on the orphan and stale block
Post by: OcTradism on November 06, 2023, 01:49:54 AM
Bitcoin Q&A: Empty Blocks, Orphan Blocks, and Valid Chains (https://www.youtube.com/watch?v=dizF2S63RXY)
Bitcoin Q&A: Orphaned Blocks and Stuck Transactions (https://www.youtube.com/watch?v=MsdW0CTYwyY)
Chain Reorganization (https://learnmeabitcoin.com/technical/chain-reorganisation)

Transactions in Orphan blocks are invalid transactions and miners who mined Orphan blocks don't get bitcoin from those blocks (invalid). They also can not spend coins in orphan blocks.