Setup
# ---------------------------
# 1. Environment setup (Ubuntu 20.04)
# - assumes the account name is "deployer"
# ---------------------------
# install deps
sudo apt install tmux git make jq --yes
# download latest release
mkdir libra-release && cd libra-release
curl -sL https://api.github.com/repos/OLSF/libra/releases/latest | jq -r '.assets[].browser_download_url' | wget -i -
# make binaries executable
chmod +x ...
# extract web-monitor
tar -xf web-monitor.tar.gz --directory ~/.0L/web-monitor/
# add to .bashrc
export PATH=$HOME/libra-release:$PATH
source ~/.bashrc
# ---------------------------
# 2. Onboarding
# ---------------------------
# create blockchain account
onboard keygen
# mine genesis proof
onboard val -u $IP
mkdir init-backup && cp -r ~/.0L/* ~/init-backup/
# ---------------------------
# 3. Diem Node
# ---------------------------
# create systemd service and copy contents
sudo nano /etc/systemd/system/diem-node.service
sudo systemctl daemon-reload
sudo systemctl start diem-node.service
sudo systemctl enable diem-node.service
# ---------------------------
# 4. Tower
# - patched version needs to run in tmux since it requires mnemonic from STDIN prompt
# - you can use the below config if you want to run with the -o flag
# ---------------------------
# create systemd service and copy content
sudo nano /etc/systemd/user/tower.service
sudo systemctl daemon-reload
systemctl --user start tower.service
systemctl --user enable tower.service
# Enable systemd persistence
loginctl enable-linger deployer
# see backlog submission patch below
Debug
# logs
tail -n 100 -f ~/logs/node.log
tail -n 100 -f ~/logs/tower.log
# install diem cli
cd libra
git checkout master
make client
mv target/debug/cli ~/libra-release/diem-cli
# dm commands
# check vdf proof height
node ms $ADDRESS
# check balance
query balance $ADDRESS
Backlog Submission Patch
# clone the main repo
git clone https://github.com/OLSF/libra.git
cd libra
# add the remote with the fix
git remote add mortonbits https://github.com/mortonbits/libra.git
# fetch the branch with the fix
git fetch mortonbits submit-initial-vdf-proof
# move to thta brach
git checkout submit-initial-vdf-proof
# Config dependencies as hard mode documentation
make deps
# Build the source and install binaries
make bins
mv ~/libra-release/tower ~/libra-release/towerold
mv target/release/tower ~/libra-release/tower
tmux new -s tower
tower start