Skip to content
Blockchain follower that follows and stores the Helium blockchain
Erlang PLpgSQL Makefile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.buildkite
config
include
migrations
priv
scripts/extensions
src
.env.template
.gitignore
CONTRIBUTING.md
LICENSE
Makefile
README.md
rebar.config
rebar.config.script
rebar.lock
rebar3

README.md

blockchain-etl

Build status

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.

Developer Usage

  • Clone this repository

  • Create .env file by copying .env.template and editing it to reflect your postgres and other keys and credentials

    Note: In order for resets to work the postgres user specified in the .env file needs to exist and have CREATEDB permissions.

  • Run make release in the top level folder

  • Run make reset to 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.

    Running a make reset will keep the existing downloaded blocks but replay the ledger so the application can re-play the blocks into the database

  • Run make start to start the application. Logs will be at _build/default/rel/blockchain_etl/log/*.

Once started the application will start syncing the blockchain and loading blocks into the attached database.

WARNING

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.

IN PROGRESS

  • Ingest of new transactions (aka pending transactions)
  • Reverse geo-coding
  • Docker setup
You can’t perform that action at this time.