Does your Ethereum node experiences errors such as: invalid gas used, BAD BLOCK 3660663, Synchronisation failed? Due to a planned breaking change, a node upgrade is necessary.

Problem with broken node

On January 9, 2019 I was developing a Lightstreams DApp connected to a Rinkeby test network where out of the blue, my node got out of sync.

geth_not_synced

########## BAD BLOCK #########
Chain config: {ChainID: 4 Homestead: 1 DAO: <nil> DAOSupport: true EIP150: 2 EIP155: 3 EIP158: 3 
Byzantium: 1035301 Constantinople: <nil> Engine: clique}
Number: 3660663

Error: invalid gas used (remote: 1496942 local: 1530542)
Synchronisation failed, dropping peer

To notice:: Constantinople: <nil>, Byzantium: 1035301, Number: 3660663

invalid_gas

Investigating the issue bit further, I recalled the following long planned breaking change of Constantinople hardfork and its implementation in the following commit of Geth 1.8.20. If you are at this point thinking what I did, then no, I have no idea why a minor release version can cause a hardfork…

Anyway…

Solution

Fortunately, the solution is rather easy. Upgrade your node to the latest Geth 1.8.20. Download page..

ALERT

Due to an emergency hotfix, UPDATE TO GETH 1.8.21. More details.

Verify the installation:

geth version

> Version: 1.8.21-stable

Re-run Geth, output:

INFO Initialised chain configuration config="{
    ChainID: 4 
    Homestead: 1 DAO: <nil>
    Byzantium: 1035301
    Constantinople: 3660663
    Engine: clique
 }"

INFO Loaded most recent local header number=3660662
INFO Block synchronisation started
INFO Imported new chain segment blocks=190 txs=2253
INFO Imported new chain segment blocks=410 txs=6200
...
...
INFO Imported new chain segment blocks=1 txs=10

Works like a charm.

geth_const_fixed

fully_synced_again

Extra hardfork details

As I am writing this blog post on Saturday 12th, yesterday, on January 11 Ethereum foundation announced via this blog post the block numbers of constantinople hardfork and other details.

Most interesting details

  • Mainnet will hardfork at block number 7,080,000 and Rinkeby at 3,660,663 , which is a funny palindrome

palindrome_conv

  • Some new fancy bitwise shifting instructions in EVM

  • Oh, and BTW, difficulty bomb causing 30s block times will be delayed by 12 months aka postponed ICE AGE

  • Lower block rewards, 2 ETH from previous 3 from previous 5 ETH

Summary

Overcoming constantinople hardfork on Rinkeby testnet was seamless but I would like to pause for a second and remind all developers and crypto enthusiasts a little detail about “decentralization” to stop the Twitter madness.

BTC Useless Not decentralized, controlled by private pools mining empty blocks and cashing rewards
ETH Transparent smart contracts with strong, growing community Decentralized as much as XRP. One foundation and a team of developers calling shots with majority of inhouse miners
XRP Scalable payment ledger Decentralized as much as Ethereum if not more due to more diversified set of validators, entities. One company and a team of developers calling shots

As you can see, decentralization atm of writing this blog post doesn’t exist. Let’s just nail transparency first and maybe one day we can solve the decentralization as well.

Don’t take me wrong, I am a big fan of Ethereum foundation, XRP ledger and general crypto space but these are still early days and developers and exchanges have all the power when it comes to forks, upgrades and a valid ledger (your balance $) whenever you like it or not so let’s stop arguing and rather focus on delivering features that will actually improve current state of corporate software abusing humans via data violations and shady non-transparent greedy deals.

Next steps

↓↓↓ Subscribe to the newsletter bellow ↓↓↓


Thx for reading,
Gopher Lukas