When does a blockchain fork resolution happen?

2

I understand that the forks are resolved by largest proof-of-work etc. but when do the miners decide to resolve a fork? Is it a network consensus or do each individual miner resolve at their own pace?

Larrrrrrrrrry

Posted 2018-09-28T04:10:00.067

Reputation: 33

Answers

1

Each node will usually resolve and reorganize their local chain as soon as they are made aware of a chain with more work.

If two blocks are mined at block height N, there is a fork. As soon as a single N+1 is mined and broadcasted, any nodes that receive it will keep the block N that it builds upon, and orphan the other block as there is now one chain with more work.

This is what makes block withholding attacks possible, as an attack could broadcast several blocks at once, which suddenly present a new, longer, valid chain.

Raghav Sood

Posted 2018-09-28T04:10:00.067

Reputation: 10 897

That is assuming that the miners are honest right? If let's say a group of miners are colluding, can they withhold from resolving until they are sure that their chain is longer?Larrrrrrrrrry 2018-09-28T04:35:40.903

Yes, that's exactly what a block withholding attack is - One or more miners don't broadcast their blocks until they want to, and broadcast entire sections at onceRaghav Sood 2018-09-28T04:36:38.267

1It really shouldn't be called an "orphan" block, because the block's parent is present and doing fine. ;) It's the transactions in the extinct block or stale chain-tip that are orphaned by the block no longer being part of the most-work chain.Murch 2018-09-28T23:11:38.363