The Java implementation of the Aion kernel. You can interact with this kernel directly through the JSON RPC or Protobuff API layers. Further documentation regarding the kernel can be found on the Aion Java Kernel GitHub repository at https://github.com/aionnetwork/aion
Native Ubuntu Install
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 have used the latest build as an example on this page. If you want to use a different version of the Aion kernel you will need to change the commands to fit the version you are using. We do not recommend always using the latest Aion kernel version.
Run the Installation
- Connect to your machine via SSH or open a terminal if you are working on a local installation.
- Change to your root
~directory and update your system:
cd ~ sudo apt update -y && sudo apt upgrade -y
- Download the latest Aion Java kernel package to your computer if you haven’t already. You can also use
wgetif you’d prefer:
- Unzip the package and move the
aiondirectory to your home
tar xvjf aion-v0.3.3.22362091d-2019-03-07.tar.bz2 mv aion ~/
- Move to your
aiondirectory and create an address & keystore:
cd ~/ ~/aion/aion.sh -a create
- Enter a password and write it down, you’ll need it later.
- The terminal shows an account address. Write it down somewhere, you’ll need this later.
~/.aion/aion.sh -a create > Please enter a password: > Please re-enter your password: > A new account has been created: 0xa09...
- The build script creates a keystore file in
aion/keystore. Create a backup of the file:
- On a local machine:
cp ~/aion/mainnet/keystore/* ~/Documents/aion-keystore. Make a copy of this
keystorefile and store it somewhere other than the computer you are installing the Java kernel on. Move onto the last step.
- On a Remote Machine over SSH:
exit && scp user@node_ip_address:~/aion/mainnet/keystore/* ~/Desktop. Make a copy of this
keystorefile and store it somewhere other than the computer you are installing the Java kernel on. Reconnect to your remote machine:
- On a local machine:
- Run the Aion Java kernel:
The kernel will now begin to sync with the other nodes on the network. This process can take up to 72 hours depending on the speed of your network and the size of the database you are syncing. Everything is complete once that’s finished. You have successfully installed the Aion Java kernel on your system.
This section covers how to configure and run the Aion Java kernel Docker container.
Follow these steps to get started quickly, or skip this section if you want to learn how to run the container in more detail.
# Pull the Rust kernel image. docker pull aionnetwork/aion:latest # Create some local storage for the container: docker volume create aion-mainnet # Run the container: docker run -it -p 8545:8545 -p 8547:8547 -p 30303:30303 --mount source=aion-mainnet,destination=/aion/mainnet aionnetwork/aion:latest
To use this Docker image your system must meet the following requirements:
- 2 CPU cores
- 1GB HDD space
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, although this can be pruned.
Install the Java Image
- Pull down the latest Java Docker image.
docker pull aionnetwork/aion:latest > latest: Pulling from aionnetwork/aion > 6cf436f81810: Pull complete > ... > Status: Downloaded newer image for aionnetwork/aion:latest
- Create local storage for Aion image.
docker volume create aion-mainnet > aion-mainnet
- Run the image.
docker run -it -p 8545:8545 -p 8547:8547 -p 30303:30303 --mount source=aion-mainnet,destination=/aion/mainnet aionnetwork/aion:latest > _____ > .'. | .~ ~. |.. | > .' `. | | | | ``.. | > .''''''''`. | | | | ``.. | >.' `. | `._____.' | ``| > > v0.4.0.2.092068b > mainnet > using FVM & AVM
Take a look at the Running the Java Container section for more information on what arguments to supply with the
docker run command.
cto shut down and exit the container.
19-03-04 10:59:01.821 INFO GEN [shutdown]: Starting shutdown process... ... 19-03-04 10:59:05.887 INFO GEN [shutdown]: --------------------------------------------- 19-03-04 10:59:05.888 INFO GEN [shutdown]: | Aion kernel graceful shutdown successful! | 19-03-04 10:59:05.888 INFO GEN [shutdown]: ---------------------------------------------
Java Arguments and Configuration
There are several arguments that you can supply with the
docker run command.
Configure the Java Kernel
Once the kernel Docker image is pulled you can configure it by running the
docker exec command in a separate terminal window:
docker exec -it <CONTAINER_NAME or CONTAINER_HASH> /bin/bash
A list of
CONTAINER_NAMEs can be found by running
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:
sudo apt install nano OR sudo apt install vim
Then you can edit the
config.xml file associated with the network you are running. For example, if you are running the Java kernel on Mainnet, then you should edit the
mainnet/config.xml file. If you are running the Rust kernel on the Testnet (Amity), then you should edit the
By default, running the image will start a node on the mainnet. To specify a network; for instance, the Amity testnet, use:
docker run -it aionnetwork/aion:latest /aion/aion.sh -n Amity
The Aion Docker image is configured to run the Java API 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.
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:
docker volume create VOLUME-NAME
To start the Docker image with the volume, where VOLUME-NAME is the volume name and NETWORK is the Aion network name:
docker run -it --mount source=VOLUME-NAME,destination=/aion/NETWORK aionnetwork/aion:latest ./aion.sh -n NETWORK
For the list of network names, see:
docker run -it aionnetwork/aion:latest /aion/aion.sh -h
That’s it, you’re done! See the Kernel wiki pages on GitHub for more on installation and configuration.