create account

Fast and secure EOS Block Producer voting with cleos in Docker by tiktuk

View this thread on: hive.blogpeakd.comecency.com
· @tiktuk · (edited)
$1.38
Fast and secure EOS Block Producer voting with cleos in Docker
<html>
<p>Today I will be covering Voting for EOS Block Producers using <a href="https://github.com/EOSIO/eos/wiki/Programs-&amp;-Tools#cleos"><code>cleos</code>, the official command line tool</a> for the EOS blockchain. This is the method I use and suggest for education purposes or anyone paranoid. This is not the "nice and easy GUI" method. There are great GUI tools available from the community such as <a href="https://scatter-eos.com/">Scatter</a>, <a href="https://vote.liquideos.com/">Liquid EOS</a>, <a href="https://github.com/eoscanada/eosc">EOSCanda eosc</a> or <a href="https://github.com/greymass/eos-voter">Greymass EOS Voter</a> if you do not know how to use the command line or Docker.</p>
<p>There are two primary ways to run <code>cleos</code> on your computer: <a href="https://github.com/eosio/eos/wiki/Local-Environment#building-eosio">compile/build EOS</a> or run the official image within Docker. If you are paranoid you should compile <code>cleos</code> yourself. I use Docker all day and must trust Docker Hub, so I trust it in this case too.</p>
<ol>
  <li><a href="https://docs.docker.com/install/">Install Docker </a>- There are many tutorials for all operating systems available across the Internet if you need help.</li>
  <li>Select an <a href="https://www.eosdocs.io/resources/apiendpoints/">EOS API endpoint of a Block Producer you trust</a>. <em>Warning: Use "https://" secured API endpoints only.</em></li>
  <li>Decide which Block Producers, up to a total of 30, you wish to vote for. I used the <a href="https://eosportal.io/chain/12/producers">EOSPortal BP List</a> and <a href="https://bp.eosgo.io/explore/?search_keywords=&job_category%5B%5D=block-producer&tab=search-form&type=place">EOS Go BP Explore</a>, but there are many other options.</li>
  <li>Start a terminal and run the following commands adapted for your needs. <code>UPPER_CASE</code> text, without a <code>$</code> prefix, represents values you must enter.</li>
</ol>
<pre><code>
# Pull the latest EOS Docker image. Always load the most recent.
docker pull eosio/eos:latest

# Run bash within a new container.
docker run --name eos-wallet -it eosio/eos:latest /bin/bash

# Set your chosen EOS API endpoint as an environment variable.
export EOS_URL=https://eos-api-endpoint

# Create a new wallet. This will start keosd in the background.
# Displays WALLET_PASSWORD, store if you plan to use the wallet again.
# Remember you can always import your private keys into another wallet.
cleos wallet create 

# Import your private key into the unlocked wallet.
# Displays PUBLIC_KEY, copy it to your clipboard.
cleos wallet import PRIVATE_KEY

# Find the account name(s) associated with your PUBLIC_KEY.
# Copy the ACCOUNT_NAME to your clipboard.
cleos --url $EOS_URL get accounts PUBLIC_KEY

# Get account details, EOS token balance, CPU/RAM usage and 
# current Block Producer Votes.
cleos --url $EOS_URL get account ACCOUNT_NAME

# Get the first 50 Block Producers
cleos --url $EOS_URL system listproducers

# Optionally page through the list with -L to see all Block Producers.
cleos --url $EOS_URL system listproducers -L LAST_BLOCK_PRODUCER_NAME

# VOTE! Enter your account name and the names of up to 30 Block Producers.
cleos --url $EOS_URL system voteproducer prods ACCOUNT_NAME \
BLOCK_PRODUCER1 BLOCK_PRODUCER2 BLOCK_PRODUCER3

# Get account details again to confirm your votes.
cleos --url $EOS_URL get account ACCOUNT_NAME

# See if your votes changed any standings.
cleos --url $EOS_URL system listproducers

# Close the container
exit # CTRL-D</code></pre>
<p>Additional commands you may need:</p>
<pre><code># Restart a stopped container and export the EOS_URL again
docker start -i eos-wallet
export EOS_URL=https://eos-api-endpoint

# Unlock a wallet, enter WALLET_PASSWORD
cleos wallet unlock
</code></pre>
<p>I could automate this further with scripts or a custom Dockerfile. Let me know in the comments if there is anything else you would find helpful.</p>
<p>Edit 6/17/18: <code>ca-certificates</code> was removed from above directions, because it was added to the <code>Dockerfile</code> in <a href="https://github.com/EOSIO/eos/commit/cb9df33a">eosio/eos@cb9df33a</a>.</p>
</html>
👍  , , , , , , , , , , ,
properties (23)
authortiktuk
permlinkfast-and-secure-eos-block-producer-voting-with-cleos-in-docker
categoryeos
json_metadata{"tags":["eos","tutorial","blockchain","dpos","blockproducer"],"links":["https://github.com/EOSIO/eos/wiki/Programs-&-Tools#cleos","https://scatter-eos.com/","https://vote.liquideos.com/","https://github.com/eoscanada/eosc","https://github.com/greymass/eos-voter","https://github.com/eosio/eos/wiki/Local-Environment#building-eosio","https://docs.docker.com/install/","https://www.eosdocs.io/resources/apiendpoints/","https://eosportal.io/chain/12/producers","https://bp.eosgo.io/explore/?search_keywords=&job_category%5B%5D=block-producer&tab=search-form&type=place","https://github.com/EOSIO/eos/commit/cb9df33a"],"app":"steemit/0.1","format":"html"}
created2018-06-13 01:31:42
last_update2018-06-17 17:15:21
depth0
children7
last_payout2018-06-20 01:31:42
cashout_time1969-12-31 23:59:59
total_payout_value1.200 HBD
curator_payout_value0.179 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,207
author_reputation121,181,112,863
root_title"Fast and secure EOS Block Producer voting with cleos in Docker"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,520,241
net_rshares533,589,992,853
author_curate_reward""
vote details (12)
@happymoneyman ·
Nice update tiktuk. This actually isn't as hard as it looks. 

