Skip to content

Setting up Liquidity Provider (LP) Node

Satinder Grewal edited this page May 11, 2017 · 23 revisions

Prerequisite for LP Node

You must have these installed and running on your system:

Installing Liquidity Provider (LP) Node on Ubuntu/Debian System

Liquidity Provider (LP) node is using the same iguana daemon codebase which is used at many other places like Notary Nodes, Agama Wallet and such.

For Liquidity Provider we'll need to compile iguana daemon & marketmaker daemon with Market Maker capabilities.

Setting up SuperNET/Iguana.

Log in as the user to your system, and issue these commands to make sure your Linux machine is up to date.

sudo apt-get update
sudo apt-get upgrade (and say Y when it wants to upgrade stuff)

Install the dependency packages:

sudo apt-get install build-essential pkg-config libc6-dev m4 \
		g++-multilib autoconf libtool ncurses-dev unzip git python \
		zlib1g-dev wget bsdmainutils automake libboost-all-dev \
		libssl-dev libprotobuf-dev protobuf-compiler libqt4-dev \
		libqrencode-dev libdb++-dev ntp ntpdate vim software-properties-common \
		curl libcurl4-gnutls-dev cmake clang

Some Linux machines are now providing nanomsg package version 1.0. If it is available via package manager, you can install it from there. Else, you should use github repo of nanomsg and compile it yourself.

For Ubuntu 14.04 you need to install it yourself

cd /tmp
wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz -O nanomsg-1.0.0.tar.gz
tar -xzvf nanomsg-1.0.0.tar.gz
cd nanomsg-1.0.0
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
cmake --build .
sudo cmake --build . --target install
sudo ldconfig

Or the following for 16.04

git clone https://github.com/nanomsg/nanomsg
cd nanomsg
cmake .
make
sudo make install
sudo ldconfig

Time to compile iguana daemon from SuperNET github repo

cd ~
git clone https://github.com/jl777/SuperNET
cd SuperNET/iguana
git checkout dev
./m_LP

This will compile iguana daemon and place it under ~/SuperNET/agents/iguana. To start iguana daemon follow these exact steps:

cd ~/SuperNET/iguana/
../agents/iguana

Make sure to follow the above steps exactly to start iguana daemon properly. Once you see output like below iguana is ready and serving it's API on http://127.0.0.1:7778 or http://localhost://7778

>>>>>>>>>> iguana_rpcloop 127.0.0.1:7778 bind sock.17 iguana API enabled <<<<<<<<<
mainloop

Setup link between iguana, KMD and BTC

Link between these three is that iguana API starts talking to Native Komodo RPC and Native Bitcoin RPC.

This let iguana and marketmaker do transaction and OP Script operations.

So, in this sense, iguana and marketmaker are basically working as external Smart Contract daemon.

To start BTC passthru link between iguana and Native Bitcoin RPC do these steps:

cd ~/SuperNET/iguana/coins
./btc

To start KMD passthru link between iguana and Native Komodo RPC do these steps:

cd ~/SuperNET/iguana/coins
./kmd

Now we are ready for next step.

Time to compile Market Maker

Keep iguana daemon running in separate window, and open a new Terminal window and follow these steps:

cd ~
cd SuperNET/iguana
git checkout dev
./m_mm

This will compile marketmaker daemon which you can find in ~/SuperNET/iguana/marketmaker.

Ready to start Market Maker

Before you execute marketmaker we first need to