______  _   _  _   _  _   ________  _____  _____  _   __
        | ___ \| | | || \ | || | / /| ___ \|  _  |/  __ \| | / /
        | |_/ /| | | ||  \| || |/ / | |_/ /| | | || /  \/| |/ / 
        |  __/ | | | || . ` ||    \ |    / | | | || |    |    \ 
        | |    | |_| || |\  || |\  \| |\ \ \ \_/ /| \__/\| |\  \
        \_|     \___/ \_| \_/\_| \_/\_| \_| \___/  \____/\_| \_/
---------------------------------------------------------------------------
 Home | Lisk | About
---------------------------------------------------------------------------

 

 

Lisk Betanet v4 on VPS with Ubuntu 18.04 & 20.04

STEP 1 - Create lisk user, install needed stuff and configure Lisk Commander for Betanet

~# adduser lisk
~# gpasswd -a lisk sudo
~# su - lisk

~$ sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && sudo apt-get -y install wget tar zip unzip ufw htop nano npm git curl bash jq screen
~$ wget https://downloads.lisk.io/lisk/beta/installLisk.sh
~$ bash installLisk.sh install -r beta
Where do you want to install Lisk to? (Default /home/lisk): PRESS ENTER
Would you like to synchronize from the Genesis Block? (Default no): PRESS ENTER
~$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
~$ sudo apt-get install -y nodejs

~$ sudo npm install --global --production lisk-commander

~$ lisk -v

lisk-commander/4.0.0 linux-x64 node-v12.19.0

~$ lisk config:set api.nodes http://127.0.0.1:5000

 

 

STEP 2 - Create your account

~$ lisk account:create

[{"passphrase":"clutch brain ... ... ... finger divert","privateKey":"cd3e1c06ada43ff313959a88609e.......edb268334e42d4cec1a02b07bbfa995429067583f","publicKey":"41c659f3fd5c8a3ed8d55beedb268334e42d4cec1a02b07bbfa995429067583f","address":"2448569909047398614L"}]

Store the output and don't lose it.
You can now use the Faucet for Betanet to get some betaLSK but you also need to ask shuse2 or Manu at Lisk's Discord (https://lisk.chat) for 11000 betaLSK.

 

 

STEP 3 - Create a random 12-word passphrase and encrypt your account-passphrase

~$ lisk account:create

You just need the 12 words. Don't lose them!

pitch strike ... ... ... verb unusual

~$ lisk passphrase:encrypt --outputPublicKey

Please enter passphrase: clutch brain ... ... ... finger divert
Please re-enter passphrase: clutch brain ... ... ... finger divert
Please enter password: pitch strike ... ... ... verb unusual
Please re-enter password: pitch strike ... ... ... verb unusual


Copy and paste the output into a txt-file. You'll need parts of it for your config.json:

{"encryptedPassphrase":"iterations=100.......version=1","publicKey":"41c659f3fd5c8a3ed8d55beedb268334e42d4cec1a02b07bbfa995429067583f"}


Now you create the onion hashes file:

~$ cd ~ && cd lisk-beta && lisk hash-onion -o hash_onion.json


Now you create a bash file:

~$ cd ~ && nano create_config.sh

 

Paste the following into the file and do NOT close it. You will replace the highlighted parts:

cd ~ && > ~/lisk-beta/config.json
ONION=$(cat ~/lisk-beta/hash_onion.json)
cat > ~/lisk-beta/config.json << EOF_betanet_config
{
    "forging": {
        "delegates": [
            {
                "encryptedPassphrase": "iterations=100...............version=1",
                "publicKey": "41c659f3fd5c8a3ed8d55beedb268334e42d4cec1a02b07bbfa995429067583f",
                "hashOnion": $ONION
            }
        ]
    },

    "components": {
    "logger": {
    "fileLogLevel": "info"
        }
    }
}
EOF_betanet_config


Now remove the highlighted parts for encryptedPassphrase and publicKey and replace them with the parts from the outputs you have generated above.

Save and exit the create_config.sh file.

Now you need to set the permissions to the file and execute it. This step will copy and paste the onion hashes into your config.json:

~$ chmod +x create_config.sh

~$ ./create_config.sh


Now you check if the config.json is working correct. Restart Lisk Core.

~$ cd ~ && cd lisk-beta && bash lisk.sh reload

Lisk configured for betanet
Stopping Lisk to reload PM2 config
[+] Lisk stopped successfully.
[+] Lisk started successfully.
[+] Lisk is running as PID: 24395
Current Block Height: 26211

If the output is like this, your config.json is correct. If not, you have made mistakes when replacing the parts. Check again.

 

STEP 4 - Register your delegate and vote for yourself

Explainations

~$ lisk transaction:create:delegate 0 25 punkr0ck --networkIdentifier="08ec0e01794b57e5ceaf5203be8c1bda51bcdd39bb6fc516adbe93223f85d630"

? Please enter passphrase: clutch brain ... ... ... finger divert
? Please re-enter passphrase: clutch brain ... ... ... finger divert

{"id":"17989794152979373617","type":10,"senderPublicKey":"41c659f3fd5c8a3ed8d55beedb268334e42d4cec1a02b07bbfa995429067583f","senderId":"2448569909047398614L","nonce":"0","fee":"2500000000","signatures":["b4cf4729c4f93a698cf51ad500cf272f0360803c213acb044bd2554e0ac25d16a6bfff8489cd14dc926155d111242baf325357fd3461081b35af21cdbf625e0c"],"asset":{"username":"punkr0ck"}}

Copy the output of the signed transaction and broadcast it:

~$ lisk transaction:broadcast '{"id":"17989794152979373617","type":10,"senderPublicKey":"41c659f3fd5c8a3ed8d55beedb268334e42d4cec1a02b07bbfa995429067583f","senderId":"2448569909047398614L","nonce":"0","fee":"2500000000","signatures":["b4cf4729c4f93a698cf51ad500cf272f0360803c213acb044bd2554e0ac25d16a6bfff8489cd14dc926155d111242baf325357fd3461081b35af21cdbf625e0c"],"asset":{"username":"punkr0ck"}}'

{"message":"Transaction(s) accepted"}

If it got accepted, your delegate name is registered.

 

Now check your account balance and vote for yourself:

~$ lisk account:get 2448569909047398614L

[{"address":"2448569909047398614L","publicKey":"41c659f3fd5c8a3ed8d55beedb268334e42d4cec1a02b07bbfa995429067583f","username":"punkr0ck","isDelegate":true,"nonce":"1","balance":"1097500000000","votes":[],"unlocking":[],"totalVotesReceived":"0","delegate":{"isBanned":false,"pomHeights":[],"lastForgedHeight":0,"consecutiveMissedBlocks":0,"approval":0},"asset":{},"missedBlocks":0,"producedBlocks":0,"fees":"0","rewards":"0","productivity":0,"keys":{"optionalKeys":[],"mandatoryKeys":[],"numberOfSignatures":0}}]

The part "balance":"1097500000000 means you have 10975 LSK or 1097500000000 Beddows.
Now vote for yourself with a big part of the balance. I will use 10950 LSK here:

~$ lisk transaction:create:vote 1 10 --votes="2448569909047398614L,10950" --networkIdentifier="08ec0e01794b57e5ceaf5203be8c1bda51bcdd39bb6fc516adbe93223f85d630"

? Please enter passphrase: clutch brain ... ... ... finger divert
? Please re-enter passphrase: clutch brain ... ... ... finger divert
{"id":"16328384932121501273","type":13,"senderPublicKey":"41c659f3fd5c8a3ed8d55beedb268334e42d4cec1a02b07bbfa995429067583f","senderId":"2448569909047398614L","nonce":"1","fee":"1000000000","signatures":["2e59e976d3a29534fecca2431f8324b67242377cbd19c9cacb64a9a12b6010e9e74c7bda2a3d279fd92bb00c561514df305c1102bc882977ca313aca95531709"],"asset":{"votes":[{"delegateAddress":"2448569909047398614L","amount":"1095000000000"}]}}

Now copy the output of the signed message and broadcast it:

~$ lisk transaction:broadcast '{"id":"16328384932121501273","type":13,"senderPublicKey":"41c659f3fd5c8a3ed8d55beedb268334e42d4cec1a02b07bbfa995429067583f","senderId":"2448569909047398614L","nonce":"1","fee":"1000000000","signatures":["2e59e976d3a29534fecca2431f8324b67242377cbd19c9cacb64a9a12b6010e9e74c7bda2a3d279fd92bb00c561514df305c1102bc882977ca313aca95531709"],"asset":{"votes":[{"delegateAddress":"2448569909047398614L","amount":"1095000000000"}]}}'

{"message":"Transaction(s) accepted"}

 

STEP 5 - Reload Lisk Core and activate forging

~$ cd ~ && cd lisk-beta && bash lisk.sh reload

IMPORTANT! Now you need the passWORD you used to encrypt your passPHRASE (Step 3) and you need to use the publicKey of your account.

~$ curl -k -H "Content-Type: application/json" -X PUT -d '{"password":"pitch strike ... ... ... verb unusual", "forging":true, "publicKey":"41c659f3fd5c8a3ed8d55beedb268334e42d4cec1a02b07bbfa995429067583f"}' http://localhost:5000/api/node/status/forging

{"meta":{},"data":[{"publicKey":"41c659f3fd5c8a3ed8d55beedb268334e42d4cec1a02b07bbfa995429067583f","forging":true}],"links":{}}

If the output says "forging":true, congratulations. You should forge on Betanet. To confirm you can always use lisk delegate:get punkr0ck to check all infos, like missedBlocks and producedBlocks. Korben3 also made a nice Explorer for Betanet.


Happy forging!
punkrock