Lisk Migrator is a command line tool to migrate the blockchain data to the latest protocol when hard fork.
The following dependencies need to be installed in order to run applications created with the Lisk SDK:
Dependencies | Version |
---|---|
NodeJS | ^18.16 |
NPM | 8.3.1 or later |
Lisk Core | 3.1.0 or later |
NOTE: It is important that NodeJS is installed using NVM. Please refer our documentation here.
The following system requirements are recommended to run Lisk Migrator v2.0.0:
- Machines with a minimum of 4 GB RAM.
- Machines with a minimum of 40 GB HDD.
Follow our Lisk Documentation guide for setting up the Lisk migrator.
Clone the Lisk Migrator repository using Git and initialize the modules.
$ git clone https://github.com/LiskHQ/lisk-migrator
$ cd lisk-migrator
$ git checkout $tag
$ nvm install $(cat .nvmrc)
$ npm install --global yarn
$ yarn; yarn build;
$ PLATFORM=$(uname | tr '[:upper:]' '[:lower:]')
$ ARCH=$(uname -m | sed 's/x86_64/x64/')
$ npx oclif-dev pack --targets=$PLATFORM-$ARCH
After building the binaries, please extract the appropriate tarball and add it the the PATH environment variable as shown below to continue with the usage.
Requires
jq
. If not already installed, please check https://jqlang.github.io/jq/download on how to install.
$ MIGRATOR_VERSION=$(jq -r .version < package.json)
$ PLATFORM=$(uname | tr '[:upper:]' '[:lower:]')
$ ARCH=$(uname -m | sed 's/x86_64/x64/')
$ mkdir ~/lisk-migrator-extract
$ find ./dist -name lisk-migrator-v$MIGRATOR_VERSION-$PLATFORM-$ARCH.tar.gz -exec cp {} ~/lisk-migrator-extract \;
$ tar -C ~/lisk-migrator-extract -xf ~/lisk-migrator-extract/lisk-migrator-v$MIGRATOR_VERSION-$PLATFORM-$ARCH.tar.gz
$ export PATH="$PATH:$HOME/lisk-migrator-extract/lisk-migrator/bin"
$ npm install -g lisk-migrator
$ lisk-migrator COMMAND
running command...
$ lisk-migrator (-v|--version|version)
lisk-migrator/2.0.1 darwin-arm64 node-v18.16.1
$ lisk-migrator --help [COMMAND]
USAGE
$ lisk-migrator COMMAND
...
NOTE: To verify the final results, please run the following command:
cat genesis_block.blob.SHA256
under the output directory and compare the results with other participants on Discord.
lisk-migrator help
- display help for lisk-migrator
Lisk Migrator has an extensive set of unit tests. To run the tests, please install Lisk Migrator from source, and then run the command:
$ npm test
The migration guide explains the transition process from Lisk Core v3.1.0 (or later) to Lisk Core v4.0.1 using Lisk Migrator v2.
Reason | How |
---|---|
Want to chat with our community | Reach them on Discord |
Found a bug | Open a new issue |
Found a security issue | See our bounty program |
Want to share your research | Propose your research |
Want to develop with us | Create a fork |
Copyright 2016-2024 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.