简体   繁体   English

如何修改正在运行的私有 ethereum.network 的阻塞时间

[英]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.我有一个使用 PoA 共识在 geth 1.8 上运行的私有 Ethereum.network。 It consists of two nodes - one sealer node and one bootnode/RPC API node.它由两个节点组成——一个 sealer 节点和一个 bootnode/RPC API 节点。 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.当我创建创世文件时,我将阻塞时间设置为 3 秒,但它以这种方式生成了太多数据,我想将其设置为 ~10 秒。 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. 一旦您开始使用Block Time,它将在PoA共识中得到永久修复。 There is no command line option for it. 没有命令行选项。 In genesis of clique (geth implimention of PoA), we can see "period": 3 (3 second) in 在派系的产生(PoA的实现)中,我们可以看到"period": 3 (3 second)

"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.你将不得不用新的秒更改创世块并重新启动 the.network。 There is no way to do this once the.network is started.一旦.network 启动,就无法执行此操作。 Note: Of course the.network will lose all data.注意:当然,.network 会丢失所有数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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