5

We have a private network with geth 1.4.18 clients. We have 3 miners (each owned and managed by a different company) and a number of sync-only nodes. Now we would like to upgrade the network to 1.5.5. Since 1.5.5 includes the last hard fork, how do we smoothly switch the miners to the new consensus? Can we set a target block for the hard fork like it was done in the mainnet? Or do we have to simultaneously stop all nodes, upgrade and restart after all companies have upgraded?

2

while all the nodes are under your control you don't need to set a block you need to just stop(mining) wait for the all nodes to be synced and afterward update them.

  • Ok, I'll try it. However, if they wouldn't be under my control (for instance different companies in within the private network are maintaining the nodes), would it be possible to configure geth to switch to the new protocol from a specific block number in the future? – ivicaa Dec 18 '16 at 22:15
  • I did that built the new updated geth, but when I start geth, eth.blockNumber starts from 0. I am using the same data directory I had before. – Ramesh Pareek May 20 '18 at 12:16
1

Without changing geth's code, it is not possible to reconfigure target blocks for feature activations (EIPs, ...). The configuration is fixed via constants in the code (see ChainConfig). A custom configuration can be provided in genesis specification file, however, this is only applicable when setting up a new chain.

Hence, currently the only way to make a hard fork in a private network is to ensure that all participants shutdown/upgrade/restart in a predefined time slot.

  • 1
    That is possible but can you guide me a step by step process. I mean how do I – Ramesh Pareek May 12 '18 at 3:24
  • I changed geth's code, But How can I retain the previous blocks? – Ramesh Pareek May 20 '18 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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