inertia186 / drotto Goto Github PK
View Code? Open in Web Editor NEWPay-to-play voting bot.
License: Other
Pay-to-play voting bot.
License: Other
rake aborted!
Errno::EMFILE: Failed to open TCP connection to steemd.steemit.com:443 (Too many open files - getaddrinfo)
/root/drotto/lib/drotto/bounce_job.rb:32:in init_transactions' /root/drotto/lib/drotto/bounce_job.rb:14:in
initialize'
/root/drotto/lib/drotto.rb:35:in new' /root/drotto/lib/drotto.rb:35:in
find_bids'
/root/drotto/lib/drotto.rb:202:in block in run' /root/drotto/lib/drotto.rb:195:in
loop'
/root/drotto/lib/drotto.rb:195:in run' /root/drotto/Rakefile:66:in
block in <top (required)>'
/root/.rbenv/versions/2.3.1/bin/bundle:23:in load' /root/.rbenv/versions/2.3.1/bin/bundle:23:in
Caused by:
Errno::EMFILE: Too many open files - getaddrinfo
/root/drotto/lib/drotto/bounce_job.rb:32:in init_transactions' /root/drotto/lib/drotto/bounce_job.rb:14:in
initialize'
/root/drotto/lib/drotto.rb:35:in new' /root/drotto/lib/drotto.rb:35:in
find_bids'
/root/drotto/lib/drotto.rb:202:in block in run' /root/drotto/lib/drotto.rb:195:in
loop'
/root/drotto/lib/drotto.rb:195:in run' /root/drotto/Rakefile:66:in
block in <top (required)>'
/root/.rbenv/versions/2.3.1/bin/bundle:23:in load' /root/.rbenv/versions/2.3.1/bin/bundle:23:in
I am running latest git master
~/drotto# rake usage
rake aborted!
TinyTds::Error: Login failed for user 'steemit'. Reason: The account is disabled.
/usr/local/rvm/gems/ruby-2.4.1/gems/tiny_tds-1.3.0/lib/tiny_tds/client.rb:53:in `connect'
/usr/local/rvm/gems/ruby-2.4.1/gems/tiny_tds-1.3.0/lib/tiny_tds/client.rb:53:in `initialize'
A bid with url to a dmania post did not get a vote. Here is a log message.
D, [2018-01-04T07:57:50.560077 #6078] DEBUG -- : No such comment. Original memo: https://dmania.lol/post/vinodgupta/husband-of-the-year-zg1hbmlh-mesah
D, [2018-01-04T07:57:50.843945 #6078] DEBUG -- : Transactions found: 200
W, [2018-01-04T07:57:50.919157 #6078] WARN -- : Couldn't find @https://dmania.lol/post/vinodgupta/husband-of-the-year-zg1hbmlh-mesah with api.
I, [2018-01-04T07:57:50.919544 #6078] INFO -- : Allowing 0.250 SBD (original memo: https://dmania.lol/post/vinodgupta/husband-of-the-year-zg1hbmlh-mesah)
Hello.
I am trying to launch drotto on golos, but getting an error:
rake run
{ :DBG => "Remaining voting power: 100.00 % (recharged 0.00 % since last vote)" }
{ :DBG => "Last vote: 628 minutes ago; 0.0 minutes of recharge power unused in 100.00 %" }
rake aborted!
NoMethodError: undefined method `map' for nil:NilClass
Did you mean? tap
/root/drotto/lib/drotto/bounce_job.rb:402:in `transfer_ids'
/root/drotto/lib/drotto.rb:34:in `find_bids'
/root/drotto/lib/drotto.rb:185:in `block in run'
/root/drotto/lib/drotto.rb:178:in `loop'
/root/drotto/lib/drotto.rb:178:in `run'
/root/drotto/Rakefile:54:in `block in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => run
I had to go back to
transfer = {
type: :transfer,
from: account_name,
to: from,
amount: amount,
memo: "Unable to accept bid. (ID:#{id})"
}
tx = Radiator::Transaction.new(chain_options.merge(wif: active_wif))
tx.operations << transfer
debug tx.process(true)
And it worked
This issue was discovered on Golos where we have Booster bot.
What should happen
Booster refunds bid to user.
What happens
Booster gets bid and don't refund it.
Additional info.
I see other returns for voted posts, so feature exists. But looks like drotto (Booster) thinks it voted a post correctly if several bids transferred in the same day.
Partial solution.
Compare bid timestamp and upvote timestamp. Return bids, which transferred after upvote.
!But there are edge cases. Bid can came after "round close" and before post upvote. It's not very rare, coz bids frequently placed near round end (to append in this case).
Real World Examples (Golos):
a. Normal
(2017-11-15 06:01:18) 10 gbg bid for post tx
(2017-11-15 06:42:00) upvote: tx
(2017-11-15 13:11:45) 10 gbg bid for the same post: tx
b. Edge case:
(2017-11-15 22:59:12) oksana0407 (A) bids 8 gbg tx
(2017-11-15 23:10:24) cryptobandera bids 10 gbg tx - not counted, already voted (like in case a.)
(2017-11-15 23:18:24) now (B) bids 100 gbg tx
(2017-11-15 23:25:24) santa-barbara (C) bids 15 gbg tx
(2017-11-15 23:26:39) eee (D) bids 197 gbg tx
(2017-11-15 23:32:48) now (A) bids 51 gbg tx
(there are also some <0.3gbg bids, which passed to next rounds or refunded later)
upvotes start
So let calculate received upvote percents:
what | without last bid | with last bid |
---|---|---|
Bids sum | 8+100+15+197 = 320 | 8+100+15+197+51 = 371 |
Upvote A | 10/320 = 3.13% | 10/371 = 2.70% |
Upvote B | 100/320 = 31.25% | (100+51)/373 = 40.48% |
Upvote C | 15/320 = 4.68% | 15/371 = 4.04% |
Upvote D | 197/320 = 61.56 | 197/371 = 53.01% |
If we check check blockchain, we'll get exactly same percents (31.25%, 61.56%, 4.68%) as in "without last bid" column. So round was closed before it, but there were no refund for that bid.
Can you upload working version for GOLOS platform? Thank you in advance.
Bottracker introduced use of Bids API to track bids.
https://s3.amazonaws.com/yabapmatt/bottracker/config.html
It would be good for drotto to support this feature.
We need to be able to auto-bounce all invalid bids.
Current Usage rules:
If there are multiple bids with the same post, only one vote will be cast and the remaining bids will not be returned.
If the bot has already voted for a post, additional bids will not be returned.
The URL must be correctly expressed in the memo alone. Malformed memos will not be returned.
I would like to auto-refund bids under all listed conditions, it would reduce manual refunds.
Would be useful to be able to set usage rules in config.
hey hello, i get this error:
rake aborted!
LoadError: cannot load such file -- yard
/home/bendenn/drotto/Rakefile:3:in `<top (required)>'
(See full trace by running task with --trace)
rake aborted!
LoadError: cannot load such file -- yard
/home/bendenn/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' /home/bendenn/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
require'
/home/bendenn/drotto/Rakefile:3:in <top (required)>' /home/bendenn/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/rake_module.rb:29:in
load'
/home/bendenn/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/rake_module.rb:29:in load_rakefile' /home/bendenn/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/application.rb:703:in
raw_load_rakefile'
/home/bendenn/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/application.rb:104:in block in load_rakefile' /home/bendenn/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/application.rb:186:in
standard_exception_handling'
/home/bendenn/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/application.rb:103:in load_rakefile' /home/bendenn/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/application.rb:82:in
block in run'
/home/bendenn/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/application.rb:186:in standard_exception_handling' /home/bendenn/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/application.rb:80:in
run'
/home/bendenn/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rake-12.3.0/exe/rake:27:in <top (required)>' /home/bendenn/.rbenv/versions/2.5.1/bin/rake:23:in
load'
/home/bendenn/.rbenv/versions/2.5.1/bin/rake:23:in `
Can you give me a hint?
By the way, very nice work!
Just hope that I get it to run;)
I've been having this problem lately where there is something that causes bot to get stuck in the middle of voting for bids and I am forced to shut it down and restart. This messes up the voting as bot assumes new round has started and does not finish up remaining votes.
Is not an issue. Sorry.
Hello,
Thanks for the great bot.
Any way to change confirm.md to show $ value of the vote?
Something like this:
This ${content_type} has received a ${vote_weight_percent} % ${vote_type} worth $ ${vote_dollar_value}
from @${account_name} thanks to @${from}.
Hello is it still work or not ? if not will you update it ? and if it is work am I doing wrong ? can you help me please with it.
Thanks for help and your codes.
Is it possible to configure drotto to accept STEEM bids? If not this would be a great feature to enhance the bot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.