How to Configure, Register and Vote for Block Producer

in #eos6 years ago (edited)

I'm sharing material used in BP technical training sessions I teach. It walks you through all steps required to configure a wallet, create and register producer account and vote for it.

Modify commands to match your local environment: paths, account names, etc.

1. Create wallet folder: mkdir ~/wallet and cd to ~/wallet

2. Create start-wallet.sh

#!/bin/bash
DATADIR=/home/ubuntu/wallet
KEOSD=/home/ubuntu/eos/build/programs/keosd/keosd
$KEOSD --data-dir $DATADIR --http-server-address 127.0.0.1:1977 "$@" > $DATADIR/stdout.txt 2> $DATADIR/stderr.txt & echo $! > $DATADIR/wallet.pid
echo "Wallet started"

3. Chmod +x start-wallet.sh and run it: ./start-wallet.sh

Check that it’s up: ps -ef | grep keosd
Check there are no errors in the log: cat stderr.txt

4. Change to ../node and create new script: cleos.sh :

#!/bin/bash
CLEOS=/home/ubuntu/eos/build/programs/cleos/cleos
$CLEOS -u http://127.0.0.1:8888 --wallet-url http://127.0.0.1:1977 "$@"

5. Create default wallet:

./cleos.sh wallet create
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW..wallet-password"
^- Save wallet password somewhere safe.

6. Unlock wallet:

./cleos.sh wallet unlock --password

7. Create new keys for your producer account (if you don't have one already):

./cleos.sh create key > producer.keys

8. Create new producer account from your personal account (if you don't have one already):

./cleos.sh system newaccount --stake-net "1.0000 EOS" --stake-cpu "1.0000 EOS" --buy-ram-kbytes 8 --transfer <new-account> <new -account-public-key>

9. Import private key into default wallet:

./cleos.sh wallet import <private-key>
imported private key for: <EOS-public-key>

10. Get account balance:

./cleos.sh get currency balance eosio.token

11. Transfer command:

./cleos.sh transfer <from-account> <to-account> "1000.0000 EOS"

12. Stake tokens for network and cpu (1 EOS for each in this example)

./cleos.sh push action eosio delegatebw '{"from":"", "receiver":"", "stake_net_quantity": "1.0000 EOS", "stake_cpu_quantity": "1.0000 EOS", "transfer": true}' -p

13. Register your producer:

./cleos.sh system regproducer <producer-name> <public-key> "http://any-url" -p <producer-name>

14. Vote for producers:

./cleos.sh system voteproducer prods <your-account> [space separated list of producers] -p <your-account>

15. You can get a list of registered producers:

./cleos.sh system listproducers

Sort:  

Thank you ^^

Thanks a lot... Finally someone I found is willing to share knowledge... I got no responses from top producers for any kind of help on this topic....

Coin Marketplace

STEEM 0.28
TRX 0.13
JST 0.032
BTC 65035.33
ETH 2950.72
USDT 1.00
SBD 3.66