区块链3.0:拥抱EOS (4)

构建完成后,会在build/programs/目录中出现nodeos文件夹,这是我们要启动节点的工具。通过以下命令启动你自己的独立节点区块链

cd programs/nodeos && ./nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::account_history_api_plugin

这条命令中,可执行文件./nodeos后面有很多参数,好看的是后面的plugin是启动时对插件的配置,剩下的参数配置我们会在接下来介绍到。启动以后,日志打印出来相关信息:

liuwenbin@liuwenbin-H81M-DS2:~/work/CLionProjects/github.com/eos/build/programs/nodeos$ ./nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::c hain_api_plugin --plugin eosio::account_history_api_plugin 3054170ms thread-0 wallet_plugin.cpp:41 plugin_initialize ] initializing wallet plugin 3054170ms thread-0 http_plugin.cpp:141 plugin_initialize ] host: 127.0.0.1 port: 8888 3054170ms thread-0 http_plugin.cpp:144 plugin_initialize ] configured http to listen on 127.0.0.1:8888 3054170ms thread-0 chain_plugin.cpp:99 plugin_initialize ] initializing chain plugin 3054170ms thread-0 net_plugin.cpp:2628 plugin_initialize ] Initialize net plugin 3054170ms thread-0 net_plugin.cpp:2644 plugin_initialize ] Setting net_plugin logging level to info 3054170ms thread-0 net_plugin.cpp:2669 plugin_initialize ] host: 0.0.0.0 port: 9876 3054170ms thread-0 net_plugin.cpp:2745 plugin_initialize ] my node_id is 86aa711400110362b7a94d9468fc45bdbfa8887a3bdaf9502dbea59694179b09 3054170ms thread-0 main.cpp:90 main ] nodeos version 96ee0325 3054170ms thread-0 main.cpp:91 main ] eosio root is /home/liuwenbin/.local/share 3054170ms thread-0 http_plugin.cpp:213 plugin_startup ] start listening for http requests 3054170ms thread-0 wallet_api_plugin.cpp:70 plugin_startup ] starting wallet_api_plugin 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/create 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/get_public_keys 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/import_key 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/list_keys 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/list_wallets 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/lock 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/lock_all 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/open 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/set_timeout 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/sign_transaction 3054170ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/wallet/unlock 3054170ms thread-0 chain_plugin.cpp:178 plugin_startup ] generating default genesis file /home/liuwenbin/.local/share/eosio/nodeos/config/genesis.json 3054209ms thread-0 chain_plugin.cpp:208 plugin_startup ] starting chain in read/write mode 3054209ms thread-0 chain_plugin.cpp:213 plugin_startup ] Blockchain started; head block is #0, genesis timestamp is 2018-03-01T12:00:00.000 3054209ms thread-0 chain_api_plugin.cpp:62 plugin_startup ] starting chain_api_plugin 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/abi_bin_to_json 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/abi_json_to_bin 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/get_account 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/get_block 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/get_code 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/get_currency_balance 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/get_currency_stats 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/get_info 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/get_required_keys 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/get_table_rows 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/push_block 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/push_transaction 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/chain/push_transactions 3054209ms thread-0 account_history_api_plugin.cpp:45 plugin_startup ] starting account_history_api_plugin 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/account_history/get_controlled_accounts 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/account_history/get_key_accounts 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/account_history/get_transaction 3054209ms thread-0 http_plugin.cpp:242 add_handler ] add api url: /v1/account_history/get_transactions 3054209ms thread-0 net_plugin.cpp:2757 plugin_startup ] starting listener, max clients is 25 3054209ms thread-0 producer_plugin.cpp:161 plugin_startup ] producer plugin: plugin_startup() begin 3054209ms thread-0 producer_plugin.cpp:166 plugin_startup ] Launching block production for 1 producers. ******************************* * * * ------ NEW CHAIN ------ * * - Welcome to EOSIO! - * * ----------------------- * * * ******************************* Your genesis seems to have an old timestamp Please consider using the --genesis-timestamp option to give your genesis a recent timestamp 3054209ms thread-0 producer_plugin.cpp:176 plugin_startup ] producer plugin: plugin_startup() end eosio generated block bd1a5181... #1 @ 2018-04-13T02:50:54.500 with 0 trxs, lib: 0 eosio generated block a8c18ba3... #2 @ 2018-04-13T02:50:55.000 with 0 trxs, lib: 1 eosio generated block 1e4c703f... #3 @ 2018-04-13T02:50:55.500 with 0 trxs, lib: 2 eosio generated block d4c29cd4... #4 @ 2018-04-13T02:50:56.000 with 0 trxs, lib: 3

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wpwzpw.html