DEV Community

EgorMajj
EgorMajj

Posted on

Aleo Testnet 3 Tutorial (automatic)

Run the script and wait for the installation to complete

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/Aleo/main/multi_tool.sh)

Enter fullscreen mode Exit fullscreen mode

To run the pruner on an existing wallet, place a file called aleo_account.txt, necessarily containing the line

Private Key  APrivateKey1___

Enter fullscreen mode Exit fullscreen mode

By path (the command displays the path)

echo $HOME/aleo_account.txt

Enter fullscreen mode Exit fullscreen mode

And run the script after that

Update

Semi-automatic

Run the script and wait for the update to complete
Enter fullscreen mode Exit fullscreen mode

Automatic
Create a folder for node files

mkdir -p $HOME/.aleo
Enter fullscreen mode Exit fullscreen mode

Create a service file

sudo tee <<EOF >/dev/null /etc/systemd/system/aleou.service
[Unit]
Description=Aleo auto-updater
After=network.target

[Service]
type=forking
User=$USER
Environment="HOME=$HOME"
WorkingDirectory=$HOME
ExecStartPre=`which wget` -qO $HOME/.aleo/multi_tool.sh https://raw.githubusercontent.com/SecorD0/Aleo/main/multi_tool.sh
ExecStartPre=`which chmod` +x $HOME/.aleo/multi_tool.sh
ExecStart=$HOME/.aleo/multi_tool.sh -up
Restart=always
RestartSec=5m

[Install]
WantedBy=multi-user.target
EOF
Enter fullscreen mode Exit fullscreen mode

Run the service file

sudo systemctl daemon-reload
sudo systemctl enable aleou
sudo systemctl restart aleou
Enter fullscreen mode Exit fullscreen mode

The script restarts every 5 minutes
To view the log of the auto update script use the command

sudo journalctl -fn 100 -u aleou
Enter fullscreen mode Exit fullscreen mode

Removal

Don't stop

sudo systemctl stop aleod
Enter fullscreen mode Exit fullscreen mode

Delete service file

sudo systemctl disable aleod
rm -rf /etc/systemd/system/aleod.service
sudo systemctl daemon-reload
Enter fullscreen mode Exit fullscreen mode

Delete the project folder and the binary file

rm -rf $HOME/snarkOS /usr/bin/snarkos
Enter fullscreen mode Exit fullscreen mode

Useful Commands

Available variables (remove echo when using)
echo $aleo_wallet_address
echo $aleo_private_key
Enter fullscreen mode Exit fullscreen mode

View log

Prover

aleo_log sudo journalctl -fn 100 -u aleod
Enter fullscreen mode Exit fullscreen mode

Automatic update script

sudo journalctl -fn 100 -u aleou
Enter fullscreen mode Exit fullscreen mode

Restart the node

sudo systemctl restart aleod
Enter fullscreen mode Exit fullscreen mode

Stop auto update script

sudo systemctl stop aleou
Enter fullscreen mode Exit fullscreen mode

Top comments (0)