Were you at the Tulip Conf in SF?
Cheers
properties (22)
authorhappymoneyman
permlinkre-tiktuk-fast-and-secure-eos-block-producer-voting-with-cleos-in-docker-20180614t011137982z
categoryeos
json_metadata{"tags":["eos"],"app":"steemit/0.1"}
created2018-06-14 01:11:39
last_update2018-06-14 01:11:39
depth1
children1
last_payout2018-06-21 01:11:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length103
author_reputation103,128,936,267,400
root_title"Fast and secure EOS Block Producer voting with cleos in Docker"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,657,318
net_rshares0
@tiktuk ·
I was at some of it. An extremely busy work week meant I couldn't see everything.
properties (22)
authortiktuk
permlinkre-happymoneyman-re-tiktuk-fast-and-secure-eos-block-producer-voting-with-cleos-in-docker-20180618t025828578z
categoryeos
json_metadata{"tags":["eos"],"app":"steemit/0.1"}
created2018-06-18 02:58:30
last_update2018-06-18 02:58:30
depth2
children0
last_payout2018-06-25 02:58:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length81
author_reputation121,181,112,863
root_title"Fast and secure EOS Block Producer voting with cleos in Docker"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id61,169,331
net_rshares0
@powderskier ·
Excellent @tiktuk! Thanks for this. I hadn’t been pulling the latest docker image and that will tighten up my coding. Thanks! Gunnar
properties (22)
authorpowderskier
permlinkre-tiktuk-fast-and-secure-eos-block-producer-voting-with-cleos-in-docker-20180613t113343114z
categoryeos
json_metadata{"tags":["eos"],"users":["tiktuk"],"app":"steemit/0.1"}
created2018-06-13 11:33:42
last_update2018-06-13 11:33:42
depth1
children3
last_payout2018-06-20 11:33:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length132
author_reputation81,526,482,443
root_title"Fast and secure EOS Block Producer voting with cleos in Docker"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,572,194
net_rshares0
@happymoneyman ·
pow pow skier! What's up bud
👍  
properties (23)
authorhappymoneyman
permlinkre-powderskier-re-tiktuk-fast-and-secure-eos-block-producer-voting-with-cleos-in-docker-20180614t011159500z
categoryeos
json_metadata{"tags":["eos"],"app":"steemit/0.1"}
created2018-06-14 01:12:00
last_update2018-06-14 01:12:00
depth2
children1
last_payout2018-06-21 01:12:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length28
author_reputation103,128,936,267,400
root_title"Fast and secure EOS Block Producer voting with cleos in Docker"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,657,358
net_rshares603,075,274
author_curate_reward""
vote details (1)
@powderskier ·
Hey Buddy! Great to connect with u again. Here’s an EOS airdrop for you and your followers!  https://t.me/EOS_airdropbot/?id=3187761

PM me on telegram sometime, I’d like to introduce our gals to each other. :)
properties (22)
authorpowderskier
permlinkre-happymoneyman-re-powderskier-re-tiktuk-fast-and-secure-eos-block-producer-voting-with-cleos-in-docker-20180614t023128914z
categoryeos
json_metadata{"tags":["eos"],"links":["https://t.me/EOS_airdropbot/?id=3187761"],"app":"steemit/0.1"}
created2018-06-14 02:31:30
last_update2018-06-14 02:31:30
depth3
children0
last_payout2018-06-21 02:31:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length210
author_reputation81,526,482,443
root_title"Fast and secure EOS Block Producer voting with cleos in Docker"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,664,192
net_rshares0
@tiktuk ·
Yes, always pull the most recent image before deploys. You don't want to miss any security updates.
properties (22)
authortiktuk
permlinkre-powderskier-re-tiktuk-fast-and-secure-eos-block-producer-voting-with-cleos-in-docker-20180618t024929100z
categoryeos
json_metadata{"tags":["eos"],"app":"steemit/0.1"}
created2018-06-18 02:49:33
last_update2018-06-18 02:49:33
depth2
children0
last_payout2018-06-25 02:49:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length99
author_reputation121,181,112,863
root_title"Fast and secure EOS Block Producer voting with cleos in Docker"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id61,168,615
net_rshares0
@steemitboard ·
Congratulations @tiktuk! You received a personal award!

<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@tiktuk/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@tiktuk) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=tiktuk)_</sub>


###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-tiktuk-20190812t013421000z
categoryeos
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-08-12 01:34:21
last_update2019-08-12 01:34:21
depth1
children0
last_payout2019-08-19 01:34:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length612
author_reputation38,975,615,169,260
root_title"Fast and secure EOS Block Producer voting with cleos in Docker"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,422,064
net_rshares0