Install
The Rust implementation of the Aion kernel. You can interact with this kernel directly through the JSON RPC layer. Further documentation regarding the kernel can be found on the Aion Rust Kernel GitHub repository at https://github.com/aionnetwork/aionr
Native Ubuntu Installation
This section walks you through installing the kernel from a package. You can either generate your own package by building the kernel from source, or you can download a pre-built package from GitHub. We also made a quick video walking through how you can install the Rust kernel on your computer using Vagrant.
System Requirements
JAVA JDK 11^ and Apache Ant are required to Build and Install
To run the kernel, your computer must meet the following requirements.
- Ubuntu 16.04 or Ubuntu 18.04
4GB
RAM~40GB
available storage~25GB
for testnet~15GB
for mainnet
These storage size requirements are estimates only. Since the databases for each network grow everytime a transaction is mined, these values will only increase in size.
Library Dependencies
The Rust kernel depends on the following libraries.
g++
gcc
libboost-all-dev
(version1.65.0
or higher)libzmq3-dev
libjsoncpp-dev
python-dev
libudev-dev
llvm-4.0-dev
To install these dependencies, follow the steps for your version of Ubuntu.
Ubuntu 16.04
Ubuntu 18.04
Set Environment Variables
Replace <jdk_directory_location>
and <apache_ant_directory>
with paths to your JDK and Apache Ant directory.
Build the Kernel
Once you have installed the prerequisites, follow these steps to build the kernel.
- Download the Aion Rust git repository:
- Build the kernel from source:
aionr-package
is the name that will be given to the Rust package when it as finished building. You can set this to anything you want by changing the last argument in the script call:
The package takes about 10 minutes to finish building.
- When the build has finished, you can find the finished binary at
package/aionr-package
.
Run the Installation
- Navigate to the binary location:
- Run
./mainnet.sh
. You can find more information on supplying commands in the user manual. Kernel will print configuration path, genesis file path, db directory, and keystore location at the top of its log.
To launch aionR kernel with a specific network, run the launch script that matches the network you would like to run:
or
Configuration of these networks can be found in their corresponding directories. See more details about different kernel networks here.
Docker Image
This section covers how to configure and run the Aion Rust kernel Docker container.
Quickstart
Follow these steps to get started quickly, or skip this section if you want to learn how to run the container in more detail.
Rust Prerequisites
To use this Docker image your system must meet the following requirements:
8GB
RAM (16GB
recommended)- 2 CPU cores
- 1GB HDD space
- Docker
v18.0.0
The HDD space required only takes the Docker image into account. You will need a significant amount of space for storing the blockchain itself. The database is currently around 22GB
in size.
Installation
- Pull down the latest Docker image.
- Create local storage for Aion image.
- Run the image.
- Press
CTRL
+c
to shut down and exit the container.
Arguments and Configuration
There are several arguments that you can supply with the docker run
command.
Configure the Rust Kernel
Once the kernel Docker image is pulled you can configure it by running the docker exec
command in a separate terminal window:
A list of CONTAINER_ID
s and CONTAINER_NAME
s can be found by using the command: $ docker container list
This starts a standard terminal session within the container. You will need to install a text editor before you can edit any files, as the container doesn’t come with one pre-installed:
The configuration file locations will be printed upon starting the node:
Then you can edit the .toml
file associated with the network you are running. For example, if you are running the Rust kernel on Mainnet, then you should edit the mainnet/mainnet.toml
file. If you are running the Rust kernel on the Testnet (Amity), then you should edit the Amity/Amity.toml
file.
Rust Networks
By default, running the image will start a node on the mainnet. To specify a network; for instance, the Amity testnet, use:
Rust Ports
The Aion Docker image is configured to run the Rust WebSocket and RPC servers, as well as allow connections from other Aion nodes. When running the Docker container, it is necessary to publish those ports if you use to wish these functionalities.
Port | Connection Type |
---|---|
30303 |
P2P |
8545 |
JSON-RPC |
8546 |
WebSocket |
Rust Storage
In most cases, storage should be attached so that configuration and blockchain sync state can be persisted between each time the kernel is launched. You will need a separate Docker volume for each Aion Network, so it is recommended to include the network name in the volume name. To create a volume:
To start the Docker image with the volume, where <VOLUME-NAME>
is the volume name and <NETWORK>
is the Aion network name (mainnet
, Amity
, custom
, etc.):
That’s it, you’re done! See the aionr repository and Kernel wiki pages on GitHub for more on installation and configuration.