Skip to content

Installation

AionJayT edited this page Mar 13, 2019 · 12 revisions

1. Install the Aion Kernel

  1. First, download the latest Aion kernel release from the releases page or build your own by following the instructions in the build page.

  2. Next, unarchive the downloaded file by right-clicking on it and selecting Extract Here from the drop-down menu. The aion folder will be generated in the current folder.

    Alternatively, to extract the file contents, run the following command in a terminal:

    tar xvjf aion-{@version}.tar.bz2
    
  3. Finally, navigate to the aion folder and configure and start the kernel.

2. Launch the Kernel

The aion kernel is ready to launch as soon as the release is unpacked. However, if you wish to used the built-in miner or connect to known peers you should first edit the configuration file as explained in the next section.

Open a terminal and navigate to the aion directory using cd aion. Then start the kernel by executing:

./aion.sh

If you want to connect to the testnet or your own private network, you should do

./aion.sh -n mastery

or custom for your private network

./aion.sh -n custom

When the kernel starts up, you should see it trying to sync with the network and importing blocks.

Optional: To check which peers you are connected to, open another terminal and run the command below:

netstat -antp | grep java

Please check the owner's manual wiki for further instructions on working with the kernel.

3. Configure your Kernel

The current kernel configuration can be found inside aion/[network name]/config/config.xml. This file is read only once when the kernel is started. Any updates made in the config.xml file while the kernel is running will not take effect until you stop the kernel (Ctrl+C) and restart it (./aion.sh).

The following are some frequent use cases when the configurations should be modified. Peruse the wiki for other configuration settings.

3.1 Mining

To receive tokens for mining blocks, you first need to create an account using:

./aion.sh -a create -n [network name]

The mining wiki illustrates how to set this account to be able to receive tokens for mining.

To import accounts created using a different binary on the same network follow the tutorial on exporting and importing accounts.

3.2 Adding Known Peers

The default configuration from the release contains the seed nodes by default. Do not remove these nodes from the configuration. To include additional peers (e.g. friends that are also connected to the network) update the config.xml file by adding nodes using the permanent peer id, IP and port of the computers you wish to connect to:

<net>
    <p2p>
        <ip>0.0.0.0</ip>
        <port>30303</port>
    </p2p>
    <nodes>
        <node>p2p://PEER_ID@IP:PORT</node>
    </nodes>
</net>

Note: Make sure to keep your configuration IP at 127.0.0.1 to connect locally. To allow peers to connect to you, set it to 0.0.0.0.

After running the kernel once, your configuration file will be updated with a permanent peer id. This id can be found at the top of the config.xml file.

<aion>
    ...
    <id>your_permanet_id</id>
    ...
</aion>

If instead of a permanent id your configuration has an id placeholder, you only need to start the kernel to be assigned a permanent id. You can share this id with peers that want to add your node to their configuration file. During kernel runtime your peer list will expand to include other active nodes.

To view your active peers in the kernel output enable the following: (not exist after v0.2.8, this has been migrated into log system P2P module DEBUG level.)

<net>
    <p2p>
        <show-status>true</show-status>
    </p2p>
</net>

If you accidentally delete the seed nodes from your configuration, you can find them on the seed nodes page. Make sure to add the seed nodes for the network you want to connect to.

3.3 Log System Settings

The log section in config.xml allows one to selectively set log-levels for each of the kernel modules. Available log-levels, from highest (most verbose) to lowest (least verbose), are: TRACE, DEBUG, INFO, WARN, ERROR, OFF. These log levels maps directly to logback;'s log levels; OFF turns off all the logging for a particular module, and TRACE prints out all available logging information.

Note that the ROOT logger maps to the logback root logger, and captures all logs not emitted directly by any of the modules (ie. logging generated by the dependency libraries).

3.3.1 Rolling Persistent Logs

Aion kernel's logger is by-default configured to persist all generated log data into the log folder. The logs roll-over every data at midnight, and at every time a log file gets larger than 100MB.

To control the directory where the logs are stored to disk, you can change the <log-path> property to your directory of choice. To disable persistance to file entirely, set the <log-file> property to false.

<log>
    <!--Enable/Disable logback service; if disabled, output will not be logged -->
    <log-file>true</log-file>
    <!--Sets the physical location on disk where log files will be stored.-->
    <log-path>log</log-path>
    
    <ROOT>WARN</ROOT>
    <GEN>INFO</GEN>
    <VM>ERROR</VM>
    <SYNC>INFO</SYNC>
    <CONS>INFO</CONS>
    <DB>ERROR</DB>
    <API>INFO</API>
    <P2P>INFO</P2P>
    <GUI>INFO</GUI>
    <TX>INFO</TX>
    <TXPOOL>INFO</TXPOOL>
</log>

4 Config Settings Migration

4.1 Migrating from v0.3.2 to v0.3.3

There is no huge config settings change compare with 0.3.2. only 2 extra settings for 0.3.3. For the database compact settings, it does not matter unless you want to enable it. Therefore if your config does not have the new settings, it is totally fine. The other settings and the file structure is the same as 0.3.2.

You can just use 0.3.2 config with new seed node added/deleted. Or migrate your current settings to the 0.3.3 default config settings. 

Mainnet seed nodes settings:

<nodes>
    <node>p2p://c33d2207-729a-4584-86f1-e19ab97cf9ce@51.144.42.220:30303</node>
    <node>p2p://c33d302f-216b-47d4-ac44-5d8181b56e7e@52.231.187.227:30303</node>
    <node>p2p://c33d4c07-6a29-4ca6-8b06-b2781ba7f9bf@191.232.164.119:30303</node>
    <node>p2p://741b979e-6a06-493a-a1f2-693cafd37083@66.207.217.190:30303</node>
    <node>p2p://c39d0a10-20d8-49d9-97d6-284f88da5c25@13.92.157.19:30303</node>
    <node>p2p://c38d2a32-20d8-49d9-97d6-284f88da5c83@40.78.84.78:30303</node>
    <node>p2p://c37d6b45-20d8-49d9-97d6-284f88da5c51@104.40.182.54:30303</node>
</nodes>

Mastery seed nodes settings:

<nodes>
    <node>p2p://a30d1000-8c7e-496c-9c4e-c89318280274@168.62.170.146:30303</node>
    <node>p2p://a30d2000-729a-4584-86f1-e19ab97cf9ce@23.96.22.19:30303</node>
    <node>p2p://a30d4000-729a-4584-86f1-e19ab97cf9cq@13.90.81.122:30303</node>
    <node>p2p://a30d5000-8c7e-496c-9c4e-c89318280275@104.42.186.213:30303</node>
</nodes>

Database compact settings:

<sync>
    ...
    <!--Trigger compact when IO time is slow. slow-import and frequency values are in milliseconds-->
    <compact enabled="false" slow-import="1000" frequency="600000"></compact>
</sync>
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.