Project Information
Aleo is a blockchain that uses Zero-Knowledge proof technology. The use of this technology allows for a high level of privacy when working with the network - non-disclosure of the sender's wallet and transaction amount.
Aleo supports the operation of smart contracts, and as a consequence, the possibility of creating DApps on it. The LEO application development language and its own development environment (IDE) were developed especially for this purpose.
Installing Node
Server requirements
Minimum (VDS/DS):
16 CPUs, 16 GB RAM, 128 GB SSD, Ubuntu 20.04
Recommended (VDS/DS):
32 CPU, 32 GB RAM, 128 GB SSD, Ubuntu 20.04
I use Hetzner
https://accounts.hetzner.com/login
Launch
Linux |Manual|
Refresh packets
sudo apt update && sudo apt upgrade -y
Install the required packages
sudo apt install wget jq git build-essential pkg-config libssl-dev -y
Install the Rust
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/installers/rust.sh)
Clone a repository with a node
cd; git clone https://github.com/AleoHQ/snarkOS.git --depth 1
Go to the snarkOS folder
cd snarkOS
Build a snarkOS binary
cargo build --release
Copy the binary file to the standard binary storage
mv $HOME/snarkOS/target/release/snarkos /usr/bin
Check version
snarkos --version
Already have a wallet
Place a file called account_aleo.txt
, necessarily containing the line
Address aleo1___
By path (the command displays the path)
echo $HOME/account_aleo.txt
No wallet yet.
Create a Wallet
snarkos experimental new_account > $HOME/account_aleo.txt
Make a backup copy of the wallet data file, saving it in a safe place (the command shows the path)
echo $HOME/account_aleo.txt
Do not show your private key to anyone
Continued
Add the wallet address to the system as a variable
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n aleo_wallet_address -v `grep -oPm1 "(?<=Address )([^%]+)(?=$)" $HOME/account_aleo.txt`
Check that the address was added to the system
echo $aleo_wallet_address
If not, go back to the step with the wallet work
Open the ports in use
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/ports_opening.sh) 3032 4132
Create a service file
printf "[Unit]
Description=Aleo Miner
After=network-online.target
[Service]
User=$USER
ExecStart=`which snarkos` --miner $aleo_wallet_address --trial --node 0.0.0.0:4132 --rpc 0.0.0.0:3032
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/aleod.service
Run the service file
sudo systemctl daemon-reload
sudo systemctl enable aleod
sudo systemctl restart aleod
Add a command to view the miner's log to the system as a variable
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n aleo_log -v "sudo journalctl -fn 100 -u aleod" -a
Add a command to view information about the miner in the system as a variable
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n aleo_node_info -v ". <(wget -qO- https://raw.githubusercontent.com/SecorD0/Aleo/main/node_info.sh) -l RU 2> /dev/null" -a
Wait a couple of minutes for the miner to start up
aleo_log
Linux |automatic|
Run the script and wait for the installation to complete
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/Aleo/main/multi_tool.sh)
To start the miner on an existing wallet, you need to put a file called account_aleo.txt
, which must contain the line
Address aleo1___
Path (the command shows the path)
echo $HOME/account_aleo.txt
And run the script after that
Reset synchronization
Stop the miner
sudo systemctl stop aleod
Uninstall the database
rm -rf $HOME/.aleo/storage/ledger-2
Restart the miner
sudo systemctl restart aleod
Information about the miner
Add a command to view information about the miner in the system as a variable
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n aleo_node_info -v ". <(wget -qO- https://raw.githubusercontent.com/SecorD0/Aleo/main/node_info.sh) -l RU 2> /dev/null" -a
View information about the miner
aleo_node_info
Update
Manual
If you have not downloaded the GitHub repository with the node (snarkOS folder), then clone it
cd; git clone https://github.com/AleoHQ/snarkOS.git --depth 1
Update the binary files
cd $HOME/snarkOS && \
git stash; \
git pull; \
git stash; \ git pull; \ cargo clean; \
cargo build --release; \
mv $HOME/snarkOS/target/release/snarkos /usr/bin; \
cd
Run the service file
sudo systemctl restart aleod
Semi-automatic
Run the script and wait for the update to complete
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/Aleo/main/multi_tool.sh) -u
Automatic
Create a service file
printf "[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 -u
Restart=always
RestartSec=1m
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/aleou.service
Run the service file
sudo systemctl daemon-reload
sudo systemctl enable aleou
sudo systemctl restart aleou
The script restarts every minute
To view the log of the auto update script
sudo journalctl -fn 100 -u aleou
Useful Commands
Available variables (remove echo if used)
echo $aleo_wallet_address
View log
Miner
aleo_log
sudo journalctl -fn 100 -u aleod
automatic update script
sudo journalctl -fn 100 -u aleou
View information about the miner
aleo_node_info
Restart the miner
sudo systemctl restart aleod
Top comments (0)