This content was deleted by the author. You can see it from Blockchain History logs.

New STEEM Blockchain Parser

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

Logo
Center