luckyluke.rb - Voting Bot

in #radiator7 years ago (edited)

Lucky Luke is a reimplementation of Dr. Phil, but instead of voting for new articles, it votes for posts mentioned in the memo field of a transfer operation. By default, it votes for any transfer sent to booster but you can configure any bot that receives pay-for-vote transfers. You can also set a minimum transfer amount to ignore small amounts.

Features

  • YAML config.
    • voting_rules
      • min_transfer allows you to specify the minimum amount in the transfer to vote on.
      • min_wait and max_wait (in minutes) so that you can fine-tune voting delay.
      • enable_comments option to vote for post replies (default false).
      • max_rep option, useful for limiting votes to newer authors (default 99.9).
      • vote_signals account list.
        • Optionally allows multiple bot instances to cooperate by avoiding vote swarms.
        • If enabled, this feature allows cooperation without sharing keys.
      • min_rep can now accept either a static reputation or a dynamic property.
        • Existing static reputation still supported, e.g.: 25.0
        • Dynamic reputation, e.g.: dynamic:100. This will occasionally query the top 100 trending posts and use the minimum author reputation.
        • Checking vote_weight: 0.00 % and skipping without broadcast.
          • This is useful for special configurations that only vote for favorites.
        • min_voting_power to create a floor with will allow the voter to recharge over time without having to stop the script.
      • only_tags (optional) which only votes on posts that include these tags.
      • Optionally configure voters as a separate filename. E.g:
        • voters: voters.txt
          • The format for the file is just: account wif (no leading dash, separated by space)
        • Or continue to use the previous format.
      • Also optional support for separate files in each (format one per line or separated by space or both):
        • skip_accounts
        • skip_tags
        • flag_signals
        • vote_signals
  • bots is a list of bots to watch transfer operations for.
  • Skip posts with declined payout.
  • Skip posts that already have votes from external scripts and posts that were edited.
  • Argument called replay: allows a replay of n blocks allowing you to catch up to the present.
    • E.g.: ruby luckyluke.rb replay:90 will replay the last 90 blocks (about 4.5 minutes).
  • Thread management
    • Counter displayed so you know what kind of impact ^C will have.
    • This also keeps the number of threads down when authors edit before Lucky Luke votes.
  • Streaming on Last Irreversible Block Number, just to be fancy.
  • Checking for new HF18 cashout_time value (if present).
    • This will skip voting when authors edit their old archived posts.

Overview

The goal is to vote before the pay-for-vote bot. To achieve this, Lucky Luke watches for transfer operations.

You might configure the bot to only watch for transfers over 10.000 SBD, for example. The bot will also use a few other rules like to avoid voting for declined payouts and automatically suspend voting if it needs to recharge.


Install

To use this Radiator bot:

Linux
$ sudo apt-get update
$ sudo apt-get install ruby-full git openssl libssl1.0.0 libssl-dev
$ sudo apt-get upgrade
$ gem install bundler
macOS
$ gem install bundler

You can try the system version of ruby, but if you have issues with that, use this how-to, and come back to this installation at Step 4:

I've tested it on various versions of ruby. The oldest one I got it to work was:

ruby 2.0.0p645 (2015-04-13 revision 50299) [x86_64-darwin14.4.0]

Setup

First, clone this gist and install the dependencies:

$ git clone https://gist.github.com/07cfb044f625beb22724371b85cea0e4.git luckyluke
$ cd luckyluke
$ bundle install

Then run it:

$ ruby luckyluke.rb

Lucky Luke will now do it's thing. Check here to see an updated version of this bot:


Upgrade

Typically, you can upgrade to the latest version by this command, from the original directory you cloned into:

$ git pull

Usually, this works fine as long as you haven't modified anything. If you get an error, try this:

$ git stash --all
$ git pull --rebase
$ git stash pop

If you're still having problems, I suggest starting a new clone.


Troubleshooting

Problem: What does this error mean?
luckyluke.yml:1: syntax error, unexpected ':', expecting end-of-input
Solution: You ran ruby luckyluke.yml but you should run ruby luckyluke.rb.

Problem: Everything looks ok, but every time Lucky Luke tries to vote, I get this error:
Unable to vote with <account>.  Invalid version
Solution: You're trying to vote with an invalid key.

Make sure the .yml file voter items have the account name, followed by a space, followed by the account's WIF posting key. Also make sure you have removed the example accounts (social and bad.account are just for testing).

Problem: The node I'm using is down.

Is there a list of nodes?

Solution: Yes, special thanks to @ripplerm.

https://ripplerm.github.io/steem-servers/




See my previous Ruby How To posts in: #radiator #ruby

Get in touch!

If you're using Lucky Luke, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on STEEM and SteemSpeak.

License

I don't believe in intellectual "property". If you do, consider Lucky Luke as licensed under a Creative Commons CC0 License.

Sort:  

command line "howto" is my favorite. A post like this is easy to understand for all levels of skill. Thank you so much for presenting it this way.

