EOS合约开发第六章-构建多节点私链

构建多节点私链

一、概述

本教程介绍如何配置在多个主机上运行多个节点的EOSIO私链网络,即多主机多节点EOS私链网络,我们将在本地计算机上配置四个节点,并让它们互相通信,其中三个节点产快,一个节点非产快,主要会用到三个程序nodeos、keosd、cleos,以下是该私链网络结构图:


二、启动第一个节点

在第一个节点上,我们启动eos进程时启动钱包插件,在这个私有网络上我们使用这个节点上钱包。

第一个节点配置如下:

# The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin)
http-server-address = 0.0.0.0:9800

# The actual host:port used to listen for incoming p2p connections. (eosio::net_plugin)
p2p-listen-endpoint = 0.0.0.0:9900


# The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. (eosio::net_plugin)
# p2p-peer-address = 
p2p-peer-address = 193.112.127.146:9900
p2p-peer-address = 118.126.97.157:9900
p2p-peer-address = 111.230.210.23:9900

producer-name = eosio

# Timeout for unlocked wallet in seconds (default 900 (15 minutes)). Wallets will automatically lock after specified number of seconds of inactivity. Activity is defined as any wallet command e.g. list-wallets. (eosio::wallet_plugin)
unlock-timeout = 90000

# Plugin(s) to enable, may be specified multiple times
# plugin = 
plugin = eosio::http_plugin
plugin = eosio::chain_api_plugin
plugin = eosio::net_api_plugin
plugin = eosio::wallet_api_plugin
plugin = eosio::history_api_plugin

主要配置本节点rpc监听地址,p2p监听地址,p2p连接地址,bp名称,因为启动有钱包插件,配置了钱包锁定的超时时间,同时加载了需要使用的插件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值