Quorum快速部署

Quorum快速部署,以下操作均在命令行执行。
参考https://docs.goquorum.consensys.net/en/stable/HowTo/GetStarted/Wizard/GettingStarted/
需要预安装:Node.js/NPM

正式开始

使用NPM安装

npm install -g quorum-wizard

安装完成之后,执行

quorum-wizard

接下来按照指引及自己的需求来构建自己的quorum网络

Welcome to Quorum Wizard!

This tool allows you to easily create bash, docker, and kubernetes files to star
t up a quorum network.
You can control consensus, privacy, network details and more for a customized se
tup.
Additionally you can choose to deploy our chain explorer, Cakeshop, to easily vi
?
Welcome to Quorum Wizard!

This tool allows you to easily create bash, docker, and kubernetes files to star
t up a quorum network.
You can control consensus, privacy, network details and more for a customized se
tup.
Additionally you can choose to deploy our chain explorer, Cakeshop, to easily vi
?
Welcome to Quorum Wizard!

This tool allows you to easily create bash, docker, and kubernetes files to star
t up a quorum network.
You can control consensus, privacy, network details and more for a customized se
tup.
Additionally you can choose to deploy our chain explorer, Cakeshop, to easily vi
ew and monitor your network.

We have 3 options to help you start exploring Quorum:

  1.  Quickstart - our 1 click option to create a 3 node raft network with tesse
ra and cakeshop

  2.  Simple Network - using pregenerated keys from quorum 7nodes example,
      this option allows you to choose the number of nodes (7 max), consensus me
chanism, transaction manager, and the option to deploy cakeshop

  3.  Custom Network - In addition to the options available in #2, this selectio
n allows for further customization of your network.
      Choose to generate keys, customize ports for both bash and docker, or chan
ge the network id

Quorum Wizard will generate your startup files and everything required to bring
up your network.
All you need to do is go to the specified location and run start.sh

 Simple Network
? Would you like to generate bash scripts, a docker-compose file, or a kubernete
s config to bring up your network? bash
? Select your consensus mode - istanbul is a pbft inspired algorithm with transa
ction finality while raft provides faster blocktimes, transaction finality and o
n-demand block creation istanbul
? Input the number of nodes (2-7) you would like in your network - a minimum of
4 is recommended 4
? Which version of Quorum would you like to use? Quorum 2.7.0
? Choose a version of tessera if you would like to use private transactions in y
our network, otherwise choose "none" none
? What tools would you like to deploy alongside your network? (Press space to se
lect options, then press enter)
? What would you like to call this network? 4-nodes-istanbul-bash
? A network with the name '4-nodes-istanbul-bash' already exists. Do you want to
 overwrite it? Yes
Downloading dependencies...
Using cached istanbul at: /Users/zhaozijun/.quorum-wizard/bin/istanbul/1.0.3/istanbul
Using cached quorum at: /Users/zhaozijun/.quorum-wizard/bin/quorum/2.7.0/geth
Building network directory...
Generating network resources locally...
Building qdata directory...
Initializing quorum...
Done


Quorum network created

Run the following commands to start your network:

cd network/4-nodes-istanbul-bash
./start.sh

A sample simpleStorage contract is provided to deploy to your network
To use run ./runscript.sh public_contract.js from the network folder

这里会创建一个network文件夹,进入此文件夹内刚创建的网络

cd network/4-nodes-istanbul-bash

接着执行

./start.sh

如果看到这个即表示网络启动成功

Starting Quorum network...

Starting Quorum nodes
Successfully started Quorum network.

然后我们利用attach.sh可以进入四个节点中的任一节点

./attach.sh 1

最后看到这样就可以了

Welcome to the Geth JavaScript console!

instance: Geth/v1.9.7-stable-6005360c(quorum-v2.7.0)/darwin-amd64/go1.13.13
coinbase: 0xd8dba507e85f116b1f7e231ca8525fc9008a6966
at block: 6 (Sat, 14 Nov 2020 21:17:32 CST)
 datadir: /Users/zhaozijun/network/4-nodes-istanbul-bash/qdata/dd1
 modules: admin:1.0 debug:1.0 eth:1.0 istanbul:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

你可能感兴趣的:(区块链,区块链,以太坊)