Quorum-7node项目启动记录

官网链接:
0.新建了一个目录:new_7_node_test

在该目录下进行了以下操作:
(共有三种启动运行方式,选择了第三种Running locally)

一、Running Locally

1.第一步:安装go(我的本地已经有了)
2.第二步:下载并构建quorum
git clone https://github.com/jpmorganchase/quorum
cd quorum
make
GETHDIR=`pwd`; export PATH=$GETHDIR/build/bin:$PATH
cd ..
3.第三步:下载并构建tessera
git clone https://github.com/jpmorganchase/tessera.git
cd tessera
mvn install
  • 其中,使用mvn之前需要安装maven,通过sudo apt进行安装
  • 卡在mvn install,花费时间太长(20201022)
4.第四步:下载quorum-examples
git clone https://github.com/jpmorganchase/quorum-examples
5.第五步:启动7nodes网络
5.1 stop20201025
Running locally这种方式有问题,换成docker-compose进行尝试。

二、Running with Docker

1.第一步 安装Docker,本地已有
2.第二步 下载并运行docker-compose
git clone https://github.com/jpmorganchase/quorum-examples
cd quorum-examples
docker-compose up -d
3.第三步 默认使用Tessera和IBFT

若要自定义,可以使用以下命令:

PRIVATE_CONFIG=ignore QUORUM_CONSENSUS=raft docker-compose up -d

4.第四步 运行docker ps

查看验证所有quorum-examples容器(7 nodes and 7 tx managers) 都是健健康康的。

5.第五步 查看日志

运行以下命令,用于查看特定容器的日志:

docker logs [container-name] -f

6.第六步 运行7nodes示例

打开geth的js控制台连接到特定节点,并发送一个私有交易

$ docker exec -it quorum-examples_node1_1 geth attach /qdata/dd/geth.ipc
Welcome to the Geth JavaScript console!

instance: Geth/node1-istanbul/v1.7.2-stable/linux-amd64/go1.9.7
coinbase: 0xd8dba507e85f116b1f7e231ca8525fc9008a6966
at block: 70 (Thu, 18 Oct 2018 14:49:47 UTC)
 datadir: /qdata/dd
 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

> loadScript('/examples/private-contract.js')
7.第七步 关闭Quorum网络

docker-compose down

8.第八步 启动7nodes示例网络
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值