perusworld / quorum-dev-quickstart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quorum Dev Quickstart - with support for more configurations!

This branch has support for specifying a config file as an optional argument to refine the kind of network that is created. This is primarily geared towards Besu customisations will look at porting the same to GoQuorum later. Look at the (example: default.json) for config options.

NOTE

Some of the config json files that have the suffix -p2p-tls.json require a build of the p2p-tls-cli-at-fn branch docker images.

Make sure to run this on the local besu checkout to use it.

./gradlew clean spotlessApply build -x test -x acceptanceTest distDocker

Example: Nodes with P2P-SSL and Tessera private transaction manager

npm run build && npm start -- --configFile=./config/small-p2p-tls-tessera.json

Example: Nodes with P2P-SSL and Orion private transaction manager

npm run build && npm start -- --configFile=./config/small-p2p-tls-orion.json

Example: Nodes with P2P-SSL and Tessera private transaction manager and using secp256r1 algorithm based node keys

npm run build && npm start -- --configFile=./config/small-p2p-tls-tessera-r1.json

Example: Nodes with PKI-based Block Creation

npm run build && npm start -- --configFile=./config/pki-4-block-validation.json

Table of Contents

  1. Prerequisites
  2. Usage

Prerequisites

To run these tutorials, you must have the following installed:

⚠️ Note: If on MacOS or Windows, please ensure that you allow docker to use upto 4G of memory or 6G if running Privacy examples under the Resources section. The Docker for Mac and Docker Desktop sites have details on how to do this at the "Resources" heading
⚠️ Note: This has only been tested on Windows 10 Build 18362 and Docker >= 17.12.2
  • On Windows ensure that the drive that this repo is cloned onto is a "Shared Drive" with Docker Desktop
  • On Windows we recommend running all commands from GitBash
  • Nodejs or Yarn

Usage

Create the docker-compose file and artifacts with

$> npx quorum-dev-quickstart
              ___
             / _ \   _   _    ___    _ __   _   _   _ __ ___
            | | | | | | | |  / _ \  | '__| | | | | | '_ ' _ \
            | |_| | | |_| | | (_) | | |    | |_| | | | | | | |
             \__\_\  \__,_|  \___/  |_|     \__,_| |_| |_| |_|
     
        ____                          _
       |  _ \    ___  __   __   ___  | |   ___    _ __     ___   _ __
       | | | |  / _ \ \ \ / /  / _ \ | |  / _ \  | '_ \   / _ \ | '__|
       | |_| | |  __/  \ V /  |  __/ | | | (_) | | |_) | |  __/ | |
       |____/   \___|   \_/    \___| |_|  \___/  | .__/   \___| |_|
                                                 |_|
       ___            _          _            _                    _
      / _ \   _   _  (_)   ___  | | __  ___  | |_    __ _   _ __  | |_
     | | | | | | | | | |  / __| | |/ / / __| | __|  / _' | | '__| | __|
     | |_| | | |_| | | | | (__  |   <  \__ \ | |_  | (_| | | |    | |_ 
      \__\_\  \__,_| |_|  \___| |_|\_\ |___/  \__|  \__,_| |_|     \__|


Welcome to the Quorum Developer Quickstart utility. This tool can be used
to rapidly generate local Quorum blockchain networks for development purposes
using tools like GoQuorum, Besu, and Codefi Orchestrate.

To get started, be sure that you have both Docker and Docker Compose
installed, then answer the following questions.

Which Ethereum client would you like to run? Default: [1]
	1. Hyperledger Besu
	2. GoQuorum
...
  Do you want to try out Codefi Orchestrate? Note: choosing yes will direct you to a login/registration page. [Y/n]
  ...
  Do you wish to enable support for private transactions? [Y/n]
  ...
  Do you wish to enable support for logging with Splunk or ELK (Elasticsearch, Logstash & Kibana)? Default: [1]
	1. None
	2. Splunk
	3. ELK
...
Where should we create the config files for this network? Please
choose either an empty directory, or a path to a new directory that does
not yet exist. Default: ./quorum-test-network

This prompts you to pick a quorum variant, whether you would like to try Privacy and the location for the artifacts. By default artifact files are stored at ./quorum-test-network, change directory to the artifacts folder:

$> cd quorum-test-network

Alternatively, you can use cli options and skip the prompt above like so:

npx quorum-dev-quickstart --clientType besu --outputPath ./quorum-test-network --monitoring default --privacy true --orchestrate false

Alternatively, complex configurations can be saved to a config json file and invoked via commandline using the the following command. A few config files are available here

npm run build && npm start -- --configFile=./config/small-p2p-tls-tessera.json

npm run build && npm start -- --configFile=./config/small-p2p-tls-orion.json

npm run build && npm start -- --configFile=./config/small-p2p-tls-tessera-splunk-snap.json

npm run build && npm start -- --configFile=./config/four-r1-tls.json

npm run build && npm start -- --configFile=./config/small-p2p-tls-tessera-r1.json

npm run build && npm start -- --configFile=./config/small-p2p-tls-tessera-r1-t.json

To start services and the network:

Follow the README.md file of select artifact:

  1. Hyperledger Besu
  2. GoQuorum
  3. Codefi Orchestrate

About

License:Apache License 2.0


Languages

Language:TypeScript 35.4%Language:JavaScript 32.9%Language:Shell 14.6%Language:Jinja 8.2%Language:Solidity 7.3%Language:Dockerfile 1.3%Language:HCL 0.4%