This is part 3 of EOS quick-start. Please makesure you have completed [Part 2] Install from sources and have all requirements installed.
Before we begin
First things first: By voting you are accepting the EOS Constitution. Make sure you have read it!
As we already stated in [Part 1] Introduction, EOS is in many ways a social experiment in governance. One of the aspects of this is voting for block producers and you vote matters. There are currently few ways to vote for EOS block producers currently available:
- using
cleos
cli tool - using dedicated client by LiquidEOS or Bitfinex Ballot
- using eosportal.io and Scatter browser extension
In this post we are going to learn how to vote using cleos
cli tool. Before we begin, please make sure that you have cleos installed. (See [Part 2] Install from sources for the instructions)
Throughout this post we will use LiquidEOS node at https://node2.liquideos.com:8883 if you prefer you can choose any other node from EOS Seed List
Voting requires you to have an account on EOS mainnet. An account can only be created using an already existing active account on EOS mainnet and account creation is not free. If you participated in EOS ICO and registered your tokens, then your account was already automatically created by the EOS Mainnet Launch Group. You should have received private and public keys for the mainnet when you registered your tokens. Here we will assume that this is the case and you already have an account created for you through the ICO and we’ll cover account creation in one of the next parts.
Let’s get to it
First, you should create a wallet and import your private key, that you received through token registration. Create wallet:
cleos wallet create
Response:
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5J4LVh75aUwZtEd25GyyepcRv23FY95QdJVWJXFrdu2rxSG3THb"
Import private key:
cleos wallet import 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
Response:
imported private key for: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
Now, using your public key that starts with EOS...
, you can find the account name that was created for you:
cleos -u https://node2.liquideos.com:8883 get accounts EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
the result would be something like this:
{
"account_names": [
"tanghongbooo"
]
}
where instead of tanghongbooo
you will find your account name. Next step, let’s check your balance to verify that everything is in order:
cleos -u https://node2.liquideos.com:8883 get account tanghongbooo
response should be something like this:
permissions:
owner 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
active 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
memory:
quota: 8.000 KiB used: 4.000 KiB
net bandwidth:
staked: 40.0000 EOS (total stake delegated from account to self)
delegated: 0.0000 EOS (total staked delegated to account from others)
used: 0 bytes
available: 18.00 MiB
limit: 18.00 MiB
cpu bandwidth:
staked: 40.0000 EOS (total stake delegated from account to self)
delegated: 0.0000 EOS (total staked delegated to account from others)
used: 0 us
available: 4.000 sec
limit: 4.000 sec
EOS balances:
liquid: 10.0000 EOS
staked: 80.0000 EOS
unstaking: 0.0000 EOS
total: 90.0000 EOS
producers: <not voted>
As you can see here you have your EOS and it is staked already, so we can proceed to voting. Let’s list available block producers:
cleos -u https://node2.liquideos.com:8883 system listproducers
this will print out the list of block producers:
Producer Producer key Url Scaled votes
eoshuobipool EOS5XKswW26cR5VQeDGwgNb5aixv1AMcKkdDNrC59KzNSBfnH6TR7 http://eoshuobipool.com 0.0260
eosnewyorkio EOS6GVX8eUqC1gN1293B3ivCNbifbr1BT6gzTFaQBXzWH9QNKVM4X https://bp.eosnewyork.io 0.0258
...
...
eosnairobike EOS54UAELQVaMrc1y98W7KsfLbBchvsQg7FCEYpoiQLi5y1Gvyqcy http://www.eosnairobi.io 0.0079
eossv12eossv EOS7fv6nadePJBdCiWyR2Ldz5YWyzJGMBkEo47zUSWFttduQhHHaa https://eossiliconvalley.io 0.0078
eosunion1111 EOS5YrPTWCKNHHLuntq13Q9X6M2CFCNGb21GqrcjUexqBBjxpCG7H http://eosunion.io/ 0.0076
-L eosvenezuela for more
Notice the last line with -L eosvenezuela
? It means that there are more producers that are not shown and you can list them with the same command adding -L eosvenezuela
to the end of it. You can continue adding -L <next_block_producer>
until you find your favorite producer or the list ends.
When you picked all your favorite producers, vote by adding them to the following command:
cleos -u https://node2.liquideos.com:8883 system voteproducer prods tanghongboooy eosauthority bitfinexeos1 eosdacserver eosliquideos
here we voted for 4 producers: eosauthority bitfinexeos1 eosdacserver eosliquideos
. Replace them with producers of your choosing.
executed transaction: aba6dcdd43a49d2189d04b9ca10329bb0ddf8b526f2a6b834dc318a137265d3b 144 bytes 3849 us
# eosio <= eosio::voteproducer {"voter":"tanghongboooy","proxy":"","producers":["bitfinexeos1","eosauthority","eosdacserver","eosliq...
This is it. You can verify your vote by doing:
cleos -u https://node2.liquideos.com:8883 get account tanghongbooo
where you can see under producers section your votes:
permissions:
owner 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
active 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
memory:
quota: 8.000 KiB used: 4.000 KiB
...
EOS balances:
liquid: 10.0000 EOS
staked: 80.0000 EOS
unstaking: 0.0000 EOS
total: 90.0000 EOS
producers:
bitfinexeos1 eosauthority eosdacserver
eosliquideos
You can vote for up to 30 block producers with each token that you stake. In this example we used the entire stake to vote for just 4 producers.
Please note that it will take up to 72 hours to unstake tokens that were staked to vote.
This concludes [Part 4] Running Local Testnet of EOS Quick-Start series
more from this series:
To be continued…
Disclaimer:
This article is not a financial advice and not an endorsement to use EOS or invest in EOS platform.