- Elastos ELA Arbiter
- Pre-requisites on Mac
- Pre-requisites on Ubuntu
- Configure the node
- Build the node
- Interact with the node
- Contribution
- Acknowledgments
- License
Make sure the OSX version is 16.7+
$ uname -srm
Darwin 16.7.0 x86_64
Use Homebrew to install Golang 1.13.
$ brew install go@1.13
If you install older version, such as v1.8, you may get missing math/bits package error when build.
Make sure your ubuntu version is 16.04+
$ cat /etc/issue
Ubuntu 16.04.3 LTS \n \l
$ sudo apt-get install -y git
$ curl -O https://storage.googleapis.com/golang/go1.13.5.linux-amd64.tar.gz
$ tar -xvf go1.13.5.linux-amd64.tar.gz
$ sudo chown -R root:root ./go
$ sudo mv go /usr/local
$ export GOPATH=$HOME/go
$ export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
$ source ~/.profile
If you install older version, such as v1.8, you may get missing math/bits package error when build.
See the documentation about config.json to understand what each parameter means on the configuration file.
If you would like to connect to testnet, do the following:
$ cp docs/testnet_config.json.sample config.json
If you would like to connect to mainnet, do the following:
$ cp docs/mainnet_config.json.sample config.json
Make sure to modify the parameters to what your own specification.
Check the golang version. Make sure they are the following version number or above.
$ go version
go version go1.13.5 darwin/amd64
If you cannot see the version number, there must be something wrong when install.
Make sure you are in the folder
$ git clone https://github.com/elastos/Elastos.ELA.Arbiter.git
If clone works successfully, you should see folder structure like Elastos.ELA.Arbiter/Makefile
Build the node.
$ cd Elastos.ELA.Arbiter
$ make
If you did not see any error message, congratulations, you have made the arbiter full node.
Run the node.
$ ./arbiter -p password
Once the node is running successfully, you can access Arbiter Node's JSON RPC APIs:
Example 1: Get the block height synchronized by SPV from the main chain
curl -H 'Content-Type: application/json' -H 'Accept:application/json' --data '{"method":"getspvheight"}' http://localhost:20606
{
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": 2509
}
Example 2: Get the block height of side chain by side chain genesis block hash
curl -H 'Content-Type: application/json' -H 'Accept:application/json' --data '{"method":"getsidechainblockheight","params":{"hash":"56be936978c261b2e649d58dbfaf3f23d4a868274f5522cd2adb4308a955c4a3"}}' http://localhost:20606
{
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": 70
}
If you would like to learn more about what other JSON RPC APIs are available for the node, please check out the JSON RPC API
We welcome contributions to the Elastos ELA Arbiter Project.
A sincere thank you to all teams and projects that we rely on directly or indirectly.
This project is licensed under the terms of the MIT license.