Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Update deploy doc with trade-server;
Browse files Browse the repository at this point in the history
Fix ci;
  • Loading branch information
ludete committed Apr 29, 2020
1 parent eef30e1 commit fbfc89f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ matrix:
- tar -xzvf v6.6.4.tar.gz && cd rocksdb-6.6.4
- pwd
- mkdir build && cd build && cmake .. && make -j4 && sudo make install
- cd ../..
- echo $PWD

script:
Expand Down
41 changes: 30 additions & 11 deletions docs/enable_tradeserver_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@
> mkdir build && cd build && cmake .. && make -j2 </br>
> sudo make install </br>
### 节点初始化配置
### 初始化节点配置

下载可执行程序、初始化数据目录

> wget https://github.com/coinexchain/dex/releases/download/v0.2.17/linux_x86_64.tar.gz </br>
> tar -zxvf linux_x86_64.tar.gz </br>
> </br>
> </br>
> </br>
> export RUN_DIR=~~/path/to/node~~ </br>
> mkdir ${RUN_DIR} && mv linux_x86_64/* ${RUN_DIR} && cd ${RUN_DIR} </br>
> ${RUN_DIR}/cetd init moniker --home=${RUN_DIR}/.cetd </br>
> cp ${RUN_DIR}/genesis.json ${RUN_DIR}/.cetd/config </br>
参照[节点的通用步骤步骤](https://github.com/coinexchain/artifacts/blob/master/coinexdex-v0.2/Validator+%E5%93%A8%E5%85%B5%E8%8A%82%E7%82%B9-%E9%83%A8%E7%BD%B2%E6%96%B9%E6%A1%88.md#%E8%8A%82%E7%82%B9%E7%9A%84%E9%80%9A%E7%94%A8%E9%83%A8%E7%BD%B2%E6%AD%A5%E9%AA%A4)初始化节点配置;

### 修改节点配置

修改`cetd`自身配置:配置文件路径 `RUN_DIR/.cetd/config/app.toml`
修改`cetd`配置文件 `${RUN_DIR}/.cetd/config/app.toml`; 在文件末尾添加下述内容


> feature-toggle = true </br>
Expand All @@ -23,23 +34,31 @@
> ] </br>
>
修改`cetd`配置文件 `${RUN_DIR}/.cetd/config/config.toml`; 修改文件中的`seeds`字段,替换为如下内容

`seeds = "903458cf236851ccf8604689c3f391c528191f47@47.75.37.80:26656,9be765dffed72adcd27ebb37c79bf8ac501f43e8@47.52.155.115:26656,cd79d6c2b3b6b561c91b61b8e3a706249b532ca4@47.56.215.151:26656,cf34ba278ce69be1240f1dabad9b57ffecae206a@47.75.60.29:26656,c70feea1a4f8ea2fd55c366fdcb7ca4d53f1c775@18.144.85.87:26656,94b718f31dedf4afee4c04d768343166625cf961@47.52.70.137:26656,2cbef50b8c996745b9c8a0059fe32a1fbfef8b46@47.52.129.186:26656,17ec2dcfd7c72fabcb7c7cfe2d71006fc39c85c9@18.180.56.174:26656"`

### 修改trade-server 配置

拷贝项目目录下的`trade-server.toml.default``RUN_DIR/.cetd/config/trade-server.toml`;
##### 设置cetd推送数据的目录

修改 `dir`的配置与`cetd`配置文件中`brokers``prune`模式配置的路径一致;
拷贝项目目录下的[trade-server.toml.default](https://github.com/coinexchain/dex/blob/master/trade-server.toml.default)``${RUN_DIR}/.cetd/config/trade-server.toml`;

修改该配置文件中`dir`的配置与`cetd`配置文件`app.toml``brokers``prune`模式配置的路径一致;

`trade-server.toml` 配置文件中[各字段含义](https://github.com/coinexchain/trade-server/blob/master/docs/trade-server-deploy.md#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E8%AF%B4%E6%98%8E)

### 放置历史数据
##### 设置trade-server功能的数据目录

[地址](https://github.com/coinexchain/artifacts/blob/master/coinexdex-v0.2/history_data.tar.gz)下载cetd的历史数据,历史数据中存储了cetd `coinexdex`链上的订单信息,与当前`coinexdex2`链上的订单信息一起组织,
形成用户所需要的订单深度、ticker等数据;
下载cetd的历史数据: `wget https://github.com/coinexchain/artifacts/raw/master/coinexdex-v0.2/history_data.tar.gz`.

* 历史数据中存储了cetd `coinexdex`链上的订单信息,与当前`coinexdex2`链上的订单信息一起组织,形成用户所需要的订单深度、ticker等数据;

解压该历史数据:`tar -zxvf history_data.tr.gz`
解压该历史数据:`tar -zxvf history_data.tar.gz`

修改`${RUN_DIR}/.cetd/config/trade-server.toml`配置文件中`data-dir`字段,指向存储历史数据的目录;


修改`trade-server.toml`配置文件中`data-dir`字段,指向存储 `cetd`历史数据的目录;
`${RUN_DIR}/.cetd/config/trade-server.toml` 配置文件中[各字段含义](https://github.com/coinexchain/trade-server/blob/master/docs/trade-server-deploy.md#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E8%AF%B4%E6%98%8E)

### 启动节点

Expand Down

0 comments on commit fbfc89f

Please sign in to comment.