Updates & Forks - Discussion

It is possible for a node to accept two blocks that are mined from competing miners, but not sure if those blocks can be received at the same time, what usually happen nodes will consider the first block they receive as part of their blockchain, but also keep the second block they receive just in case . However, the second block to arrive will not be considered as part of their active blockchain. Consequently, nodes on the network will actually be in disagreement about which of these two blocks belongs at the top of the chain. This disagreement is resolved when the next block is mined. The next block will build on top of one of these blocks, creating a new Longest chain of blocks, and as a rule nodes will always adopt the longest known chain of blocks as their active blockchain.

1 Like

Your reply makes sense in the case of "collisions - the node will still over rule another block for the longest chain. Thank you for the insight.

The way it was explained using the blue(turquoise) blocks that end up as the longest could just aswell have been explained using the green blocks.To me it was not really clear how the network would choose the correct/longest chain.Is it just random depending on location/how far nodes are from each other and depending how fast the new block gets propegated and adopted by the network making/establishing the longest chain/the truth?

This will answer ur questions https://learnmeabitcoin.com/technical/longest-chain

It only tells you what happens and not exactly why it happens just like in the videos of this academy.My only take from this would be :due to the unpredictability of mining and the speed of broadcasting data across a network…which comes back to my question of why it seems to me that the answer is random due to the speed that mesages gets transmitted across the network,my guess would possibly be distance between nodes and computing power maybe.Could you or someone please clarify this for me.Thanks for the help

Or is it that when the chain splits/forks some miners will be adding to the one block and others miners will be adding to the other block depending on how far they are from the miner that produced the block and propegated the msg to them first,so now we have two chains.Some miners chose the one chain/block and others on the other one…So lets say the one is the new blue chain/block and the other the new red chain/block,they keep on mining so if a miner from lets say the red chain solves the next block first and adds it to the red chain making the red chain the longest/the truth then everybody will continue with that red chain.

Exactly, temporary forks happens let take an example we have to miners, miner A is in China and miner B is in America. Those miners mine a block at the same time and their block is broadcasted to the network, and we have other miners in China as well as in America, since it takes for a data to broadcasted over the network the miners in China will receive faster the block mined by A and the same in America they receive the block closer to them faster in that case block mined by B and they will start to mine the next block, this is resolved whenever a block for the next height is found. The ā€œbest chainā€ is always a probabilistic determination, but the confidence quickly rises as more blocks get added (hence the recommendation in the white paper to wait for six confirmations). Nothing prevents a miner to continue mining on a stale chain. However, a miner cannot spend the block reward if the block does not become part of the best chain.

Thanks ,makes sense now.

Hey, is there some forks that can and can’t enter the block?

I really don’t understand your question, what do you mean by entering the block.

My question is in regards to this statement, ā€œTo avoid a hard fork 100% of the network must updateā€. Does this mean 100% of the entire network (miners and nodes) must update? Or just 100% of the miners? I’m thinking the miners because they are who create the blocks.

Mining nodes are just special nodes. So to avoid hard fork every node(miner nodes and full nodes) in the network should update.

What happens if there is a soft fork and only after a period of 1 year over 50% of the hash rate is generated by nodes that have updated to the new set of rules? Does an entire year of transactions on the old fork get dropped and go back in to the mempool? Is there a time limit for how long a soft fork can be dropped before 50% of the network updates?

The hard and the soft fork that enter the blocks for nodes

A soft fork is a software upgrade that is backwards compatible with older versions that means all participants, whether they’ve updated or not will continue to recognise new blocks and maintain compatibility with the network. So it is very in practical for a soft fork to go for a period of one year before it get resolved.

Soft work is an update in software but it is backwards compatible, all participants whether they’ve updated or not will accept the new block created by a miner that updates the software. In the case of a hard fork, the block is only accepted by nodes that agree with the new rule.

But what happens after 50% of the network updates? @filip said that once 50% of the network updates, the new protocol will form the longer chain and the old protocol will fall off and the transactions will go back to the mempool. If a soft fork goes on for a year and then the transactions go back to the mempool, the money may have already been spent. That is a lot of transactions.

If a soft fork creates a fork for a year, this is creating a permanent fork(hard fork) not a soft fork. A soft fork upgrade is designed to avoid a permanent fork.

Does a change in rules go back to the genesis block? Or just into the future? Ie are new blocks mined if (e.g.) the size rule changes going back in time or only forward?

The two chain will have the same history but different future.