Wednesday, March 29, 2023
HomeCrypto BasicsBlockchainWhat is a Stale Block in a Blockchain?

What is a Stale Block in a Blockchain?

- Advertisement -

The Bitcoin (BTC) blockchain was designed with the ability for miners to discover two blocks at the same time. However, only one of these blocks will be preserved by the chain, which qualifies the discarded block as a stale block. Although such an occurrence is relatively rare, let’s take a look at what these one-of-a-kind blocks are.

What is a Stale Block?

Stale blocks are blocks that are not accepted in a network due to a delay in their acceptance in the blockchain compared to another eligible block. Also called orphan blocks, stale blocks are removed from a blockchain completely, despite being valid and verified.

Note that conceptually a stale block is distinct from an orphan block. However, the term orphan block is still very widely used to designate outdated blocks.

Although most blockchains based on the Proof of Work (PoW) consensus can be subject to stale blocks, it is very often the Bitcoin blockchain that is taken as an example to present these blocks.

Such blocks arise when two different miners submit their valid blocks to a blockchain at the same time. This, therefore, induces a division of the chain until one of the blocks is abandoned. Although two blocks are verified and validated, only one is attached to the main chain.

Such a situation occurs because the acceptance of blocks in the blockchain by other nodes in the network does not happen instantaneously. For a stale block to appear, it must be mined a few seconds after the first block.

This delay in accepting a block can therefore cause another miner to solve the exact same block. This then results in a temporary misunderstanding in the blockchain, as the nodes try to determine which block should be validated and which will therefore be rejected.

When this relatively rare situation occurs, the block with the largest Proof-of-Work (PoW) share is accepted, while the other is discarded and considered a stale block.

The Particularities of a Stale Block

Sometimes stale blocks are not totally discarded. For example, in case it contains valid transactions before it was discarded, these will be added to the next valid block and will be listed normally in the blockchain.

Although to compensate for the use of its resources, a miner at the origin of a stale block could be rewarded.  He does not receive any satoshi in return for his efforts. Many miners consider this practice to be unjustified.

The generation of a stale block occurs purely by chance and is, therefore, under most circumstances, a natural occurrence. However, such blocks can be created when a malicious miner tries to rearrange a chain during a 51% attack.

In the example below, taken from analysis by BitMEX Research, a stale block emerged on January 27, 2020, at the height of 614.732. Thus, the block on the right has been rejected by the network, giving it the status of a stale block.

In the case below, the stale block was mined 29 seconds after the block was accepted by the network:

Representation of a stale block in a blockchain 

Stale blocks are, therefore, in the vast majority of cases, completely harmless and are self-controlled by the miners themselves. However, the fact that they are relatively rare usually causes amazement in the crypto-sphere. We are talking here about 1 to 3 occurrences per year.

So don’t panic, expired blocks are and will always be part of Bitcoin.

- Advertisement -
- Advertisment -

Most Popular