Apollo Blockchain Platform Core
Apollo is being developed by the Apollo Foundation and supporting members of the community.
This repository contains core classes of Apollo blockchain platform and main executable of Apollo-blockchain component.
There are other components that are parts of Apollo:
- Apollo-web-ui: Web wallet UI that is served by Apollo blockchain node and can be accersed by browser at http://localhost:7876
- Apollo-dektop Desktop wallet UI. Apollo-web-ui must be installed tobe able to run Apollo desktop wallet.
- Apollo-tools: "swiss knife" of tools for node maintenance, transaction signing, etc.
- Apollo-bom-ext This module required in compilation time oly. It contains BOM of all external libraries used by Apollo components.
Java 11 (JRE) is required to run the most Apollo components.
If you feel like an expert, please use build instructions below. But also please note that instructions may be slightly outdated, especially in "development" branches of the Apollo project repositories.
We use LTS JDK version 11 in the development and and in the production environments. To be exact, we use vanilla openjdk builds from AdoptOpenJDK site: Java Development Kit openjdk v.11 from AdopOpenJDK, . You can download and install JDK for your platform by the link.
Apollo code runs well on latest JDKs but is not thouroughly tested. So you can use latest JDKs, e.g. version 15 on your own risk.
If you are dveloper, we'd like to recommend SDKMan kit to manage installed Java platforms.
- Verify your JDK installation by running
java -versionin console:
openjdk version "126.96.36.199" 2020-11-04 OpenJDK Runtime Environment 18.9 (build 188.8.131.52+1) OpenJDK 64-Bit Server VM 18.9 (build 184.108.40.206+1, mixed mode, sharing)
versionmatches 11.0.x version, your java was installed successfully and you can _proceed with next steps.
Clone this repository
Open command line, change your current directory to this project root and execute
- for Linux:
- for Windows cmd:
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T18:06:16+03:00) Maven home: /home/al/.m2/wrapper/dists/apache-maven-3.6.2-bin/795eh28tki48bv3l67maojf0ra/apache-maven-3.6.2 Java version: 220.127.116.11, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-18.104.22.168-4.fc33.x86_64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.9.12-200.fc33.x86_64", arch: "amd64", family: "unix"
- If output looks similar to example, you can perform build step.
./mvnw clean install(or
./mvnc -DskipTests clean installfor skipping tests)
mvnw.bat clean install(or
mvnw.bat -DskipTestsfor skipping tests)
###Other modules required to build Apollo components
Module [Apollo-bom-ext](https://github.com/ApolloFoundation/Apollo-bom-ext) contains all external library dependencies used by Apollo blockchain. Usually you do not need to build it because it is in out public artefact repository and downloaded by build scipts authamtically. But if you are developer and have neccessity to change external dependency, please refer to this module.
The final artifact that is ready to install and run located in the apl-exec/target directory and has name like apollo-blockchain-1.50.36-NoOS-NoArch.zip.
Unzip it to some location and run by scripts in ApolloWallet/apollo-blockchain/bin directory.
Project is entirely on Maven v3 and could be loaded in any IDE that supports Maven.
We follow GIT FLOW procedure in our development and use following branches:
master branch contains stable code of the latest release. It is also tagged for each public release. Please see "Tags" in the "barcnh" dropdown menu. Please use this branch to compile Apollo components.
develop branch contains latest development version. Use this branch if you are developer/contributor.
stage branch contains release preparation work of the last release. Do not use this branch if you are not release engineer
fix/, feature/, bugfix/** - temporary branches used by developers. Usually those branches get merged to develop and deleted after work is done.
1) Open repository https://github.com/ApolloFoundation/dbpackages 2) Change directory to mariadb-pkg and Run script depends on OS. ./maria_db_linux_pkg.sh ./maria_db_osx_pkg.sh ./maria_db_windows_pkg.sh 3) Unzip target packege and start db installation process. (<BASE_DIR>/ApolloWallet/apollo-mariadb is a basedir path) 4) Change directory to apollo-mariadb and run script ./install-mariadb.sh The default database data directory is <BASE_DIR>/ApolloWallet/apl-blockchain-db. To specify the custom path of the database data directory use parameter --apl-db-dir, example: ./install-mariadb.sh --apl-db-dir /home/user/.apl-blockchain/apl-blockchain-db
Article about MariaDB in docker https://mariadb.com/kb/en/installing-and-using-mariadb-via-docker/
How create local docker image for unit tests
Check IP table / firewall settings to access docker
$ sudo iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- 172.17.0.0/24 anywhere