User avatar
cc001
Lisker
Posts: 103
Joined: Sat Mar 12, 2016 12:48 pm

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

Thu May 19, 2016 11:17 am

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.
Last edited by cc001 on Fri Jan 13, 2017 4:53 pm, edited 3 times in total.
My Delegate Node
My Websites:
My Scripts:
My Tutorials:
  • Secure basic setup of a delegate server
  • how to set up 'lisk-rake' (outdated)


peanuts
Lisker
Posts: 24
Joined: Wed Apr 06, 2016 10:49 pm

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

Mon May 23, 2016 5:37 pm

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

User avatar
DAFRICASH
Lisker
Posts: 58
Joined: Thu Apr 14, 2016 1:06 pm
Location: Morocco

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

Mon May 23, 2016 6:46 pm

Thank you cc001, you make our lives easier as usual. :)
My Candidature : viewtopic.php?f=6&t=359

User avatar
Forrest01
Lisker
Posts: 55
Joined: Mon Apr 04, 2016 7:52 pm

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

Thu Dec 29, 2016 4:58 pm

Great tool, cc001. Thank you. This makes voting / unvoting very easy and also saves on some lisk. :)
========================== Forrest node details : ==========================
Mainnet node |•| Delegate Proposal |•| Transparency Report |•| Testnet node

User avatar
cc001
Lisker
Posts: 103
Joined: Sat Mar 12, 2016 12:48 pm

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

Fri Jan 13, 2017 4:54 pm

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.
My Delegate Node
My Websites:
My Scripts:
My Tutorials:
  • Secure basic setup of a delegate server
  • how to set up 'lisk-rake' (outdated)

Return to “Guides”

Who is online

Users browsing this forum: No registered users and 1 guest