如何运行一个CYBEX数据节点

为了运行一个cybex的节点,今天联系到cybex的开发人员,拿到了相关的代码。
由于cybex暂时没有提供binary文件,所以还是需要手动编译的。

cybex的代码,托管在github上,但是前端轻钱包的代码和节点程序的代码分开在两个repo。
前端: https://github.com/CybexDex
节点程序: https://github.com/NebulaCybexDEX/cybex-core

环境使用的ubuntu 16.04,编译使用的命令如下

sudo apt-get update
sudo apt-get install autoconf cmake git libboost-all-dev libssl-dev
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .
make

需要注意的有两点

  1. cybex现在并没有把正式链,创世块的genesis文件更新到github
  2. cybex网络的种子节点,也没有内置到cpp文件中
    因此,都需要联系提供。( cybex开发最近应该会更新到repo。)

之后,就可以运行witness_node同步网络, cli_wallet查询链信息啦。

./witness_node --rpc-endpoint=0.0.0.0:8098
./cli_wallet -r 127.0.0.1:8099 -s ws://127.0.0.1:8098

比如 CYB 的最大供应1000000000, 当前供应950050007

new >>> get_asset CYB
{
  "id": "1.3.0",
  "symbol": "CYB",
  "precision": 5,
  "issuer": "1.2.3",
  "options": {
    "max_supply": "100000000000000",
    "market_fee_percent": 0,
    "max_market_fee": "1000000000000000",
    "issuer_permissions": 0,
    "flags": 0,
    "core_exchange_rate": {
      "base": {
        "amount": 1,
        "asset_id": "1.3.0"
      },
      "quote": {
        "amount": 1,
        "asset_id": "1.3.0"
      }
    },
    "whitelist_authorities": [],
    "blacklist_authorities": [],
    "whitelist_markets": [],
    "blacklist_markets": [],
    "description": "",
    "extensions": []
  },
  "dynamic_asset_data_id": "2.3.0"
}
new >>> 
get_object 2.3.0
new >>> get_object 2.3.0
[{
    "id": "2.3.0",
    "current_supply": "95005000770249",
    "confidential_supply": 0,
    "accumulated_fees": 0,
    "fee_pool": 0
  }
]

后面几天,再来学习cybex的后端代码的改进工作。

你可能感兴趣的:(如何运行一个CYBEX数据节点)