0

I've created a GoQuorum network and I'm looking for ways to change the way the network operates in future, while also preserving the blockchain when I do so.

From the GoQuorum docs I know that the "transitions" field in genesis.json is supposed to enable changes starting with block x. However, this feature is not well documented. Looking at the source code I gather what specifically can be changed.

Now I wonder about other params, like the gasLimit per block. This is not a parameter that can be included in the "transitions" field, so how would I change it?

Would this necessarily require a hard fork?

If so, how do I create a hard fork for this purpose? What can vs. cannot change in a genesis.json if the goal is to keep the genesis block as it is?

I'm familiar with the GoQuorum docs on the genesis.json. I reckon that certain genesis params must remain as they are (like "alloc", as shown in this thread), while some fields in "config", e.g. the ones referring to scheduled hard fork blocks, can be changed without affecting the genesis block. Is this correct?

I'm also aware of the official geth docs on private networks, but quorum seems to handle fields like "constantinopleFixBlock" differently. The docs state: In private networks, the milestone block defines the protocol version for the network.

1 Answer 1

1

The way geth handles hard forks is different. Generally speaking geth will have a a bunch of changes at a block height that are irreversible.

With Quorum we wanted to be more flexible with things and started introducing the idea of transitions in v22.4. You're right the docs are out of date in some cases. At the moment you can specify a transition for any of the following.

https://github.com/ConsenSys/quorum/blob/master/params/config.go#L451

type Transition struct {
Block                        *big.Int              `json:"block"`
Algorithm                    string                `json:"algorithm,omitempty"`
EpochLength                  uint64                `json:"epochlength,omitempty"`                  // Number of blocks that should pass before pending validator votes are reset
BlockPeriodSeconds           uint64                `json:"blockperiodseconds,omitempty"`           // Minimum time between two consecutive IBFT or QBFT blocks’ timestamps in seconds
EmptyBlockPeriodSeconds      *uint64               `json:"emptyblockperiodseconds,omitempty"`      // Minimum time between two consecutive IBFT or QBFT a block and empty block’ timestamps in seconds
RequestTimeoutSeconds        uint64                `json:"requesttimeoutseconds,omitempty"`        // Minimum request timeout for each IBFT or QBFT round in milliseconds
ContractSizeLimit            uint64                `json:"contractsizelimit,omitempty"`            // Maximum smart contract code size
ValidatorContractAddress     common.Address        `json:"validatorcontractaddress"`               // Smart contract address for list of validators
Validators                   []common.Address      `json:"validators"`                             // List of validators
ValidatorSelectionMode       string                `json:"validatorselectionmode,omitempty"`       // Validator selection mode to switch to
EnhancedPermissioningEnabled *bool                 `json:"enhancedPermissioningEnabled,omitempty"` // aka QIP714Block
PrivacyEnhancementsEnabled   *bool                 `json:"privacyEnhancementsEnabled,omitempty"`   // privacy enhancements (mandatory party, private state validation)
PrivacyPrecompileEnabled     *bool                 `json:"privacyPrecompileEnabled,omitempty"`     // enable marker transactions support
GasPriceEnabled              *bool                 `json:"gasPriceEnabled,omitempty"`              // enable gas price
MinerGasLimit                uint64                `json:"miner.gaslimit,omitempty"`               // Gas Limit
TwoFPlusOneEnabled           *bool                 `json:"2FPlus1Enabled,omitempty"`               // Ceil(2N/3) is the default you need to explicitly use 2F + 1
TransactionSizeLimit         uint64                `json:"transactionSizeLimit,omitempty"`         // Modify TransactionSizeLimit
BlockReward                  *math.HexOrDecimal256 `json:"blockReward,omitempty"`                  // validation rewards
BeneficiaryMode              *string               `json:"beneficiaryMode,omitempty"`              // Mode for setting the beneficiary, either: list, besu, validators (beneficiary list is the list of validators)
MiningBeneficiary            *common.Address       `json:"miningBeneficiary,omitempty"`            // Wallet address that benefits at every new block (besu mode)

Note MinerGasLimit

You could in theory perform a transition with an alloc at a block height, but it's not implemented.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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