Cold Staking Guide

Post Reply
User avatar
AlexBlackHat
Site Admin
Posts: 21
Joined: Tue Apr 13, 2021 7:40 am

Cold Staking Guide

Post by AlexBlackHat »

Original post by Jeffrey

Cold staking requires two BlackHat wallets: one to hold the funds (owner, does not need to be always online) and another one, the hot-node, to do the staking (staker, this needs to be online 24/7).

In order to setup cold-staking, you need to perform the following steps (either with the command-line interface CLI or with the graphical interface GUI):
  1. Generate a “staking address” from the staker wallet (if you don’t have one already).
  2. Generate a “owner address” from the owner wallet (if you don’t have one already).
  3. Create a “cold stake delegation”.
  4. Whitelist the owner address on your staker (if you haven’t already).
To send more delegations, using the same addresses-pair, just replicate step 3 of this guide.


1) Generate a “staking address” from the staker wallet
Staking addresses must be owned by the staker wallet (the one that is online 24/7 and holds no funds).

Use Command Line Innerface (CLI)
To get a new staking address, from the staker wallet, do:

Code: Select all

blkc-cli getnewstakingaddress
You don’t need to create a new staking address for each delegation. You can reuse your previously generated addresses. To list them, do:

Code: Select all

blkc-cli liststakingaddresses

USE GUI interface
Enable Cold Staking in the wallet by clicking on the top bar Cold Staking icon. In the result the additional option will be displayed in the right menu:
cs1.jpg
cs1.jpg (80.29 KiB) Viewed 23506 times

To create a staking address, after enabling the cold staking tab, select Staker–> “Create cold stake address”:
cs2.jpg
cs2.jpg (90.27 KiB) Viewed 23506 times

Insert any amount, a label for the address, optionally a description, and click “Generate”:
cs3.jpg
cs3.jpg (44.69 KiB) Viewed 23506 times

The new address gets visualized, along with a QR-code.
You can either copy the address or the URL to paste it during the delegation (see point n.3).
You don’t need to create a new staking address for each delegation. You can reuse your previously generated addresses. To view them click “My staking addresses”:
cs4.jpg
cs4.jpg (55.29 KiB) Viewed 23506 times


2) Generate an “owner address” from the owner wallet
Owner addresses are regular BlackHat addresses. Their private key can be used to redeem delegated coins. Creating an owner address is akin to creating a receiving address. They must belong to the owner wallet (the one that is offline and has ownership of the coins).

Use Command Line Innerface (CLI)
To get a new owner address, from the owner wallet do:

Code: Select all

blkc-cli getnewaddress

USE GUI interface
To get a new owner address, simply go to the “Receive” tab and click “Generate address”:
cs5.jpg
cs5.jpg (59.9 KiB) Viewed 23506 times

You don’t need to create a new owner address for each delegation. You can reuse your previously generated addresses.


3) Create a “cold stake delegation”
This is the main step.
To delegate coins you need to send a special “delegation contract” transaction.

Use Command Line Innerface (CLI)
Specify the staker address, the amount to delegate and (optionally) the owner address:
(WARNING! These addresses are provided as examples. Specify YOUR addresses)

Code: Select all

blkc-cli delegatestake "S1t2a3kab9c8c71VA78xxxy4MxZg6vgeS6" 1000 "BMJRSsuU9zfyrvxVaAEFQqK4MxZg34fk"
If the owner address is omitted, a new address is automatically generated from the wallet.

USE GUI interface
From the coldstaking widget, click “delegation”.
As with the regular sending operation, you must select an amount and either let the wallet pick the coins, or select them with coin control.
Insert the staker address (or select it from the list of previously used ones), a description, and (optionally) a owner address (again, if not provided, it will be generated automatically).
Then click “Delegate”.
cs6.jpg
cs6.jpg (74.09 KiB) Viewed 23506 times


4) Whitelist the owner address on your staker
In order to stake delegations, the owner address must be whitelisted by the staker.

Use Command Line Innerface (CLI)
To whitelist an address (<owneraddress>), from the staker wallet do:

Code: Select all

blkc-cli delegatoradd <ownerAddress>
Once a delegator address is whitelisted, it remains so, even for successive delegations.

To remove a particular address from the whitelist, do

Code: Select all

blkc-cli delegatorremove <ownerAddress>
To view the current whitelisted addresses, do

Code: Select all

blkc-cli listdelegators

USE GUI interface
The delegation is visible in the “Staker” tab of the coldstaking widget.
To whitelist the delegator, click on its row and select “Stake” from the contextual menu.
To remove the delegator from the whitelist, select “Blacklist” from the contextual menu.


Additional RPC functions
These are other JSON-RPC calls accessible via console or blkc-cli.
Check the help for more info on each one.
  • getcoldstakingbalance
  • getdelegatedbalance
  • listcoldutxos
Post Reply