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 you can do this by executing the following command:

pm2 stop lisk

2. Backup Lisk Core

2.1. Backup your custom config

In case you use 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:

~/lisk-core/
cd lisk-core/ (1)
git fetch (2)
git checkout v3.0.2 -b v3.0.2 (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. Update the custom config

Update the custom configuration according to the provided default configurations for Lisk Core, located in lisk-core/config/default/, if necessary.

Most importantly, ensure to include the new property unlockFixHeight in the configuration.

5. 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.

6. Start Lisk Core again

Start the node again by executing the following command below:

pm2 start lisk

7. Sanity Check

Verify the correct version

lisk-core --version
#lisk-core/3.0.2 linux-x64 node-v12.22.7

Check if the new unlockFixHeight is correctly set:

  • unlockFixHeight value for the Mainnet is 16785878

  • unlockFixHeight value for the Testnet is 14867989.

Example: Checking unlockFixHeight for Testnet
lisk-core node:info --pretty | grep unlockFixHeight
"unlockFixHeight": 14867989
For delegates
For delegates: Don’t forget to Enabling forging again after the update.