博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
EOSIO 指南(启动你的节点并设置)
阅读量:7038 次
发布时间:2019-06-28

本文共 3606 字,大约阅读时间需要 12 分钟。

启动你的节点并设置

第1步:引导节点和电子钱包

步骤1.1:启动keosd

首先让我们启动keosd:

keosd &

你应该看到一些看起来像这样的输出:

info  2018-11-26T06:54:24.789 thread-0  wallet_plugin.cpp:42          plugin_initialize    ] initializing wallet plugininfo  2018-11-26T06:54:24.795 thread-0  http_plugin.cpp:554           add_handler          ] add api url: /v1/keosd/stopinfo  2018-11-26T06:54:24.796 thread-0  wallet_api_plugin.cpp:73      plugin_startup       ] starting wallet_api_plugininfo  2018-11-26T06:54:24.796 thread-0  http_plugin.cpp:554           add_handler          ] add api url: /v1/wallet/createinfo  2018-11-26T06:54:24.796 thread-0  http_plugin.cpp:554           add_handler          ] add api url: /v1/wallet/create_keyinfo  2018-11-26T06:54:24.796 thread-0  http_plugin.cpp:554           add_handler          ] add api url: /v1/wallet/get_public_keys

enter键退出。

步骤1.2:启动nodeos

nodeos -e -p eosio \--plugin eosio::producer_plugin \--plugin eosio::chain_api_plugin \--plugin eosio::http_plugin \-d CONTRACTS_DIR/eosio/data \--config-dir CONTRACTS_DIR/eosio/config \--access-control-allow-origin='*' \--contracts-console \--http-validate-host=false \—filter-on='*' >> nodeos.log 2>&1 &

这些设置可实现以下功能:

  1. 在开发目录下的eosio目录中为区块链数据和配置使用工作目录,这里我们分别使用eosio/dataeosio/config
  2. 运行Nodeos,此命令加载所有基本插件、设置服务器地址、启用CORS并添加一些合约调试和日志记录。
  3. 启用CORS没有限制(*)。
在上面的配置中,CORS仅用于开发目的
*,你永远不应在可公开访问的节点上启用CORS为
*

第2步:检查安装

步骤2.1:检查Nodeos是否正在生成块

运行以下命令:

tail -f nodeos.log

你应该在控制台中看到一些如下所示的输出:

1929001ms thread-0   producer_plugin.cpp:585       block_production_loo ] Produced block 0000366974ce4e2a... #13929 @ 2018-05-23T16:32:09.000 signed by eosio [trxs: 0, lib: 13928, confirmed: 0]1929502ms thread-0   producer_plugin.cpp:585       block_production_loo ] Produced block 0000366aea085023... #13930 @ 2018-05-23T16:32:09.500 signed by eosio [trxs: 0, lib: 13929, confirmed: 0]1930002ms thread-0   producer_plugin.cpp:585       block_production_loo ] Produced block 0000366b7f074fdd... #13931 @ 2018-05-23T16:32:10.000 signed by eosio [trxs: 0, lib: 13930, confirmed: 0]1930501ms thread-0   producer_plugin.cpp:585       block_production_loo ] Produced block 0000366cd8222adb... #13932 @ 2018-05-23T16:32:10.500 signed by eosio [trxs: 0, lib: 13931, confirmed: 0]1931002ms thread-0   producer_plugin.cpp:585       block_production_loo ] Produced block 0000366d5c1ec38d... #13933 @ 2018-05-23T16:32:11.000 signed by eosio [trxs: 0, lib: 13932, confirmed: 0]1931501ms thread-0   producer_plugin.cpp:585       block_production_loo ] Produced block 0000366e45c1f235... #13934 @ 2018-05-23T16:32:11.500 signed by eosio [trxs: 0, lib: 13933, confirmed: 0]1932001ms thread-0   producer_plugin.cpp:585       block_production_loo ] Produced block 0000366f98adb324... #13935 @ 2018-05-23T16:32:12.000 signed by eosio [trxs: 0, lib: 13934, confirmed: 0]1932501ms thread-0   producer_plugin.cpp:585       block_production_loo ] Produced block 00003670a0f01daa... #13936 @ 2018-05-23T16:32:12.500 signed by eosio [trxs: 0, lib: 13935, confirmed: 0]1933001ms thread-0   producer_plugin.cpp:585       block_production_loo ] Produced block 00003671e8b36e1e... #13937 @ 2018-05-23T16:32:13.000 signed by eosio [trxs: 0, lib: 13936, confirmed: 0]1933501ms thread-0   producer_plugin.cpp:585       block_production_loo ] Produced block 0000367257fe1623... #13938 @ 2018-05-23T16:32:13.500 signed by eosio [trxs: 0, lib: 13937, confirmed: 0]

ctrl+c关闭日志。

步骤2.2:检查钱包

打开shell并运行以下命令:

cleos wallet list

你应该看到一个响应

Wallets:[]

从现在开始,你将从本地系统(Linux或Mac)执行命令。

步骤2.3:检查Nodeos端点

这将检查RPC API是否正常工作,选择一个。

  1. 在浏览器中检查chain_api_plugin提供的get_info端点:。
  2. 检查相同的事情,但在你主机上的控制台中。

    curl http://localhost:8888/v1/chain/get_info

转载地址:http://czfal.baihongyu.com/

你可能感兴趣的文章
数组转DataTable
查看>>
scrum之旅读书笔记
查看>>
PIX8.0的LAN-to-LAN IPSEC***反向路由注入测试
查看>>
实现F5后端服务器访问
查看>>
ThinkPHP源码阅读2-----C函数配置文件详解
查看>>
6421B Lab6 NPS角色服务的安装、配置和故障排除
查看>>
快速提高博客访问量的22条军规
查看>>
***S 2012 内置字段 -- 介绍
查看>>
vCloud Automation Center (vCAC) 6.0 (六)
查看>>
微软推出一个非常有趣的网站—— How-old.net 看照片猜年龄!
查看>>
puppet之master/agent模型详解
查看>>
Docker分离部署MySQL、Nginx+Tomcat复制共享
查看>>
hashtable和dictionary
查看>>
05-Windows Server 2012 新特性 ---- 集成的ISCSI网络存储
查看>>
Percona XtraDB Cluster Installation Guide
查看>>
.net中的mapinfo开发:图层读写(二)
查看>>
Percona Cluster集群讲解
查看>>
IPHONE5为什么爽约?
查看>>
Skype for Business Server 2015-00-规划(注意:下载-附件)
查看>>
【翻译】Sencha Touch 2入门:创建一个实用的天气应用程序之二
查看>>