Skip to content

Misc. Stuff related to lisk-core beta

Notifications You must be signed in to change notification settings

punkrock/LiskBeta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 

Repository files navigation

Misc. stuff related to lisk-core beta network.

Disclaimer

Valid for Lisk Betanet ONLY!

For most questions, take the time to read official Lisk-Core & Lisk-SDK documentation! Links below

This page is not intended to be a dummy proof guide, it's a guide based on my configuration and tools created by reading others guides and official documentation.

Thanks to all peoples in lisk chat network. In particular to Punkrock & Lemii for their useful notes and Korben3 & Moosty for their blockchain explorers.

Links

Documentation

Faucet

Explorer

Guides

Public API Endpoints

Scripts

Install Lisk-Core 3 Beta 5 on Ubuntu

Install Base

sudo apt-get -y install wget tar zip unzip ufw htop npm git curl bash jq nodejs npm

Configure UFW firewall

Important: To not get locked out of your server, make sure your management IP is static to use 'Allow From' command. If you are not sure of what to do, don't use 'Allow From' and just open port 22 (SSH) with sudo ufw allow '22/tcp'.

sudo ufw default deny incoming
sudo ufw default allow outgoing

# Static Management IP
sudo ufw allow from "100.150.200.250/32"

# DNS
sudo ufw allow "53/udp"

# NTP (Optional)
sudo ufw allow "123/udp"

# Mail Server (Optional)
sudo ufw allow "25/tcp"

# Lisk-Core
sudo ufw allow "5000/tcp"
sudo ufw allow "5001/tcp"

sudo ufw --force enable
sudo ufw status

Install Lisk-Core Using Binary Method

curl https://downloads.lisk.io/lisk/betanet/3.0.0-beta.5/lisk-core-v3.0.0-beta.5-linux-x64.tar.gz -o lisk-core.tar.gz
tar -xf ./lisk-core.tar.gz
rm -f ./lisk-core.tar.gz
echo 'export PATH="$PATH:$HOME/lisk-core/bin"' >> ~/.bashrc
source ~/.bashrc

Install & Configure PM2

# Install NodeJS, NPM & PM2
sudo apt-get -y install nodejs npm
sudo npm i -g pm2

# Install PM2 Max Log Size Manager
pm2 install pm2-logrotate
pm2 set pm2-logrotate:max_size 100M

# Download lisk-core configuration file for PM2
curl https://raw.githubusercontent.com/Gr33nDrag0n69/LiskBeta/main/PM2/lisk-core-first-start.pm2.json -o ~/lisk-core-first-start.pm2.json
curl https://raw.githubusercontent.com/Gr33nDrag0n69/LiskBeta/main/PM2/lisk-core.pm2.json -o ~/lisk-core.pm2.json

Create Bash Alias

cat > ~/.bash_aliases << EOF_Alias_Config 
alias lisk-firststart='pm2 start ~/lisk-core-first-start.pm2.json'
alias lisk-start='pm2 start ~/lisk-core.pm2.json'
alias lisk-stop='pm2 stop lisk-core'
alias lisk-logs='tail -f ~/.lisk/lisk-core/logs/lisk.log'
alias lisk-pm2logs='pm2 logs'
alias lisk-lastblocks='tail -n 1000 ~/.lisk/lisk-core/logs/lisk.log | grep "Forged new block"'
alias lisk-forge='~/lisk-enable-forging.sh'
EOF_Alias_Config

source ~/.bashrc

Start Lisk

lisk-firststart

# Verify Lisk-Core Logs (Optional)
lisk-logs

# Verify PM2 Logs (Optional)
lisk-pm2-logs

Download & Execute Delegate Account Creation Script

All-in-one script tasks:

  • Create Account
  • Create Encryption Password
  • Create Encrypted Passphrase
  • Create Auto Hash-Onion File to ~/lisk-auto-onion.json
  • Create Auto Config.json File to ~/lisk-auto-config.json
curl https://raw.githubusercontent.com/Gr33nDrag0n69/LiskBeta/main/SH/lisk-create-account.sh -o ~/lisk-create-account.sh
chmod 700 ~/lisk-create-account.sh
~/lisk-create-account.sh

Copy Auto Config.json to Production Path

cp ~/lisk-auto-config.json ~/lisk-core/config.json

Restart PM2 (Reload Lisk on production config.)

lisk-stop
lisk-start

Fund the account

Using Lisk.io Faucet with 'Account Address'. (Not 'Account BinaryAddress'!)

Wait for funds

Edit ##AccountBinaryAddress##

lisk-core account:get ##AccountBinaryAddress## --pretty

Account should exist & 'token -> balance' should be greater then zero.

Register Delegate Name

Edit ##DelegateName## & ##AccountPassphrase##

# Create Tx

lisk-core transaction:create 5 0 1100000000

? Please enter username:      ##DelegateName##
? Please enter passphrase:    ##AccountPassphrase##
? Please re-enter passphrase: ##AccountPassphrase##

# Save Output

{"transaction":"0805...005"}

# Broadcast Tx

lisk-core transaction:send 0805...005

# Should output

Transaction with id: 'a3d...5b0' received by node.

Wait for Delegate Name Registration Confirmed

Edit ##AccountBinaryAddress##

lisk-core account:get ##AccountBinaryAddress## --pretty

Account should exist & 'dpos -> delegate -> username' should be set.

Download Forging Enable Script

curl https://raw.githubusercontent.com/Gr33nDrag0n69/LiskBeta/main/SH/lisk-enable-forging.sh -o ~/lisk-enable-forging.sh
chmod 700 ~/lisk-enable-forging.sh

Activate Forging

lisk-forge

Self-Vote your delegate account

Edit ##AccountBinaryAddress##, ##AccountPassphrase## & Vote Amount

# Check Balance

lisk-core account:get ##AccountBinaryAddress##

"balance":"148900000000" = 1489 LSK

# Vote myself with 1480 LSK (Amount should be multiple of 10 * 10^8.)

lisk-core transaction:create 5 1 100000000

? Please enter: votes(delegateAddress, amount):        ##AccountBinaryAddress##,148000000000
? Want to enter another votes(delegateAddress, amount) No
? Please enter passphrase:                             ##AccountPassphrase##
? Please re-enter passphrase:                          ##AccountPassphrase##

# Save Output

{"transaction":"080...10e"}

# Broadcast Tx

lisk-core transaction:send 080...10e

# Should output

Transaction with id: 'f0c...da7' received by node.

Wait for Delegate to be voted in & forge a block

  1. Use one of the explorer in the link section.
  2. Use the lisk-lastblocks alias command to detect forged block from the local logs.

Configure HTTPS API Endpoint

Configure UFW firewall

sudo ufw allow "80/tcp"
sudo ufw allow "443/tcp"

sudo ufw status

Configure DNS 'A Record'

Using your domain name DNS manager, create a 'A Record'.

Example:

100.150.200.250/32      beta.domain.com

Test & Wait

Before you can continue, you must make sure the DNS record is working. Best way to test it is to ping the A record address and wait for the IP to resolve correctly.

Install Nginx & Certbot

sudo apt-get -y install nginx certbot python-certbot-nginx

Create SSL cert.

Edit DomainName & Email

sudo certbot --nginx -d beta.domain.com --email [email protected] --agree-tos

Configure Nginx

TODO

Update Certificate

TODO

API

TODO

About

Misc. Stuff related to lisk-core beta

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages