How to access the blockchain
This page is under contruction
Contents
How to access the blockchain
The problem statement
Blockchains are in general of distributed nature. In ordert to access them and to potentially send or receive ATH there are two choices:
- Run a gath node (easiest if You are anyway running an own server)
- Access via Metamask (when You want to to access ATH via a website and not run a node)
Solution 1: deploy a node
Prerequisit
In order to spin off a node we will use a droplet from digital ocean http://www.digitalocean.com. When selecting a droplet, we will choose choose the following parameters:
- 1 CPU
- 1 GB RAM
- 25 GB SSD space
- floating IP
at the time of writing a droplet would cost 5 USD per month. We will use LAMP UBUNTU 16.04 for X64 as a base system. It is important to use this one, as otherwise You need to enable SSH access and fiddle with the firewall settings via digital ocean's console.
Installation
After installation digital ocean will send You the login information with the user root and then the password. You can facilitate the information by logging in via SSH
ssh root@Your_IP_ADDR
This will prompt for a password which You have received via mail. Once logged in You are placed into the /root directory.
Fetching and installing gath
As we want to run a node, we need an executable to do so. gath is the go language implementation of the atheios node. The latest release can be found at the following address: https://github.com/atheioschain/go-atheios/releases
At the point of writing the latest version is 1.03. When Atheios develops further new versions will be released. In the release branch several versions are available: for OSX, windows and Linux. As we run Ubuntu on AMD64 we will choose the related file and download it: https://github.com/atheioschain/go-atheios/releases/download/1.0.3/gath-linux-amd64-1.0.3.tar.gz
Upload the file with Your FTP file of Your choice to the droplet and place into the /root folder.
The file can be uncompressed with
tar xvf gath-linux-amd64-1.0.3.tar.gz
This will create a directory and place gath inside the directory.
Starting Gath
Gath is a multipurpose command line tool that run a full Atheios node. It offers multiple interfaces: the command line subcommands and options, a JSON-RPC server and an interactive console. Let us fire up that console. However , in order to run gath even after logging out we use the unix screen program. It creates a new screen where then gath can be executed.
root@lamp-s-1vcpu-1gb-lon1-01:~/gath-linux-amd64-1.0.3# screen -S GATH
This spawns a new screen, in which we then can start gath.
root@lamp-s-1vcpu-1gb-lon1-01:~/gath-linux-amd64-1.0.3# ./gath --rpc --rpcaddr 0.0.0.0 --rpcport 8696 --rpccorsdomain "http://localhost" --rpcapi "personal,db,eth,net,web3"
Now Gath starts to syncronize with the network. It will take up to 30 minutes and has reached full sync until the blocks are only increased by one. With screen CTRL ad the screen detaches and then returns to the shell. A short compendium for screen can be found here: http://aperiodic.net/screen/quick_reference
Configuration
https://ethereum.stackexchange.com/questions/28703/full-list-of-geth-terminal-commands
https://github.com/ethereum/go-ethereum/wiki/Management-APIs
https://github.com/ethereum/wiki/wiki/JSON-RPC