Code Monkey home page Code Monkey logo

snarkos's Introduction

snarkOS

Table of Contents

1. Overview

snarkOS is a decentralized operating system for private applications. It forms the backbone of Aleo and enables applications to verify and store state in a publicly verifiable manner.

2. Quick Start

Option 1 - Download snarkOS

Step 1. Download the executable

[] [] []
[] [] []

Step 2. Install the executable

macOS or Linux

Unzip the package and in terminal, cd into the unzipped folder and run:

mv snarkos /usr/local/bin
Windows
Coming Soon

Step 3. Start snarkOS

To start a snarkOS client node, run:

snarkos

Option 2 - Install from Crates.io

Step 1. Install Rust

We recommend installing Rust using rustup. You can install rustup as follows:

macOS or Linux
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Windows

Download the Windows 64-bit executable or Windows 32-bit executable and follow the on-screen instructions.

Step 2. Install from Crates.io

In your terminal, run:

cargo install snarkos

Step 3. Start snarkOS

To start a snarkOS client node, run:

snarkos

Option 3 - Build from Source Code

Step 1. Install Rust

We recommend installing Rust using rustup. You can install rustup as follows:

macOS or Linux
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Windows

Download the Windows 64-bit executable or Windows 32-bit executable and follow the on-screen instructions.

Step 2. Build from Source Code

Start by cloning this repository:

git clone https://github.com/AleoHQ/snarkOS --depth 1

Next, compile and install snarkOS:

cargo install --path . --locked

Step 3. Start snarkOS

To start a snarkOS client node, run:

snarkos

3. Usage Guide

3.1 Connecting to Aleo Testnet I

To start a client node, run:

snarkos

To start a mining node, run:

snarkos --is-miner

To run a node with custom settings, refer to the full list of options and flags available in the CLI.

3.2 Command Line Interface

Full list of CLI flags and options can be viewed with snarkos --help:

snarkOS <version>
Run an Aleo node (include -h for more options)

USAGE:
    snarkos [FLAGS] [OPTIONS]

FLAGS:
    -h, --help           Prints help information
        --is-bootnode    Run the node as a bootnode (IP is hard coded in the protocol)
        --is-miner       Start mining blocks from this node
        --no-jsonrpc     Run the node without running the json rpc server

OPTIONS:
        --connect <ip>                           Specify one or more node ip addresses to connect to on startup
    -i, --ip <ip>                                Specify the ip of your node
        --max-peers <max-peers>                  Specify the maximum number of peers the node can connect to
        --mempool-interval <mempool-interval>    Specify the frequency in seconds the node should fetch a sync node's mempool
        --min-peers <min-peers>                  Specify the minimum number of peers the node should connect to
        --miner-address <miner-address>          Specify the address that will receive miner rewards
        --network <network-id>                   Specify the network id (default = 1) of the node
    -d, --path <path>                            Specify the node's storage path
    -p, --port <port>                            Specify the port the node is run on
        --rpc-password <rpc-password>            Specify a password for rpc authentication
        --rpc-port <rpc-port>                    Specify the port the json rpc server is run on
        --rpc-username <rpc-username>            Specify a username for rpc authentication
        --verbose <verbose>                      Specify the verbosity (default = 1) of the node [possible values: 0, 1, 2, 3]

Examples

Guard RPC endpoints
snarkos --rpc-username <Username> --rpc-password <Password>
Manually connect to a peer on the network
snarkos --connect "<IP ADDRESS>"

3.3 Configuration File

A config.toml file is generated in the ~/.snarkOS/ directory when the node is initialized for the time. Updating this config.toml file allows node operators to specify default settings for the node without having to specify additional information in the CLI.

4. JSON-RPC Interface

By default, snarkOS launches a JSON-RPC server to allow external interfacing with the Aleo network. Documentation of the RPC endpoints can be found here

5. Additional Information

For additional information, please refer to the official Aleo documentation page.

6. License

License: GPL v3

snarkos's People

Contributors

howardwu avatar raychu86 avatar ljedrz avatar niklaslong avatar dependabot-preview[bot] avatar collinc97 avatar gakonst avatar daniilr avatar kobigurk avatar akattis avatar soft2dev avatar dependabot[bot] avatar austinabell avatar yelhousni avatar huitseeker avatar avadon avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.