I am just wondering and struggling to understand how blockchain developers of crypto coins like BTC, ETH, etc. manage to update the code due to the consensus nature. Do they stop all nodes, so later on push the updated code and then run again and they sync to reach consensus again? if yes. How were forks prevented in that case? Or somehow they manage to update the source code without pull plug nodes but instead to have them running up and fully functional?

1

There are 1 best solutions below

0
On

For forks, both soft and hard

  • Software of different nodes, sometimes called clients, is prepared ahead of time
  • Validators, RPC providers and other teams running full nodes update their software
  • The software contains activation for hard fork rules to occur at a specific block. It can be a fixed block number or a dynamic block number. For example, Ethereum proof-of-stake was set to activate at a block height derived from proof-of-work mining difficult.
  • If consensus (2/3) of block producers upgraded the software, the new version is the canonical chain
  • Node runners who did not upgrade their software can no longer sync the network

The blockchain never stops. Neither Bitcoin nor Ethereum have paused of halted for many many years. Uptime is generally much better than on traditional IT systems due to distributed and censorship resistant nature.

Ethereum mainnet upgrade from proof-of-work to proof-of-stake was one of the most complex and most co-ordinated hard fork, and also software upgrade, ever performed in the terms of human work years involved.