cardano-db-sync
What is cardano-db-sync?
The cardano-db-sync is a node that synchronizes chain data with the PostgreSQL engine. The PostgreSQL engine consists of:
- cardano-db - a PostgreSQL database used by cardano-graphql and cardano-rosetta to retrieve chain data upon request.
- cardano-db-sync that connects directly to the cardano-node following the chain while inserting data directly into the PostgreSQL database.
For more information please see Readme.md. or you can explore Cardano docs.
Prerequisites for running cardano-db-sync
The cardano-db-sync has been built for and tested on Linux and will support Docker as a
target environment. It may also run on Mac OS X or Windows operating systems, but they
are not officially supported.
Running the cardano-db-sync will require the Nix package manager and either
multiple terminals or a multi-terminal emulator such as GNU Screen or tmux or alternatively the entire stack can be build using docker-compose
The cardano-db-sync is designed to work with a locally running Cardano node.
Additionally, the following git repositories cardano-node, cardano-graphql, and cardano-rosetta need to be checked out so that they are all at the same level in your local file directory.
Using the cardano-db-sync
Option 1: To build using Docker (Recommended):
Alternatively, all components are built automatically using docker-compose. To build all components using docker-compose see the following GitHub pages for instructions here
Once you have completed these steps, you will be able to use the PostgreSQL database to view chain information
Option 2: To build the cardano-db-sync using Nix:
Follow the instructions in iohk-nix/docs/nix.md to install Nix and set up the IOHK binary cache.
- Set up and run a local Cardano node
- Set up a new PostgreSQL for Cardano DB Sync
- Set up and run a local Cardano DB Sync node