Peer node setup

Instruction on the GitHub LINK

❗️

Be sure to read the instructions on setting up the #MetaGate node here

Please follow the instruction to setup the node.

Required libs:
cmake >= 3.14.1
gcc >= 8.2
libev = 4.25
boost >= 1.70
libsecp256k1
libfmt = 5.3.0
gperftools >= 2.7
openssl >= 1.1.1b
libconfig >= 1.7.2

1. Install Docker

sudo apt-get update
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker

2. Create a directory for configs and script

Be careful, this directory mustn’t be for read-only. Also, the name of the directory shouldn’t contain special symbols or spaces. Good variant for directory name - peer_node

3. Open terminal in this directory

4. Use command:

vim private.key
Paste your private key in HEX format. To quit vim press ESC, “:”, write “wq” and press Enter. (write all without “”)
How to get private key in HEX format

5. Use next commands:

wget https://raw.githubusercontent.com/metahashorg/peer_node/master/install/peer.conf --no-check-certificate
wget https://raw.githubusercontent.com/metahashorg/peer_node/master/install/peer.network --no-check-certificate
wget https://raw.githubusercontent.com/metahashorg/peer_node/master/install/start.sh --no-check-certificate

6. After downloading these files, use command:

./start.sh
If you’ll get the error “Permission denied” provide permission by chmod +x start.sh

7. You should get something like this:

$./start.sh
latest: Pulling from metahash/peer_node
Digest: sha256:759edffe2cd0294138414540e716c03acd743b2f8f7ceb62c13ee1ffe9ff885d
docker.io/metahash/peer_node:latest
Error response from daemon: No such container: peer_node
Error: No such container: peer_node
3fa40f29eac5fa7f0784bd3ad7ca009f9eef27629eed9fb200bd5d5420351e9a
[2019-09-03 19:04:47] [info] Starting...
[2019-09-03 19:04:47] [info] Load config file: peer.conf
[2019-09-03 19:04:47] [info] Peer: 2.1.7 (Sep 20 2019, 14:41:50 UTC), rev 6f0582640e06f355f7de15bc4ffcb231a4a5a095
[2019-09-03 19:04:47] [info] OpenSSL: OpenSSL 1.1.1b  26 Feb 2019
[2019-09-03 19:04:47] [info] Config dump:
[2019-09-03 19:04:47] [info] core
[2019-09-03 19:04:47] [info]    threads: 8
[2019-09-03 19:04:47] [info]    reqs_dump_ok: false
[2019-09-03 19:04:47] [info]    reqs_dump_err: true
[2019-09-03 19:04:47] [info]    queue_size: 10000000
[2019-09-03 19:04:47] [info] stats
[2019-09-03 19:04:47] [info]    interval_seconds: 1
[2019-09-03 19:04:47] [info]    url: http://172.104.236.166:5797/save-metrics
[2019-09-03 19:04:47] [info]    dump_stdout: false
[2019-09-03 19:04:47] [info]    send: true
[2019-09-03 19:04:47] [info] http server
[2019-09-03 19:04:47] [info]    ip: 0.0.0.0
[2019-09-03 19:04:47] [info]    port: 9999
[2019-09-03 19:04:47] [info]    max_conns: 70000
[2019-09-03 19:04:47] [info]    backlog: 70000
[2019-09-03 19:04:47] [info]    conns_clean_interval_seconds: 5
[2019-09-03 19:04:47] [info]    keep_alive_timeout_seconds: 600
[2019-09-03 19:04:47] [info]    request_read_timeout_seconds: 10
[2019-09-03 19:04:47] [info]    message_max_size: 20485760
[2019-09-03 19:04:47] [info] http client
[2019-09-03 19:04:47] [info]    conns_per_ip: 10
[2019-09-03 19:04:47] [info]    pool_max_conns: 100
[2019-09-03 19:04:47] [info]    reponse_timeout_ms: 5000
[2019-09-03 19:04:47] [info]    retries: 5
[2019-09-03 19:04:47] [info]    message_max_size: 4096
[2019-09-03 19:04:47] [info] Load network file: peer.network
[2019-09-03 19:04:47] [info] network: net-main
[2019-09-03 19:04:47] [info]    206.189.11.155:9999
[2019-09-03 19:04:47] [info]    206.189.11.153:9999
[2019-09-03 19:04:47] [info]    206.189.11.126:9999
[2019-09-03 19:04:47] [info]    206.189.11.128:9999
[2019-09-03 19:04:47] [info]    206.189.11.121:9999
[2019-09-03 19:04:47] [info]    206.189.11.148:9999
[2019-09-03 19:04:47] [info]    206.189.11.133:9999
[2019-09-03 19:04:47] [info]    206.189.11.147:9999
[2019-09-03 19:04:47] [info] Peer started

8. To check node status use

sudo docker ps

9. To find node logs use

sudo docker logs peer_node