Staketool - Intro & Setup
Horizen Stake Verification Tool
This tool is used to verify the ownership of a ZEN transparent address used for staking Horizen Super Nodes.
Verified addresses allow:
- up to five alternate 'payto' addresses
- multiple stake amounts in one address
A stake address is verified by sending a deterministically derived amount of ZEN from the stake address back to the same address and submitting the resulting transaction ID to the tracking servers. The tracking servers validate the stake address, the payto addresses and check the amount on the blockchain to complete the verification.
The tool consists of two command line applications:
- staketool
- creates verification requests and ZEN transactions
- sends signed ZEN transactions to the blockchain and verification requests to the servers
- signtxtool
- signs ZEN transactions using the private key of the stake address
This guide covers the most commonly used steps of verifying an address. The tools supports alternative methods which may be more suited for your situation.
For the purposes of this guide, we will be using the Linux installation binaries. For all binary files please see: https://github.com/HorizenOfficial/staketool/releases/latest
Note: The Horizen Stake Verification Tool does not need to be executed from your node's CLI (command line interface) over SSH.
It can be executed from any local internet connected terminal. This guide will be making use of a Linux CLI using the terminal.
Guide Summary
- Download and extract the staketool binaries
- Explore and familiarize yourself with the help menu
- Create a Node API sub key (if not already created or delivered to you by a hosting provider)
- This sub key is provided by your Node hosting provider or, if you host your own nodes, you can create it on the Super Node API Settings page
- Fund an unused address (has not been used as the stake address of a node before)
- Create a new stake verification request with payto addresses (up to five). This step creates the amount to send (<0.1 ZEN)
- Send amount of ZEN specified from and to the address specified from the verification request
- Send the stake verification request using a TXID, and api sub key
- Check status of stake verification
- Update the node's stake address
Staketool Setup | ||
---|---|---|
1 | Download and extract the latest staketool binaries curl --silent "https://api.github.com/repos/HorizenOfficial/staketool/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | xargs -I{} wget https://github.com/HorizenOfficial/staketool/releases/download/{}/staketool-linux-{}.tar.gz -O - | tar -xz | |
Help Menu | ||
2 | Display help menu options for staketool and signtxtool | ./staketool help ./signtxtool help |
3 | Further information can be displayed about each particular command by adding help afterward | Example ./staketool createstakeverification help Example Output zenops@localhost:~$ ./staketool createstakeverification help Horizen supernode stake ownerhsip verification tool USAGE DESCRIPTION OPTIONS -sys=| --system=super,testnet (required) tracking system must be: super, or testnet
Tracking System: The system where the stake address will be used: super, or testnet. A stake address can only be used for super node systems. Method: Option "tool" creates a raw transaction to be used by the tool (using zencashjs) and returns transaction and verification data. Extrazen: By default the tool creates a transaction smaller than 1 zen, in some circumstances this might be lower than a minimum transaction size. |
Create A Stake Verification Request | ||
4 | Fund an unused (never registered) transparent (T) address with 0.1 ZEN and wait for at least one confirmation. This method of authentication will require <0.1 ZEN to be spent from and back to the source or staking address being verified. After this process is completed, a balance of at least 500 ZEN for super nodes must be transferred to the staking address verified using this guide. Note: This staking address can be any transparent address you control the private keys to, IE a hardware wallet such as Ledger or Coolwallet or a software wallet like Sphere By Horizen. | |
5 | Create a new stake verification request. You will need to modify the supplied examples with your own addresses. Note: Note: you may include up to five payto addresses and the percentages or "pct" must add up to 100. Payto Example for two different addresses with 10% and 90% payout distribution. ./staketool createstakeverification -s=znXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -p='[{"address":"znYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY","pct":10.00},{"address":"znZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ","pct":90.00}]' -sys=super Payto Example for one payout address. ./staketool createstakeverification -s=znXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -p='[{"address":"znYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY","pct":100.00}]' -sys=super Note: the Payto addresses can be absolutely any transparent (T) address. It will be the address or addresses that all node payments will be sent to. Example Output zenops@localhost:~$ ./staketool createstakeverification -s=znawdGp9aF1a1eqpDgxdqF4wiwArPta2qXY -p='[{"address":"znVjfAQpsAUD84JThD8Unk3ivHJdMWi6o8A","pct":100.00}]' -sys=super | |
6 | Send the exact amount of ZEN specified from the output of your last command from the staking address back to itself and record the transaction ID. Note: you will need to wait for at least one confirmation to occur before proceeding to the next step. Note: Example shown is for the Sphere By Horizen wallet. You may use any other wallet for this operation that you control the private keys to. | |
7 | Using your API sub key and your transaction ID recorded in prior steps, reconstruct the following example command to use your relevant variables. -a signifies the API sub key, -tx signifies the transaction ID ./staketool sendtxandstakeverification -a=xnd59ce59fe90eef708b11021b413b81a38fdf8993 -tx=802553ad615f5d38efc488d80cd39c2157bfff2af73302adf48a54bc18bce67f -sys=super Example Output zenops@localhost:~$ ./staketool sendtxandstakeverification -a=xnd59ce59fe90eef708b11021b413b81a38fdf8993 -tx=802553ad615f5d38efc488d80cd39c2157bfff2af73302adf48a54bc18bce67f -sys=super | |
8 | Check on the status of your verification request by repeating the last command. Your stake and payto address(es) are authenticated and active once you can repeat your last command and receive a status of active. Example Output zenops@localhost:~$ ./staketool sendtxandstakeverification -a=xnd59ce59fe90eef708b11021b413b81a38fdf8993 -tx=802553ad615f5d38efc488d80cd39c2157bfff2af73302adf48a54bc18bce67f -sys=super | |
9 | If you're running your own node, you will still need to update your node's staking address. You can find instructions for doing so at the following: Change Staking Address If you're using a hosting provider, you will need to notify them of the change of staking address so they can update the node configuration. Note: a new staking address must have it's minimum stake balance in the verified address with at least 5 confirmations |