Introduction

Core

Lisk Core is the program that actually implements the Lisk Protocol. In order to run a node which will participate in the network, the Lisk Core must be installed. Furthermore, this also applies to every additional machine that is required to run a node.

Setting up Lisk Core provides the user with the following options:

  • The ability to connect to a network and communicate with other nodes in the network.

  • The full control to configure Lisk Core to specific and custom requirements.

  • The possibility to create your own snapshot of the blockchain.

  • The ability to use a self controlled node to perform actions on the Lisk blockchain, e.g. with Lisk Desktop.

  • The opportunity to Forge new blocks, (for active delegates).

An instance of Lisk Core and a Lisk peer can generally be defined by the following two statements below:

A Lisk Core instance connected to a network is referred to as a Lisk node.

A Lisk node connected to other Lisk nodes, and is referred to as a Lisk peer.

Both statements above refer to a machine which in turn now becomes a server, after Lisk Core has been installed and executed. Subsequently, the server now participates in the network and provides the blockchain data to its clients.

Getting started

What is a node?

The Lisk blockchain is a decentralized network that consists of many different servers, (or nodes). Node operators are required to set up Lisk Core on a server, and then connect it to the desired network.

There are over 600 nodes around the world that are maintained by individuals, and these nodes communicate with the network. For example, by broadcasting and receiving blocks or transactions from their peers. In addition, Lisk nodes are also required to forge/add new blocks to the blockchain. It is possible to view the live network statistics by accessing the following URL: Lisk’s Blockchain Explorer.

Who should operate a node?

If you fall under one of the following categories listed below, then it is recommended to set up your own node:

  • Exchanges and other services that rely on a stable API interface to the network.

  • Delegates who have registered as a delegate and would like to actively forge.

  • Users who do not trust external sources and want to be in full control over their node.

Why operate a node?

There are several advantages listed below as to why one would wish to set up a node, and these are described below:

  • To have your private entry point to communicate with the network. This is especially important when running an exchange and implementing LSK tokens.

  • To create your own snapshots of the blockchain.

  • To have the option to forge new blocks, (assuming you are an active delegate).

  • To acquire full control in order to configure the node to your specific requirements.

To learn how to set up a node, please see the setup overview page.

Networks

The Lisk Core can be connected to different networks. Please be aware that there are three key accessible public networks existing which are entirely independent of each other. These networks are described below.

Table 1. Public networks of Lisk
Mainnet Testnet Betanet

Network Identifier

none

none

7158c297294a540bc9ac6e474529c3da38d03ece056e3fa2d98141e6ec54132d

Explorer

Lisk Explorer

Lisk Testnet Explorer

Lisk Betanet Explorer

HTTP port

8000

7000

5000

Mainnet

The Mainnet is where the true Lisk economy exists. Within this network the Lisk users can transfer LSK tokens from one account to another, register accounts as delegates; and vote for other delegates.

Testnet

The Testnet is an independent replica of the Lisk Mainnet, whose main function is to test the upgrades first before they are run on the Lisk Mainnet. Subsequently, this is where new/updated versions and fixes of the Lisk Core are tested.

To start using the Testnet, please download your free LSK Testnet from the Testnet faucet.

To connect to the Testnet via Lisk Desktop, simply enable the "Network Switcher" in the settings and then use it to switch the network to Testnet.

Betanet

The Betanet is the place where the most recent releases of Lisk Core are tested, before moving to the Testnet and Mainnet.

The releases for Lisk Core 3.0. will all be published on the Betanet. Each version that uses a new major version of the Lisk SDK will result in a new hard fork in the network. After the new releases have been successively released on the Betanet, they will be released on the Testnet, and then later on the Mainnet in order to reduce the number of hard forks in the networks.

Read this Blog post for more information about the New Lisk Core release schedule.

To start using the Betanet, please download your free Betanet LSK from the Betanet faucet

To connect to the Betanet via Lisk Desktop, simply enable the "Network Switcher" in the settings. On the Login page, now enter betanet.lisk.io as custom node.

Snapshots

A snapshot is a backup of the complete blockchain. It can be used to speed up the synchronization process, instead of having to validate all transactions starting from the genesis block to the current block height. Lisk provides official snapshots of the blockchain which can be found in the following link: http://snapshots.lisk.io

How to rebuild from a snapshot and to create your own snapshots is explained in the administration section for each distribution of the Lisk Core.

It is recommended to use Lisk Core application for creating your own snapshots, as a script is provided to conveniently create snapshots.

Technology stack

The Lisk Core consists of the following 4 main technologies:

  • Node.JS

  • Swagger

  • PostgreSQL

  • Redis

Node.js

Node.js serves as the underlying engine for code execution in the Lisk Core. Node.js is an open-source, cross-platform JavaScript run-time environment, that executes the JavaScript code on the server-side. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.

Swagger

Swagger is an open source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful web services. As part of the Lisk Core documentation, the whole API specification can be explored interactively via the Swagger-UI interface.

PostgreSQL

PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development. It has subsequently earned a strong reputation for reliability, feature robustness, and performance. All information on the Lisk mainchain is stored inside of the PostgreSQL databases.

Redis

Redis is an open source, in-memory data structure store. Lisk Core mainly uses it to cache API responses. This prevents performance drops in the application. For example, when the same API request is sent repeatedly.

Versioning schemes

Lisk Core is described in 2 different versioning schemes. The Software implementation version and the Protocol version as described below:

Software implementation versioning

All Lisk Core software changes except for the logging system, are communicated following the exact rules specified by the SemVer.

Software implementation versioning has a version prefix v followed by a 3 digit notation <MAJOR>.<MINOR>.<PATCH> , in which the individual digits represent the following types of software changes shown below:

v<MAJOR>.<MINOR>.<PATCH>

v     - Version prefix
MAJOR - Breaking change
MINOR - New feature
PATCH - Bug fix

The software implementation version follows the popular SemVer scheme, and provides a quick overview for developers about breaking and non-breaking changes in the software.

Protocol versioning

The protocol version is denoted by two digits, H.S.. The first digit, H, depends on the number of hard forks, and is incremented with each hard fork. S represents the number of soft forks since the last hard fork.

The initial protocol version 1.0 is defined as the version that was implemented by Lisk Core v1.0.0.

The protocol version is used for example, in P2P communication between Lisk Core nodes, in order to determine if the nodes have compatible versions of the Lisk protocol implemented.