搭建简单POA联盟链

1 .安装Go语言 yum install -y golang

2 .安装Ethereum wget https://github.com/ethereum/go-ethereum/archive/v1.7.3.tar.gz

3 .编译
tar -zxvf v1.7.3.tar.gz
cd go-ethereum-1.7.3
make geth
make all

4 .添加环境变量
vim /etc/profile (编辑配置文件,在最后面加入下面的路径)
export PATH=$PATH:/root/go-ethereum-1.7.3/build/bin/

source /etc/profile (使配置文件生效)

5 .初始化并启动
cd eth_work/boot1

geth --datadir ./ init genesis.json

geth --datadir /root/eth_work/boot1 --network 151081 --rpc --rpcaddr “0.0.0.0” --rpcapi “admin,debug,eth,miner,net,personal,shh,txpool,web3” --rpcport 22000 --port 21000 --unlock 0 --password towerchain --bootnodes “enode://7ec0cacc20bacb3f61b60077d72820a91d39f5023affaaf59def30046fb748d144ec6729e72a5443d553c31ebf991c152f9fae8472d7ce75c5a0d43c70fee08e@127.0.0.1:30301” --syncmode “full” console

6 .授权其他节点作为signer,当signer有多个时,需要大于51%完成签名,当需要删除某个singer时同样需要>51%,signer可以删除自己:
clique.propose(“0x01fb4acbc59b9e9370c6f1af5982d41e5fcc082b”,true)//添加
clique.discard(“0x8a098a17c39d4cb1ce76dbabfdf02e935a558211”) /删除
geth --datadir ./ account new

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值