This is an Erlang application to follow the Helium blockchain and store it in a Postgres database. This ingest service tracks all blocks as they're addded to the blockchain by running a full node and listening for new block events.
Clone this repository
.envfile by copying
.env.templateand editing it to reflect your postgres and other keys and credentials
Note: In order for resets to work the postgres user specified in the
.envfile needs to exist and have
make releasein the top level folder
make resetto initialize the database and reset the ledger. You will need to run a make reset every time the schema or code importing the blockchain is changed.
make resetwill keep the existing downloaded blocks but replay the ledger so the application can re-play the blocks into the database
make startto start the application. Logs will be at
Once started the application will start syncing the blockchain and loading blocks into the attached database.
Schema changes will happen in this repo as we flesh out the
corresponding APIs. A schema change will require a
make reset to
reset the database and associated blockchain ledger. On a reset the
blockchain store itself is not affected but the ledger is replayed
which allows the application to reload the database.
- Ingest of new transactions (aka pending transactions)
- Reverse geo-coding
- Docker setup