Skip to content

Files

Latest commit

 

History

History
 
 

Hypersign

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Hypersign testnet guide

hyper

  • Minimum hardware requirements:
Node Type CPU RAM Storage
Testnet 8 16GB 160GB

1) Auto_install script

wget -O hyper https://raw.githubusercontent.com/obajay/nodes-Guides/main/Hypersign/hyper && chmod +x hyper && ./hyper

2) Manual installation

Preparing the server

sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y

GO 18.5

cd $HOME
ver="1.18.5"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version

Build 17.10.22

git clone https://github.com/hypersign-protocol/hid-node.git
cd hid-node
git checkout v0.1.2
make install

hid-noded version

  • v0.1.2
hid-noded init STAVRguide --chain-id jagrat

Create/recover wallet

hid-noded keys add <walletname>
hid-noded keys add <walletname> --recover

Download Genesis

curl -s  https://raw.githubusercontent.com/hypersign-protocol/networks/master/testnet/jagrat/final_genesis.json > ~/.hid-node/config/genesis.json

sha256sum $HOME/.hid-node/config/genesis.json

  • 7de2e77cff6d601387a46a760e9c0d7a573b2cfdbdaebb0f04512878543fc0a1

Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers

sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uhid\"/" $HOME/.hid-node/config/app.toml
sed -i -e "s/^filter_peers *=.*/filter_peers = \"true\"/" $HOME/.hid-node/config/config.toml
external_address=$(wget -qO- eth0.me) 
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.hid-node/config/config.toml
peers="7991e99ee8c05906a2161d8b47d826240da5c5d2@network.jagart.hypersign.id:26656,4625d4f9aa5034579134bdd551b6b54ee2b48c6a@network.jagart.hypersign.id:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26657,[email protected]:10956,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:46656,[email protected]:26656,[email protected]:26656,[email protected]:46636,[email protected]:29227,[email protected]:26656,[email protected]:26657,[email protected]:26656,[email protected]:26656,[email protected]:26456,[email protected]:26656,[email protected]:36656,[email protected]:27756,[email protected]:26657,[email protected]:26656,[email protected]:2460,[email protected]:26656,[email protected]:56656,[email protected]:26656,[email protected]:26656,[email protected]:28765,[email protected]:26656,[email protected]:26657,[email protected]:26926,[email protected]:26656,[email protected]:13656,[email protected]:26656,[email protected]:46151,[email protected]:26656,[email protected]:27161,[email protected]:26656,[email protected]:26656,[email protected]:26657,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26657,[email protected]:45656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.hid-node/config/config.toml
seeds=""
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.hid-node/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 100/g' $HOME/.hid-node/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 100/g' $HOME/.hid-node/config/config.toml

Pruning (optional)

pruning="custom" && \
pruning_keep_recent="100" && \
pruning_keep_every="0" && \
pruning_interval="10" && \
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" ~/.hid-node/config/app.toml && \
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" ~/.hid-node/config/app.toml && \
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" ~/.hid-node/config/app.toml && \
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" ~/.hid-node/config/app.toml

Indexer (optional)

indexer="null" && \
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.hid-node/config/config.toml

Download addrbook

wget -O $HOME/.hid-node/config/addrbook.json "https://raw.githubusercontent.com/obajay/nodes-Guides/main/Hypersign/addrbook.json"

StateSync

SNAP_RPC=http://hid.rpc.t.stavr.tech:21057
peers="[email protected]:21056"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.hid-node/config/config.toml
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 500)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.hid-node/config/config.toml
hid-noded tendermint unsafe-reset-all --home $HOME/.hid-node
systemctl restart hid-noded && journalctl -u hid-noded -f -o cat

SnapShot 12.10.22 (0.1 GB) height 189856

# install the node as standard, but do not launch. Then we delete the .data directory and create an empty directory
sudo systemctl stop hid-noded
rm -rf $HOME/.hid-node/data/
mkdir $HOME/.hid-node/data/

# download archive
cd $HOME
wget http://hid.snapshot.stavr.tech:7160/hyperdata.tar.gz

# unpack the archive
tar -C $HOME/ -zxvf hyperdata.tar.gz --strip-components 1
# !! IMPORTANT POINT. If the validator was created earlier. Need to reset priv_validator_state.json  !!
wget -O $HOME/.hid-node/data/priv_validator_state.json "https://raw.githubusercontent.com/obajay/StateSync-snapshots/main/priv_validator_state.json"
cd && cat .hid-node/data/priv_validator_state.json

# after unpacking, run the node
# don't forget to delete the archive to save space
cd $HOME
rm hyperdata.tar.gz
systemctl restart hid-noded && journalctl -u hid-noded -f -o cat

Create a service file

sudo tee /etc/systemd/system/hid-noded.service > /dev/null <<EOF
[Unit]
Description=hypersign
After=network-online.target

[Service]
User=$USER
ExecStart=$(which hid-noded) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Start

sudo systemctl daemon-reload
sudo systemctl enable hid-noded
sudo systemctl restart hid-noded && sudo journalctl -u hid-noded -f -o cat

Create validator

hid-noded tx staking create-validator \
--amount=10000000uhid \
--pubkey=$(hid-noded tendermint show-validator) \
--moniker=STAVRguide \
--chain-id=jagrat \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.1" \
--min-self-delegation="1" \
--from=STAVR1 \
--identity="" \
--details="" \
--website="" \
-y

Delete node

sudo systemctl stop hid-noded && \
sudo systemctl disable hid-noded && \
rm /etc/systemd/system/hid-noded.service && \
sudo systemctl daemon-reload && \
cd $HOME && \
rm -rf hid-node && \
rm -rf .hid-node && \
rm -rf $(which hid-noded)