Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lisk-core

Package Overview
Dependencies
Maintainers
4
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lisk-core

Lisk blockchain application platform

  • 4.0.0-beta.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by400%
Maintainers
4
Weekly downloads
 
Created
Source

Logo

Lisk Core

License: Apache 2.0 GitHub tag (latest by date) GitHub repo size DeepScan grade GitHub issues GitHub closed issues Code coverage

Lisk is a next-generation crypto-currency and decentralized application platform, written entirely in JavaScript. The official documentation about the whole ecosystem can be found in https://lisk.com/docs.

Lisk Core is the program that implements the Lisk Protocol. In other words, Lisk Core is what every machine needs to set-up to run a node that allows for participation in the network.

This document details how to install Lisk Core from source and from npm registry, but there are two other ways to participate in the network: binaries and Docker images. If you have satisfied the requirements from the Pre-Installation section, you can jump directly to the next section Installation Steps.

Index

Installation

Dependencies

The following dependencies need to be installed in order to run applications created with the Lisk SDK:

DependenciesVersion
NodeJS18.16
Python (for development)2.7.18

You can find further details on installing these dependencies in our pre-installation setup guide. Clone the Lisk Core repository using Git and initialize the modules.

From Source

git clone https://github.com/LiskHQ/lisk-core.git
cd lisk-core
git checkout main
nvm install
npm ci
npm run build
./bin/run --help

From NPM

$ npm install -g lisk-core
$ lisk-core COMMAND
running command...
$ lisk-core (-v|--version|version)
lisk-core/4.0.0-beta.4 darwin-arm64 node-v18.16.1
$ lisk-core --help [COMMAND]
USAGE
  $ lisk-core COMMAND
...

Command Topics

Managing Lisk Node

System requirements

The following system requirements are recommended for validator nodes:

Memory
  • Machines with a minimum of 4 GB RAM for the Mainnet.
  • Machines with a minimum of 2 GB RAM for the Testnet.
Storage
  • Machines with a minimum of 40 GB HDD.
OS
  • Ubuntu 22
  • Ubuntu 20
  • MacOS 13

To start a Lisk Core node as a background process, we recommend using a process management tool, such as PM2.

Example using PM2

nvm install
npm i -g pm2
pm2 start "lisk-core start" --name lisk-mainnet
pm2 status
pm2 logs lisk-mainnet

For a more advanced options refer to PM2 documentation.

Configuring Lisk Node

lisk-core start supports flag and environment variable options to configure a node.

In addition, custom configuration through the JSON file can be made available through the --config, -c flag.

NOTE: As a security measure, access to all the methods on the node over the IPC and HTTP API by default are disabled. To allow access, the system.allowedMethods property within the custom node config file may be configured as shown below.

  • system.allowedMethods: ["system_getNodeInfo"] - Expose specific methods
  • system.allowedMethods: ["system", "token"] - Expose all the registered methods under the specified namespaces
  • system.allowedMethods: ["*"] - Expose all available registered methods under all the namespaces

Example

With custom config file ./custom-config.json below:

{
  "system": {
    "dataPath": "~/.lisk",
    "logLevel": "debug",
    "keepEventsForHeights": -1,
    "allowedMethods": ["*"]
  },
  "rpc": {
    "modes": ["ipc", "ws", "http"],
    "port": 7887,
    "host": "127.0.0.1"
  },
  "network": {
    "port": 7667,
  },
  "transactionPool": {
    "maxTransactions": 8096,
    "maxTransactionsPerAccount": 1024,
  },
  "generator": {
    "keys": {
      "fromFile": "./config/dev-validators.json"
    }
  },
  "plugins": {
    "reportMisbehavior": {
      "encryptedPassphrase": "iterations=10&cipherText=5dea8b928a3ea2481ebc02499ae77679b7552189181ff189d4aa1f8d89e8d07bf31f7ebd1c66b620769f878629e1b90499506a6f752bf3323799e3a54600f8db02f504c44d&iv=37e0b1753b76a90ed0b8c319&salt=963c5b91d3f7ba02a9d001eed49b5836&tag=c3e30e8f3440ba3f5b6d9fbaccc8918d&version=1"
    },
    "chainConnector": {
      "receivingChainIPCPath": "~/.lisk/sidechain",
      "ccuFee": "5000000",
      "encryptedPrivateKey": "kdf=argon2id&cipher=aes-256-gcm&version=1&ciphertext=f962147c16450604456db731156a31b5fa07bc1a55c32f243f59795414b75fbfcbe13a54426976c98fe21c0a9d918b80fb956d280ceff8a7ca35db29eb77ecfd0afbd359233a863425766815c84d5d20ba17ca0edd07e0eacaa3324e53ade573f7f647097dffaf64368cf40be05636bee58318389843d1f29b587d58c71e34ab&mac=bbe4120b758ba7c541cfb39d1ea9b6a781054cdaffbd4b5e724d375fc5367543&salt=20fdfa08a8e6d158fc1f8b70672f43aa&iv=22cb20bdf0a9f06124a7b53a&tag=37cbecb09493581e476dd4439e8ef1fc&iterations=1&parallelism=4&memorySize=2024",
      "password": "lisk"
    }
  },
}

Running a command will overwrite the default config and use the specified options.

lisk-core start -n devnet -c ./custom-config.json --overwrite-config

For a more detailed understanding of configuration read this online documentation.

Tests

Automated tests

All automated tests will run with the below command.

npm test

Running a local development node

In order to run a node for a local test, in a root folder of lisk-core, run below command.

./bin/run start -n devnet --data-path ./devnet-data --port 3333 --api-ipc --enable-forger-plugin

This command will start a lisk-core node using data path ./devnet-data with Forger Plugins. Data on the node can be obtained by commands like

./bin/run endpoint invoke system_getNodeInfo --pretty
./bin/run system node-info --data-path ./devnet-data
./bin/run block:get 3 --data-path ./devnet-data

Contributors

https://github.com/LiskHQ/lisk-core/graphs/contributors

License

Copyright 2016-2023 Lisk Foundation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Keywords

FAQs

Package last updated on 19 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc