区块链中文技术社区

配置自己的节点与EOS主网数据同步

本篇文章将讲解如何将自己机器部署的节点链接到EOS主网,并同步区块数据。

1.源码编译
2.修改config.ini

三种方式获取可用的p2p-peer-address:

  1. (科学上网访问)
  2. (EOSPark 进入BP节点,查看接入点)")
  3. (已测试当前可用节点)
  4. (Block Producer bp.json Validator)
  5. (eosnation)
p2p-peer-address = node1.eosnewyork.io:6987
p2p-peer-address = p2p.eos42.io:9876
p2p-peer-address = peering.mainnet.eoscanada.com:9876
p2p-peer-address = node1.starteos.io:9876
plugin = eosio::chain_api_plugin
plugin = eosio::history_api_plugin
plugin = eosio::chain_plugin
plugin = eosio::history_plugin
plugin = eosio::net_plugin
plugin = eosio::net_api_plugin

~/.local/share/eosio/nodeos/config目录下执行 (目录可随意)

wget https://github.com/EOS-Mainnet/eos/raw/mainnet-1.0.5/mainnet-genesis.json

在上面目录下执行nodeos --genesis-json mainnet-genesis.json
出现错误Genesis state can only be set on a fresh blockchain
修改执行命令为

nodeos --genesis-json mainnet-genesis.json --delete-all-blocks

执行cleos get info查看chain_id

已经为EOS主网络。

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »