Alpha RTA Testnet Install & Usage Instruction

Vitalius Parubochyi edited this page Jan 31, 2019 · 11 revisions

Table of Contents

Requirements

OS: Ubuntu 18.04 LTS Bionic

Build Requirments Run Requirements
RAM, GB 8 2
CPU, Cores 2 2
Storage, GB 100 100

Note: In order to GraftNode (also called the cryptonode) work properly 28680 (P2P) port should be opened for incoming and outgoing traffic. If you are using other ports, please, make sure that you are open P2P port of the cryptonode.

Default Alpha RTA Configuration

Ports

28600 - load balancer http port.

28643 - load balancer https port.

28680 - p2p node port.

28681 - rpc node port.

28690 - rpc supernode port.

8081 - block explorer port.

DNS

testnet-dev-seed.graft.network - wallet proxy supernode load balancer DNS.

Installation

Environment Preparation

  1. Update package index lists:
sudo apt-get update
  1. Install git (if not installed already):
sudo apt-get install -y git

Build Graft Supernode

  1. Clone Graft Supernode from GitHub repository: https://github.com/graft-project/graft-ng.git
git clone --recursive https://github.com/graft-project/graft-ng.git
  1. Go to graft-ng directory:
cd graft-ng
  1. Switch to alpha4 branch:
git checkout alpha4
  1. Update submodules:
git submodule update --init --recursive
  1. Install cryptonode dependencies from the list https://github.com/graft-project/GraftNetwork#dependencies
  • Option A - use following command line:
sudo apt-get -y install build-essential cmake \
              pkg-config libboost-all-dev \
              libssl-dev libunwind8-dev \
              liblzma-dev libldns-dev \
              libexpat1-dev doxygen graphviz
./install_dependencies.sh

You can find it in the supernode by path <supernode_project_path>/graft-ng/modules/cryptonode/.

  1. Install supernode dependencies from the list https://github.com/graft-project/graft-ng/tree/alpha4#dependencies
sudo apt-get -y install build-essential cmake \
                  pkg-config libboost-all-dev \
                  libssl-dev autoconf automake \
                  check libpcre3-dev rapidjson-dev \
                  libreadline-dev
  1. Create build directory:
mkdir -p <build directory>
cd <build directory>

Where <build directory> is any directory, for example, $HOME/supernode.

  1. Run CMake:
cmake <project root>

Where <project root> is location of your project files; if you downloaded the source into your home directory, it is $HOME/graft-ng.

  1. Start the build:
  • Option A (Use single CPU):
make
  • Option B (Defined CPU affinity):
make -j2

for "-j" param select appropriate number of CPU cores available on your system.

  1. Wait until compilation finished.
  2. Find Graft Supernode executable (supernode) in the <build directory>.
  3. Find Graft Node (graftnoded), Graft Wallet CLI (graft-wallet-cli) executables in the <build directory>/BUILD/bin.

Build Graft Node

Note: Normally you don't need to build Graft Node separately, it currently builds as a part of supernode project.

  1. Clone Graft Network from GitHub repository: https://github.com/graft-project/GraftNetwork.git
git clone https://github.com/graft-project/GraftNetwork.git
  1. Go to GraftNetwork directory:
cd GraftNetwork
  1. Switch to rta-alpha4 branch:
git checkout rta-alpha4
  1. Install dependencies from the list https://github.com/graft-project/GraftNetwork#dependencies
  • Option A - use following command line:
sudo apt-get -y install build-essential cmake \
              pkg-config libboost-all-dev \
              libssl-dev libunwind8-dev \
              liblzma-dev libldns-dev \
              libexpat1-dev doxygen graphviz
./install_dependencies.sh
  1. Start the build:
  • Option A (Use single CPU):
make release-syslog
  • Option B (Defined CPU affinity):
make -j2 release-syslog

for "-j" param select appropriate number of CPU cores available on your system.

In order to build standalone binaries (i.e. to upload it to the server where no dev packages installed), invoke:

make -j2 release-syslog-static
  1. Wait until compilation finished (Approximate 21 minutes using AWS T2 Medium).
  2. Find Graft Node executable (graftnoded) and Graft CLI Wallet in the <your GraftNetwork path>/GraftNetwork/build/release/bin.

Configuration of Alpha RTA Environment

Graft Node Configuration

  1. Run Graft Network daemon from using following commands:
  • With console output:
./graftnoded --testnet --log-file <path_to_log_file>
  • In background mode:
./graftnoded --testnet --log-file <path_to_log_file> --detach

Additional options:

    --testnet-data-dir - specify testnet data directory.
    --testnet-p2p-bind-port <port> - specify custom testnet p2p binding port. For example, 28680.
    --testnet-rpc-bind-port <port> - specify custom testnet rpc binding port. For example, 28681.
    --rpc-bind-ip <ip> - specify ip to bind rpc server. For example, 0.0.0.0 for external binding.
    --confirm-external-bind - confirm rpc-bind-ip value is not a loopback (local) IP.
    --help - display help message with all supported commands.
  1. Wait for blockchain synchronization.

Note: Please don’t run Alpha RTA Testnet on the same server as public testnet.

