You are viewing a single comment's thread from:

RE: Another blockchain puzzle: Last irreversible blocks

in #blockchainlast year (edited)

As a first approach, I would consider the witness shuffle...

Makes sense. I noticed yesterday that the 1000 block number with a gap of 15 from head to last irreversible is not too far from (1/3), which is (1 - 2/3) whereas (2/3 + 1) is the number of confirmations needed. Maybe it's something to do with witnesses trying to build on a reversible block that they already built on in the previous round? Maybe it needs 15 unique confirmations?

Update:

I wasn't finding anything to that effect in the code, so I downloaded it and chatted about it with ChatGPT - EasyCode. He says that's not the case:

Yes, you are correct. If the required number of (additional) confirmations for a block to become irreversible is 14, and there are no missed blocks, the gap between the head block and the last irreversible block (LIB) should indeed be 15 blocks. Here’s the reasoning behind this:

Explanation:

Understanding Confirmations:

For a block to be considered irreversible, it must be confirmed by a certain number of witnesses. In this case, if 14 (additional) confirmations are required, it means that at least 14 different witnesses must validate the block.

Block Production:

When a new block is produced (let's call it Block #N+1), it is built on top of Block #N. This means that Block #N is confirmed by the witness that produced Block #N+1.

Counting the Gap:

If Block #N is the last irreversible block, then:
Block #N+1 is produced and confirms Block #N.
Block #N+2 can be produced by another witness, confirming Block #N+1.
This continues until Block #N+14, which will be the 14th confirmation of Block #N.
Therefore, the next block (Block #N+15) will be the first block that is produced after Block #N has received the required 14 confirmations.

Conclusion:

As a result, if there are no missed blocks, the head block (Block #N+15) will be 15 blocks ahead of the last irreversible block (Block #N). This is because the head block is the most recent block, while the last irreversible block is the last block that has received the necessary confirmations.

Summary:

If 14 confirmations are required for a block to become irreversible and there are no missed blocks, the gap between the head block and the last irreversible block should indeed be 15 blocks. This ensures that the last irreversible block has been confirmed by the required number of witnesses, and the head block reflects the most recent state of the blockchain.

And

In the context of the Steem blockchain, there are mechanisms in place to ensure that witnesses can confirm blocks, but there are no inherent limitations that prevent a witness from confirming a reversible block that it had previously confirmed. Here’s a detailed explanation of how this works:

Key Points:
Witness Confirmation:

Each witness can confirm blocks independently based on their own view of the blockchain. When a witness produces a block, they are effectively confirming the validity of the previous block (the parent block) by including its hash in the new block.

Shuffling of Witnesses:

The Steem blockchain employs a witness schedule that can shuffle the order of witnesses. This means that the order in which witnesses are called to produce blocks can change, but it does not affect their ability to confirm blocks.
Even if a witness has previously confirmed a block, they can confirm it again if they produce a new block that references it. This is part of the normal operation of the blockchain.

Reversible vs. Irreversible Blocks:

A block is considered reversible until it has received enough confirmations from witnesses to be deemed irreversible. The last irreversible block (LIB) is determined by the consensus of the witnesses.
If a witness produces a new block on top of a reversible block, they are confirming that block again. However, this does not change the status of the block unless enough witnesses confirm it to make it irreversible.

Consensus Mechanism:

The consensus mechanism relies on the collective agreement of witnesses. If a witness confirms a block, it contributes to the overall count of confirmations. However, the block will only become irreversible once the required number of confirmations is reached.

Potential for Forks:

If a witness confirms a block that is later found to be invalid (e.g., due to a competing block produced by another witness), it can lead to a temporary fork. The blockchain will eventually resolve this fork based on the longest chain rule, where the chain with the most cumulative proof of work (or the most confirmations) is considered the valid chain.

Summary:

There are no limitations preventing a witness from confirming a reversible block that it had previously confirmed. The shuffling of witnesses does not affect their ability to confirm blocks. Each witness can independently confirm blocks based on their own view of the blockchain, and the consensus mechanism ensures that blocks are eventually deemed irreversible based on the collective confirmations of the witnesses.

Sort:  
Loading...

Coin Marketplace

STEEM 0.06
TRX 0.31
JST 0.060
BTC 66360.41
ETH 1997.94
USDT 1.00
SBD 0.50