-
Notifications
You must be signed in to change notification settings - Fork 113
Build Aion kernel from source
- Ubuntu 16.04 or later version
- Open JDK 11
- Apache Ant 1.10
- 8GB RAM
- CPU need to support SSE4.2
- install pre-required package
sudo apt-get update
sudo apt-get install -y git g++ cmake wget llvm-4.0 lsb-release libjsoncpp1 libjsoncpp-dev libboost1.58-all-dev libzmq5 libstdc++6 libgcc1 libpgm-5.2-0
- Clone the Aion project
git clone --recursive https://github.com/aionnetwork/aion
- Go into the folder
cd aion
- Check your environment settings are correct, including the Ant execute path, java executes PATH link to the JDK11 folder, and the JAVA_HOME.
Set a link at /usr/lib/jvm/jdk-11.0.1
ln -s [your jdk install folder] /usr/lib/jvm/jdk-11.0.1
This is the example for the building environment settings in .profile under the home path. You can reload it by source ~/.profile
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
export JAVA_HOME=/usr/lib/jvm/jdk-11.0.1
export ANT_HOME=$HOME/IDE/apache-ant-1.10.3
PATH="$ANT_HOME/bin:$JAVA_HOME/bin:$PATH"
Then you should be able to build
./gradlew build
- Verify the code You can go through the test cases by:
./gradlew test -x aion_api:test
- pack the code
./gradlew pack
check your pack folder
cd pack
You should see a file named like this
aion-v<KERNEL VERSION>.<GIT REVISION>-<BUILD DATE>.tar.bz2
eg. aion-v0.1.12.2c5119a-2018-02-28.tar.bz2
If you want to build the project all from the source code. In step 4 of the How to build, you can use ant full_build to build all from source (It will take a while). make sure your Ubuntu is 16.04 release (if you want to build on top of the latest Ubuntu release, will require you to change the dependency of the build script in the aion_fastvm/script folder, the last Ubuntu release doesn't have the libboost1.58 package)
The build scripts can also produce a Docker image.
In addition to the per-requisites listed above, building the Docker image will also require you to have the following installed:
- Docker 18+
- Python 2.x
To build the Docker image, run the following from the aion
directory: ./gradlew packDocker
For more information about running Aion in Docker, see: https://docs.aion.network/v1.1/docs/docker-images
Please check the section Aion Installation in the aion/README.md
There is a wiki about the code convention. Please follow the rules when you do pull requests to this repo. Thanks
If you want to test your dev AVM with the Aion Java kernel, copy the AVM libraries to the Aion kernel lib folder after finished your build in the AVM repo
$[your AVM repo PATH] ant; ant test
cp [your AVM repo PATH]/build/main/org-aion-avm-*(except org-aion-avm-tooling.jar) [your kernel repo]/lib
Basics
Kernel Configuration
- Build Aion kernel from source
- Installation & Configuration
- Command Line Interface
- Graphical Interface
- Database
- Internal Miner
- Genesis Block
- Aion Seed Nodes
- JSON-RPC API Docs
For Developers
- How to load/debug project to IntelliJ IDEA
- Aion Code Conventions
- Migrating from Ethereum
- Precompiled contract details
- Troubleshooting the kernel
- Aion P2p Specifications
- Aion transaction Specifications
- Aion pending state and the transaction pool
Tutorials
- Importing Accounts
- Kernel Deployment Examples
- Reverting to Previous Blocks
- Application Development
- Enabling-HTTPS-for-JSONRPC
- Enabling Secure connection for Aion Java API
Modules
Tools