
Hi, everyone!
made a fantastic job doing gridcoinstats. But, you know, sometimes it's never enough! I was looking for some stats that are not available on gridcoinstats. I will not detail what I wanted to build on this post because I'm still developing it! Maybe I'll post something if I find it interesting.
First, I was playing with the daemon, but it's not that easy to fetch information on the blockchain if you only count on the client. RPC commands are clearly not made to query a lot of information and it takes ages to fetch it.
So, I was looking for a database already made or something to store the data and fetch information. After digging out the internet for some times, I found the Haskell script of . I had never worked with Haskell before. After looking at the syntax I told myself that I would spend hours debugging if something went wrong with this code. Sorry
, but Haskell is unreadable for me! ;)
Anyway, I decided to build my own database with Python3 and SQLite3. SQLite is not the fastest database of the world, but at least it's quick to build, quite fast to access and you have all the power given by SQL to query the data you need.
So after spending a few days making the script and letting it suck all the blockchain block by block. I finally have my database to work on!
SQL Database Released
After building this database I decided to release it. So, if you want to make fancy stats about the Gridcoin blockchain, you can start with that!
The script that I used to build the database is available here. The database can be used without the daemon but if you want to sync your database, it's mandatory to have the daemon running.
Since it takes an incredible amount of time to sync a million blocks. I've uploaded an archive of the database available here, download it if you want to reduce the sync time. The database size is about 1Go and 370Mo for the archive.
Disclaimer:
- It's not an official database.
- Use this database at your own risk.
- It's your responsibility to check if this database is not corrupt/incorrect/inaccurate.
- You can tell me if something goes wrong.
- You can fix it if something goes wrong.
EDIT
I may have shouted victory too quickly ...
After playing some time on my database, I found a bug that i'm solving! The database is still in development. I'll let you know when I have news!

