Skip to content

[MIRROR] Project to make QRL blockchain data accessible in popular databases. So data can be analyzed for projects like Quantascan

License

Notifications You must be signed in to change notification settings

theqrl-community/QRLtoDatabase

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QRLtoDB

The aim for this project is to make QRL blockchain data accessible in popular databases. So data can be analyzed for projects like Quantascan

In progress

  • Currently Postgres, SQL and Mongodb are working
  • Data completeness needs to be checked
  • Script still needs a long run to check for errors
  • Neo4j is not working yet, but in the pipeline

Getting started

Installing

  1. Run a QRL node locally, for more information see How to run a QRL node

  2. Install database and utilities

  1. install utilities

Running

  1. inside directory run:
  • to create env
    pip install pipenv
    pipenv install 
    pipenv shell
    
  • Create database and tables/Collections
    python QRLtoDB.py --create_db -db (your chosen database)
    python QRLtoDB.py --create_tables -db (your chosen database)
    
  • Get the data
    python QRLtoDB.py --get_data -db (your chosen database) -s ~/.qrl/data/state/
    

Arguments

-h, --help            show this help message and exit
--create_db           Create Database and Tables/Collections
--create_tables       Create Tables/Collections
--drop_db             DROPS the entire database !!
--drop_tables         DROPS all Tables/Collections
--truncate_tables     Empty all Tables/Collections
--recreate_tables     Recreate all Tables/Collections
--get_data            Gets blockchain data and stores it in the given Database

-db, --database Choose the database {sqlite,postgres,neo4j,mongodb} 
-s, --source Need to select source (QRL state folder, ex: /home/ubuntu/.qrl/data/state)
-n, --node Choose to run while the node is offline (faster to start up, for dev) {offline}  ! Warning 

Warning

Before using -n offline. the node NEEDS to be stopt. otherwise data is corrupted!

Special thanks

0xFF (https://github.com/0xFF0) for

  • Creating an example for getting blockchain data to sqlite db QRLtoSQLite
  • Creating the script so node can run simultaneously with this script QRL bootstrap

Needing help with

Getting the following data from plyvel.DB

  • BlockDataPoint

  • BlockExtended

    See for more information The qrl API

More information

Quantascan.io

The Quantum resistant Ledger

Discord Chat @12remember

License: MIT

About

[MIRROR] Project to make QRL blockchain data accessible in popular databases. So data can be analyzed for projects like Quantascan

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 93.6%
  • Shell 6.4%