How to use Single Nominator Pool
It's recommended to get acquainted with Single Nominator Pool Specification before reading this tutorial.
Set up single-nominator
Before start make sure you have topped up and activated validator's wallet.
- Enable single nominator mode
MyTonCtrl> enable_mode single-nominator
- Check if single-nominator mode is enabled.
MyTonCtrl> status_modes
Name Status Description
single-nominator enabled Orbs's single nominator pools.
- Create pool
MyTonCtrl> new_single_pool <pool-name> <owner_address>
If you have already created pool it's possible to import it:
MyTonCtrl> import_pool <pool-name> <pool-addr>
- Type
pools_list
to display pool addresses
MyTonCtrl> pools_list
Name Status Balance Version Address
test-pool empty 0.0 spool_r2 kf_JcC5pn3etTAdwOnc16_tyMmKE8-ftNUnf0OnUjAIdDJpX
- Activate the pool
MyTonCtrl> activate_single_pool <pool-name>
After successfully activated pool:
MyTonCtrl> pools_list
Name Status Balance Version Address
test-pool active 0.99389 spool_r2 kf_JcC5pn3etTAdwOnc16_tyMmKE8-ftNUnf0OnUjAIdDJpX
Now you can work with this pool via mytonctrl like with a standard nominator pool.
If the pool's balance is enough to participate in both rounds (balance > min_stake_amount * 2
) then MyTonCtrl will automatically participate in both rounds using stake = balance / 2
, unless user sets stake manually using command set stake
. This behaviour is different from using a nominator pool but similar to staking using validator wallet.
Start without mytonctrl
Prepare launched Validator
If you have mytonctrl installed and validator running:
- Stop validation and withdraw all funds.
Prepare from the beginning
If you had no Validator before, do the following:
- Run a Validator and make sure it's synced.
- Stop validation and withdraw all funds.
Prepare Single Nominator
-
Install nodejs v.16 and later and npm (detailed instructions)
-
Install
ts-node
andarg
module
$ sudo apt install ts-node
$ sudo npm i arg -g
- Create symlinks for compilers:
$ sudo ln -s /usr/bin/ton/crypto/fift /usr/local/bin/fift
$ sudo ln -s /usr/bin/ton/crypto/func /usr/local/bin/func
- Run test to make sure everything is set up properly:
$ npm run test
- Replace mytonctrl nominator-pool scripts: https://raw.githubusercontent.com/orbs-network/single-nominator/main/mytonctrl-scripts/install-pool-scripts.sh
Create Single Nominator Pool
- Get Toncenter API key from a Telegram @tonapibot
- Set env variables:
export OWNER_ADDRESS=<owner_address>
export VALIDATOR_ADDRESS=<validator_wallet_address>
export TON_ENDPOINT=https://toncenter.com/api/v2/jsonRPC
export TON_API_KEY=<toncenter api key>
- Create deployer address:
$ npm run init-deploy-wallet
Insufficient Deployer [EQAo5U...yGgbvR] funds 0