Getting Started

Build

1. macOS Prerequisites

Make sure you're using the macOS version Mojave or latest 64-bit Intel.
1
$ uname -srm
2
Darwin 18.7.0 x86_64
Copied!
Use Homebrew to install Golang 1.13:
1
$ brew install [email protected]
Copied!
Check the golang version - make sure they're the following version number above:
1
$ go version
2
go version go1.13.15 darwin/amd64
Copied!

2. Ubuntu Prerequisites

Make sure your ubuntu version is 18.04 or later:
1
$ cat /etc/issue
2
Ubuntu 18.04.5 LTS \n \l
Copied!
Install Git:
1
$ sudo apt-get install -y git
Copied!
Install Go distribution:
1
$ curl -O https://golang.org/dl/go1.13.15.linux-amd64.tar.gz
2
$ tar -xvf go1.13.15.linux-amd64.tar.gz
3
$ sudo chown -R root:root ./go
4
$ sudo mv go /usr/local
5
$ export GOPATH=$HOME/go
6
$ export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
7
$ source ~/.profile
Copied!

3. Clone source code

Make sure you're in the working folder:
1
$ git clone https://github.com/elastos/Elastos.ELA.git
Copied!
If the clone works successfully, the folder structure should appear as "Elastos.ELA/Makefile."

4. Make

Build the node:
1
$ cd Elastos.ELA
2
$ make
Copied!

Run the Node

1. Configure the node

You can run an ela node without a config.json file; the ela node will use the mainnet configuration by default and provide a JSON-RPC service on http://localhost:20336.
If you want to customize the node configuration, see the config.json to understand what each parameter means on the configuration file.
If you would like to connect to the testnet, please do the following:
1
$ cp -v docs/testnet_config.json.sample config.json
Copied!
If you would like a simple config template, please do the following:
1
$ cp -v docs/mainnet_config.json.sample config.json
Copied!
Make sure to modify the parameters to your own specifications:

2. Run the node on Ubuntu and macOS

Run the node:
1
$ ./ela
Copied!