Page 1 of 1

autoVote - a script/tool to vote automatically for delegates (by name, address, or publickey) provided in text files

Posted: Thu May 19, 2016 11:17 am
by cc001
UPDATE 2017-01-13: Pushed a small update where the waiting time between several transactions has been removed. This security measurement is not needed anymore, because the issue has been fixed in the Lisk core. Update at will.

UPDATE 2016-12-11: Pushed a bigger update. It now needs only one file per config, not one for positive votes and one for negative votes. Just put all the votes you want in one file. During execution the script now checks what you're existing votes are and calculates which votes must be added and which must be removed to reach the state as in the test file.
Additionally it asks you now for a confirmation before executing the votes
If you update (what I recommend) you must keep your current config.yml and adapt it in the following way:
  • Remove the flag negativeVotingFilename
  • Change positiveVotingFilename to votingFilename


UPDATE 2016-05-20: If you leave your passphrase empty in the config (mySecret: "") it will ask you during runtime to enter your passphrase. This is for people who don't like putting the passphrase into a file. If you don't use the second passphrase you have to remove it completely from the config now



I wrote a python script to automate and simplify the voting. You simply put all the delegatenames (or addresses, or publickeys) in a textfile and let the script vote automatically for all of them.
It can be found here:
https://github.com/simonmorgenthaler/Lisk-autoVote

To download/install it, you need git. On ubuntu git can be installed with

Code: Select all

sudo apt-get install git


Then go to the directory you want to install autoVote, for example your home directory:

Code: Select all

cd ~


Then clone autoVote:

Code: Select all

git clone https://github.com/simonmorgenthaler/Lisk-autoVote.git


Go into the newly created directory:

Code: Select all

cd Lisk-autoVote/


Read all info:

Code: Select all

head -23 autoVote.py
cat README.md


Read and edit config.yml:

Code: Select all

nano config.yml


run the script if you use the default section

Code: Select all

./autoVote.py


Or if you use a special config section with:

Code: Select all

./autoVote.py cc001


If you get an error message similar to this one
bash: ./autoVote.py: Permission denied


make autoVote.py executable with

Code: Select all

chmod +x autoVote.py

and execute it again.

Re: autoVote - a script/tool to vote automatically for delegates (by name, address, or publickey) provided in text files

Posted: Thu May 19, 2016 6:55 pm
by GoldenEye
Great script, thanks!

Re: autoVote - a script/tool to vote automatically for delegates (by name, address, or publickey) provided in text files

Posted: Mon May 23, 2016 5:37 pm
by peanuts
hi, great script, thx

i had to add WAN hostname entry to /etc/hosts when voting from node locally.
for ex if your internal hostname is lisk and WAN address login.lisk.io:

/etc/hosts:
127.0.1.1 login.lisk.io lisk

Re: autoVote - a script/tool to vote automatically for delegates (by name, address, or publickey) provided in text files

Posted: Mon May 23, 2016 6:46 pm
by DAFRICASH
Thank you cc001, you make our lives easier as usual. :)

Re: autoVote - a script/tool to vote automatically for delegates (by name, address, or publickey) provided in text files

Posted: Thu Dec 29, 2016 4:58 pm
by Forrest01
Great tool, cc001. Thank you. This makes voting / unvoting very easy and also saves on some lisk. :)

Re: autoVote - a script/tool to vote automatically for delegates (by name, address, or publickey) provided in text files

Posted: Fri Jan 13, 2017 4:54 pm
by cc001
Pushed a small update where the waiting time between several transactions has been removed. This security measurement is not needed anymore, because the issue has been fixed in the Lisk core. Update at will.