从零构建以太坊(Ethereum)智能合约到项目实战——第21章 搭建联盟链

P78 、1-内容介绍

什么情况下建立自己测试用的PoA chain?

  • 公司内网或无对外网络,无法同步区块
  • 降低测试时等待区块的时间
  • 不想碰到testrpc各种雷

PoA chain特点有

  • 有别于PoW(Proof-of-Work)需要解数学难题来产生block,PoA是依靠预设好的Authority nodes,负责产生block。
  • 可依照需求设定Authority nodes数量。
  • 可指定产生block的时间,例如收到交易的5秒后产生block。
  • 一般的Ethereum node也可以连接到PoA chain,正常发起transactions,contracts等。

大纲

1、Parity钱包下载安装

2、设置chain spec

3、设置两个节点

4、设置账号(Account)

5、启动Authority node

6、连接两个节点

7、发送交易

扫描二维码关注公众号,回复: 5165766 查看本文章

8、分享给其它节点


P79 、2-Parity钱包下载安装

钱包有:Mist钱包、Metamask、myetherwallet钱包。

Parity钱包下载安装:https://www.parity.io/ethereum/

https://github.com/paritytech/parity-ethereum/releases/tag/v2.2.9

ubuntu安装parit教程:https://github.com/paritytech/parity-ethereum


P80 、3-demo-spec 配置文件
P81 、4-POA Node创建的两种方法
P82 、5-node0 &P 、amp; node1 配置以及账号创建
P83 、6-多节点连接、P 、交易、P 、互通

猜你喜欢

转载自www.cnblogs.com/little-kwy/p/10371429.html