Meeseeker Steem Engine Support - 0.0.6

in utopian-io •  6 years ago 

As of 0.0.6, you can now sync the Steem Engine sidechain. So not only can you subscribe to the Steem Engine custom_json ids on the mainnet, you can also get the responses from contracts once they've been processed on the Steem Engine sidechain.

One thing this might be handy for is when you write an app that needs to confirm. Just broadcasting to the mainnet isn't enough. But if you're running meeseeker, you can subscribe to the steem_engine:transaction redis channel and once the transaction confirms, your app will be notified.

Or, if you're only interested in certain contracts and/or actions (e.g. all market actions or only specific actions like market:sell, you can subscribe to those specific channels as well.

Related commit: https://github.com/inertia186/meeseeker/commit/a509d528fb983caa973f83952a20c73128966bc8

What Changed

Since accessing the sidechain is achieved by making requests to api.steem-engine.com, I added a simple Agent class to meeseeker called Meeseeker::SteemEngine::Agent. This manages the specific RPC requests needed to stream the sidechain.

image.png

This agent is used by Meeseeker::SteemEngine::FollowerJob to poll the sidechain for new blocks as they happen.

image.png

I've updated the README.md file to include the following:


Steem Engine Support

As of v0.0.6, meeseeker can also follow the Steem Engine side-chain. This is optional and requires a separate process.

To sync Steem Engine to your local redis source (also defaults to redis://127.0.0.1:6379/0):

meeseeker sync steem_engine

When running meeseeker sync steem_engine, the following channels are available:

  • steem_engine:block
  • steem_engine:transaction
  • steem_engine:market:buy
  • steem_engine:market:cancel
  • steem_engine:market:sell
  • steem_engine:sscstore:buy
  • steem_engine:steempegged:buy
  • steem_engine:steempegged:removeWithdrawal
  • steem_engine:steempegged:withdraw
  • steem_engine:tokens:create
  • steem_engine:tokens:issue
  • steem_engine:tokens:transfer
  • steem_engine:tokens:updateMetadata
  • steem_engine:tokens:updateUrl

The above "channel/action" patterns are the ones that are known that the time of writing. In addition, if a new contract is added or updated, meeseeker will automatically publish to these corresponding channels as they appear, without needing to update or even restart meeseeker.

See main section on Using SUBSCRIBE.

Once your SteemEngine sync has started, you can begin doing queries against redis, for example, in the redis-cli:

redis-cli --scan --pattern 'steem_engine:*:tokens:transfer'

This returns the keys, for example:

steem_engine:18000:d414373db84e6a642f289641ea1433fda22b8a4d:0:tokens:transfer
steem_engine:18004:c9e06c8449d2d04b4a0a31ec7b80d2f62009a5f0:0:tokens:transfer
steem_engine:17994:faf097391760ad896b19d5854e2822f62dee284b:0:tokens:transfer

See main section on Using SCAN.


Other than a new namespace, the process for pub/sub and scan is the same as the mainnet.

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:  
  • Great article with images, code samples and instructions.
  • Great exposure for the side chain steem-engine
  • could use more comments in the code.

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!

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

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

Evaluation of your UA score:
  • You've built up a nice network.
  • The readers appreciate your great work!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

Hi, @inertia!

You just got a 1.24% 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.

This post has been included in the latest edition of SoS Daily News - a digest of all the latest news on the Steem blockchain.

Hey, @inertia!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!