Post Promoter JavaScript Voting Bot - Update 5 - Stability
Hello everyone, as you probably know the post promoter voting bot software had some issues recently dealing with the shutdown of the steemd.steemit.com node and the subsequent performance issues of the new api.steemit.com node (which also affected many other Steem related sites and services). These type of events are very important in the lifecycle of a software project because they highlight all of the issues which go unnoticed when everything is running smoothly.
I have been working quite some long hours both to update the code to make sure it handles these situations much more gracefully in the future and also to refund all bids that were missed from the @postpromoter bot during the outage. What doesn't kill you makes you stronger as the saying goes, and I feel that the software is much stronger now and ready to handle whatever the steem nodes want to throw at it!
Here are the specific changes that have been made in the past two days:
Removed "node_modules" folder and updated NPM package
If you've been following all of my updates you may recall that this is the first nodejs / npm project I have ever done, so there's a good bit of learning on my end regarding best practices. One such best practice is that the "node_modules" folder should be excluded from the git repository and all dependencies should be included in the NPM package (package.json file). These changes have now been made so if you're installing post promoter for the first time you can now do:
$ npm install
In the directory where you downloaded the project and all dependencies should be loaded automatically for you.
Price Feed Changes
Bots that accept both STEEM and SBD bids require a price feed to account for each type of currency correctly. Previously the post promoter software used a price feed URL that I set up and maintained myself and reloaded the prices every minute. This was unnecessary and caused significant issues for both the bot software and the Steem Bot Tracker website when my price feed went down.
Now the post promoter software loads the price feed directly from coinmarketcap.com and refreshes it once every 30 minutes. It also saves the last prices it loaded so if coinmarketcap.com goes down then it will continue to use the last prices it received and keep running without any issues.
Wait until previous vote goes through before sending next one
Previously the bot would send out a vote transaction, wait 5 seconds (3 second voting limit plus a little buffer) and then send out the next one. The problem with this approach is that if for whatever reason (such as nodes being slow, for example) the first vote transaction took say 4 seconds to go through, then the next vote would be sent only 1 second later and would then fail.
So now the software will wait until the previous vote transaction completes before scheduling the next one 5 seconds later. This way it is no longer possible for votes to be sent out within 3 seconds of each other, even if the nodes are running slowly, which will greatly reduce the possibility of missed votes in situations like we saw over the last couple of days.
Added RPC node setting to config.json
Perhaps most important of all, there is now an option to specify what RPC node to connect to in the config.json file. If api.steemit.com is having problems, you can now easily switch to say rpc.buildteam.io (props to @themarkymark for running that great node) or any other node that you like for that matter. You can set the RPC node to use in config.json as shown below, and if none is set then api.steemit.com will be used by default:
"rpc_node": "https://api.steemit.com"
In the future I plan to add the ability to specify a list of nodes and have the software fail over to the next node on the list if the current node is having issues, but that change is much more involved and I haven't gotten to that one yet. It would be great if the Steem JS library supported this since I feel that that's really where this belongs, but for now it doesn't so we will have to make due.
If anyone reading this has the ability to make that change to Steem JS and get it merged into the main repo I will do what I can to make sure you're adequately compensated for it!
Additional / updated error logging
Last, but not least, the error logging has been significantly updated and improved to make it much easier to figure out what is going on when and if errors do arise.
Thanks for your support!
As always I want to thank everyone who has helped and supported me in creating this software. I love that it has been able to help so many people get their content promoted and to help so many investors earn a return on their STEEM investment. Please stay tuned for more updates in the coming weeks!
Links to relevant commits:
- Removing node_modules and updated package.json
- Load prices every 30 minutes and added more error logging
- Wait until previous vote completed before sending next one
- Allow setting RPC node to use in config.json
Posted on Utopian.io - Rewarding Open Source Contributors
Man I’m glad I added you to my witness list. I hope to see you climb the ranks quickly as it looks like you’re really pouring your time and energy into this.
I only wish I had studied programming and computer science instead of mechanical engineering so I could make a bigger contribution to this community. Maybe some day I’ll have the spare time to pick up where I left off years ago and start learning again but so much has changed.
Thank you for your support! Let me know if you do ever get back into programming and I'll be happy to help out!
I appreciate that greatly. It's just a matter of making time for it. Doing my taxes is gonna consume a lot of my time but I'm gonna make a point to at least dip my toes back into it (programming) at some point this year.
It's never too late to start learning! You can start learning about how the web works by just opening up Chrome Developer Tools and poking around in there.
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
This is awesome. Thanks for putting in all this hard work to help secure the future of your programs and of steemit!
Please I sent 2.5sbd to postpromoter and my name didn't even appear in the round and it's over 2hrs with no upvote On my post.
I have sent SBD to @postpromoter and still get no upvote..please help
Your bid was refunded because it was below the min bid amount.
Thanks I fixed it... now it is 1 SBD
hi @yabapmatt thanks for the big help you've been providing! I'm now building a new bot, how can I get listed on steembottracker.com?
Hi @antonsteemit, you can contact me on Discord or Steemit.Chat and we can discuss getting your bot added to the site.
Hi @yabapmatt, I have sent you some info via Discord (My id: Antonasso#0708)
hello @yabapmatt. For sure @postpromoter just gave me 19 when i invested 10??? with the 19, they will take the 25% and then divide by 2 which makes almost 7 steem dollars from me. This a loss of 3 stem dollars for sure. Please, be kind to me on this post https://steemit.com/busy/@jona12/don-t-call-me-a-minnow-i-m-a-baby-whale. Thank you
Hi @jona12, the @postpromoter bot (like all other bid-based bots) are based on a bidding system. This means the vote value is based on the amount of SBD/Steem that is bid in each voting round. Some rounds you might have a slight loss and some you might have a slight gain. Overall it's pretty close to break-even which it sounds like it is in your case as well.
Also please remember that the payout value fluctuates as the value of STEEM changes in the markets, so your actual return will not be determined until the post pays out.
You got a 29.95% upvote from @postpromoter courtesy of @yabapmatt! Want to promote your posts too? Check out the Steem Bot Tracker website for more info. If you would like to support development of @postpromoter and the bot tracker please vote for @yabapmatt for witness!
Nice Post! Very informative. Thank you very much. Please don't stop posting. Postpromoter voting BOT is currently working.
I really do not understand what is a bot because I am a beginner steemit, just one week I often read postings on the wall steemit, but I want to register also bot but I do not know how !? and what is a bot !? please tell me how to @yabapmantt? if you do not mind, sorry a thousand sorry I think about this bot very stupid people see me because still miss what bot