Graft Supernode Configuration

  1. [NOTE: Only for new setup] Having built supernode binary (supernode), please copy <graft_ng-source-dir>/data/config.ini to the same directory as supernode binary.
  2. Run supernode binary, let it run for few seconds and stop it with CTRL-C. Ignore any errors in console. This will automatically create stake wallet for your supernode.
  3. Go to ~/.graft/supernode/data/stake-wallet and note wallet address from stake-wallet.address.txt. Request stake amount for your supernode by sending email to alpha@graft.network with your wallet address - we will load up your stake wallet with testnet coins.
  4. Once you received coins and coins are unlocked - the supernode is ready to be used - run supernode binary having config.ini in the same directory as binary. It make sense to redirect the log to a file - in case any bug we might request a log from you. This can be done with the following starter script:
#!/bin/bash
./supernode --log-file <path_to_log_file>

Graft Clients (Point-of-Sale and Wallet) Configuration

  1. Upload Graft Clients:
  • iOS Clients: Check if you have access to iPhone clients for Alpha RTA Testnet. For this check your email if you got notification from TestFlight with Redeem Code or open TestFlight application and check if GRAFT Mobile Point of Sale version 1.13.x and GRAFT CryptoPay Wallet version 1.13.x is available for you.
  • macOS Clients: Download macOS packages for desktop clients (Graft Point-of-Sale and Graft Wallet): https://github.com/graft-project/GraftMobile/releases/latest.
  1. Configure Graft Account
  • Open Graft Point-of-Sale or Graft Wallet application.
  • Select Alpha RTA Testnet and press Confirm.
  • If you want to change service settings, for example, connect to your supernode, press the Settings button. How to configure custom service settings see 3.
  • If you want to create a new account, enter the password, confirm it and press Create New Wallet. Then copy mnemonic phrase and press I saved it!.
  • Also, you can restore your existing wallet (from Public RTA Testnet). For this, press Restore/Import Wallet. Then enter or paste mnemonic phrase, enter and confirm the password, and press Restore.
  1. Configure custom service settings
  • Open Settings Screen.
  • If you haven’t HTTPS access, disable HTTPS.
  • Select one two options and enter your service address:
    • Service address, for access via IP and Port.
    • Service URL, for access via HTTPS or HTTP URL.
  • Press Done to save changes.

Appendix 1. Running Graft Node

  1. Under folder <path to GraftNetwork>/GraftNetwork/build/release/bin, the following components may be found:
  • graftnoded - Graft Network daemon;
  • graft-wallet-cli - Graft Network CLI Wallet.
  1. Running Graft Network daemon
graftnoded --testnet --detach
    --detach  - Running service in the background. Running without "--detach" will provide on
                screen visual daemon log and alscrelow to invoke daemon commands.
    --testnet - Running on the test network.
  1. Additional Graft Network daemon functions:
graftnoded --help
  1. Status and log files are saved at $HOME/.graft/testnet directory. To specify any arbitrary directory, add --testnet-data-dir to the command line. Example: --testnet-data-dir .

Appendix 2. Graft CLI Wallet Commands

Creating a wallet and connecting to the local testnet node

To create new wallet for the public testnet, invoke:

./graft-wallet-cli --generate-new-wallet <wallet_name> \
                   --testnet --daemon-address localhost:28681

File location : <your GraftNetwork path>/GraftNetwork/build/release/bin.

This will try to connect to the local daemon, running in testnet mode, ask password for a new wallet, electrum seed language, generate new wallet and finally open wallet with CLI interface. Invoke help to see available commands. E.g. CPU mining (Solo mining) can be started with start_mining command.

Here are the shell scripts automating wallet creation and other tasks in non-interactive mode: https://github.com/graft-project/GraftNetwork/tree/master/tests/libwallet_api_tests/scripts

Opening an existing wallet

To open a previously created testnet wallet, invoke:

./graft-wallet-cli --wallet-file <wallet_name> --password "" \
                   --testnet --trusted-daemon \ 
                   --daemon-address localhost:28681

Restoring an existing wallet

To restore your wallet via Graft CLI, you need to get the mnemonic phrase of your Graft wallet and run Graft CLI with the following options:

--restore-deterministic-wallet - allow creating wallet from mnemonic phrase

--electrum-seed "<mnemonic phrase>" - mnemonic phrase of your Graft wallet

For example:

Linux/MacOS:

./<path to GraftNetwork install directory>/graft-wallet-cli \
                    --testnet --restore-deterministic-wallet \
                    --electrum-seed "<mnemonic phrase>"

Windows:

<path to GraftNetwork install directory>\graft-wallet-cli.exe \
                      --testnet --restore-deterministic-wallet \
                      --electrum-seed "<mnemonic phrase>"

Then Graft CLI will ask to enter a file name for your wallet and password to secure your wallet.

To get more information about options of Graft CLI you can run it with --help option:

./<path to GraftNetwork install directory>/graft-wallet-cli --help

To get information about actions which are available for your wallet in the Graft CLI, enter help command when opening your Graft wallet in the Graft CLI.

Appendix 3. Reporting Bugs, Suggestions, and Information Requests

Jira for reporting bugs, suggesting improvements, and asking devs for information: https://graftnetwork.atlassian.net/projects/SUP/

To collect additional information about the issue:

  1. Run graftnode and supernode with detailed logging:
  • Run graftnode with option --log-level 3
  • Run supernode with option --log-level 2
  1. Use Alpha RTA seed nodes:
  • Connect to specific supernode (only HTTP) to localize issue:
	18.214.197.224:28690
	18.214.197.50:28690
	35.169.179.171:28690
	34.192.115.160:28690
  • Specify this supernode in the description of the issue.
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.
Press h to open a hovercard with more details.