Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - silent

Pages: [1]
1
Technical Support / best way to get and refresh orderbook with api?
« on: September 11, 2017, 08:34:17 am »
I'm using get_order_book() to get orderbook,
is there a way to let websocket api notice me when one item in orderbook changed ?

I see there is a subscribe_to_market(), though I'm still don't know what id does, but it is not like notice for orderbook.

what is the best way to do this ?


2
Technical Support / no data in test net exchange page
« on: August 03, 2017, 05:27:48 am »
https://testnet.bitshares.eu/market/USD_BTS

I can only see a loading gif there, also the websocket api returns nothing.

3
Technical Support / witness_node doesn't work well
« on: July 30, 2017, 07:00:48 am »
I compiled witness_node as the document, but it doesn't look like working well,

softwares : Debian9 x86, gcc 6,
boost.1.6..0(tried 1.5.7-1.5.9, none works, complain about some SSL functions),
bitshares-core is from github.

# witness_node -d /data/BTS_data --partial-operations true --track-account "\"1.2.22***\"" --rpc-endpoint

it needs many hours to sync data, but almost every time it will crash when the syncing data to a few days before current date,
after crashing or closed by Ctrl-C I start it again, but it won't sync data anymore, json rpc will return empty data(ie. empty bid and ask data).

2810445ms th_a       object_database.cpp:94        open                 ] Opening object database from /data/BTS_data/blockchain ...
2822900ms th_a       object_database.cpp:100       open                 ] Done opening object database.
2822923ms th_a       application.cpp:131           reset_p2p_node       ] Adding seed node 104.200.28.117:61705
..
...
2823265ms th_a       witness.cpp:122               plugin_startup       ] witness plugin:  plugin_startup() begin
2823266ms th_a       witness.cpp:137               plugin_startup       ] No witnesses configured! Please add witness IDs and private keys to configuration.
2823266ms th_a       witness.cpp:138               plugin_startup       ] witness plugin:  plugin_startup() end
2823266ms th_a       main.cpp:179                  main                 ] Started witness node on a chain with 0 blocks.

What I want to do is have a witness_node running, then I can get the ask/bid prices of some coins and use program to trade.

I have some questions here:

1. how to run witness_node smoothly even after restarting it?

2. do I have to set enable-stale-production = true  and add some winness-id ?
I see some thread in forum saying  to add some witness-id = "1.7.*
but in my config file, I can only add some "1.6.*", and I'v no idea what they are.

3. I heard the witness_node requires 8 ~ 24GB memory, closing it with Ctrl-C need to wait more than 10 minutes unitll it finish write data to disk,
but I only have 4GB memory, not SWAP, not SSD. but I never saw it use all of the memory, usually around 1GB,
though there is a time it did crashed with std::bad_alloc, but system still have lots of free memory, no OOM-killer message in system logs.
also closing it with a single Ctrl-C doesn't need to wait at all .

are these saying that I'm using wrong witness_node ?


4. is witness_node + cli_wallet enough to run a trading bot ? (with wintness_node default setting)

5. is there any public witness_node I can connect to ? then I can stop making my witness_node work, is it safe to run bot with public node ?


sorry, too many questions, but really need help, thanks!

4
新手入门 / 运行wintness_node遇到麻烦, 请达人帮忙
« on: July 29, 2017, 10:06:35 am »
参照教程编译了witness_node,但是运行不正常,

环境:debian9 x86, gcc 6, boost.1.6..0(试过1.5.7-1.5.9都不行), bitshares-core也都是最新的代码.
# witness_node -d /data/BTS_data --partial-operations true --track-account "\"1.2.22***\"" --rpc-endpoint

同步数据要好多个小时, 但是每次快结束(到了7月中旬的数据)就挂了, 各种奇葩原因, 好像都是程序错误, 具体我也记不得了.
每次重启witness_node,他就不再同步数据了, 不知道在干啥, rpc也不能返回数据了:

2810445ms th_a       object_database.cpp:94        open                 ] Opening object database from /data/BTS_data/blockchain ...
2822900ms th_a       object_database.cpp:100       open                 ] Done opening object database.
2822923ms th_a       application.cpp:131           reset_p2p_node       ] Adding seed node 104.200.28.117:61705
..
...
2823265ms th_a       witness.cpp:122               plugin_startup       ] witness plugin:  plugin_startup() begin
2823266ms th_a       witness.cpp:137               plugin_startup       ] No witnesses configured! Please add witness IDs and private keys to configuration.
2823266ms th_a       witness.cpp:138               plugin_startup       ] witness plugin:  plugin_startup() end
2823266ms th_a       main.cpp:179                  main                 ] Started witness node on a chain with 0 blocks.


有好多问题想请教:

1. 为什么我的witness_node无法完成同步呢?
2. 有必要设置enable-stale-production = true并加入winness-id么?
我看网上说要加一堆的witness-id = "1.7.*"然而这东西是做什么用的呢? 我的环境下只能加一堆"1.6.*", 完全不知道是啥

3. 听闻机器需要8-24G内存,Ctrl-C结束witness-node也要等10多分钟才能完全结束.
然而, 在我这里机器只有4G内存, 也从来没有用满过, 刚才的确挂于std::bad_alloc, 但是我从系统日志中并没有看到内存用光的记录,
每次Ctrl-C结束witness_node,它都是很快就结束, 没有把内存数据写入磁盘的操作似的.
这究竟是为什么呢?


4. 我想做的事情就是建立本地交易所, 内获取盘口行情, 并用程序交易,
请问只用witness_node + cli_wallet够不够, 不知道witness默认设置够不够, 钱包的话猜测应该是要导入私钥吧, 现在还无法达到那一步.

5. 有什么公共的witness_node可用么? 那么我就不折腾了, 不知道公共的是否可信, 因为钱包也要链接人家的节点嘛.
后面大坨的事情还没学习, 比如api, 策咯什么的, 结果第一步就卡住了, 已经浪费了几天时间, 希望懂的人能帮忙解说解说.

Pages: [1]