Socket
Socket
Sign inDemoInstall

ezzah-quorum-genesis

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ezzah-quorum-genesis

A utility that lets developers create genesis files and node (&account) keys from ConsenSys!


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Quorum Genesis Tool

Table of Contents

  1. Prerequisites
  2. Usage
  3. Troubleshooting

Prerequisites

Usage

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.

Generation of Keys

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
 
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: 2
 
Choose number of bootnode node keys to generate: (integer) Default: 2
 
Choose your encryption curve: Default: [1]
        1. secp256k1
        2. secp256r1
 
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:

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 1 --bootnodes 0

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

Using the keys and genesis files on instances

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:

  1. Update the in both the permissions file and the static nodes files. Please note the selected ports are default and you may need to check firewall rules if using alternate ports
  2. As above, update the permissions.json files
  3. update in every Besu nodes' config.toml

FAQs

Package last updated on 03 Feb 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc