Consensys / quorum-kubernetes

Helm charts for Hyperledger Besu and GoQuorum
Apache License 2.0
119 stars 129 forks source link

How to update the genesis.json using transitions? #195

Closed YosukeAbe47 closed 1 year ago

YosukeAbe47 commented 1 year ago

Hello,

I'd like to update the genesis

I am using goquorum ver:22.7.1. Although I changed the setting of emptyBlockPeriodSeconds using transitions, no block was generated at the blockperiodseconds interval.

Here is my genesis:

{
      "nonce": "0x0",
      "timestamp": "0x58ee40ba",
      "extraData": "0xf87aa00000000000000000000000000000000000000000000000000000000000000000f854947e16b5f1c55eb6ce809e39f68670dfb22f7fed97942638a357ffb0116d489e4b7f2a80718a383a4dd79467b4d0fe257539a56212c1d1fbf088a6d10b3f7f94b163e980919d200447b890ea146653ee56cf2ff6c080c0",
      "gasLimit": "0x47b760",
      "gasUsed": "0x0",
      "number": "0x0",
      "difficulty": "0x1",
      "coinbase": "0x0000000000000000000000000000000000000000",
      "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
      "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "config": {
        "chainId": 1337,
        "homesteadBlock": 0,
        "eip150Block": 0,
        "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "eip155Block": 0,
        "eip158Block": 0,
        "byzantiumBlock": 0,
        "constantinopleBlock": 0,
        "isQuorum": true,
        "maxCodeSizeConfig": [
          {
            "block": 0,
            "size": 128
          }
        ],
        "txnSizeLimit": 64,
        "qbft": {
          "policy": 0,
          "epoch": 30000,
          "ceil2Nby3Block": 0,
          "testQBFTBlock": 0,
          "blockperiodseconds": 5,
          "emptyblockperiodseconds": 60
        },
        "transitions": [{
          "block": <FutureBlockNumber >,
          "blockPeriodSeconds": 5,
          "emptyBlockPeriodSeconds": 0
        }],
      },
      "alloc": {
        "0x9603d61fa6463b1b4732e72c20934b24f7ef6489": {
          "balance": "1000000000000000000000000000"
        },
        "0xd636793971c6dd7dc04744e5677cac40d7e9a432": {
          "balance": "1000000000000000000000000000"
        },
        "0xa59d2747ff59e8381ca6612da6debb1f4fab3e1d": {
          "balance": "1000000000000000000000000000"
        },
        "0x3c81ebab79dc53cd942caa79590f36c0b4db474b": {
          "balance": "1000000000000000000000000000"
        }
      }
    }

The actual steps I took for the update were as follows.

  1. stop all nodes (helm uninstall validator, rpc)
  2. kubectl edit cm -n quorum goquorum-genesis (mod transitions)
  3. restart all nodes (helm install rpc, validator)

Am I doing something wrong with the steps or settings?

Or would it be better to specify it directly in qbft?

"qbft": {
          "policy": 0,
          "epoch": 30000,
          "ceil2Nby3Block": 0,
          "testQBFTBlock": 0,
          "blockperiodseconds": 5,
          "emptyblockperiodseconds": 60  ->   0
        },

Can you help me please?

Regards,

YosukeAbe47 commented 1 year ago

I have resolved myself and will close the issue. My apologies.