Update Lisk Core (source code)

This section describes how to update Lisk Core to a specific version from source code

1. Stop the old Lisk Core

Stop the node. If you are using pm2 this can be performed by executing the following command:

pm2 delete lisk-core

2. Backup Lisk Core

2.1. Backup your custom config

In case you are using a custom configuration which is stored inside the lisk-core/ folder, make sure to copy or move the custom configuration to another location.

2.2. Backup the application data

tar czf ~/backup_lisk.tar.gz ~/.lisk/

3. Switch to the new version

Pull the latest tagged release using Git:

cd lisk-core/ (1)
git fetch (2)
git checkout v3.1.1 -b v3.1.1 (3)
1 Navigate into the root directory of Lisk Core.
2 Fetch the latest releases.
3 To view the latest release tag, please see Lisk Core releases.

4. Install the new version

Install node modules as shown below in the following commands:

npm ci (1)
npm run build (2)
1 Install node modules.
2 Compile packages.

5. Start Lisk Core again

Start the node again by executing the following command below:

pm2 start pm2.conf.json

6. Sanity Check

Verify the correct version.

lisk-core --version
#lisk-core/3.1.1 linux-x64 node-v18.16.1

Check if the new transferFixHeight, serializationFixHeight is correctly set:

  • transferFixHeight, serializationFixHeight value for the Mainnet is 17557156.

  • transferFixHeight, serializationFixHeight value for the Testnet is 15466999.

Example: Checking transferFixHeight, serializationFixHeight for Testnet
lisk-core node:info --pretty | grep "serializationFixHeight\|transferFixHeight"
"transferFixHeight, serializationFixHeight": 15466999
For delegates
For delegates: Don’t forget that Enabling forging again is required after the update.