It's a fact of life in cryptocurrency that bots are here to stay. We either embrace them, or we hate them. The ones that win, are willing to embrace them. :)

Thank you for this...

Yep, the curation game has evolved quite a bit in a year. I believe these kinds of tools might lead to a true Network Effect over time. That's why I want them out there, in the open. More bots!!

@inertia Yup! man is very helpful for newbie it help a a lots :)

I'm just a 'minnow' swimming in a big sea - Vote for Me! @joedirt :) I know nothing about Bots or much about Steemit for that matter. Is there an article or tip you could provide to a noob to learn and curate better? Any suggestion would be appreciated. Thank you for your consideration.

This Bot can Frontrun @booster, @randowhale & other pay4vote bots. Guaranteed curation-rewards. Nice Nice Nice!! Upvoted & Resteemed.

I thought You said "This bot can run Fortran"
Hey can you tell me if I am correct?
So do I just send like, 1 SBD to @booster and put the steemit link of post I want to be boosted in the field?
This post is so full of codes and non laymen terms, its super overwhelming unless you turn your Highlighter vision on and try to decipher what its really saying!

Its like...we wanna make sure only the smart people find out about the tips and tricks that allow you to make just enough steem to live off heh, imagine, the company store, complete full spectrum doination of daily life, but ina gooey gooey good way! Farming robots and drones will be our freedom! Smartphones run off wireless electriicityto liberate us from batteries! i cant wait for al the stuff we will get to soen our steemit fortuns on!

people REALLY are senstiveto the market forces especialy with steem price! since steem is low now people get depressed and stop thinking about the future!

i want to REMIND everyone that Steemprice is STILL going to be over 410 before the end of the year! and I REALLLy see no reason why steem wouldnt hit $1000 in the next couple years! especially once we have the hundreds of millions f users we KNOW w will have sooon...just takes time!! just kep the content flowing! we work on the same basis a any other content funnel online BUt we have blockchain goodness behind us! we are the MOSt advanced efficient blockchain also! with MOSt efficient transactions and also in many cases wwe have some achievemnt trophies for some of the most transactions if this was all a videogame on xbox live...

and if this was an xbox live videogame, steemitw ould also have won SO many achievment trophies for all sorts of records broken!

steemit has broken so many records,its technology is SO advanced

we have social media AND we have crypto currency AND we have the blockchain networks

and just WAIt untill you see a little ethereum and bitcoin wallet inside of the Internal SBD /STeem market in your steemit wallet! just WAIt until you see all the new crypto users who will be able to keep their crypto currecy INSIDE the steem blockchain BUT as btcoin and ethereum and other altcooins even ec20 tookens!

we will be a one stop shop for all your crypto needs if we get some openledger bitshares integration too! just wait! i cant WAIt for this shit to get to $10 and all our dreams to be funded!

honestly i have SO much time to PLAN all my ideas! so I have No complaints NONE of us should unless we are homeless or hungry, and if we are homless or hungry ask steemt for help! prove u canbring value and we will help u! thats the beaty of steemit! we have TIME to all sit here and come up with ideas! if the community lieks oru ideas we wil lknow and we wil post MORE of the ideas peopel like! we can basically LIVE off our iddeas! its so attractve it pulls people in!


I just made this in MS paint JUSt for this comment!

omg nice comment you are right about the script thing... too much and for someone like me with none skills to script is not a good scene lol I guess I will have to slowly auto didact my self through hoping to get lucky like lucky luke lol if I do manage to get there I will surely let you know. I loved your enthusiasm really encouraging but that means we have to engage even more and share as much as we can if we ought to reach the hundred of millions and so I will my friend @cem if there is a version for dummies of lucky luke??? HELP

I dont know. You should ask @inertia 😎

already did like many guess windows is not good 4 steemit ... :)) wish us luck Cem thanks!! :]

Figured that lol. Good luck 😎 dont forget to add my posts to your automated upvoting ;)

Sure, Cem!! Thanks!! ;))

Is it confirmed that we'll see multi-currency wallets?
is there a link? ^^

Sorry you wont find a link because this is supposed to be a secret and you wont find a link, this is just
bro it was a SECRET I over heard in the discord and i would tell you who said it but it would get them in trouble!

But they seemed drunk and were bragging about it and when we asked about it more they said "Oh I have No idea what youre talking about"

But yeah man Im so upset that I am not super wealthy right now, I am such a human i am so greedy wtf i cant believe how ANGRY I got this morning over the fact that crypto currencies are going UP and I dont have tghem! i sold all my altcoins for some Bitcoin to claim bitcoin cash and i see that i didnt have to send all my btc to jaxx i coulda kept em in bittrexand now bittrex has bitcoin cash

man soprry im going off talking about what I was jst talking about

back to what YOURE talking about multi walet inside styeemit

yes it will be just like openledger.io which is a great way anyone can convert steem or SBD to bitcoin or all sorts of altcoins using the bitshares decentralied exchange and its kust like poloniex or bittrex its so cool and it would be simple to integrate the two, so when you login to steemit youll have a lil option for altcoisn and bitcoin and ethereum etc

