Sign inSign up

havah/chain-node

By havah

•Updated about 2 years ago

Image
0

2.4K

havah/chain-node repository overview

⁠havah-chain-node-docker

⁠Welcome to the havah-chain-node docker hub repository.

⁠Prerequisites

We recommend running nodes using Docker.
Install Docker Engine: Install Docker Engine⁠
Install Docker Compose: Install Docker Compose⁠
Official Docker Image: havah/chain-node

System Requirements 

CPU:  minimum 4core, recommend 8core +
RAM:  minimum 16GB, recommend 32GB + 
DISK : minimum SSD 1.5TB, recommend SSD 2TB + 
Network: minimum 1Gbps, recommend 2Gbps +

External Communications 
TCP 7100: TCP port used for peer-to-peer connection between HAVAH nodes.
TCP 9000: JSON-RPC or RESTful API port serving application requests.
Validators must allow TCP connections to port 7100 and 9000 of an external host. ( Use 0.0.0.0/0 for a source from any network )

⁠Getting started

Open docker-compose.yml in a text editor and add the following content:

version: "3"
services:
   havah-node:
      image: havah/chain-node
      container_name: "havah-chain-node"
      network_mode: host
      restart: "on-failure"
      environment:
         SERVICE: "MainNet"  # MainNet, VegaNet  ## kind of network type 
         GOLOOP_LOG_LEVEL: "debug" # trace, debug, info, warn, error, fatal, panic          
         KEY_STORE_FILENAME: "INPUT_YOUR_KEY_STORE_FILENAME" # e.g. keystore.json read a config/keystore.json
         # e.g. "/goloop/config/keystore.json" read a "config/keystore.json" of host machine
         KEY_PASSWORD: "INPUT_YOUR_KEY_PASSWORD"
         FASTEST_START: "true"    # It can be restored from the latest Snapshot DB.
         ROLE: 3 # validator = 3, citizen = 0

      cap_add:
         - SYS_TIME

      volumes:         
         - ./data:/goloop/data # mount a data volumes
         - ./config:/goloop/config # mount a config volumes ,Put your used keystore file here.     
         - ./logs:/goloop/logs

Start up

$ docker-compose pull && docker-compose up -d

To see the logs of the havah-chain-node you can execute

$ tail -f logs/booting.log


$ tail -f logs/goloop.log

The directories(data, config, icon, logs …) are created by docker engine, but config directory needs to importing your keystore file.

.
├── docker-compose.yml 
├── config               # configuration files                         
│   └── keystore.json   # Import your keystore file
├── data                # block data
│   ├── 1
│   ├── auth.json
│   ├── cli.sock
│   ├── ee.sock
│   └── rconfig.json
└── logs   # log files
    ├── booting.log   
    ├── health.log    # health state log
    ├── chain.log     # goloop chain action logs
    ├── download.log
    ├── download_error.log # download  
    └── goloop.log   # goloop's log file

⁠Docker environments settings

Namedefaulttyperequireddescription
SERVICEMainNetstrfalseService Name - (MainNet, VegaNet)
ROLE0inttrueRole of running node. 0: Citizen, 3: P-Rep
CONFIG_URLstrfalse
CONFIG_URL_FILEdefault_configure.jsonstrfalse
CONFIG_LOCAL_FILEconfigure.jsonstrfalse
IS_AUTOGEN_CERTfalseboolfalseAutomatically generate certificates
FASTEST_STARTfalseboolfalseDownload snapshot DB
KEY_STORE_FILENAMEkeystore.jsonstrtruekeystore.json file name
KEY_PASSWORDstrtruepassword of keystore.json file
USE_NTP_SYNCTrueboolfalseWhether to use NTP in container
NTP_SERVERstrfalseNTP Server
NTP_REFRESH_TIMEintfalseNTP refresh time
SLACK_WH_URLstrfalseslack webhook url - If a problem occurs, you can receive an alarm with a slack.
USE_HEALTH_CHECKTrueboolfalseWhether to use health check
USE_VALIDATOR_HEALTH_CHECKFalseboolfalseWhether to use validator health check
CHECK_TIMEOUT10intfalsesec - TIMEOUT when calling REST API for monitoring
CHECK_PEER_STACK6intfalsesec - Stack value to check the peer for monitoring.
CHECK_BLOCK_STACK10intfalsesec - Stack value to check the block for monitoring.
CHECK_INTERVAL10intfalsesec - check interval for monitoring
CHECK_STACK_LIMIT360intfalsecount - count- Restart container when stack value is reached
GOLOOP_LOG_LEVELdebugstrfalseLog Level - (trace,debug,info,warn,error,fatal,panic
LOG_OUTPUT_TYPEfilestrfalsesec - check interval for monitoring

Tag summary

Content type

Image

Digest

sha256:91855f7f1…

Size

357.3 MB

Last updated

over 2 years ago

docker pull havah/chain-node