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
gethto its highest version
- I have kept the
go-ethereum/params/config.gofile as it is
- I have updated the
genesis.jsonfile by adding
"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
- 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.