Meeseeker Witness Schedule Pub/Sub - 0.0.4

in utopian-io •  6 years ago  (edited)

As of 0.0.4, you can now subscribe to the witness schedule to track block production.

Related commit:

https://github.com/inertia186/meeseeker/commit/9999b7b29dd5bc84866d825e5649674c3bbd6743

What Changed

I added a new job called Meeseeker::WitnessScheduleJob that will publish to a channel called steem:witness:schedule. Roughly every 63 seconds, when a new schedule is created by the blockchain, this channel will trigger an event.

image.png

Under the hood, you can see we're requesting the witness schedule from the API.

After a few checks to make sure we're not processing the next schedule too early, we publish the schedule to the steem:witness:schedule channel and continue to the next schedule.

image.png

This is a separate process from the normal meeseeker sync. I've updated the README.md file to include the following:


Witness Schedule

When running meeseeker witness:schedule, the steem:witness:schedule channel is available. This is offered as a separate command because most applications don't need to worry about this level of blockchain logistics.

For example, from redis-cli, if we wanted to subscribe to the witness schedule:

$ redis-cli
127.0.0.1:6379> subscribe steem:witness:schedule
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "steem:witness:schedule"
3) (integer) 1
1) "message"
2) "steem:witness:schedule"
3) "{\"id\":0,\"current_virtual_time\":\"415293532210075480213212125\",\"next_shuffle_block_num\":30035208,\"current_shuffled_witnesses\":[\"thecryptodrive\",\"timcliff\",\"utopian-io\",\"themarkymark\",\"aggroed\",\"smooth.witness\",\"someguy123\",\"gtg\",\"followbtcnews\",\"yabapmatt\",\"therealwolf\",\"ausbitbank\",\"curie\",\"clayop\",\"drakos\",\"blocktrades\",\"good-karma\",\"roelandp\",\"lukestokes.mhth\",\"liondani\",\"anyx\"],\"num_scheduled_witnesses\":21,\"elected_weight\":1,\"timeshare_weight\":5,\"miner_weight\":1,\"witness_pay_normalization_factor\":25,\"median_props\":{\"account_creation_fee\":{\"amount\":\"3000\",\"precision\":3,\"nai\":\"@@000000021\"},\"maximum_block_size\":65536,\"sbd_interest_rate\":0,\"account_subsidy_budget\":797,\"account_subsidy_decay\":347321},\"majority_version\":\"0.20.8\",\"max_voted_witnesses\":20,\"max_miner_witnesses\":0,\"max_runner_witnesses\":1,\"hardfork_required_witnesses\":17,\"account_subsidy_rd\":{\"resource_unit\":10000,\"budget_per_time_unit\":797,\"pool_eq\":157691079,\"max_pool_size\":157691079,\"decay_params\":{\"decay_per_time_unit\":347321,\"decay_per_time_unit_denom_shift\":36},\"min_decay\":0},\"account_subsidy_witness_rd\":{\"resource_unit\":10000,\"budget_per_time_unit\":996,\"pool_eq\":9384019,\"max_pool_size\":9384019,\"decay_params\":{\"decay_per_time_unit\":7293741,\"decay_per_time_unit_denom_shift\":36},\"min_decay\":257},\"min_witness_account_subsidy_decay\":0}"

To update your gem:

gem update meeseeker

Previous posts:

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  • Good article with an image and code samples.
  • There is a good amount of comments in the code.
  • More commits would allow better separation of concerns.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @helo! Keep up the good work!

Hi, @inertia!

You just got a 1.38% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Hi @inertia!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 6.591 which ranks you at #143 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 201 contributions, your post is ranked at #18.

Evaluation of your UA score:
  • You've built up a nice network.
  • The readers appreciate your great work!
  • Good user engagement!

Feel free to join our @steem-ua Discord server

This post has been included in the latest edition of SoS Daily News - a digest of all you need to know about the State of Steem.

  ·  6 years ago Reveal Comment