The aim for this project is to make QRL blockchain data accessible in popular databases. So data can be analyzed for projects like Quantascan
- 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
-
Run a QRL node locally, for more information see How to run a QRL node
-
Install database and utilities
- Postgres, SQL, Mongodb on Windows SUBsystem Getting started with databases on windows subsystem for linux
- Neo4J Get Neo4j
- install utilities
- Postgres pgadmin
- Sqlite sqlitebrowser
- 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/
-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
Before using -n offline. the node NEEDS to be stopt. otherwise data is corrupted!
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
Getting the following data from plyvel.DB
-
BlockDataPoint
-
BlockExtended
See for more information The qrl API
Discord Chat @12remember