Skip to content

Syncs all the core public info from an ixo blockchain to an instance of PostgreSQL.

License

Notifications You must be signed in to change notification settings

ixofoundation/ixo-blocksync-core

Repository files navigation

ixo-blocksync-core

ixo GitHub GitHub repo size License: Apache 2.0

Twitter Medium

PostgresExpress.jsNodeJSTypeScriptPrismaDockerGraphQL

Syncs the core info from an ixo blockchain to an instance of PostgreSQL. The core info consists of the Block data, Transactions, Messages and Events.

For now this server doesnt expose any API interfaces as it's purpose is only to generate and keep up to date the ixo-blocksync-core database, we plan on adding API interfaces in the near future

Run

From Source

Requirements

git clone https://github.com/ixofoundation/ixo-blocksync-core.git
cd ixo-blocksync-core/

Copy .env.example to .env and configure. If this step is skipped, ixo-blocksync-core will use .env.example as the configuration by default.

  • Create a database called Blocksync-core
yarn install
yarn prisma:reset
yarn start

Using Docker (with Compose)

Requirements

git clone https://github.com/ixofoundation/ixo-blocksync-core.git
cd ixo-blocksync-core/

Copy .env.example to .env and configure. If this step is skipped, ixo-blocksync will use .env.example as the configuration by default. Don't use quotations when asign env vars for docker
Create a role(e.g. app_user) in the DB for postgress to work

docker build -t ixofoundation/ixo-blocksync-core:latest .
docker compose up -d