#### Overview Regult (regult.rb) is a proxy sentinel that streams the blockchain, looking for proxy/unproxy operations to update a local text file with a list of accounts that proxy their witness vote to a particular account you're interested in tracking. In addition to streaming the blockchain, in order to save time and resources, this script will also initialize the list from data on Steem SQL. Since Steem SQL [is a paid service](https://steemit.com/steemsql/@arcange/steemsql-is-moving-to-a-monthly-subscription-model), I figure using Steem SQL should be optional. If you can manually initialize the `proxy-list.txt` file using some other method, using Steem SQL should not be required. It's also *possible* to just let Regult build the `proxy-list.txt` file from the Genesis block, but that's a bad idea if you're using a public node. Don't do that. --- #### Install To use this [Radiator](https://steemit.com/steem/@inertia/radiator-steem-ruby-api-client) script: ##### Linux ```bash $ 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 ```bash $ gem install bundler ``` I've tested it on various versions of ruby. The oldest one I got it to work was: `ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin17]` First, clone this gist and install the dependencies: ```bash $ git clone https://gist.github.com/cfce5b47fa0f5b1eae0c6dd9c653ca7d.git regult $ cd regult $ bundle install ``` You should edit `regult.yml` and point it at the correct account (`proxy_target_account`). If you intend to use Steem SQL, you can provide the credentials in `authorize-steem-sql.sh`, then use this terminal command to enable Steem SQL just before running this script: ```bash source authorize-steem-sql.sh ``` Now you can skip to `ruby regult.rb`. Otherwise, if you do not intend to use Steem SQL, in order to avoid long replays, get a list of accounts that currently proxy to `proxy_target_account` and create a file called `proxy-list.txt` with the entire list of account names only, one account name per line (you can typically get this list from steemdb.com, for example: https://steemdb.com/@jesta/proxied is a list of accounts that proxy to jesta). Then create a file called `last-block-num.txt` and add a single line with the latest block number, or whatever number you'd like to begin streaming from. Once those two files exist, you can run this script and the `proxy-list.txt` file will be kept current whenever a relevant proxy/unproxy operation is seen. Then run it: ```bash $ ruby regult.rb ``` Regult will now do it's thing. Check here to see an updated version of this script: https://gist.github.com/inertia186/cfce5b47fa0f5b1eae0c6dd9c653ca7d --- #### Upgrade Typically, you can upgrade to the latest version by this command, from the original directory you cloned into: ```bash $ 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? ``` regult.yml:1: syntax error, unexpected ':', expecting end-of-input ``` ##### Solution: You ran `ruby regult.yml` but you should run `ruby regult.rb`. ##### Problem: The node I'm using is down. Is there a list of nodes? ##### Solution: Yes, special thanks to @jamzed. https://geo.steem.pl/ --- <center> <a href="https://www.deviantart.com/randychen/art/Robotech-enemy-pod-392359533"> <img src="https://orig00.deviantart.net/848b/f/2015/325/a/d/robotech_enemy_pod_by_randychen-d6hlmjx.jpg" /> </a> <br /> <sub>art by <a href="https://www.deviantart.com/randychen/">randychen</a></sub> </center> See my previous Ruby How To posts in: #radiator #ruby ## Get in touch! If you're using Regult, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on STEEM and [SteemSpeak](http://discord.steemspeak.com). ## License I don't believe in intellectual "property". If you do, consider Regult as licensed under a Creative Commons [](http://creativecommons.org/publicdomain/zero/1.0/) License.
author | inertia |
---|---|
permlink | regult-rb-proxy-sentinel |
category | radiator |
json_metadata | {"tags":["radiator","ruby","steem","steemdev","witness-category"],"users":["jamzed","inertia"],"image":["https://orig00.deviantart.net/848b/f/2015/325/a/d/robotech_enemy_pod_by_randychen-d6hlmjx.jpg","http://i.creativecommons.org/p/zero/1.0/80x15.png"],"links":["https://steemit.com/steemsql/@arcange/steemsql-is-moving-to-a-monthly-subscription-model","https://steemit.com/steem/@inertia/radiator-steem-ruby-api-client","https://steemdb.com/@jesta/proxied","https://gist.github.com/inertia186/cfce5b47fa0f5b1eae0c6dd9c653ca7d","https://geo.steem.pl/","https://www.deviantart.com/randychen/art/Robotech-enemy-pod-392359533","https://www.deviantart.com/randychen/","http://discord.steemspeak.com","http://creativecommons.org/publicdomain/zero/1.0/"],"app":"steemit/0.1","format":"markdown"} |
created | 2018-06-28 03:21:12 |
last_update | 2018-06-29 04:42:12 |
depth | 0 |
children | 9 |
last_payout | 2018-07-05 03:21:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 14.189 HBD |
curator_payout_value | 3.736 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 4,340 |
author_reputation | 346,568,901,399,561 |
root_title | "regult.rb - Proxy Sentinel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,561,194 |
net_rshares | 7,171,414,032,861 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
matt-a | 0 | 4,355,820,074,021 | 100% | ||
elyaque | 0 | 68,956,782 | 20% | ||
inertia | 0 | 1,470,444,002,085 | 100% | ||
arcange | 0 | 26,519,679,538 | 5% | ||
raphaelle | 0 | 1,919,581,922 | 5% | ||
arrowj | 0 | 19,263,179,695 | 100% | ||
brianphobos | 0 | 9,857,590,977 | 10% | ||
gonzo | 0 | 406,990,822 | 25% | ||
johnvibes | 0 | 3,840,786,020 | 3% | ||
dajohns1420 | 0 | 13,403,502,224 | 40% | ||
whatsup | 0 | 276,653,699,253 | 100% | ||
jamzed | 0 | 30,782,425,039 | 100% | ||
crowdfundedwhale | 0 | 69,545,771,020 | 15% | ||
jumowa | 0 | 96,582,508,843 | 100% | ||
seablue | 0 | 54,517,629,738 | 100% | ||
wilbur | 0 | 43,536,152,013 | 100% | ||
mathworksheets | 0 | 92,952,359,918 | 100% | ||
helo | 0 | 13,353,806,095 | 100% | ||
bluemist | 0 | 122,314,381,841 | 100% | ||
yanes94 | 0 | 20,724,437,935 | 100% | ||
mydivathings | 0 | 642,965,151 | 1% | ||
alexzicky | 0 | 11,984,839,362 | 25% | ||
crokkon | 0 | 49,388,443,137 | 100% | ||
kaliju | 0 | 283,283,743,366 | 100% | ||
alanzheng | 0 | 491,813,516 | 7.1% | ||
steemfleamarket | 0 | 9,908,897,001 | 100% | ||
cryptorg | 0 | 26,112,914,657 | 100% | ||
bycoleman | 0 | 12,748,368,635 | 25% | ||
acknowledgement | 0 | 509,464,747 | 10% | ||
beat-the-bookies | 0 | 2,748,707,690 | 100% | ||
choibo21c | 0 | 787,907,515 | 100% | ||
imowaisab | 0 | 0 | 100% | ||
lusinehakobyan | 0 | 581,918,941 | 100% | ||
botreporter | 0 | 13,397,121,259 | 50% | ||
zenbot | 0 | 143,146,967 | 100% | ||
askmecr | 0 | 116,065,518 | 100% | ||
askmecryp | 0 | 113,622,026 | 100% | ||
askmecrypto | 0 | 598,271,061 | 100% | ||
love-bot | 0 | 33,816,113,876 | 36% | ||
reviewme | 0 | 1,532,192,655 | 100% |
Nice organized post, but while I follow your posts I must say that I still face some issues to understanding the tools and their use. Maybe in the overview you can put up some examples and explain at what the tool is used for in a more "human" way as I would really like to learn, but not sure from were to start when I find such information. I know that it all makes sense for you as you are like the fish in the water with all these technologies and tools, but I think that explaining a little bit with a broad sense would make others follow and try these new things. Thanks, nevertheless!
author | cryptorg |
---|---|
permlink | re-inertia-regult-rb-proxy-sentinel-20180628t190308057z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2018-06-28 19:03:09 |
last_update | 2018-06-28 19:03:57 |
depth | 1 |
children | 2 |
last_payout | 2018-07-05 19:03:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 3.997 HBD |
curator_payout_value | 1.330 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 591 |
author_reputation | 8,806,415,131,458 |
root_title | "regult.rb - Proxy Sentinel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,652,555 |
net_rshares | 2,157,257,573,229 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
inertia | 0 | 2,157,257,573,229 | 100% |
It solves a problem that cannot be solved by typical methods. In this case, say I want to know all of the accounts that proxy their witness votes to me at any given time. The blockchain knows, but itβs not telling. This script figures it out without needing to read the entire 824 days worth of blocks from beginning to end.
author | inertia |
---|---|
permlink | re-cryptorg-re-inertia-regult-rb-proxy-sentinel-20180629t044945783z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2018-06-29 04:49:45 |
last_update | 2018-06-29 04:49:45 |
depth | 2 |
children | 1 |
last_payout | 2018-07-06 04:49:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 327 |
author_reputation | 346,568,901,399,561 |
root_title | "regult.rb - Proxy Sentinel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,696,230 |
net_rshares | 0 |
Nice trick to get that info revealed using this script, thanks for the info!
author | cryptorg |
---|---|
permlink | re-inertia-re-cryptorg-re-inertia-regult-rb-proxy-sentinel-20180629t160018747z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2018-06-29 16:00:18 |
last_update | 2018-06-29 16:00:18 |
depth | 3 |
children | 0 |
last_payout | 2018-07-06 16:00:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 76 |
author_reputation | 8,806,415,131,458 |
root_title | "regult.rb - Proxy Sentinel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,759,692 |
net_rshares | 0 |
I'm learning so much from your commits @inertia! Thank you for all your work man. By the way, a question I've been meaning to ask: why did you go with Ruby to begin with? Did you know how to code in ruby before? If I understand it correctly, there are things like SteemPy that can achieve similar results, correct? Just curious to know your reasons from a programmer's perspective. Thanks again! <center><sup><sub>CREATE YOUR OWN @REVIEWME PROFILE TO START EARNING *CREDIBILITY STARS* FROM THE COMMUNITY! [CREATING YOUR PROFILE IS EASY! JUST FOLLOW THE STEPS HERE](https://steemit.com/reviewme/@reviewme/how-to-create-your-very-own-reviewme-page-start-earning-credibility-stars-get-reviewed-by-steemians) β(ΛβΏΛc) [You can trade your earned credstars for SBD!](https://steemit.com/reviewme/@reviewme/your-reputation-on-steemit-should-be-rewarded-earn-sbd-with-your-reviewme-profile-41dd9704cbff7) </sub></sup></center>
author | kaliju |
---|---|
permlink | re-inertia-regult-rb-proxy-sentinel-20180628t033551912z |
category | radiator |
json_metadata | {"tags":["radiator"],"users":["inertia","reviewme"],"links":["https://steemit.com/reviewme/@reviewme/how-to-create-your-very-own-reviewme-page-start-earning-credibility-stars-get-reviewed-by-steemians","https://steemit.com/reviewme/@reviewme/your-reputation-on-steemit-should-be-rewarded-earn-sbd-with-your-reviewme-profile-41dd9704cbff7"],"app":"steemit/0.1"} |
created | 2018-06-28 03:36:27 |
last_update | 2018-06-28 03:37:00 |
depth | 1 |
children | 2 |
last_payout | 2018-07-05 03:36:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 921 |
author_reputation | 34,142,096,389,326 |
root_title | "regult.rb - Proxy Sentinel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,562,353 |
net_rshares | 0 |
I've been meaning to post about why I'm into ruby. But in a nutshell, I got into it in 2004 when Ruby on Rails started getting popular. And I've been working with it professionally since 2012.
author | inertia |
---|---|
permlink | re-kaliju-re-inertia-regult-rb-proxy-sentinel-20180628t034728787z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2018-06-28 03:47:27 |
last_update | 2018-06-28 03:47:27 |
depth | 2 |
children | 1 |
last_payout | 2018-07-05 03:47:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.330 HBD |
curator_payout_value | 0.014 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 194 |
author_reputation | 346,568,901,399,561 |
root_title | "regult.rb - Proxy Sentinel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,563,256 |
net_rshares | 138,271,094,413 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
kaliju | 0 | 138,271,094,413 | 50% |
Cool stuff, you're motivating me to learn more and your tools are a dream come true for anyone who's starting to study the steem blockchain and the different languages one can use. A post on your history with Ruby would be nice!
author | kaliju |
---|---|
permlink | re-inertia-re-kaliju-re-inertia-regult-rb-proxy-sentinel-20180628t035855387z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2018-06-28 03:59:30 |
last_update | 2018-06-28 03:59:30 |
depth | 3 |
children | 0 |
last_payout | 2018-07-05 03:59:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 228 |
author_reputation | 34,142,096,389,326 |
root_title | "regult.rb - Proxy Sentinel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,564,248 |
net_rshares | 0 |
@inertia You have received a [random](https://steemit.com/@transparencybot/the-daily-coverup-transparency-under-attack-6-29-18) upvote from @botreporter & @bycoleman because this post did not use any [bidbots](https://steemit.com/introduceyourself/@transparencybot/transparency-bot-is-going-on-line-to-help-fight-the-rampant-rise-in-bitbots-and-their-long-term-devastating-effect-on-our).
author | transparencybot |
---|---|
permlink | re-regult-rb-proxy-sentinel-inertia-botreporter-randomvote |
category | radiator |
json_metadata | {"tags":["botreporter","random-upvote"],"users":["inertia","transparencybot","botreporter","bycoleman","transparencybot"],"links":["https://steemit.com/@transparencybot/the-daily-coverup-transparency-under-attack-6-29-18","https://steemit.com/introduceyourself/@transparencybot/transparency-bot-is-going-on-line-to-help-fight-the-rampant-rise-in-bitbots-and-their-long-term-devastating-effect-on-our"],"app":"null/null","format":"markdown"} |
created | 2018-06-30 02:58:57 |
last_update | 2018-06-30 02:58:57 |
depth | 1 |
children | 2 |
last_payout | 2018-07-07 02:58:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 392 |
author_reputation | -5,641,716,862,244 |
root_title | "regult.rb - Proxy Sentinel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,814,467 |
net_rshares | -86,949,084,112 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
iflagtrash | 0 | -31,052,159,396 | -6% | ||
elsteemo | 0 | -363,194,443 | -100% | ||
abusereports | 0 | -64,616,456,916 | -2% | ||
transparencybot | 0 | 9,082,726,643 | 15% |
@transparencybot you're on the @abusereports naughty list for being a super douche!<br><br>**Bad Steemian! Bad!**
author | abusereports |
---|---|
permlink | abusereports-re-transparencybotre-regult-rb-proxy-sentinel-inertia-botreporter-randomvote |
category | radiator |
json_metadata | "" |
created | 2018-06-30 02:59:06 |
last_update | 2018-06-30 02:59:06 |
depth | 2 |
children | 0 |
last_payout | 2018-07-07 02:59:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 1.331 HBD |
curator_payout_value | 0.436 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 113 |
author_reputation | 199,407,425,243,286 |
root_title | "regult.rb - Proxy Sentinel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,814,479 |
net_rshares | 729,658,110,147 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
berniesanders | 0 | 14,122,579,604 | 5% | ||
nextgencrypto | 0 | 4,109,372,890 | 5% | ||
thecyclist | 0 | 84,809,046,037 | 5% | ||
engagement | 0 | 346,214,217,452 | 5% | ||
thedelegator | 0 | 41,978,907,028 | 5% | ||
ngc | 0 | 238,423,987,136 | 5% |
# Vote for witness @nextgencrypto!<br><br>Thank you for the free promotion @transparencybot and @bycoleman!<br><br>
author | iflagtrash |
---|---|
permlink | iflagtrash-re-transparencybotre-regult-rb-proxy-sentinel-inertia-botreporter-randomvote |
category | radiator |
json_metadata | "" |
created | 2018-06-30 02:59:03 |
last_update | 2018-06-30 02:59:03 |
depth | 2 |
children | 0 |
last_payout | 2018-07-07 02:59:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.783 HBD |
curator_payout_value | 0.256 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 156 |
author_reputation | 14,709,692,204,215 |
root_title | "regult.rb - Proxy Sentinel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,814,473 |
net_rshares | 429,410,445,797 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
berniesanders | 0 | 7,845,879,588 | 3% | ||
nextgencrypto | 0 | 2,285,013,843 | 3% | ||
thecyclist | 0 | 47,116,152,927 | 3% | ||
engagement | 0 | 216,383,966,089 | 3% | ||
thedelegator | 0 | 23,321,621,105 | 3% | ||
ngc | 0 | 132,457,812,245 | 3% |