## Table of Contents * [1. Overview](#1-overview) * [2. Build Guide](#2-build-guide) * [2.1 Requirements](#21-requirements) * [2.2 Installation](#22-installation) * [3. Run an Aleo Node](#3-run-an-aleo-node) * [3.1 Run an Aleo Client](#31-run-an-aleo-client) * [3.2 Run an Aleo Prover](#32-run-an-aleo-prover) * [4. FAQs](#4-faqs) * [5. Command Line Interface](#5-command-line-interface) * [6. Development Guide](#6-development-guide) * [6.1 Quick Start](#61-quick-start) * [6.2 Operations](#62-operations) * [7. Contributors](#7-contributors) * [8. License](#8-license) [comment]: <> (* [4. JSON-RPC Interface](#4-json-rpc-interface)) [comment]: <> (* [5. Additional Information](#5-additional-information)) ## 1. Overview __snarkOS__ is a decentralized operating system for zero-knowledge applications. This code forms the backbone of [Aleo](https://aleo.org/) network, which verifies transactions and stores the encrypted state applications in a publicly-verifiable manner. ## 2. Build Guide ### 2.1 Requirements The following are **minimum** requirements to run an Aleo node: - **OS**: 64-bit architectures only, latest up-to-date for security - Clients: Ubuntu 22.04 (LTS), macOS Sonoma or later, Windows 11 or later - Provers: Ubuntu 22.04 (LTS), macOS Sonoma or later - Validators: Ubuntu 22.04 (LTS) - **CPU**: 64-bit architectures only - Clients: 32-cores - Provers: 32-cores (64-cores preferred) - Validators: 32-cores (64-cores preferred) - **RAM**: DDR4 or better - Clients: 32GB of memory - Provers: 32GB of memory (64GB or larger preferred) - Validators: 64GB of memory (128GB or larger preferred) - **Storage**: PCIe Gen 3 x4, PCIe Gen 4 x2 NVME SSD, or better - Clients: 300GB of disk space - Provers: 32GB of disk space - Validators: 2TB of disk space (4TB or larger preferred) - **Network**: Symmetric, commercial, always-on - Clients: 100Mbps of upload **and** download bandwidth - Provers: 500Mbps of upload **and** download bandwidth - Validators: 1000Mbps of upload **and** download bandwidth - **GPU**: - Clients: Not required at this time - Provers: CUDA-enabled GPU (optional) - Validators: Not required at this time Please note that in order to run an Aleo Prover that is **competitive**, the machine will need more than these requirements. ### 2.2 Installation Before beginning, please ensure your machine has `Rust v1.79+` installed. Instructions to [install Rust can be found here.](https://www.rust-lang.org/tools/install) Start by cloning this GitHub repository: ``` git clone --branch mainnet --single-branch https://github.com/AleoNet/snarkOS.git ``` Next, move into the `snarkOS` directory: ``` cd snarkOS git checkout tags/testnet-beta ``` **[For Ubuntu users]** A helper script to install dependencies is available. From the `snarkOS` directory, run: ``` ./build_ubuntu.sh ``` Lastly, install `snarkOS`: ``` cargo install --locked --path . ``` Please ensure ports `4130/tcp` and `3030/tcp` are open on your router and OS firewall. ## 3. Run an Aleo Node ## 3.1 Run an Aleo Client Start by following the instructions in the [Build Guide](#2-build-guide). Next, to start a client node, from the `snarkOS` directory, run: ``` ./run-client.sh ``` ## 3.2 Run an Aleo Prover Start by following the instructions in the [Build Guide](#2-build-guide). Next, generate an Aleo account address: ``` snarkos account new ``` This will output a new Aleo account in the terminal. **Please remember to save the account private key and view key.** The following is an example output: ``` 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 ``` Next, to start a proving node, from the `snarkOS` directory, run: ``` ./run-prover.sh ``` When prompted, enter your Aleo private key: ``` Enter the Aleo Prover account private key: APrivateKey1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` ## 4. FAQs ### 1. My node is unable to compile. - Ensure your machine has `Rust v1.66+` installed. Instructions to [install Rust can be found here.](https://www.rust-lang.org/tools/install) - If large errors appear during compilation, try running `cargo clean`. - Ensure `snarkOS` is started using `./run-client.sh` or `./run-prover.sh`. ### 2. My node is unable to connect to peers on the network. - Ensure ports `4130/tcp` and `3030/tcp` are open on your router and OS firewall. - Ensure `snarkOS` is started using `./run-client.sh` or `./run-prover.sh`. ### 3. I can't generate a new address ### - Before running the command above (`snarkos account new`) try `source ~/.bashrc` - Also double-check the spelling of `snarkos`. Note the directory is `/snarkOS`, and the command is `snarkos` ### 4. How do I use the CLI to sign and verify a message? 1. Generate an account with `snarkos account new` if you haven't already 2. Sign a message with your private key using `snarkos account sign --raw -m "Message" --private-key-file=