简体   繁体   中英

How to modify blocktime of a running private ethereum network

I have a private Ethereum.network that is running on geth 1.8 using PoA consensus. It consists of two nodes - one sealer node and one bootnode/RPC API node. When I created the genesis file I set the blocktime to 3s but it generates too much data this way and I want to set it to ~10s. How can I do this without loosing previous transactions and data?

Once you have started with Block Time then it will be fixed forever in PoA consensus. There is no command line option for it. In genesis of clique (geth implimention of PoA), we can see "period": 3 (3 second) in

"clique": {
      "period": 3,   
      "epoch": 30000
    }

I think you are aware of this now so unless you change in current protocol on how to cope with blockchain data on changing block time or how to change the block time, you have no other option till now.

You will have to change the genesis block with the new seconds and restart the.network. There is no way to do this once the.network is started. Note: Of course the.network will lose all data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM