Medas Digital Medas Digital - Mainnet
Chain ID: medasdigital-2 Block Height: Loading...
RPC Status:

Network Overview

Medas Digital Network is a Cosmos™-based blockchain project focused on decentralized technology and interoperability. Powered by the MEDAS token, it offers services like automated staking via Restake.app and launched the first DVPN node in Central Africa in partnership with MTN Global and iColo. The project aims to empower communities with secure and reliable technological solutions.

https://rpc-medas.sychonix.com

https://api-medas.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)
cd $HOME
curl -L https://snapshot.sychonix.com/mainnet/medas/medasdigitald.tar.gz | tar -xvzf - -C $HOME
sudo mv medasdigitald /usr/local/bin/
  • Download CosmWasm Library
sudo wget -P /usr/lib https://github.com/CosmWasm/wasmvm/releases/download/v2.1.2/libwasmvm.x86_64.so
  • Initialize The Node
medasdigitald init $MONIKER --chain-id medasdigital-2
sed -i -e "s|^node *=.*|node = \"tcp://localhost:12857\"|" $HOME/.medasdigital/config/client.toml
sed -i -e "s|^keyring-backend *=.*|keyring-backend = \"os\"|" $HOME/.medasdigital/config/client.toml
sed -i -e "s|^chain-id *=.*|chain-id = \"medasdigital-2\"|" $HOME/.medasdigital/config/client.toml
  • Download Genesis & Addrbook
curl -L https://snapshot.sychonix.com/mainnet/medas/genesis.json > $HOME/.medasdigital/config/genesis.json
curl -L https://snapshot.sychonix.com/mainnet/medas/addrbook.json > $HOME/.medasdigital/config/addrbook.json
  • Configure Seeds and Peers
SEEDS="cfef0546b0621abba2818874a2935507878dbc80@medas-mainnet.sychonix.com:12856"
PEERS="$(curl -sS https://rpc-medas.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/.medasdigital/config/config.toml
  • Update Port Configuration
sed -i -e "s%:1317%:12817%; s%:8080%:12880%; s%:9090%:12890%; s%:9091%:12891%; s%:8545%:12845%; s%:8546%:12846%; s%:6065%:12865%" $HOME/.medasdigital/config/app.toml
sed -i -e "s%:26658%:12858%; s%:26657%:12857%; s%:6060%:12860%; s%:26656%:12856%; s%:26660%:12861%" $HOME/.medasdigital/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/.medasdigital/config/app.toml
  • Set Minimum Gas Price, Enable Prometheus, and Disable the Indexer
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.025umedas\"|" $HOME/.medasdigital/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.medasdigital/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.medasdigital/config/config.toml
  • Create Service File
sudo tee /etc/systemd/system/medasdigitald.service > /dev/null <<EOF
[Unit]
Description=medasdigitald node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which medasdigitald) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
  • Download Current Snapshot
curl "https://snapshot.sychonix.com/mainnet/medas/medas-snapshot.tar.lz4" | lz4 -dc - | tar -xf - -C "$HOME/.medasdigital"
  • Enable the Service and Start the Node
sudo systemctl daemon-reload
sudo systemctl enable medasdigitald.service
sudo systemctl restart medasdigitald.service && sudo journalctl -u medasdigitald.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-medas.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/.medasdigital/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 medasdigitald
  • Back up priv_validator_state.json
cp $HOME/.medasdigital/data/priv_validator_state.json $HOME/.medasdigital/priv_validator_state.json.backup
  • Reset the data
medasdigitald tendermint unsafe-reset-all --home $HOME/.medasdigital --keep-addr-book
  • Download Snapshot
aria2c -x 16 -s 16 -o medas-snapshot.tar.lz4 https://snapshot.sychonix.com/mainnet/medas/medas-snapshot.tar.lz4
lz4 -dc medas-snapshot.tar.lz4 | tar -xf - -C $HOME/.medasdigital
rm -v medas-snapshot.tar.lz4
  • Restore Backup and Restart Service
mv $HOME/.medasdigital/priv_validator_state.json.backup $HOME/.medasdigital/data/priv_validator_state.json
sudo systemctl restart medasdigitald && sudo journalctl -u medasdigitald -f -o cat

Addrbook

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

Genesis

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

API

api-medas.sychonix.com

RPC

rpc-medas.sychonix.com

CLI Cheatsheet

Wallet Management

medasdigitald keys add 

medasdigitald keys add  --recover

medasdigitald keys list 

medasdigitald keys delete 

medasdigitald keys export 

medasdigitald keys import .backup

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

Validator Management

Moniker

Identity

Details

Website

Security Contact

Amount

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

medasdigitald tx staking edit-validator \
--new-moniker="" \
--identity="" \
--details="" \
--website="" \
--chain-id=medasdigital-2 \
--commission-rate=0.07 \
--from wallet \
--gas=auto \
--gas-prices 0.025umedas \
-y

medasdigitald tx slashing unjail --from wallet --chain-id medasdigital-2 --gas auto --gas-adjustment 1.5  

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

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

medasdigitald q bank denom-metadata -oj | jq

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

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

Token Management

medasdigitald tx distribution withdraw-all-rewards --from wallet --chain-id medasdigital-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025umedas -y 

medasdigitald tx distribution withdraw-rewards $(medasdigitald keys show wallet --bech val -a) --commission --from wallet --chain-id medasdigital-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025umedas -y 

medasdigitald tx staking delegate $(medasdigitald keys show wallet --bech val -a) 1000000.025umedas --from wallet --chain-id medasdigital-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025umedas -y 

medasdigitald tx staking redelegate $(medasdigitald keys show wallet --bech val -a)  1000000.025umedas --from wallet --chain-id medasdigital-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025umedas -y

medasdigitald tx staking delegate  1000000.025umedas --from  --chain-id medasdigital-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025umedas -y 

medasdigitald tx staking unbond $(medasdigitald keys show wallet --bech val -a) 1000000.025umedas --from wallet --chain-id medasdigital-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025umedas -y

medasdigitald tx bank send wallet  1000000.025umedas --from wallet --chain-id medasdigital-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.025umedas -y

Service Management

sudo systemctl daemon-reload

sudo systemctl enable medasdigitald 

sudo systemctl disable medasdigitald 

sudo systemctl start medasdigitald 

sudo systemctl stop medasdigitald 

sudo systemctl restart medasdigitald 

sudo systemctl status medasdigitald 

sudo journalctl -u medasdigitald -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/.medasdigital/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/.medasdigital/config/app.toml

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