avrio_config
cargo install avrio_config

avrio_config

Avrio's core code written in rust.

by avrio-project

0.3.4 (see all)License:MIT
cargo install avrio_config
Readme

Avrio

Master branch: Travis CI Development branch: Travis CI Codacy Badge

This is the offical implemention of the avrio protocol. It is written in rust. It's protocol is subject to frequent change and as such no documention exists (however it is in the works) It is currently not ready for usage. For more details please join our discord

Table of Contents

How to compile

Build optimization

The following instructions use the --release flag. This means that cargo will optimize the code while compiling. It takes considerably longer to compile but makes the executables much faster. If you want to compile faster or if you are debugging the code, remove the release tag and the bins will end up in target/debug rather than target/release. Please note that using these debug bins will result in a considerably lower vote and hence lower reward. On slower machines, using debug may cause you to receive vote below the minimum (meaning you get banned for an epoch). For this reason, we do not recommend that you remove the ---release tag unless needed.

Linux

Prerequisites

Rust makes abundant use of Rust's syntax extensions and other advanced, unstable features. Because of this, you will need to use a nightly version of Rust. If you already have a working installation of the latest Rust nightly, feel free to skip to the next section.

To install a nightly version of Rust, we recommend using rustup. Install rustup by following the instructions on its website. Once rustup is installed, configure Rust nightly as your default toolchain by running the command:

rustup default nightly

If you prefer you can use per-directory overrides to use the nightly version only for avrio by running the following command in the directory:

rustup override set nightly

Warning: Avrio requires the latest version of Rust nightly.

If avrio suddenly stops building, ensure you're using the latest version of Rust nightly and avrio by updating your toolchain and dependencies with:

rustup update && cargo update

You will also need the following packages: Boost, OpenSSL Cargo (or rustc) and git.

Ubuntu
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get install -y build-essential g++-8 gcc-8 git libboost-all-dev libssl1.0-dev cmake libclang-dev clang
git clone -b master --single-branch https://github.com/avrio-project/avrio-rs/
cd avrio-rs
cargo build --release

After the completion, the binaries will be in the target/release folder.

cd target
./avrio-daemon
Generic Linux

Ensure you have the dependencies listed above.

git clone -b master --single-branch https://github.com/avrio-project/avrio-rs/
cd avrio-rs
cargo build --release

After the completion, the binaries will be in the target/release folder.

cd target
./avrio-daemon

Windows

Compiling on widnows is a tad more complicated due to the requirment of openssl for various cryptographic functions. First, ensure rust is installed and the default toolchain is set to nightly, then install vcpkg (used to install openssl, other methods can be used if you are confident, however this should be included in any bug reports it will likley result in)

> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat

Now, install open ssl

.\vcpkg install openssl

You can now compile avrio as described in the ubuntu/generic linux section:

cd avrio-rs
cargo build --release

File structure

Each aspect of the code is split up into libraries (e.g. database, blockchain, p2p). Libraries are further split into modules (e.g., transaction is a module part of the core library; genesis is a module part of the blockchain lib). If you want to use one of these libs in your code then please add the following to your Cargo.toml and clone this repo into your extern folder for the blockchain library avrio_<lib_name> = { path: "extern/<lib_name>" } e.g. avrio_p2p = { path: "extern/p2p" } The executables can be found in the bin folder, the testnet executables are in bin/testnet.

Contributing

Pull requests are welcomed. If you can help with the code, please fork the repo, make your changes to the forked repo and then open a PR into the development branch. Please NEVER open a PR into the master branch. Any PRs into the master branch without prior authorization will be closed.

Contributors

A huge thank you to everyone who has controbuted to the avrio codebase:

GitHub Stars

13

LAST COMMIT

8mos ago

MAINTAINERS

1

CONTRIBUTORS

9

OPEN ISSUES

5

OPEN PRs

0
VersionTagPublished
0.3.4
2yrs ago
0.3.3
2yrs ago
0.3.2
2yrs ago
0.3.1
2yrs ago
No alternatives found
No tutorials found
Add a tutorial