
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
quorum-genesis-tool
Advanced tools
A utility that lets developers create genesis files and node (&account) keys from ConsenSys!
NOTE: Where possible, based on the consensus algortithm selected, the Quorum Genesis Tool will create keys and genesis files for both HLF Besu and GoQuorum and you can pick the one you'd like to use. At present only QBFT has cross client compatibility.
Create the artifacts with:
npx quorum-genesis-tool
___
/ _ \ _ _ ___ _ __ _ _ _ __ ___
| | | || | | | / _ \ | '__|| | | || '_' _ \
| |_| || |_| || (_) || | | |_| || | | | | |
\__\_\ \__,_| \___/ |_| \__,_||_| |_| |_|
/ ___| ___ _ __ ___ ___ (_) ___
| | _ / _ \| '_ \ / _ \/ __|| |/ __|
| |_| || __/| | | || __/\__ \| |\__ \
\____| \___||_| |_|_\___||___/|_||___/
_____ _
|_ _|___ ___ | |
| | / _ \ / _ \ | |
| || (_) || (_) || |
|_| \___/ \___/ |_|
Welcome to the Quorum Genesis Tool. This tool can be used
to rapidly generate genesis, account keys, and configs for Besu and GoQuorum.
To get started, be sure that you have read Besu and GoQuorum documentation regarding
genesis config options, then answer the following questions.
Which consensus algorithm will you use? Default: QBFT
1. IBFT1
2. IBFT2
3. QBFT
4. Clique
5. RAFT
Set your chainID value: (integer) Default: 1337
Set your blockperiodseconds value: (integer) Default: 5
(GoQ only) Set your emptyblockperiodseconds value: (integer) Default: 60
Set your requestTimeoutSeconds value: (integer) Default: 10
Set your epoch length value: (integer) Default: 30000
Set your difficulty: (integer) Default: 1
Set your gas limit value: (string) Default: 0xFFFF
Set your coinbase address for rewards: (string) Default: 0x0000000000000000000000000000000000000000
Set your max code size value: (integer) Default: 64
Set your transaction size limit value: (integer) Default: 64
Choose number of validator node keys to generate: (integer) Default: 4
Choose number of member node keys to generate: (integer) Default: 1
Choose number of bootnode node keys to generate: (integer) Default: 2
Set your account password: (empty for none)
This prompts you to pick a consensus algorithm variant, and specifics for your genesis file. By default,
artifact files are stored at ./output/<TIMESTAMP>, where TIMESTAMP is the time in a user friendly string:
Alternatively, you can use cli options and skip the prompt above like so:
npx quorum-genesis-tool --help
Options:
--help Show help [boolean]
--version Show version number [boolean]
--consensus Consensus algorithm to use
[string] [required] [choices: "ibft", "ibft2", "qbft", "clique", "raft"]
[default: "qbft"]
--chainID ChainID for blockchain
[number] [required] [default: 1337]
--blockperiod Number of seconds per block
[number] [required] [default: 5]
--requestTimeout Minimum request timeout for each round
[number] [default: 10]
--emptyBlockPeriod Reduce number (seconds) of blocks produced when there
are no transactions [number] [default: 60]
--epochLength Number of blocks after which votes reset
[number] [required] [default: 30000]
--difficulty Difficulty of network[number] [required] [default: 1]
--gasLimit Block gas limit
[string] [required] [default: "0xFFFF"]
--coinbase Address to pay mining rewards to
[string] [default: "0x0000000000000000000000000000000000000000"]
--maxCodeSize Maximum contract size (kb) [number] [default: 64]
--txnSizeLimit Maximum transaction size (kb) [number] [default: 64]
--validators Number of validator node keys to generate
[number] [required] [default: 4]
--members Number of member node keys to generate
[number] [required] [default: 1]
--bootnodes Number of bootnode node keys to generate
[number] [required] [default: 2]
--accountPassword Password for keys [string] [default: ""]
--outputPath Output path relative to current directory
[string] [default: "./output"]
--tesseraEnabled Whether to generate tessera keys
[boolean] [default: false]
--tesseraPassword Set password to encrypt generated keys
[string] [default: ""]
--quickstartDevAccounts Include quorum-dev-quickstart test accounts
[boolean] [required] [default: false]
--alloc Defines accounts with balances
[string] [default: "{}"]
To generate keys for QBFT (default) with 4 validators, 2 bootnodes and 2 members:
npx quorum-genesis-tool --consensus QBFT
To generate config for HLF Besu using QBFT
npx quorum-genesis-tool --consensus qbft --chainID 400 --blockperiod 5 --requestTimeout 10 --epochLength 30000 --difficulty 1 --gasLimit '0xFFFFFF' --coinbase '0x0000000000000000000000000000000000000000' --validators 4 --members 0 --bootnodes 2
To generate config for GoQuorum using IBFT
npx quorum-genesis-tool --consensus ibft --chainID 400 --blockperiod 5 --requestTimeout 10 --epochLength 30000 --difficulty 1 --gasLimit '0xFFFFFF' --coinbase '0x0000000000000000000000000000000000000000' --validators 4 --members 1 --bootnodes 0
Eth Accounts
For each node (bootnode/validator/member) an account is generated (files in their respective directories start with account*) to perform transactions and prefilled with a large balance. If you would like to remove or edit certain accounts from the genesis before the network has been spun up, you can find the genesis for Besu and goQuorum under each of their respective directories (besu/genesis.json or goQuorum/genesis.json).
If the flag quickstartDevAccounts is set to true, it will include the quorum-dev-quickstart test accounts. It is important to remove these accounts when going into production!
If the flag is not specified, then it will default to false with the assumption that the genesis is to be used in production. You should specify the flag only if you would like the accounts in testing/dev.
Tessera Passwords and Configuration
If you opt to provide a tesseraPassword to encrypt the tessera private keys, you will need to pass a passwordFile field with the password in a file. You will also need to update the privateKeyPath and publicKeyPath to the paths where you store your keys. See more here.
Once generated, the output should resemble the file structure below.
βββ validator0
β βββ nodekey # the node private key
β βββ nodekey.pub # the node's public key which is used in the enode
β βββ address # the node's address which is used to vote the validator in/out
β βββ accountAddress # GoQuorum only - the accountAddress
β βββ accountKeystore # GoQuorum only - the account's v3 keystore
β βββ accountPassword # GoQuorum only - the account's password (you would have supplied this)
β βββ accountPrivateKey # GoQuorum only - the account's private key
β βββ ...
βββ validatorN
β βββ nodekey # the node private key
β βββ nodekey.pub # the node's public key which is used in the enode
β βββ ...
|
βββ bootnodeN
β βββ nodekey # the node private key
β βββ nodekey.pub # the node's public key which is used in the enode
β βββ ...
|
βββ memberN
β βββ nodekey # the node private key
β βββ nodekey.pub # the node's public key which is used in the enode
β βββ ...
|
βββ besu
β βββ static-nodes.json # a list of static nodes to make peering faster
β βββ genesis.json # this genesis file for any HLF Besu nodes
β βββ permissioned-nodes.json # local permissions for any HLF Besu node
β
βββ goQuorum
β βββ static-nodes.json # a list of static nodes to make peering faster
β βββ genesis.json # this genesis file for any GoQuorum nodes
β βββ permissioned-nodes.json # local permissions for any GoQuorum node
β βββ disallowed-nodes.json # disallowed nodes for any GoQuorum node ie this new nodes will not connect to any nodes on this list
β
βββ userData.json # this answers provided in a single map
βββ README.md # this file
Please remember to do the following:
FAQs
A utility that lets developers create genesis files and node (&account) keys from ConsenSys!
The npm package quorum-genesis-tool receives a total of 16 weekly downloads. As such, quorum-genesis-tool popularity was classified as not popular.
We found that quorum-genesis-tool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.