New STEEM Blockchain Parser

in #utopian-io7 years ago (edited)

You want to build your own database with the data of the STEEM Blockchain?
From now on it will be easier.

Since the SBDS runs very unstable we started to build a new parser for STEEMPUNK-NET a few weeks ago which inserts the STEEM blockchain data into a MySQL database.

Since more than two weeks our parser is now active in STEEMPUNK-NET, the live test is running and our delay has been pressed down from several hours to 10 seconds.

Features

What feature(s) did you add?

  • It is based on the structure of SBDS (at the moment)
  • It is used currently a MySQL database
  • Parse a single block
  • Parse a range of Blocks
  • Parse latest blocks
  • Easily readable output

How did you implement it/them?

A complete commit log can you find here: https://github.com/pcsg/steemit-blockchain-parser/commits/master


Installation / Usage

Manually

Step 1 Clone the repository

git clone git@dev.quiqqer.com:pcsg/steem-blockchain-parser.git

Step 2 Edit the config file

mv etc/config.ini.php.dist etc/config.ini.php
nano etc/config.ini.php

Step 3 Create Database

  • Create da Database
  • Import the SQL File sql/createTables.sql

Step 4 Run composer

composer install

Step 5 Run the parser

php run.php

Docker

We provide a docker container for ease of use.
Change the environment variables and run the following command to get the container up and running.

docker run --name steemit-parser \
  -e DB_HOST=<changeme> \
  -e DB_PORT=<changeme> \
  -e DB_USER=<changeme> \
  -e DB_PASSWORD=<changeme> \
  -e DB_NAME=<changeme> \
  --restart=unless-stopped \
  bogner/steem-blockchain-parser

Hint: To run the container in the background you need to add the -d flag to the docker run command.

You can find the installation instruction in the README, too.

Future

Since we needed this for STEEMPUNK-NET as quickly as possible, we oriented ourselves primarily on the structure of the SBDS. However, we will make this flexible in the future.

The PSBP (PCSG STEEM Blockchain Parser) will get a modular structure and an API in which it is possible to react only to certain block types. The aim is to store data in the database according to own wishes.

In addition, we would like to support several database types in the future. Not only MySQL should be supported, every database that supports the PDO should be able to be used by PHP (PostgreSQL etc).

Thanks for reading
hen and Flo, for PCSG Developers



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

Please include the list of commit relevant to the post in your next contribution.

  • How much space would be required to host the entire blockchain?
  • How much time does it take to load?
  • Do you process every type of transactions on the blockchain?

You can contact us on Discord.
[utopian-moderator]

Loading...

I like this,,

More stablity for steem is a good thing it lifts the whole plattform

Yes, we hope it helps some developers and this will bring even more enhancements / ideas for STEEM. With a real database you can do more, instead of always go directly at the blockchain. :-)

We can also be found in the SPN discord server, if anyone has any questions:
https://discord.gg/p2bUGCn

Hey @pcsg-dev I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Utopian Witness!

Participate on Discord. Lets GROW TOGETHER!

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Thank you :-)