Skip to content

Instantly share code, notes, and snippets.

@LeoHChen
Last active May 15, 2020 15:53
Show Gist options
  • Save LeoHChen/2182d7259eac826a48d8160c23d16350 to your computer and use it in GitHub Desktop.
Save LeoHChen/2182d7259eac826a48d8160c23d16350 to your computer and use it in GitHub Desktop.
update harmony binary and script for open staking
# All exchange partners have to update the harmony node software and script for the open staking
# The following instructions assume you already have a running node on harmony mainnet
# and running the node.sh in console/tmux.
# stop your node.sh
# upgrade node.sh
curl -LO https://harmony.one/node.sh
chmod +x node.sh
# check the node.sh version
./node.sh -v
node.sh: version: v1 20200513.0
# download the harmony binary to staging/ directory
./node.sh -I -d
cp staging/harmony .
# check the harmony binary version
./node.sh -V
Harmony (C) 2020. harmony, version v5941-v2.1.0-1-gac977cfd (jenkins@ 2020-05-14T05:17:38+0000)
# start your node.sh, for example, non-validating node, aka, explorer node
./node.sh -k bls.key -p bls.pass -D -P -T explorer -S -i 0
# for validator node particiating in open staking, you may use the following command for one key node
./node.sh -k bls.key -p bls.pass -S -z
# for multikey node, the setup is a bit complicated, you may put your keys into .hmy/blskeys directory
# the script will ask for passphrase for each key and may save it to as .pass file in .hmy/blskeys.
./node.sh -M -S -z
# more detailed usage/info about node.sh, please run
./node.sh -h
@LeoHChen
Copy link
Author

  • you may also wrap the node.sh in systemd service, some reference

A sample harmony.service file

[Unit]
Description=harmony service
After=network.target

[Service]
Type=simple
Restart=always
RestartSec=1
User=root
WorkingDirectory=/root/
ExecStart=/root/node.sh -k bls.key -p bls.pass -1 -D -P -T explorer -i 0
StandardError=syslog
SyslogIdentifier=harmony
StartLimitInterval=0
LimitNOFILE=65536
LimitNPROC=65536

[Install]
WantedBy=multi-user.target

@denniswon
Copy link

@LeoHChen
# start your node.sh, for example /node.sh -k bls.key -p bls.pass -D -P -T explorer -S -i 0 -P
This is for running the explorer (non-validating) node, so for validator node, just exclude -T explorer right?

@yelllowsin
Copy link

@LeoHChen
# start your node.sh, for example /node.sh -k bls.key -p bls.pass -D -P -T explorer -S -i 0 -P
This is for running the explorer (non-validating) node, so for validator node, just exclude -T explorer right?

You are right, this will run as an explorer and won't sign blocks. @LeoHChen can you fix the instructions please? There are some users already asking why run using -T explorer

@LeoHChen
Copy link
Author

@LeoHChen
# start your node.sh, for example /node.sh -k bls.key -p bls.pass -D -P -T explorer -S -i 0 -P
This is for running the explorer (non-validating) node, so for validator node, just exclude -T explorer right?

You are right, this will run as an explorer and won't sign blocks. @LeoHChen can you fix the instructions please? There are some users already asking why run using -T explorer

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment