EOS踩坑记 2

1、--contracts-console

  在开发模式下,需要将 nodeos 添加此选项。

  

  

2、Debug Method

  The main method used to debug smart contract is Caveman Debugging, where we utilize the printing functionality to inspect the value of a variable and check the flow of the contract.

  原始人调试法(Log 调试法)

  Printing in smart contract can be done through the Print API. The C++ API is the wrapper for C API, so most often we will just use the C++ API.

3、If no optional arguments are used (i.e. --url and --wallet-url), cleos automatically tries to connect to a locally running eos node (i.e. nodeos).

4、nodeos --plugin

--plugin eosio::chain_api_plugin

  也可以在 cofnig.ini 中配置

  

plugin = eosio::chain_api_plugin

5、nodeos -h 可以查看 plugin 有哪些option可以设置
  

6、cleos system

  

  

7、p2p-peer-address

  通过 config.ini 中的 p2p-peer-address 可以配置要联接的主网结点,使得当前结点可以加入主网。

  

# Default p2p port is
p2p-peer-address = 123.255.78.9:

8、Non-Producing Node

  A non-producing node is a node that is not configured to produce blocks. An example use case would be to provide a synchronized node that provides a public HTTP-RPC API for developers or as a dedicated private endpoint for your app.

  You need to set some peers in your config ini, for example:

    p2p-peer-address = 106.10.42.238:9876

  Or you can include the peer in as a boot flag, like so:

    --p2p-peer-address=106.10.42.238:9876

  只需指定 p2p-peer-address,就这么简单。详情见参考[3]。

9、nodeos 单节点常用选项

    # Enable production on a stale chain, since a single-node test chain is pretty much always stale
enable-stale-production = true
# Enable block production with the testnet producers
producer-name = eosio
# Load the block producer plugin, so you can produce blocks
plugin = eosio::producer_plugin
# As well as API and HTTP plugins
plugin = eosio::chain_api_plugin
plugin = eosio::http_plugin
# This will be used by the validation step below, to view history
plugin = eosio::history_api_plugin

10、EOSIO Core Network

  

11、EOSIO Access Network

  

  1)API Node

    API nodes handle requests from cleos to perform transactions and query state. API nodes communicate with cleos via http, and with other nodeos nodes using the EOSIO networking protocols.

    Each producer node should have at least one associated API node.

  2)Seed Node

    Seed nodes communicate with other nodeos nodes in order to maintain synchronization with the producer nodes. Seed nodes might be producer candidates that are maintaining synchronization with producers and servicing other nodes.

    Each producer node should have at least one associated seed node.

12、EOSIO Consumer Network

  

参考:

1、https://developers.eos.io/eosio-cpp/docs/debugging

2、https://developers.eos.io/eosio-nodeos/docs/environment-producing-node

3、https://developers.eos.io/eosio-nodeos/docs/environment-non-producing-node

EOS踩坑记 2的更多相关文章

  1. EOS踩坑记

    [EOS踩坑记] 1.每个account只能更新自己的contract,即使两个account的秘钥相同,也不允许. 如下,使用alice的权限来更新james的contract.会返回 Missin ...

  2. Spark踩坑记——Spark Streaming+Kafka

    [TOC] 前言 在WeTest舆情项目中,需要对每天千万级的游戏评论信息进行词频统计,在生产者一端,我们将数据按照每天的拉取时间存入了Kafka当中,而在消费者一端,我们利用了spark strea ...

  3. Spark踩坑记——数据库(Hbase+Mysql)

    [TOC] 前言 在使用Spark Streaming的过程中对于计算产生结果的进行持久化时,我们往往需要操作数据库,去统计或者改变一些值.最近一个实时消费者处理任务,在使用spark streami ...

  4. 【踩坑记】从HybridApp到ReactNative

    前言 随着移动互联网的兴起,Webapp开始大行其道.大概在15年下半年的时候我接触到了HybridApp.因为当时还没毕业嘛,所以并不清楚自己未来的方向,所以就投入了HybridApp的怀抱. Hy ...

  5. Spark踩坑记——共享变量

    [TOC] 前言 Spark踩坑记--初试 Spark踩坑记--数据库(Hbase+Mysql) Spark踩坑记--Spark Streaming+kafka应用及调优 在前面总结的几篇spark踩 ...

  6. Spark踩坑记——从RDD看集群调度

    [TOC] 前言 在Spark的使用中,性能的调优配置过程中,查阅了很多资料,之前自己总结过两篇小博文Spark踩坑记--初试和Spark踩坑记--数据库(Hbase+Mysql),第一篇概况的归纳了 ...

  7. djangorestframework+vue-cli+axios,为axios添加token作为headers踩坑记

    情况是这样的,项目用的restful规范,后端用的django+djangorestframework,前端用的vue-cli框架+webpack,前端与后端交互用的axios,然后再用户登录之后,a ...

  8. HttpWebRequest 改为 HttpClient 踩坑记-请求头设置

    HttpWebRequest 改为 HttpClient 踩坑记-请求头设置 Intro 这两天改了一个项目,原来的项目是.net framework 项目,里面处理 HTTP 请求使用的是 WebR ...

  9. vue踩坑记

    vue踩坑记 易错点 语法好难啊qwq 不要把'data'写成'date' 在v-html/v-bind中使用vue变量时不需要加变量名 在非vue事件中使用vue中变量时需要加变量名 正确 < ...

随机推荐

  1. Python 学习之路的前言

    做为一个编程小白,除了大三的时候考了VB的二级之后,就在也没有接触过其它有关计算机之类的知识.考入材料的研究生之后,越来越觉得自己不想继续这个行业,选择计算机作为自己以后要走的路,所下的决心所用的时间 ...

  2. Docker跨主机link

    user case:一个app container向一个oracle container跨主机传输数据. 思路一:将oracle对外暴露端口,将hostA的IP添加入app上/ect/hosts上.这 ...

  3. PythonStudy——文件操作习题 Document operation exercises

    # 1.统计文件数据中字母e出现的次数(不区分大小写)# 文件内容:hello friend, can you speak English!# 结果:4# 分析:将文件内容读出,然后统计读出的字符串中 ...

  4. 使用deb 打包开发的postgres extension

    昨天写过一个使用rpm 打包分发pg 扩展的demo,今天使用deb 进行打包分发,同时使用checkinstall 生成我们的deb包 安装deb 依赖 sudo apt-get install c ...

  5. 在子页面操作父页面元素和iframe说明

    实现功能:在子页面操作父页面元素. 在实际编码的过程中,大家一定有这种需求:在父级页面有一个<iframe scrolling='auto'></iframe>内联框架,而我们 ...

  6. centos7使用snmp

     一.安装snmp net-snmp :服务端 net-snmp-utils:客户端工具集   二.启动 systemctl start snmpd   三.修改配置文件(完整的配置文件如下) com ...

  7. Scrapy学习篇(十三)之scrapy+selenum获取网站cookie并保存带本地

    参考:https://www.cnblogs.com/small-bud/p/9064674.html 和selenium登录51job的例子

  8. Git从远程clone项目报错cannot open git-upload-pack,将http.sslVerify设为false即可

    通过HTTPS访问Git远程仓库,如果服务器的SSL证书未经过第三方机构签署,那么Git就会报错 通过https访问Git远程仓库,如果服务器的SSL证书没有经过第三方机构签署,就会出现cannot ...

  9. centos 设置中文环境

    方法1: [hl@localhost ~]$ LANG=zh_CN.UTF-8 #只对当前shell有效,临时设置 [hl@localhost ~]$ ll 总用量 drwxrwxr-x. hl hl ...

  10. array 的方法