7

It is said that the transition from Frontier to Homestead will be done by a hardfork. What does it mean exactly? Are hardforks expected to also be used in future Ethereum upgrades?

3 Answers 3

8

A hardfork is a change in the protocol that is not backwards compatible, ie transactions from nodes running the older software will not be considered valid.

With a soft fork nodes running an older version of the software could still publish valid transactions, they will just not have the latest and greatest features.

1
  • Look at the --illegal-code-hashes in the geth pull. The mined blocks using smart code with these hashs will be ignored. Mining with old version of software will produce ignored blocks.
    – Ellis
    Commented Jun 21, 2016 at 19:34
5

A hardfork is a situation where by consensus the ethereum peers agree to change the blockchain protocol spec as of a certain block number. The Homestead release has been hardcoded into the current ethereum clients to occur at block number 1,150,000. Nodes need to be upgraded to the latest release in order to continue functioning correctly after the Homestead hard fork at block number 1,150,000. For Geth you need to install version 1.3.5 at the time of this posting:

https://github.com/ethereum/go-ethereum/releases/tag/v1.3.5

As for your second question, yes hardforks will definitely be used in the future. Fore example when Ethereum moves to Proof of Stake mining.

3

The short and precise definition is provided by BIP 123:

Hard Forks

In a hard fork, structures that were invalid under the old rules become valid under the new rules.

Soft Forks

In a soft fork, some structures that were valid under the old rules are no longer valid under the new rules. Structures that were invalid under the old rules continue to be invalid under the new rules.

An article in Bitcoin Magazine explains further, and here are snippets:

Bitcoin's consensus rules can be changed in two ways. A change that adds extra rules to the protocol (making previously valid blocks invalid) is called a soft fork. Soft forks require a majority of hash power to support the change. The blocks that are produced under the new rules would be valid under the old rules as well, so nodes that didn’t upgrade would still follow the longest chain.

A consensus rule change that removes rules from the protocol (making previously invalid blocks valid) is called a hard fork. A hard fork requires all full nodes on the network to adopt. Any node that doesn't implement the change might not follow the longest chain at all, as it could consider that chain invalid and stay on the “old” chain instead.

The article mentions Bitcoin, but also applies to Ethereum, including the conclusion:

Hard fork changes to the consensus rules without consensus could -- in a worst-case scenario -- split the Bitcoin network.

A hardfork is expected to be used in future Ethereum upgrades, such as removing Proof of Work and replacing it with the Casper Proof of Stake algorithm.

EDIT:

Ethereum is generally hard to soft-fork; the reason is that unlike bitcoin, where scripts return a 0 or 1 to signify whether a transaction is valid, and so you can always just add a rule to turn some 1s into 0s, in ethereum scripts execute state changes, so it's not a matter of transactions being valid vs invalid as it is a matter of transactions having different effects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.