- AWS Lightsail - Linux virtual server (1 cpu, 1GB memory, 40GB ssd, 2TB bandwidth)
- Google Cloud Platform - Compute Engine General purpose (N2)
- Vultr - Cloud Compute (1 cpu, 1GB memory, 25GB ssd, 1TB bandwidth)
- Digital Ocean - Droplet (1 cpu, 25GB ssd, 1TB bandwidth)
- Linode - Shared virtual Instances (1 cpu, 1GB memory, 25GB ssd, 1TB bandwidth)
- [Others]
- Ubuntu 18.04 x64 LTS or higher
- An IPv4 address
- Run
$ dig +short myip.opendns.com @resolver1.opendns.com
- Or get it from cloud server providers. Most vps / cloud server
- Run
- With below ports open:
- udp port
7946
- tcp port
7946
,9501
- udp port
- It's recommended to generate ssh login key pairs and setup public key authentication instead of using password login for server security and funds safety:
- Learn how to setup SSH public key authentication on Ubuntu 18.04 and disable password logins.
- Acquire at least 800,000 DOS tokens, (and optional - acquire several DropBurn token to reduce (up to 30%) the amount of DOS tokens needed to start a node, distribution plan be out later).
- Replace your node ip address in config.json
- Node runners currently earn three types of incomes: (Self-bonded) staking rewards, (other delegators') staking reward shares, oracle request processing fees.
- Register and get Infura api key
- Replace your infura api key in config.json
-
Install go1.11 or higher and setup golang workingspace like below:
$ sudo apt-get install golang $ sudo apt-get install build-essential
-
Open
~/.bashrc
and set$GOPATH
and$PATH
environmental variables:$ vim ~/.bashrc export GOPATH=$HOME/go export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin $ source ~/.bashrc
-
Download source code:
$ mkdir -p $GOPATH/src/github.com/DOSNetwork $ cd $GOPATH/src/github.com/DOSNetwork && git clone https://github.com/DOSNetwork/core.git $ cd core $ git checkout v1.0.4-m
-
Build:
$ GO111MODULE=on go mod download
- to download building dependencies- Dev dependencies: solc-v0.5.17, abigen-v1.9.18-stable
$ make
- to build release version client
-
Run:
$ ./dos.sh start
-
Dev tips:
$ go fmt ./...
to reformat go source code.$ golint
to fix style mistakes conflicting with effective go. (golint tool for vim users.)$ make devClient
to build develoment version client.$ make updateSubmodule
to fetch latest system contracts from repo, instead of making contract modifications locally.$ make gen
to generate binding files for system contracts.$ make clean
to remove built binaries or unnecessary generated files.- Use solc-select tool to select / pin to specific solidity compiler version.