EOS

EOS单节点启动与配置说明

简介

本文重点介绍EOS配置文件config.ini的各项的解释及其作用。

EOS,可以理解为Enterprise Operation System,即为商用分布式应用设计的一款区块链操作系统。EOS是引入的一种新的区块链架构,旨在实现分布式应用的性能扩展。注意,它并不是像比特币和以太坊那样的货币,而是基于EOS软件项目之上发布的代币,被称为区块链3.0。百度百科

本文使用的EOS是2018年8月23日在Git中下载master版本;源码版本差异过大的可能本文不适用。

EOS-GitHub
EOS-官方英文文档

本地单节点EOS网络

使用以下命令启动自己的单节点EOS网络:

执行后效果如下:

执行上命令后会在~/.local/share/eosio/nodeos/config目录下创建配置文件config.ini

config.ini

以下为config.ini文件内配置项的说明:

我们上边使用的启动命令是:

config.ini中修改修改以下配置项,之后便可以直接使用./nodeos来启动。

建议在配置中将verbose-http-errors=false改为true,便于在发开中发现各种奇怪的问题。

genesis.json

在之前的版本中genesis.json不存在时,会在启动时随着config.ini一起创建并加载使用,但是新版中取消了这一设定;规定只有在启动时使用命令--genesis-json XXXXXX指定了genesis.json才会加载,否则会采用默认的配置。
以下为genesis.json文件内配置项:

2018年9月3日16点02分修正部分说明。
.
.
.
.
.
.
.
【本文章出自NM1024.com,转载请注明作者出处。】

6 thoughts on “EOS单节点启动与配置说明”

    1. 你看到的这一行,完整是
      ^C2018-08-27T03:07:29.562 thread-0 net_plugin.cpp:3046 plugin_shutdown ] shutdown..

      前边有^C(Ctrl+C),意思是我在这一步执行了退出,所以shutdown了。

  1. I got following error while running code:

    2019-06-26T10:06:34.623 thread-0 chain_plugin.cpp:317 plugin_initialize ] initializing chain plugin
    2019-06-26T10:06:34.623 thread-0 chain_plugin.cpp:556 plugin_initialize ] Starting up fresh blockchain with default genesis state.
    sh: 1: 30032: not found
    2019-06-26T10:06:34.624 thread-0 chain_plugin.cpp:317 plugin_initialize ] initializing chain plugin
    2019-06-26T10:06:34.624 thread-0 chain_plugin.cpp:556 plugin_initialize ] Starting up fresh blockchain with default genesis state.
    2019-06-26T10:06:34.906 thread-0 http_plugin.cpp:344 plugin_initialize ] configured http to listen on 127.0.0.1:8888
    2019-06-26T10:06:34.906 thread-0 net_plugin.cpp:2894 plugin_initialize ] Initialize net plugin
    2019-06-26T10:06:34.906 thread-0 net_plugin.cpp:2920 plugin_initialize ] host: 0.0.0.0 port: 9876
    2019-06-26T10:06:34.906 thread-0 net_plugin.cpp:2991 plugin_initialize ] my node_id is f3851eb429291c06fdad3631d2edfcb93c44ee8c8c0a1972f1378f5a50cdcc39
    2019-06-26T10:06:34.906 thread-0 main.cpp:105 main ] nodeos version v1.2.5-dirty
    2019-06-26T10:06:34.906 thread-0 main.cpp:106 main ] eosio root is /home/bob/.local/share
    2019-06-26T10:06:34.906 thread-0 controller.cpp:1380 startup ] No head block in fork db, perhaps we need to replay
    2019-06-26T10:06:34.906 thread-0 controller.cpp:372 initialize_fork_db ] Initializing new blockchain with genesis state
    2019-06-26T10:06:34.938 thread-0 chain_plugin.cpp:648 plugin_startup ] starting chain in read/write mode
    2019-06-26T10:06:34.938 thread-0 chain_plugin.cpp:652 plugin_startup ] Blockchain started; head block is #1, genesis timestamp is 2018-06-01T12:00:00.000
    2019-06-26T10:06:34.938 thread-0 producer_plugin.cpp:648 plugin_startup ] producer plugin: plugin_startup() begin
    2019-06-26T10:06:34.938 thread-0 producer_plugin.cpp:670 plugin_startup ] Launching block production for 1 producers at 2019-06-26T10:06:34.938.
    2019-06-26T10:06:34.985 thread-0 producer_plugin.cpp:682 plugin_startup ] producer plugin: plugin_startup() end
    2019-06-26T10:06:34.985 thread-0 http_plugin.cpp:401 plugin_startup ] start listening for http requests
    2019-06-26T10:06:34.985 thread-0 http_plugin.cpp:408 plugin_startup ] http service failed to start: Address already in use
    2019-06-26T10:06:35.013 thread-0 http_plugin.cpp:344 plugin_initialize ] configured http to listen on 127.0.0.1:8888
    2019-06-26T10:06:35.013 thread-0 net_plugin.cpp:2894 plugin_initialize ] Initialize net plugin
    2019-06-26T10:06:35.013 thread-0 net_plugin.cpp:2920 plugin_initialize ] host: 0.0.0.0 port: 9876
    2019-06-26T10:06:35.014 thread-0 net_plugin.cpp:2991 plugin_initialize ] my node_id is 1ada8546526b4e476074753edebcaf303f522dd67519b2d2c0d5192d72f419b7
    2019-06-26T10:06:35.014 thread-0 main.cpp:105 main ] nodeos version v1.2.5-dirty
    2019-06-26T10:06:35.014 thread-0 main.cpp:106 main ] eosio root is /home/bob/.local/share
    2019-06-26T10:06:35.014 thread-0 controller.cpp:1380 startup ] No head block in fork db, perhaps we need to replay
    2019-06-26T10:06:35.014 thread-0 controller.cpp:372 initialize_fork_db ] Initializing new blockchain with genesis state

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据