quorum-kubernetes icon indicating copy to clipboard operation
quorum-kubernetes copied to clipboard

Enable alloc for quorum-besu & quorum-kubernetes

Open ILoomans opened this issue 2 years ago • 2 comments

Note: For this PR to work it will require consensys/quorum-k8s-hooks:qgt-0.2.15 to be published that will use quorum-genesis-tool 15, which has the ability to dynamically set prefuneded accounts!

It seems people have been trying to use the alloc parameter in respective genesis.yaml files, which currently does not actually do anything. I believe this is because the quorum-genesis-tool originally didn't allow users to dynamically set pretended accounts.

Issues:

here here

However the alloc feature was added in the latest version of quorum-genesis-tool through this pr

I updated QGT to the latest version in this pr, this means that we can now enable users to set prefunded addresses.

For example in genesis-best.yml rawGenesisConfig: genesis: config: chainId: 1337 algorithm: consensus: qbft # choose from: ibft2 | qbft | clique blockperiodseconds: 5 epochlength: 30000 requesttimeoutseconds: 20 alloc: 01F596ee3243dd61531240B72273d0aeF203847a: balance: "1000000000000000000000000000" gasLimit: '0x47b760' difficulty: '0x1' coinbase: '0x0000000000000000000000000000000000000000' includeQuickStartAccounts: true # set to t

Will set the balance of the 01F596ee3243dd61531240B72273d0aeF203847a address to "1000000000000000000000000000", which has been verified in postman using the getBalance rpm call which has a response of:

{ "jsonrpc": "2.0", "id": "90.0", "result": "0x33b2e3c9fd0803ce8000000" }

  • Note: The addition of --alloc does not override any other set accounts, such as the --quickstartdevaccounts

I believe this would be a useful addition! Let me know what you think

ILoomans avatar Oct 11 '23 17:10 ILoomans

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 11 '23 17:10 CLAassistant

I would also add --maxCodeSize {{ .Values.rawGenesisConfig.genesis.contractSizeLimit }} as it is a supported option for the genesis file. The bad thing is that quorum-genesis-tool doesn't add it to the besu genesis file when using QBFT.

I opened this PR on the quorum-genesis-tool repo asking for this to be added: https://github.com/Consensys/quorum-genesis-tool/issues/53

0xDones avatar Oct 12 '23 20:10 0xDones

Failed to pull image "consensys/quorum-k8s-hooks:qgt-0.2.15": rpc error: code = NotFound There are no images on Docker Hub. Should I use a different repository?

soaMan avatar May 22 '24 09:05 soaMan