Monday, December 23, 2024

blockchain fork – Is the stale block (its header) accepted provided that it extends the prevailing stale chain tip or it is just crucial that the mother or father is thought?

After I write “accepted” for non-main (canonical) chain blocks, I imply on accepting and storing their headers, not whole blocks. Extra request for a whole block is completed as soon as the chain its a part of grew to become a brand new essential chain (chain with most complete work).

I do know {that a} node solely accepts blocks for which it is aware of the mother or father (if it does not know, block is taken into account as orphaned and rejected). Nonetheless, does that mother or father need to be solely one of many chain ideas, or the mother or father can be any of the blocks from any of the branches (both essential or one of many forks)?

For instance, we now have following chains:

essential chain: 100.000th blocks (chain tip: 100.000)
chain_1: diverged from essential chain at 60.000th block and has extra 30 block (chain tip: 60.030)
chain_2: diverged from essential chain at 20.000th block and has extra 5 blocks (chain tip: 20.005)

Will a block be accepted provided that its mother or father is the 100.000th block of the essential chain, the 20.005th block of the chain_2, or the 60.030th block of the chain_1, so chain ideas? Or will the block even be accepted if its mother or father just isn’t a number of the chain ideas however, for instance, the 86.004th block of the essential chain, the 20.002nd block of the chain_2, the 60.026th block of the chain_1 and many others., so “random” block from a number of the chain?

After I say accepted, I imply as a stale block (we obtained solely header). So solely validation of PoW and mother or father hash is completed and if all the things is correct, it’s accepted. Additionally, it’s checked whether or not it may need grow to be the brand new essential chain. In that case, it turns into essential chain and extra checks comply with.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles