Deployment Tutorial for Aleo Prover Node

中文

ZKRush offers an error-free version of the deployment guide for novices, which includes a multi-node launch method, quick synchronization of official nodes, and ways for future upgrades.

Aleo Github: https://github.com/AleoHQ/snarkOS

If access is restricted, please use a VPN.

Demo Environment

  • CPU:16-cores
  • RAM: 32GB of memory
  • OS: Ubuntu 20.04

1. Install Rust

1
2
# installation command
curl --proto '=https' --tlsv1.2 -sSf <https://sh.rustup.rs> | sh

Accessible in mainland China

Input 1, press enter to proceed with the installation.

1
2
3
# verify whether the installation of Rust has completed
source "$HOME/.cargo/env"
rustc --version

2. Acquire SnarkOS

Install git

1
2
3
sudo apt update
sudo apt install git -y
git clone <https://github.com/AleoHQ/snarkOS.git> --depth 1

Users in mainland China may not have access, please use a VPN.

3. Compile SnarkOS

  1. Enter snarkOS library

    1
    cd snarkOS
  2. Execute ./build_ubuntu.sh

    1
    sudo ./build_ubuntu.sh

    According to the returned information, please make sure

    • Port 4133 and 3033 are not occupied

      1
      netstat -anp |egrep 4133
      1
      2
      # Please kill the process if occupied, e.g., pid in the picture is 39254
      kiil -9 39254
    • Please allow port 4133 to be accessed by the external network (for cloud server, please configure the security group, for physical workers, please use NAT for mapping)

  3. Install with cargo

    1
    cargo install --path .

4. Run a Prover

  1. Generate a new Aleo account

    1
    2
    3
    4
    5
    6
    7
    8
    9
    # please store the private key & view key
    snarkos account new

    # return
    Attention - Remember to store this account private key and view key.

    Private Key APrivateKey1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <-- Save Me And Use In The Next Step
    View Key AViewKey1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <-- Save Me
    Address aleo1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <-- Save Me
  2. Start Prover

    1
    2
    3
    4
    5
    # replace APrivateKeyXXX as the private key just generated, and run it at the background
    nohup snarkos start --prover APrivateKeyXXX --connect 164.92.111.59:4133,159.223.204.96:4133,167.71.219.176:4133,157.245.205.209:4133,134.122.95.106:4133,161.35.24.55:4133 --nodisplay > snarkos.log 2>&1 &

    # view output log
    tail -f snarkos.log

    Wait for the above log to appear after connecting with peer, the prover starts successfully.

    Program Update

    1. Stop SnarkOS program

      1
      2
      3
      sudo apt install -y psmisc

      killall snarkos -2
    2. Clean SnarkOS Program

      1
      2
      3
      cargo uninstall snarkos
      cd snarkOS
      cargo clean
    3. Obtain the latest code from git repository

      1
      2
      # make sure it's under SnarkOS
      git pull
    4. Repeat the installation steps

If you have any technical problems or you are looking for customized solutions, feel free to contact ZKRush team.

Link copied!