DEV Community

EgorMajj
EgorMajj

Posted on

1

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

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay