Set up Fullnode And Connect to Testnet

This document explains how to set up a fullnode and connect to the Testnet of the Lino Blockchain.

NOTE: We are aware that this documentation is sub-par and we are actively working on improving both the tooling and the documentation to make this setup process as smooth as possible. In the meantime, join us on Discord for technical support.

Software Setup (Manual Installation)

These instructions are for setting up a brand new full node from scratch. Follow the steps below to install Lino Core and connect to Testnet. This instruction works for both a local machine and a VM on a cloud server. Lino Core is based on Cosmos SDK, and the setup process is similar.

If you want to run a non-validator full node, installing the Lino Core on a Cloud server should be a good option. However, if you want to run a validator, you should first learn more about Sentry Node Architecture to protect your validator from DDoS attacks and ensure a high availability (see the technical requirements).

Install GNU Wget

MacOS

brew install wget
1

Linux

sudo apt-get install wget make
1

Note: You can check other available options for downloading wget here.

Install Go

To install go, follow the instructions in the official golang website. You will need Go 1.12+ for this tutorial.

$ wget https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz
$ sudo tar -xvf go1.12.9.linux-amd64.tar.gz
$ sudo mv go /usr/local
1
2
3

Set GOPATH

First, you need to set up your GOPATH. Make sure that the location $HOME is something like /Users/<username>, you can corroborate it by typing echo $HOME in your terminal.

Go to $HOME with the command cd $HOME, open the hidden file .bashrc with a code editor, and paste the following code (or .bash_profile if your're using OS X).

$ export GOROOT=/usr/local/go
$ export GOPATH=$HOME/go
$ export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
1
2
3

Install Lino Core

Now we can fetch the correct versions of each dependency by running:

$ mkdir -p $GOPATH/src/github.com/lino-network/
$ cd $GOPATH/src/github.com/lino-network/
$ git clone https://github.com/lino-network/lino
$ cd lino
$ git checkout v0.6.8
$ make get_tools && make install
1
2
3
4
5
6

Full Node Setup

If you go through above process, you should be able to start a node with single validator. The genesis account's private key will show up at last step of above process. Now you can start you own node by running:

$ lino init
$ lino start
1
2

If you want to connect to Lino Testnet, you should copy config and genesis file.

$ lino init
$ cp -a genesis/upgrade5/genesis.json $HOME/.lino/config/genesis.json
$ cp -a genesis/upgrade5/config.toml $HOME/.lino/config/config.toml
$ lino unsafe-reset-all
1
2
3
4

If you wanna sync the blocks from the first block, please download all previous blockchain data from S3:

$ wget https://lino-blockchain-opendata.s3.amazonaws.com/prd/prevstates.tar.gz
$ tar -xzvf prevstates.tar.gz -C ~/.lino/
1
2

Lastly change the moniker string in the $HOME/.lino/config/config.tomlto identify your node.

# A custom human readable name for this node
moniker = "<your_custom_name>"
1
2

Optional: to increase number of connections

$ ulimit -n 4096
1

Run a Full Node

Start the full node:

$ lino start
1

Your node should start syncing to our Lino Testnet.

Start Fullnode from Snapshot

Lino officially takes snapshot of blockchain data every 30 mins and uploads to AWS S3. You can start your node from that snapshot to save sync time.

To start from snapshot, you should first clear your current blockchain data with command:

$ lino unsafe-reset-all
1

Once data is cleared you can download the snapshot and uncompress it to data folder:

$ wget "https://lino-blockchain-data-ireland.s3-eu-west-1.amazonaws.com/data.tar.gz"
$ mkdir -p $HOME/.lino/data/
$ tar -xzvf data.tar.gz -C $HOME/.lino/data/
1
2
3

Then you can start you node with command:

$ lino start
1