A RESTful API providing routes for blockchain data stored in a native graph database, which is populated by helium-arango-etl
.
Helium's Blockchain API is an effective way to view historical data stored on-chain, but the ledger-based format is less useful for feeding directly into network models. In this project, we propose to build a framework for a graph-based representation of blockchain activity, including Proof of Coverage and Token Flow. By capturing the natural adjacency between hotspots and accounts, we will be able to build machine learning models to, for instance, identify likely "gaming" behavior and predict coverage maps based on hotspot placement.
More details in the full project proposal.
To run helium-arango-http, you will need:
- Read/write access to a running ArangoDB instance that has been configured and populated by the helium-arango-etl service
- If running locally, you can view the Arango WebUI at
http://localhost:8529/
.
- If running locally, you can view the Arango WebUI at
-
Make a copy of
.env.template
called.env
and include the Arango URL and credentials. -
Build/run the app with
docker-compose
(the API runs alongside a redis cache):docker-compose up -d
-
View the Swagger documentation at
http://{domain}:8000/docs
(full API reference coming)
Exploring the Helium Network with Graph Theory
: Blog post inspiring much of this work.evandiewald/helium-arango-etl
: ETL service that converts relational blockchain data into a native graph format for storage in ArangoDB.evandiewald/helium-arango-analysis
: (coming soon) methods and models for running Graph Theory- and Graph Neural Network-based analyses of the Arango graphs using Python-friendly formats, such as networkx and torch-geometric.
Pull requests are welcome, especially when it comes to adding additional interesting queries. The focus of this project is to leverage the native graph format of ArangoDB to run analyses that are not already covered by the Blockchain API, such as token flow and coverage mapping. If you are not familiar with ArangoDB, the AQL query language allows for powerful extraction of adjacencies in the dataset. Build AQL queries in helium_arango_http/arango_queries.py
and add routes to the FastAPI server in helium_arango_http/server.py
.
This project is supported by a grant from the Decentralized Wireless Alliance.