搭建简单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

猜你喜欢

转载自blog.csdn.net/qq_35331140/article/details/86479248