What is the difference between a softfork and a hardfork?
A hard fork requires all nodes to be updated. The rules are changed in such a
way that previous invalid blocks become valid. The ruleset needs to be more
inclusive to allow for the new blocks to be accepted. That inclusion requires a
new currency with a new network in place. Unupdated nodes won’t be able to
accept new block types nor interact with new nodes.
With a soft fork, the rules change in such a way that previous valid blocks may
become invalid and therefore the ruleset needs to be more exclusive. This means
that old nodes may still accept the new blocks and therefore a new network will
not be required.
Understanding this from a software engineering perspective by looking or
discussing what in the source code has required this may help me comprehend this
better but for now, will be taking this at face value.
What are some of the reasons why you would do a hardfork?
As mentioned earlier, if the rules change in such a way that the network needs
to be more inclusive of invalid blocks, a hard fork would be required. The old
nodes won’t be able to accept new nodes with the new criteria so the nodes all
need to be updated.
What are some of the risks with performing a hardfork?
One risk is that since we have a new network with all the previous transactions,
double spending would be possible. Old UTXO’s in the older network may still
be used while the new UTXO’s in the newer network are also available.
Since there is two networks, we run another risk of having some people use one
network while the others use the other, splitting not only the value of the
currency in two networks but also the global hash rate available to mine the
currencies. The concept of multiple networks introduces multiple currencies and
may indicate confusion to some unless older networks are completely discarded
with all coins transferred to the new network to avoid people from losing their
currencies.