您正在查看: EOS 分类下的文章

state_history_plugin 的使用

发现今天更新了1.8.0RC版本,readme中说mongo插件已经废弃,马上将被删除,

Mongo DB plugin deprecated
The Mongo DB plugin has been deprecated and will be removed from the EOSIO source in a future release. Users are recommended to switch to non-deprecated history solutions such as the ones built off of the state_history_plugin.

之前一直没时间研究state_history_plugin EOSIO推荐的方案,最近抽空试一试
优点是分离了入库的逻辑, 不用replay就能自由的同步的其他数据库

源代码地址

插件源码地址:https://github.com/EOSIO/eos/tree/master/plugins/state_history_plugin
应用API:https://github.com/acoutts/EOS-state-history-API

安装依赖

安装postgresql

sudo apt-get install postgresql

待续。。

参考

https://cloud.tencent.com/developer/news/368043
https://www.jianshu.com/p/50bf6429a1ce
https://eosio.stackexchange.com/questions/3832/difference-between-history-plugin-and-state-history-plugin
https://developers.eos.io/eosio-nodeos/docs/monitoring-with-state-history
https://developers.eos.io/eosio-nodeos/docs/monitoring-with-3rd-party
https://eosio.github.io/history-tools/
https://github.com/tmuskal/jsclient-eosio-state-history-plugin

开源EOS浏览器eosweb

recipe for target 'all' failed appbase_version

详细错误如下

[  6%] Built target chainbase
fatal: No names found, cannot describe anything.
CMake Error at version.cmake:11 (message):
  git describe failed


libraries/appbase/CMakeFiles/appbase_version.dir/build.make:57: recipe for target 'libraries/appbase/CMakeFiles/appbase_version' failed
make[2]: *** [libraries/appbase/CMakeFiles/appbase_version] Error 1
CMakeFiles/Makefile2:1746: recipe for target 'libraries/appbase/CMakeFiles/appbase_version.dir/all' failed
make[1]: *** [libraries/appbase/CMakeFiles/appbase_version.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 29%] Built target softfloat
[ 31%] Built target libc++
[ 35%] Built target fc
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

    >>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.

解决方案
由于当时是直接复制的项目,所以没有tag。(CMakeLists.txt)编译时至少需要有一个tag,appbase会以最新的tag作为版本信息。
最终会写入 build\libraries\appbase\version.cpp 中
所以新建一个tag就好了
参考:https://github.com/EOSIO/eos/issues/5345