I am able to hard fork my private chain into first Constantinople and than to Istanbul, please see the answer for it.
My approach is:
- I have updated
geth
to its highest version - I have kept the
go-ethereum/params/config.go
file as it is - I have updated the
genesis.json
file by adding"constantinopleBlock": 2862930
,"petersburgBlock": 2862930
, and"istanbulBlock": 3831182
. Block numbers are selected based on my chain. - I have removed the chain.
sudo rm -rf chaindata lightchaindata
- Initialized my chain by started it with
geth init
- Finally, I have started my chain, which started to sync from 0th block
I have tried this without removing the chain but it did not work. So from scratch since genesis block should be updated, I am syncing the chain from 0th, block which is very uniefficient.
[Q] I was wondering is it possible to hard fork a private network without resyncing chain from the 0th block? This approach is inefficient to sync few GB all over again for all the nodes on the network.
geth
starts as:Istanbul <Nil>
that's the way I was able to check it.