hyperledger / besu

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
1.52k stars 846 forks source link

Change blockperiodseconds in Genesis #2952

Closed damianlluch closed 3 years ago

damianlluch commented 3 years ago

Hi, to change the block generation time of a project that is already started, I should just stop the nodes and change the blockperiodseconds value in the genesis file and run the nodes again, right? thanks

atoulme commented 3 years ago

No, it will invalidate the existing chain.

macfarla commented 3 years ago

@damianlluch @atoulme - We have just recently added support for configuring the block period for IBFT2 and QBFT for an existing chain using transitions. This will be included in Besu 21.10.1 release - you can have look at this PR for the details https://github.com/hyperledger/besu/pull/2902

sambacha commented 3 years ago

Doesn't quorum use nanoseconds? Wouldn't you have to specify this in the appropriate measurement? Its raft based consensus isn't it. This is the whole reason why there is a separate web3 package for qbft.

jframe commented 3 years ago

Both Besu and Quorum use seconds to define the block period. For Besu see https://besu.hyperledger.org/en/latest/HowTo/Configure/Consensus-Protocols/IBFT/#block-time and for Quorum https://docs.goquorum.consensys.net/en/stable/Reference/CLI-Syntax/#istanbulblockperiod.

Besu doesn't currently support a raft based consensus mechanism. Both IBFT2 and QBFT are byzantine fault tolerant style consensus mechanisms.

damianlluch commented 3 years ago

We changed the value in genesis and it worked.

sambacha commented 3 years ago

Both Besu and Quorum use seconds to define the block period. For Besu see besu.hyperledger.org/en/latest/HowTo/Configure/Consensus-Protocols/IBFT/#block-time and for Quorum docs.goquorum.consensys.net/en/stable/Reference/CLI-Syntax/#istanbulblockperiod.

Besu doesn't currently support a raft based consensus mechanism. Both IBFT2 and QBFT are byzantine fault tolerant style consensus mechanisms.

Quorum has RAFT consensus which is what I am referring to which does not use seconds, it uses nano seconds. That is a separate issue from changing the fixed blocksPerSeconds, which would invalidate the chain pre-hardfork