This repository has been archived by the owner. It is now read-only.
Guide for developing ACES servies
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

ACES Developer Guide

Deploying your Node

These steps help you get set up a Ubuntu 16.04 linux server running ACES. You'll need at least 50GB of disk space to sync the ethereum blockchain (might not be necessary for light syncing).

These instructions use systemd to supervise applications running in the background and nginx to serve web traffic.

  1. Install system dependencies
sudo apt-get install software-properties-common python-software-properties build-essential curl git maven
sudo add-apt-repository ppa:git-core/ppa
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update

sudo apt-get install ethereum solc

# install Java JVM
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
sudo apt-get install oracle-java8-installer

# install nodejs
curl -sL | sudo -E bash -
sudo apt-get install nodejs

# install nginx
sudo apt-get install nginx
  1. Install ethereum service

Copy the following into /etc/systemd/system/geth-network.service. There are 3 different ways to run geth to target different ethereum networks: dev, testnet, and mainnet.

vim /etc/systemd/system/geth-network.service

When in vim, press 'a' to enter insert mode. Then press ctrl+shift+V to paste the desired network chunk below. If you make a mistake, press ESC and type :1,$d to clear the page. Save the changes with ESC and type :x

Local Devnet:

Description=Ethereum devnet

ExecStart=/usr/bin/geth --dev --rpc --rpcaddr= --rpcapi 'web3,eth,personal' --rpccorsdomain="*" \

Rinkeby Testnet:

Description=Ethereum testnet

ExecStart=/usr/bin/geth --testnet --rpc --rpcaddr= --rpcapi 'web3,eth,personal' --rpccorsdomain="*" \
--datadir=/eth-data --fast --cache=1024 \



Description=Ethereum network

ExecStart=/usr/bin/geth --rpc --rpcaddr= --rpcapi 'web3,eth,personal' --rpccorsdomain="*" \
--datadir=/eth-data --fast --cache=1024 \
--bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@"


Start up ethereum service (this can take several hours to sync before transactions):

sudo chmod 655 /etc/systemd/system/geth-network.service
sudo systemctl daemon-reload
sudo service geth-network start

You can view the output of running systemd services by tailing the syslog:

sudo tail -f /var/log/syslog

It is helpful to check the status of your sync by opening a new terminal window, logging in to your server if necessary, and running the following:

sudo geth attach ipc:/eth-data/geth.ipc
  1. Create Service Eth Wallet

Connect to the local geth instance and create a new eth wallet for ACES service:

geth attach ipc:/eth-data/geth.ipc

> personal.newAccount('enter your passphrase here');
> eth.accounts

Use the eth wallet address and password in the application.yml configuration below.

  1. Install ACES application

Install the application under /apps:

sudo mkdir /apps
cd /apps
git clone

Install application.yml configuration file under /etc/aces-backend:

mkdir /etc/aces-backend

Copy src/main/resources/application.yml file over into /etc/aces-backend and replace wallet configurations with your own Ethereum and Ark addresses and passphrases/passwords. Ensure that the values remain quoted. If using mainnet, change arkPerEthAdjustment: "100.00" to arkPerEthAdjustment: "1"

vim /etc/aces-backend/application.yml
    url: "jdbc:h2:/tmp/testdb;DB_CLOSE_ON_EXIT=FALSE;AUTO_RECONNECT=TRUE"
    driver-class-name: "org.h2.Driver"
      ddl-auto: "update"

  name: "mainnet"

  ethServerUrl: "http://localhost:8545"
  scriptPath: "./bin"
  nodeCommand: "/usr/bin/node"

    address: "change me"
    passphrase: "change me"

    address: "change me"
    password: "change me"

arkPerEthAdjustment: "100.00"

  arkFlatFee: "2.00"
  arkPercentFee: "2.25"
  requiredArkMultiplier: "1.2"

  arkFlatFee: "1.00"
  arkPercentFee: "1.25"
  requiredArkMultiplier: "1"

OPTIONAL: For production instances, you should configure the application to use a real database like posgresql:

    url: jdbc:postgresql://{host}:{port}/{database_name}
    username: {username}
    password: {password}
    database-platform: org.hibernate.dialect.PostgreSQLDialect
    generate-ddl: true
      ddl-auto: update


Copy the following into /etc/systemd/system/aces-backend.service:

vim /etc/systemd/system/aces-backend.service
Description=Aces Backend

ExecStart=/usr/bin/mvn spring-boot:run -Dspring.config.location=file:/etc/aces-backend/application.yml


Install npm dependencies:

cd /apps/aces-backend/bin
npm install

Start the ACES backend service:

sudo chmod 655 /etc/systemd/system/aces-backend.service
sudo systemctl daemon-reload
sudo service aces-backend start
  1. Installing ACES frontend

Install the application under /apps:

cd /apps
git clone

Copy prod configuration template into custom configuration file:

cd /apps/aces-frontend
cp src/environments/ src/environments/environment.custom.ts

If using an Ethereum Testnet, copy the following into /apps/aces-frontend/src/environments/environment.custom.ts, making sure to replace localhost with your server ip, if applicable.

vim /apps/aces-frontend/src/environments/environment.custom.ts
export const environment = {
  production: true,
  title: 'Custom Ark Contract Execution Services (ACES)',
  isEthTestnet: true,
  ethNetworkName: 'rinkeby',
  etherscanBaseUrl: '',
  ethArkRateFraction: '1/100',
  arkExplorerBaseUrl: '',
  acesApiBaseUrl: 'http://localhost/aces-api'

If using an Ethereum Mainnet, copy the following into /apps/aces-frontend/src/environments/environment.custom.ts, making sure to replace localhost with your server ip, if applicable.

vim /apps/aces-frontend/src/environments/environment.custom.ts
export const environment = {
  production: true,
  title: 'Custom Ark Contract Execution Services (ACES)',
  isEthTestnet: false,
  ethNetworkName: 'mainnet',
  etherscanBaseUrl: '',
  ethArkRateFraction: '1',
  arkExplorerBaseUrl: '',
  acesApiBaseUrl: 'http://localhost/aces-api'

Install angular for the front-end UI

cd /apps/aces-frontend
npm install -g @angular/cli
npm install

Build the application

ng build --target=production --env=custom --base-href /aces-app/
  1. Set up nginx web server

Allow backend and frontend to be served by nginx by adding the following to /etc/nginx/sites-available/default under root server directive.

First vim into the file

vim /etc/nginx/sites-available/default

Then add the snippet below under the server directive.

location /aces-app/ {
    alias /apps/aces-frontend/dist/;
    try_files $uri $uri/ /aces-app/;

location /aces-api/ {

Now restart the nginx service

sudo service nginx restart
  1. Confirm setup

Check the backend API by making a GET request to http://localhost/aces-api/test-service-info:

curl http://localhost/aces-api/test-service-info
  "capacity" : "∞",
  "flatFeeArk" : "0",
  "percentFee" : "0",
  "status" : "Up"

Open up the aces-app frontend in your browser: https://localhost/aces-app/