[Accusta for Steem] Now the Accusta system works with the VIZ blockchain. (v1.4.0)

in #utopian-io4 years ago (edited)


https://github.com/semasping/Accusta - Accusta - this is a service with Statistic of Steem Accounts.

In 1.4.0 release of accusta_logo_line_170.png:

  • Clearing code from old commented structures;
  • [viz] add viz blockchain to Accusta system;
  • [viz golos steem] update php-graphene-node-client to version 5.1;
  • [viz golos steem] fix downloading Account History from blockchain;
  • [viz] add checking for new operations types in VIZ accounts history;
  • [viz] rework some part of code for viz blockchain;
  • [viz] edit welcome page;
  • [viz] off some routes while not working good;
  • [viz] rework author reward code for viz blockchain;
  • [viz] add processing for new operations types in VIZ accounts history;
  • [viz] add processing for operations types (committee_worker_cancel_request_transfer) in VIZ accounts history;
  • [viz] fix author rewards;
  • [viz] add benefactor rewards;
  • [viz] add curator rewards;
  • [viz golos steem] - fix ajax load for table. Remove middleware for checking new operations from this requests;
  • [viz golos steem] - fix doubled rewards on charts;

A few words about VIZ blockchain

VIZ.World is Graphene Blockchain based on Golos fork.
There are lots of changes in the blockchain in economic and technic parameters. Here are some of them:

  • Fixed 10% inflation with 1-year rounds;
  • Committee;
  • 2 vote for witnesses per account;
  • Without peg-asset, only 2 assets: liquid token VIZ and SHARES token;

And lot of other changes.
You can find more in the blog: https://steemit.com/@viz.world

Some of technical changes in Accusta associated with connection VIZ.

In the Viz blockchain was renamed lots of operations related account_history, I had to do backward compatibility. Match old and new operation types. For example:

In this code^:
content_benefactor_reward - new operation name in VIZ
comment_benefactor_reward - old operation name in STEEM and GOLOS
and For steem and golos reward was in VESTS, but for VIZ reward in SHARES
By the way I used VESTS field for building charts and summary by months, and now I do additional data conversion:

$trns['op'][1]['SHARES'] = (double)((str_replace(' SHARES', '', $trns['op'][1]['reward'])));
$trns['op'][1]['VESTS'] = (double)((str_replace(' SHARES', '', $trns['op'][1]['reward'])));

That allowed us to use the database aggregation capabilities.
One example:
Curator rewards by months.

One important fix (fix doubled rewards on charts)

It turned out, in charts we always can see double rewards value.
I found it by testing in the VIZ blockchain. There are small amount rewards in VIZ and we can check it easy.
It came because of operation unwind in requests to MongoDB. The operation created double records for processing. In all requests I added a new condition:
'$match' => ['op.VESTS'=>['$gte'=>0]],
Now in processing used only relevant data.

You can find in Accusta for VIZ

Rewards statistic:

  • Author
  • Curator
  • Benefactor
  • Witness

Statistic of Voting for witnesses.

I continue to work about transfer history. There is a lots technical changes in VIZ blockchain, all of this need more time.

It's all for today.

Link to comparing changes for this release:

Welcome to Accusta: https://steemit.accusta.tk

In the future:

  • Changes in the code responsible for the initial data download from the blockchain
  • Some cosmetic changes
  • Add some specific statistics for VIZ:
    • Committee rewards
    • Referral rewards
    • ...

Thank you for your contribution. A lot of work has been done for this contribution. I would suggest you to create a Pull Request for every release, it would be better to track this way. Also, there are a lot of comments or writing written in a different language, why not do language localization.

You are also using equals sign to check steemit or viz, wouldn't it be better to have a global property and then access it 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? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.


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

Hi, @semasping!

You just got a 1.13% 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 just added as new item to timeline of Accusta on Steem Projects.

If you want to be notified about new updates from this project, register on Steem Projects and add Accusta to your favorite projects.

Congratulations @semasping! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 9000 upvotes. Your next target is to reach 10000 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard:

Trick or Treat - Publish your scariest halloween story and win a new badge
SteemitBoard notifications improved

Support SteemitBoard's project! Vote for its witness and get one more award!

Hi @semasping!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @semasping!

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!

Coin Marketplace

STEEM 0.25
TRX 0.07
JST 0.039
BTC 29191.52
ETH 1954.39
USDT 1.00
SBD 2.24