EOS全节点连接主网
2018-06-27 本文已影响0人
NanoLeak
下载主网 genesis.json ,地址:https://github.com/EOS-Mainnet/eos/blob/launch-rc-1.0.2/mainnet-genesis.json
vim genesis.json
{
"initial_timestamp": "2018-06-08T08:08:08.888",
"initial_key": "EOS7EarnUhcyYqmdnPon8rm7mBCTnBoot6o7fE2WzjvEX2TdggbL3",
"initial_configuration": {
"max_block_net_usage": 1048576,
"target_block_net_usage_pct": 1000,
"max_transaction_net_usage": 524288,
"base_per_transaction_net_usage": 12,
"net_usage_leeway": 500,
"context_free_discount_net_usage_num": 20,
"context_free_discount_net_usage_den": 100,
"max_block_cpu_usage": 200000,
"target_block_cpu_usage_pct": 1000,
"max_transaction_cpu_usage": 150000,
"min_transaction_cpu_usage": 100,
"max_transaction_lifetime": 3600,
"deferred_trx_expiration_window": 600,
"max_transaction_delay": 3888000,
"max_inline_action_size": 4096,
"max_inline_action_depth": 4,
"max_authority_depth": 6
}
}
启动方式一,直接命令启动,不编辑config.ini
nodeos -p user --plugin eosio::chain_api_plugin --plugin eosio::net_api_plugin --http-server-address 127.0.0.1:8890 --p2p-listen-endpoint 127.0.0.1:9877 --p2p-peer-address p2p.meet.one:9876 --config-dir nodedata --data-dir nodedata --genesis-json genesis.json
这里直接连接p2p.meet.one:9876这个地址,
其他地址列表有
p2p.one.eosdublin.io:9876
eu-west-nl.eosamsterdam.net:9876
p2p.mainnet.eosgermany.online:9876
35.197.190.234:19878
p2p.genereos.io:9876
fullnode.eoslaomao.com:443
new.eoshenzhen.io:10034
node1.eosphere.io:9876
p2p.meet.one:9876
bp.eosbeijing.one:8080
peer1.mainnet.helloeos.com.cn:80
p2p-public.hkeos.com:19875
pub1.eostheworld.io:9876
eu1.eosdac.io:49876
peer.eosio.sg:9876
更多地址参考:
https://docs.google.com/spreadsheets/d/1K_un5Vak3eDh_b4Wdh43sOersuhs0A76HMCfeQplDOY/edit#gid=0
https://eosnodes.privex.io/?config=1
二、验证是否正常
cleos -u "http://127.0.0.1:8890" get info
chain_id 为aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906
则正常
{
"server_version": "c9b7a247",
"chain_id": "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906",
"head_block_num": 1,
"last_irreversible_block_num": 0,
"last_irreversible_block_id": "0000000000000000000000000000000000000000000000000000000000000000",
"head_block_id": "00000001405147477ab2f5f51cda427b638191c66d2c59aa392d5c2c98076cb0",
"head_block_time": "2018-06-08T08:08:08.500",
"head_block_producer": "",
"virtual_block_cpu_limit": 200000,
"virtual_block_net_limit": 1048576,
"block_cpu_limit": 199900,
"block_net_limit": 1048576
}
参考:https://cloud.tencent.com/developer/news/240133
常见问题:
nodeos关闭重启时,还得删除genesis配置参数,否则出现如下错误:
!fc::exists( my->blocks_dir / “blocks.log” ): Genesis state can only be set on a fresh blockchain
说明配置了genesis.json,但是blocks目录不为空
需要删除blocks或者去除--genesis-json的配置