More details on how to spin up AWS instance here
- select
amazon linux 2
AMI - select
t3.small
as instance type - select 15 GiB of storage.
- ssh into your AWS instance
More details on first time setup can be found here
- Download Harmony CLI with:
cd ~/
curl -LO https://harmony.one/hmycli && mv hmycli hmy && chmod +x hmy
- Generate a bls key for a specific shard with
cd ~/
./hmy keys generate-bls-keys --shard <shard number> --count 1 -n https://api.s0.dry.hmny.io/
note the public bls key, for example:
c5fb43d473b622e958b256f128c5e50b894fc8a572d8d74957dde6fa8723df302ecab3cb132d524a636f0162737e5205
- Import wallet via CLI with:
cd ~/
./hmy keys import-private-key <private key>
Note the ONE address
OR
Create new wallet via CLI with:
cd ~/
./hmy keys add validator
Note the ONE address
- Install rclone with
curl https://rclone.org/install.sh | sudo bash
- Add the mainnet config to rclone config:
echo "
[mainnet]
type = s3
provider = AWS
env_auth = false
region = us-west-1
acl = public-read
server_side_encryption = AES256
storage_class = REDUCED_REDUNDANCY
" >> /home/ec2-user/.config/rclone/rclone.conf
You might have to change
/home/ec2-user/.config/rclone/rclone.conf
to whateverrclone config file
outputs.
- rclone s0 shard's DB (needed regardless of shard you are validating for) with
cd ~/
rclone sync mainnet:pub.harmony.one/mainnet.min/snapshot.20200501/harmony_db_0 harmony_db_0
- rclone the shard you are validating for (i.e: the shard you used in step 2 of the setup)
For shard 1
cd ~/
rclone sync mainnet:pub.harmony.one/mainnet.min/snapshot.20200504/harmony_db_1 harmony_db_1
For shard 2
cd ~/
rclone sync mainnet:pub.harmony.one/mainnet.min/snapshot.20200505/harmony_db_2 harmony_db_2
For shard 3
cd ~/
rclone sync mainnet:pub.harmony.one/mainnet.min/snapshot.20200505/harmony_db_3 harmony_db_3
- download and setup the dryrun node.sh with
cd ~/
curl -O https://raw.githubusercontent.com/harmony-one/harmony/t3.dryrun/scripts/node.sh && chmod +x node.sh && sudo ./node.sh -s
It is okay to see
grep: /etc/pam.d/common-session: No such file or directory
at the end of the command above
- download and install tmux with
sudo yum install tmux -y
- Start a tmux session with
tmux new -s node
- Start your harmony node with:
cd ~/
./node.sh -N dryrun -S -z -I -k <public-bls-key>.key
<public-bls-key>
will be from step 2 of setup. For example:./node.sh -N dryrun -S -z -I -k c5fb43d473b622e958b256f128c5e50b894fc8a572d8d74957dde6fa8723df302ecab3cb132d524a636f0162737e5205.key
- Detach from your tmux by pressing
ctrl
+b
then pressd
Use the following command to create your validator, replace the fields with whatever you want
cd ~/
./hmy --node="https://api.s0.dry.hmny.io" staking create-validator \
--validator-addr <ONE ADDRESS> --amount 10001 \
--bls-pubkeys <BLS PUBLIC KEY> \
--name "<NAME>" --identity "<IDENTITY>" --details "<DETAILS>" \
--security-contact "<CONTACT>" --website "<YOUR-WEBSITE.COM>" \
--max-change-rate 0.1 --max-rate 0.1 --rate 0.1 \
--max-total-delegation 100000000 --min-self-delegation 10000 \
--chain-id mainnet --passphrase
By default your passphrase is an empty, so you can just press enter when prompted for it
cd ~/
./hmy blockchain latest-headers
cd ~/
./hmy blockchain validator information <ONE address>