dHealth dHealth - Mainnet
Chain ID: dhealth Block Height: Loading...
RPC Status:

Network Overview

dHealth Network is an open blockchain platform specifically designed for the healthcare sector. This platform enables the development of decentralized applications (dApps) and innovative business models that integrate blockchain technology with the needs of the healthcare industry.

https://rpc-dhealth.sychonix.com

https://api-dhealth.sychonix.com

Installation

  • Install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev aria2 -y
  • Install Go
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.23.2.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
  • Install Binary
cd $HOME
curl -L https://snapshot.sychonix.com/mainnet/dhealth/dhealthd.tar.gz | tar -xvzf - -C $HOME
sudo mv dhealthd /usr/local/bin/
  • Download CosmWasm Library
sudo wget -P /usr/lib https://github.com/CosmWasm/wasmvm/releases/download/v1.3.1/libwasmvm.x86_64.so
  • Initialize The Node
dhealthd config chain-id dhealth
dhealthd init $MONIKER --chain-id dhealth
sed -i -e "s|^node *=.*|node = \"tcp://localhost:12457\"|" $HOME/.dhealth/config/client.toml
sed -i -e "s|^keyring-backend *=.*|keyring-backend = \"os\"|" $HOME/.dhealth/config/client.toml
  • Download Genesis & Addrbook
curl -L https://snapshot.sychonix.com/mainnet/dhealth/genesis.json > $HOME/.dhealth/config/genesis.json
curl -L https://snapshot.sychonix.com/mainnet/dhealth/addrbook.json > $HOME/.dhealth/config/addrbook.json
  • Configure Seeds and Peers
SEEDS="89661b92afd14d7672c6a37547cab8c746dc58c6@dhealth-mainnet.sychonix.com:12456"
PEERS="$(curl -sS https://rpc-dhealth.sychonix.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i -e "s|^seeds *=.*|seeds = '"$SEEDS"'|; s|^persistent_peers *=.*|persistent_peers = '"$PEERS"'|" $HOME/.dhealth/config/config.toml
  • Update Port Configuration
sed -i -e "s%:1317%:12417%; s%:8080%:12480%; s%:9090%:12490%; s%:9091%:12491%; s%:8545%:12445%; s%:8546%:12446%; s%:6065%:12465%" $HOME/.dhealth/config/app.toml
sed -i -e "s%:26658%:12458%; s%:26657%:12457%; s%:6060%:12460%; s%:26656%:12456%; s%:26660%:12461%" $HOME/.dhealth/config/config.toml
  • Customize Pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "17"|' \
  $HOME/.dhealth/config/app.toml
  • Set Minimum Gas Price, Enable Prometheus, and Disable the Indexer
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"1udhp\"|" $HOME/.dhealth/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.dhealth/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.dhealth/config/config.toml
  • Create Service File
sudo tee /etc/systemd/system/dhealthd.service > /dev/null <<EOF
[Unit]
Description=dhealth mainnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which dhealthd) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
  • Download Current Snapshot
curl "https://snapshot.sychonix.com/mainnet/dhealth/dhealth-snapshot.tar.lz4" | lz4 -dc - | tar -xf - -C "$HOME/.dhealth"
  • Enable the Service and Start the Node
sudo systemctl daemon-reload
sudo systemctl enable dhealthd.service
sudo systemctl restart dhealthd.service && sudo journalctl -u dhealthd.service -f --no-hostname -o cat
  • Create Validator
medasdigitald tendermint show-validator
  • Create validator.json file
sudo nano $HOME/.medasdigital/validator.json
{
  "pubkey": {"#pubkey"},
  "amount": "", 
  "moniker": "", 
  "identity": "",
  "website": "",
  "security": "", 
  "details": "", 
  "commission-rate": "0.05",
  "commission-max-rate": "0.2",
  "commission-max-change-rate": "0.05",
  "min-self-delegation": "1"
}
medasdigitald tx staking create-validator $HOME/.medasdigital/validator.json \
--from wallet \
--chain-id medasdigital-2

Upgrade

No chain upgrades scheduled yet.

Peers

PEERS="$(curl -sS https://rpc-dhealth.sychonix.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.dhealth/config/config.toml

Snapshot

Height: Loading... | Last updated: Loading... | Size: Loading...
  • Install dependencies, if needed
sudo apt update && sudo apt install aria2
  • Stop Service
sudo systemctl stop dhealthd
  • Back up priv_validator_state.json
cp $HOME/.dhealth/data/priv_validator_state.json $HOME/.dhealth/priv_validator_state.json.backup
  • Reset the data
dhealthd tendermint unsafe-reset-all --home $HOME/.dhealth --keep-addr-book
  • Download Snapshot
aria2c -x 16 -s 16 -o dhealth-snapshot.tar.lz4 https://snapshot.sychonix.com/mainnet/dhealth/dhealth-snapshot.tar.lz4
lz4 -dc dhealth-snapshot.tar.lz4 | tar -xf - -C $HOME/.dhealth
rm -v dhealth-snapshot.tar.lz4
  • Restore Backup and Restart Service
mv $HOME/.dhealth/priv_validator_state.json.backup $HOME/.dhealth/data/priv_validator_state.json
sudo systemctl restart dhealthd && sudo journalctl -u dhealthd -f -o cat

Addrbook

curl -L https://snapshot.sychonix.com/mainnet/dhealth/addrbook.json > $HOME/.dhealth/config/addrbook.json

Genesis

curl -L https://snapshot.sychonix.com/mainnet/dhealth/genesis.json > $HOME/.dhealth/config/genesis.json

API

api-dhealth.sychonix.com

RPC

rpc-dhealth.sychonix.com

CLI Cheatsheet

Wallet Management

dhealthd keys add 

dhealthd keys add  --recover

dhealthd keys list 

dhealthd keys delete 

dhealthd keys export 

dhealthd keys import .backup

dhealthd q bank balances $(dhealthd keys show  -a)

Validator Management

Moniker

Identity

Details

Website

Security Contact

Amount

dhealthd tx staking create-validator \
--amount=100000udhp \
--pubkey=$(dhealthd tendermint show-validator) \
--moniker="" \
--identity="" \
--details="" \
--website="" \
--security-contact= \
--chain-id=dhealth \
--commission-rate=0.05 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--gas-prices 1udhp \
--gas "auto" \
--gas-adjustment "1.5" \
--from wallet \
-y

dhealthd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--details="" \
--website="" \
--chain-id=dhealth \
--commission-rate=0.07 \
--from wallet \
--gas=auto \
--gas-prices 1udhp \
-y

dhealthd tx slashing unjail --from wallet --chain-id dhealth --gas auto --gas-adjustment 1.5  

dhealthd query slashing signing-info $(dhealthd tendermint show-validator)

dhealthd q staking validator $(dhealthd keys show wallet --bech val -a)

dhealthd q bank denom-metadata -oj | jq

dhealthd status 2>&1 | jq -r '.SyncInfo.catching_up // .sync_info.catching_up'

dhealthd status 2>&1 | jq -r '.SyncInfo.latest_block_height // .sync_info.latest_block_height'

Token Management

dhealthd tx distribution withdraw-all-rewards --from wallet --chain-id dhealth --gas auto --gas-adjustment 1.5 --gas-prices 1udhp -y 

dhealthd tx distribution withdraw-rewards $(dhealthd keys show wallet --bech val -a) --commission --from wallet --chain-id dhealth --gas auto --gas-adjustment 1.5 --gas-prices 1udhp -y 

dhealthd tx staking delegate $(dhealthd keys show wallet --bech val -a) 100000udhp --from wallet --chain-id dhealth --gas auto --gas-adjustment 1.5 --gas-prices 1udhp -y 

dhealthd tx staking redelegate $(dhealthd keys show wallet --bech val -a)  100000udhp --from wallet --chain-id dhealth --gas auto --gas-adjustment 1.5 --gas-prices 1udhp -y

dhealthd tx staking delegate  100000udhp --from  --chain-id dhealth --gas auto --gas-adjustment 1.5 --gas-prices 1udhp -y 

dhealthd tx staking unbond $(dhealthd keys show wallet --bech val -a) 100000udhp --from wallet --chain-id dhealth --gas auto --gas-adjustment 1.5 --gas-prices 1udhp -y

dhealthd tx bank send wallet  100000udhp --from wallet --chain-id dhealth --gas auto --gas-adjustment 1.5 --gas-prices 1udhp -y

Service Management

sudo systemctl daemon-reload

sudo systemctl enable dhealthd

sudo systemctl disable dhealthd

sudo systemctl start dhealthd

sudo systemctl stop dhealthd

sudo systemctl restart dhealthd

sudo systemctl status dhealthd

sudo journalctl -u dhealthd -f --no-hostname -o cat

CUSTOM_PORT=
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}660\"%" $HOME/.dhealth/config/config.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}317\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}091\"%" $HOME/.dhealth/config/app.toml

cd $HOME && sudo systemctl stop dhealthd && sudo systemctl disable dhealthd && sudo rm /etc/systemd/system/dhealthd.service && sudo systemctl daemon-reload && sudo rm -rf $(which dhealthd) && sudo rm -rf $HOME/.dhealth && sudo rm -rf $(which dhealthd)