Misc. stuff related to lisk-core beta network.
- Disclaimer
- Links
- Install Lisk-Core 3 Beta 5 on Ubuntu
- Install Base
- Configure UFW firewall
- Install Lisk-Core Using Binary Method
- Install & Configure PM2
- Create Bash Alias
- Start Lisk
- Download & Execute Delegate Account Creation Script
- Copy Auto Config.json to Production Path
- Restart PM2 (Reload Lisk on production config.)
- Fund the account
- Wait for funds
- Register Delegate Name
- Wait for Delegate Name Registration Confirmed
- Download Forging Enable Script
- Activate Forging
- Self-Vote your delegate account
- Wait for Delegate to be voted in & forge a block
- Configure HTTPS API Endpoint
- API
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.
- Punkrock - Install Lisk BetaNet v5
- Lemii - Securing a Lisk Node with Nginx and Certbot
- Lemii - Managing the Lisk Core process with PM2
- Gr33nDrag0n - Create Delegate Account Bash Script
- Gr33nDrag0n - Enable Delegate Account Forging Bash Script
sudo apt-get -y install wget tar zip unzip ufw htop npm git curl bash jq nodejs npm
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
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 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
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
lisk-firststart
# Verify Lisk-Core Logs (Optional)
lisk-logs
# Verify PM2 Logs (Optional)
lisk-pm2-logs
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
cp ~/lisk-auto-config.json ~/lisk-core/config.json
lisk-stop
lisk-start
Using Lisk.io Faucet with 'Account Address'. (Not 'Account BinaryAddress'!)
Edit ##AccountBinaryAddress##
lisk-core account:get ##AccountBinaryAddress## --pretty
Account should exist & 'token -> balance' should be greater then zero.
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.
Edit ##AccountBinaryAddress##
lisk-core account:get ##AccountBinaryAddress## --pretty
Account should exist & 'dpos -> delegate -> username' should be set.
curl https://raw.githubusercontent.com/Gr33nDrag0n69/LiskBeta/main/SH/lisk-enable-forging.sh -o ~/lisk-enable-forging.sh
chmod 700 ~/lisk-enable-forging.sh
lisk-forge
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.
- Use one of the explorer in the link section.
- Use the
lisk-lastblocks
alias command to detect forged block from the local logs.
sudo ufw allow "80/tcp"
sudo ufw allow "443/tcp"
sudo ufw status
Using your domain name DNS manager, create a 'A Record'.
Example:
100.150.200.250/32 beta.domain.com
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.
sudo apt-get -y install nginx certbot python-certbot-nginx
Edit DomainName & Email
sudo certbot --nginx -d beta.domain.com --email [email protected] --agree-tos
TODO
TODO
TODO