Skip to content
The new Cardano Explorer
Haskell Nix PLpgSQL Shell Other
Branch: master
Clone or download
erikd Merge pull request #198 from input-output-hk/erikd/purge
webapi: Purge unused/unsupported endpoints
Latest commit 3b6d45a Dec 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.buildkite buildkite: Add stack-cabal-sync CI test Sep 27, 2019
cardano-explorer-db db: Add a test for upstream functionality Dec 3, 2019
cardano-explorer-node
cardano-explorer-webapi webapi: Purge unused/unsupported endpoints Dec 6, 2019
config node: Unify config in a single file Nov 20, 2019
doc Rename cardano-explorer to cardano-explorer-webapi Dec 4, 2019
docker cardano-explorer-webapi: rename and utilize in docker config Dec 4, 2019
docs add support for building with nix and CI (#2) Jul 29, 2019
monitoring cardano-exporter: support environment configs Nov 21, 2019
nix dont add postgresql to a test which no longer exists Dec 6, 2019
schema Performance indices migration Nov 26, 2019
scripts scripts/postgresql-setup.sh: Make it work when -tests db is present Nov 27, 2019
.gitattributes First pass at cardano-explorer-db-node program Aug 12, 2019
.gitignore make nix scripts work correctly Sep 16, 2019
Dockerfile cardano-exporter: support environment configs Nov 21, 2019
Readme.md Rename cardano-explorer to cardano-explorer-webapi Dec 4, 2019
bors.toml Nix voodoo Dec 4, 2019
cabal.project
default.nix Nix voodoo Dec 4, 2019
lib.nix Nixify cardano-explorer repo Nov 8, 2019
niv-shell.nix Nixify cardano-explorer repo Nov 8, 2019
release.nix More renaming fixes Dec 4, 2019
shell.nix add support for building with nix and CI (#2) Jul 29, 2019
stack.yaml Rename cardano-explorer to cardano-explorer-webapi Dec 4, 2019
usage.nix node: Split block retrieval and db insert into separate threads Oct 9, 2019

Readme.md

Cardano Explorer

The new cardano-explorer consists of three components:

  • cardano-explorer-db which defines common data types and functions that are shared by the following two components. In particular, it defines the database schema.
  • cardano-explorer-node which acts as a Cardano node, following the chain and inserting date from the chain into a PostgreSQL database.
  • cardano-explorer which serves data from the PostgreSQL database via HTTP.

Architecture

The explorer is written in a highly modular fashion to allow it to be as flexible as possible.

The cardano-explorer-node connects to a locally running cardano-node (ie one connected to other nodes in the Cardano network over the internet with TCP/IP) using a Unix domain socket, retrieves blocks and stores parts of each block in a local PostgreSQL database. The database does not store things like cryptographic signatures but does store enough information to follow the chain of blocks and look at the transactions within blocks.

The PostgreSQL database is designed to be accessed in a read-only fashion from other applications. The database schema is highly normalised which helps prevent data inconsistencies (specifically with the use of foreign keys from one table to another). More user friendly database queries can be implemented using Postgres Views to implement joins between tables.

The cardano-explorer-webapi is a client than serves data from the PostgreSQL database as JSON via a HTTP REST API.

Further Reading

  • BuildingRunning: Building and running the explorer node and webapi.
  • SchemaManagement: How the database schema is managed and modified.
  • Validation: Explanation of validation done by the explorer and assumptions made.
You can’t perform that action at this time.