封装了一个Bitshares的喂价程序

in #cn5 years ago (edited)

最近 GBAC 计划参与 Bitshares 的见证人竞选,而我负责见证人服务节点等一系列服务的搭建。

一个见证人,最好是配备2台节点服务器(主备),1台测试节点服务器,1个API节点服务器,1个喂价程序。

其中像API和测试节点为了省成本,可以跟备机一块。最让我头疼的就是喂价程序了。

找了两个老的开源的喂价程序,折腾了一整天,总是各种各样的报错,最后@abit 提供了一个 https://github.com/Zapata/bitshares-pricefeed ,最终终于打包成可用的 docker 镜像了。

目前已经提交 PR 给原库了,不过还没有合并。目前想要使用的话,可以先用我的库,

git clone https://github.com/ety001/bitshares-pricefeed.git
cd bitshares-pricefeed
git checkout develop
docker build -t bitshares-pricefeed .

打包好以后,镜像大约在250MB左右,比原作者的1G多的镜像小了很多。

使用前,先生成默认配置文件

docker run -it --rm -v /path/to:/app bitshares-pricefeed:latest bitshares-pricefeed create

执行后,在 /path/to 目录下会有一个 config.yml 的配置文件,里面的注释解释的比较清楚,自己看一下就好。

然后执行下面的命令即可启动喂价程序

docker run -itd --name pricefeed -v /path/to/config.yml:/config/config.yml bitshares-pricefeed:latest bitshares-pricefeed --configfile /config/config.yml --node wss://ws.gdex.top update --active-key=XXXXXXX

其中 active-key 就是你的见证人账号的 active 权限的私钥

简单来说,就是简单的两步,创建配置文件,启动喂价程序。

不得不说,现在我对于docker的依赖越来越严重了。。。


ET碎碎念,每周一,晚六点一刻更新,欢迎订阅


感谢你的阅读,我是中文区见证人之一,欢迎通过 SteemConnect 来给我投票,或者打开 https://steemit.com/~witnesses/ 页面,输入 ety001 进行投票。

2.gif

中文区的见证人目前有:
支持一下他们(按字母顺序),一人可以有30票


Thank you for reading. I'm a witness. I would really appreciate your witness vote! You can vote by SteemConnect. Or open https://steemit.com/~witnesses page, input ety001 to vote.

2.gif

Sort:  

你今天过的开心吗?想要参加活动但是不知道从何开始?关注寻宝cn-activity每日整理社区活动!感谢支持。

Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!

Congratulations @ety001! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 3000 as payout for your posts. Your next target is to reach a total payout of 4000

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

The new SteemFest⁴ badge is ready
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.30
TRX 0.11
JST 0.034
BTC 66408.70
ETH 3225.39
USDT 1.00
SBD 4.17