Skip to content

Local Environment

Eugene Boltenko edited this page Oct 1, 2018 · 2 revisions

Contents

Overview

Multy-back comes with a number of services. The primary ones that you will use, and the ones that are covered here, are:

  • Multy-BTC-node-service - service that proceed BTC node and send custom data with gRPC to Multy-Back
  • Multy-ETH-node-service - service that proceed ETH node and send custom data with gRPC to Multy-Back

Getting the Code

To download all of the code, clone the Multy-back, Multy-BTC-node-service and Multy-ETH-node-service repository

go get -u https://github.com/Multy/Multy-back
go get -u https://github.com/Multy/Multy-BTC-node-service
go get -u https://github.com/Multy/Multy-ETH-node-service

Building Multy-back and Services

The simple approach to building Multy-back is to use the automated build script:

make all-with-deps

The executables can be found in the Multy-baсл/cmd folder.

In order you want to build it for linux (not from linux) use this command:

make dist

Then you shoud install MongoDB and NSQD.

Nodes

We are using 4 nodes: BTC Testnet + Mainnet, ETH Testnet + Mainnet. All of them you should setup by yourself. Configs are listed here: [LINK].

In order to setup BTC download btcd and laucnh it using following command:

btcd --configfile=config.conf

As we using RPC you should generate rpc.cert and rpc.key by yourself.

In order to setup ETH download geth, install and laucnh it using following commands:

geth --config=config.toml --console (optional)

Configs

Sample configs for Multy-back and Services are listed on cmd/ directories in each of repositories. Depending on choosing parametres when setting up nodes, you should change ports on config-files.

BTCD nodes config: mainnet, testnet
GETH nodes config: mainnet, testnet

Docker

Simple and fast setup of Multy-back and Services on Docker is also available. It will do everything without you.

Install Dependencies

  • Docker Docker 17.05 or higher is required

Change default configuration

You can use docker-compose override file to change the default configurations.

Then restart your docker containers as follows:

$ docker-compose down
$ docker-compose up

Clear data-dir

The data volume created by docker-compose can be deleted as follows:

$ docker volume rm VOLUME_NAME

Clone this wiki locally