Sounds cool, man. Sorry to hear you dont have coins. Even if theres some crazy shit happening in some other market. My mantra is, I joined this market to find value in it. If I wanted to store my money somewhere I'd keep it in BTC or Steem, and be sure not to spend more than you're willing to sacrifice, and sometimes that includes your altcoins. Great concept though, I hope it comes through.

Do not really get this yet . So we have to install it to work and it only works on mac or linux....right?

Does Piers have anything to do with Vermont?

Well I am but if you do not believe that it is okay because I thought you were a robot at first.

I don´t believe in intelectual property either. Here is a drawing of mine of the great Luke, which I used to have as avatar.

I know I know, drawing is not my thing.

Bang bang lucky Luke :)

Nice lucky luke drawing!

Thank you! Help yourself, if you like. Mention the author (that would be me) if you use it. And Tabary, as well (that would be the creator of Lucky Luke, with another guy called Goscinni).

Good work!

In a way this automatically becomes good for people using randowhale and other bots as this bot will upvote too lol

Now I am going to have to scrape together a Linux system just to run this bot. I havent used Linux in about 20 years. Wonder if I can get it to run on my old Nook?

Works like a charm..thanks for all help @inertia :)

@banjo, how do you like the competition?

Yes!

@inertia aka Dr.Phill
I'm glad to have a mentor like you
You're the one who are pushing our post a step forward by upvoting through bot
Thank You So Much
Steem On

what exactly does this bot do (sorry for my ignorance)
also can you tell me which bot is the best to use and why
Please I need help I am a real dummie

Could you show how a bot from steembottrackers is build??

I love the time then the upvote had 100% power now it's just only 0.5/1% what's happened

awesome post @inertia
Your post is very helpful to me in wrestling steemit world
thank for sharing

Great time for this post. I had just read your stuff on Github.

Upvoted and also resteemed!

Sweeet! I may try this out

thanks good to know, very new at this.

This bot looks so good to get better curation rewards.
I'll get round to using it when I've got myself into my laptop
Seems like bots are getting better and better recently haha
Thanks @inertia

help! i have windows and a donkey brain...:]

Very nice! big help! Thank you!

@inertia, interesting. Bots are taking over leaving humans behind. The game is changing fast

Maybe in the future, bots will write all the blogs, voted on by bots.

I'm going to have to get a Linux machine and start running this. Thanks very much for posting.

I used to have a CD with Lucky Luke's songs. Good times.

Amazing bot @inertia
This really is like a turbo booster bot of curation.

Its a curation vote bot?am i right

Excellent work. Will fork and test.

Great idea!

Great project mate! Thanks for the work and for sharing it.
It's the first time I tried running a steemit bot, had it on for a while now, so far it hasn't been able to beat randowhale. It does beat booster as the orders come in at different times compared to the bot's vote.

Upvoted and Resteemed. Many, Many Thanks for your help.

Well this is downright interesting. I may have to build that Linux computer afterall.

Hey Lucky Luke, can you resteem articles in the memo field?

This is awesome and I'm going to try it out. Sounds very interesting and worth a shot. Thanks for sharing this awesome bot. You're awesome for breaking it down and making it very simple. 👍🏾👍🏾

Thanks for a great post. I have installed and it is working as advertised. I used an Ubuntu 16.04 server from linode.com and couldn't get it to work due to ffi 1.9.18 not working with ruby -v 2.3.x (can't remember exact version).

I upgraded to ruby 2.4 using rbenv and it worked like a charm. I used this as a guide:

https://gorails.com/setup/ubuntu/16.04

By the way a $5 VPS with 1 core and 1 GB of memory is plenty to run this from what I've seen so far.

may I know which VPS you use or recommend?

This is very nice!

I am not at all getting it. This seems too technical to me.

Hey inertia, Im going to drop you a line on discord in the next coming weeks if i cant get this stuff understood...thanks for this

Good bot!
Easy installation and it's working well on a raspberry pi 2 B !

Thanks

Be proud of yourself for doing this.

Your kind are few & far between. Good on you Sir! Upvoted

Well that took longer than expected..

I had issues adding radiator, ended up installing gemrat to bypass some runtime errors.

I haven't really used ruby before but got there eventually :)

The struggle was real! Excellent work though @inertia I really appreciate it.

I would have loved a docker image lol - I'm not lazy at all /s

Gained yourself a follower.

This is the technical know-how, not for laymen in programming.

I do not understand about voting bots. But very interesting post.

Thank you for this. I'm an ABSOLUTE beginner as this was my first attempt at anything in ruby, it was easy to follow, but just challenging enough that I actually learned something instead of just copying and pasting.

oh man, this is way over my head !

Awesome idea! Any chance of making a version of this for Windows?

 7 years ago  Reveal Comment

It's really simple to install

That was what I thought at first, but I followed the howto and then it was a kinda set it and forget it kinda thing.

does it work for windows? i really want to see the "simple" in all this :[

is that your whole purpose in your bot life ..." i like toast "