From 8fd75036be24ff29f29c81928d99bdf2a462149f Mon Sep 17 00:00:00 2001 From: iskay Date: Wed, 7 Aug 2024 14:51:33 -0400 Subject: [PATCH 1/3] update indexer docs --- .../pages/integrating-with-namada/_meta.json | 3 +- .../pages/integrating-with-namada/indexer.mdx | 169 +++++++++++------- .../integrating-with-namada/namadexer.mdx | 110 ++++++++++++ 3 files changed, 215 insertions(+), 67 deletions(-) create mode 100644 packages/docs/pages/integrating-with-namada/namadexer.mdx diff --git a/packages/docs/pages/integrating-with-namada/_meta.json b/packages/docs/pages/integrating-with-namada/_meta.json index a7a66d23..13c33ed3 100644 --- a/packages/docs/pages/integrating-with-namada/_meta.json +++ b/packages/docs/pages/integrating-with-namada/_meta.json @@ -2,5 +2,6 @@ "sdk" : "Using the SDK", "light-sdk": "Using the Light SDK", "indexer": "Using the Indexer", - "interface": "Namada Interface" + "interface": "Namada Interface", + "namadexer": "Namadexer (deprecated)" } diff --git a/packages/docs/pages/integrating-with-namada/indexer.mdx b/packages/docs/pages/integrating-with-namada/indexer.mdx index 89184c41..677b2ba7 100644 --- a/packages/docs/pages/integrating-with-namada/indexer.mdx +++ b/packages/docs/pages/integrating-with-namada/indexer.mdx @@ -1,103 +1,140 @@ import Expandable from '../../components/Expandable'; -import { Callout } from 'nextra-theme-docs' +import { Callout, Steps } from 'nextra-theme-docs' # Namada Indexer -In collaboration with [Zondax](https://zondax.ch/), an indexer for the Namada blockchain has been born. +The [namada-indexer](https://github.com/anoma/namada-indexer) crawls a Namada blockchain to map details such as transactions, validator set updates, POS rewards, +governance proposals and more. It stores the results in a Postgres database where it can be queried via a REST api. -The Namada indexer (a.k.a `namadexer`) constantly queries the Namada blockchain, and together with the [SDK](./sdk.mdx), is able to map blocks, transactions, along with other valuable information into a relational database (postgres). - -This is especially useful for performing analytics over the blockchain, including storing historical data in a way that could be easily queried. +Namada-indexer was created to power the [Namadillo](./interface.mdx) interface; however it can be generally useful for any application that needs to query historical data +or perform analytics over the blockchain. ## Setting up -The namada indexer's source code can be found [here](https://github.com/zondax/namadexer) and is simple to set up. +The *namada-indexer* source code can be found [here](https://github.com/anoma/namada-indexer). -The `namadexer` works best together with [Docker](https://www.docker.com/products/docker-desktop) +It's recommended to use [Docker/Docker Compose](https://www.docker.com/products/docker-desktop) to run the indexer. -```bash -git clone https://github.com/Zondax/namadexer.git -cd namadexer -make compose -``` +### Prerequisites +- *(required)*: an available Namada RPC node +- *(required)*: [Docker and Docker Compose](https://www.docker.com/products/docker-desktop) +- *(optional but recommended)*: [Just](https://github.com/casey/just) -- see the project's README for installation instructions for your system -## Running the server and db -Once the DockerFile has run, it is straightforward to both set up the postgres database as well as the server that will query the database. +### RPC configuration +To configure your RPC node to serve historical data to the indexer, you will need to open its `config.toml` file (located in `~/.local/share/namada/$CHAIN_ID` by default) +and find the setting `storage_read_past_height_limit`. Change the default value of `3600` to an appropriately high number. -Make sure that `postgres` [is installed](https://www.postgresql.org/download/) on the local machine. +If you see the following error in your logs when running the indexer, it indicates that you have this value configured too low: +``` +Info log: RPC error: Cannot query more than 3600 blocks in the past (configured via `shell.storage_read_past_height_limit`)., error code: 1 +``` -**Run postgres in docker** +## Running the indexer +The following steps will help you configure and run *namada-indexer*. + +### Clone repo +Begin by cloning the indexer repo: ```bash -make postgres -# or run (and change arguments, e.g port): -# docker run --name postgres -e POSTGRES_PASSWORD=wow -e POSTGRES_DB=blockchain -p 5432:5432 -d postgres +git clone https://github.com/anoma/namada-indexer.git +cd namada-indexer ``` -Once the postgres server is up and running, it is time to set up the server that will query the postgres db. -Execute the following command in order to set up the server +### Set environment variables +The indexer configuration is stored in its `.env` file, found in the base directory of the repo. Refer to `.env_sample` to see which values can be set. + +Create that file now: ``` -make run_server +cp .env_sample .env ``` -If successful, the server should be running as a daemon on the localhost at port `30303`. - -## Run the indexer - -First, ensure that the `Settings.toml` within `config/Settings.toml` is configured correctly. - - -```toml -log_level = "info" -network = "public-testnet-14" - -[database] -host = "0.0.0.0:5435" -user = "postgres" -password = "wow" -dbname = "blockchain" -# Optional field to configure a timeout if database connection -# fails. -connection_timeout = 20 +It will have the following default values: +``` +DATABASE_URL=postgres://postgres:password@postgres:5432/namada-indexer +TENDERMINT_URL=http://host.docker.internal:27657 +CACHE_URL=redis://dragonfly:6379 +WEBSERVER_PORT=5000 +``` +Change the value of `TENDERMINT_URL` to the url of your RPC node. -[server] -serve_at = "0.0.0.0" -port = 30303 +### (Recommended) Change Postgres username and password +The default username and password (`postgres` and `password` respectively) will work for local development, however they should be changed if your indexer will be publicly accessible. -[indexer] -tendermint_addr = "0.0.0.0" -port = 26657 +First, open the file `docker-compose-db.yml` and change the default values to something more secure: +``` +environment: + POSTGRES_PASSWORD: NEW_PASSWORD + POSTGRES_USER: NEW_USERNAME + PGUSER: NEW_USERNAME + POSTGRES_DB: namada-indexer +``` -[jaeger] -enable = false -host = "localhost" -port = 6831 +Then, update the Postgres url in your `.env` file with the new values. -[prometheus] -host = "0.0.0.0" -port = 9000 +The schema for the url is `postgres://{user_name}:{password}@{host}:{port}/{database_name}` +``` +DATABASE_URL=postgres://NEW_USERNAME:NEW_PASSWORD@postgres:5432/namada-indexer ``` - +### Build the containers +Build the indexer containers by running: +``` +docker compose build +``` - -**Interpreting the toml** +Instead of building yourself, you can check the repo's [container registry](https://github.com/anoma/namada-indexer/pkgs/container/namada-indexer) for +recent images. -It is important to change the following parameters: +### Start the indexer +Start all indexer containers with this command: +``` +just docker-up +``` +You can expect to see some database connection errors in the logs during the time the database is being initialized -- these are normal and will resolve within a couple minutes. + +Assuming you want to keep the indexer running persistently in the background, you will likely want to perform this step using something like `screen` or `tmux`. + +*Eg.* In Ubuntu, using `screen`: +1. Start a new screen session: `screen -S indexer` +2. Start the indexer: `just docker-up` +3. Detach from the session, allowing it to run in the background: Press `Ctrl+A` and then `d` +4. To re-attach to the session at a later time: `screen -d -r indexer` + +Stop the indexer with `Ctrl+c`. Remove all associated data with `docker compose down --volumes`. + -1. `indexer.tendermint_addr` - This should be the address and corresponding port of a synced Namada full node +## REST API +Once the indexer has been started, the `webserver` container will serve requests at the port given by `WEBSERVER_PORT` in the `.env` file. -2. `database.host` - This should be the tcp address (with port) where the postgres database is running. - +Available endpoints are documented in the `swagger.yml` file inside the repo. -Once the setup is complete, it is possible to start the indexer +*Eg.* to query the latest indexed block: +``` +curl localhost:5000/api/v1/chain/block/latest -```bash -make run_indexer +# response +{"block":"163445"} ``` ## Querying the database +You can also query the Postgres database directly. -The pre-defined endpoints to query the database are described in the documentation [here](https://github.com/Zondax/namadexer/blob/main/docs/04-server.md). - +*Eg.* to perform a simple query using `pgcli` on Ubuntu: + +### Install `pgcli` +``` +sudo apt install pgcli +``` +### Connect to the database +(If you changed your Postgres username and/or password above, use the updated values.) +``` +pgcli postgres://postgres:password@localhost:5435/namada-indexer +``` +### Run a query +*Eg.* Find a wrapper transaction by its hash: +``` +SELECT * FROM wrapper_transactions WHERE id = 'cece56db36322f9b0728a0f2e127ef33c410a9fab74e2b9e135f97903c6c2c4e'; +``` + +If you prefer to use a GUI, there are many free options available such as [Beekeeper Studio](https://www.beekeeperstudio.io/get-community) and [pgAdmin](https://www.pgadmin.org/download/). diff --git a/packages/docs/pages/integrating-with-namada/namadexer.mdx b/packages/docs/pages/integrating-with-namada/namadexer.mdx new file mode 100644 index 00000000..251c02b0 --- /dev/null +++ b/packages/docs/pages/integrating-with-namada/namadexer.mdx @@ -0,0 +1,110 @@ +import Expandable from '../../components/Expandable'; +import { Callout } from 'nextra-theme-docs' + +# Namadexer (deprecated) + + +Namadexer has been deprecated and is not compatible with Namada versions later than `v0.31.4`. Please refer to the section [Using the Indexer](./indexer.mdx) instead for +up-to-date instructions on configuring and using a Namada indexer. + +The original documentation for Namadexer follows below for reference purposes only. + + +In collaboration with [Zondax](https://zondax.ch/), an indexer for the Namada blockchain has been born. + +The Namada indexer (a.k.a `namadexer`) constantly queries the Namada blockchain, and together with the [SDK](./sdk.mdx), is able to map blocks, transactions, along with other valuable information into a relational database (postgres). + +This is especially useful for performing analytics over the blockchain, including storing historical data in a way that could be easily queried. + +## Setting up + +The namada indexer's source code can be found [here](https://github.com/zondax/namadexer) and is simple to set up. + +The `namadexer` works best together with [Docker](https://www.docker.com/products/docker-desktop) + +```bash +git clone https://github.com/Zondax/namadexer.git +cd namadexer +make compose +``` + +## Running the server and db +Once the DockerFile has run, it is straightforward to both set up the postgres database as well as the server that will query the database. + +Make sure that `postgres` [is installed](https://www.postgresql.org/download/) on the local machine. + +**Run postgres in docker** +```bash +make postgres +# or run (and change arguments, e.g port): +# docker run --name postgres -e POSTGRES_PASSWORD=wow -e POSTGRES_DB=blockchain -p 5432:5432 -d postgres +``` +Once the postgres server is up and running, it is time to set up the server that will query the postgres db. + +Execute the following command in order to set up the server +``` +make run_server +``` + +If successful, the server should be running as a daemon on the localhost at port `30303`. + +## Run the indexer + +First, ensure that the `Settings.toml` within `config/Settings.toml` is configured correctly. + + +```toml +log_level = "info" +network = "public-testnet-14" + +[database] +host = "0.0.0.0:5435" +user = "postgres" +password = "wow" +dbname = "blockchain" +# Optional field to configure a timeout if database connection +# fails. +connection_timeout = 20 + + +[server] +serve_at = "0.0.0.0" +port = 30303 + +[indexer] +tendermint_addr = "0.0.0.0" +port = 26657 + +[jaeger] +enable = false +host = "localhost" +port = 6831 + +[prometheus] +host = "0.0.0.0" +port = 9000 +``` + + + + +**Interpreting the toml** + +It is important to change the following parameters: + +1. `indexer.tendermint_addr` - This should be the address and corresponding port of a synced Namada full node + +2. `database.host` - This should be the tcp address (with port) where the postgres database is running. + + +Once the setup is complete, it is possible to start the indexer + +```bash +make run_indexer +``` + +## Querying the database + +The pre-defined endpoints to query the database are described in the documentation [here](https://github.com/Zondax/namadexer/blob/main/docs/04-server.md). + + From f36b6101a036ff6038d4eedabc648b60733c6e7b Mon Sep 17 00:00:00 2001 From: iskay Date: Wed, 7 Aug 2024 14:51:33 -0400 Subject: [PATCH 2/3] update indexer docs --- .../pages/integrating-with-namada/_meta.json | 3 +- .../pages/integrating-with-namada/indexer.mdx | 169 +++++++++++------- .../integrating-with-namada/namadexer.mdx | 110 ++++++++++++ 3 files changed, 215 insertions(+), 67 deletions(-) create mode 100644 packages/docs/pages/integrating-with-namada/namadexer.mdx diff --git a/packages/docs/pages/integrating-with-namada/_meta.json b/packages/docs/pages/integrating-with-namada/_meta.json index a7a66d23..13c33ed3 100644 --- a/packages/docs/pages/integrating-with-namada/_meta.json +++ b/packages/docs/pages/integrating-with-namada/_meta.json @@ -2,5 +2,6 @@ "sdk" : "Using the SDK", "light-sdk": "Using the Light SDK", "indexer": "Using the Indexer", - "interface": "Namada Interface" + "interface": "Namada Interface", + "namadexer": "Namadexer (deprecated)" } diff --git a/packages/docs/pages/integrating-with-namada/indexer.mdx b/packages/docs/pages/integrating-with-namada/indexer.mdx index 89184c41..677b2ba7 100644 --- a/packages/docs/pages/integrating-with-namada/indexer.mdx +++ b/packages/docs/pages/integrating-with-namada/indexer.mdx @@ -1,103 +1,140 @@ import Expandable from '../../components/Expandable'; -import { Callout } from 'nextra-theme-docs' +import { Callout, Steps } from 'nextra-theme-docs' # Namada Indexer -In collaboration with [Zondax](https://zondax.ch/), an indexer for the Namada blockchain has been born. +The [namada-indexer](https://github.com/anoma/namada-indexer) crawls a Namada blockchain to map details such as transactions, validator set updates, POS rewards, +governance proposals and more. It stores the results in a Postgres database where it can be queried via a REST api. -The Namada indexer (a.k.a `namadexer`) constantly queries the Namada blockchain, and together with the [SDK](./sdk.mdx), is able to map blocks, transactions, along with other valuable information into a relational database (postgres). - -This is especially useful for performing analytics over the blockchain, including storing historical data in a way that could be easily queried. +Namada-indexer was created to power the [Namadillo](./interface.mdx) interface; however it can be generally useful for any application that needs to query historical data +or perform analytics over the blockchain. ## Setting up -The namada indexer's source code can be found [here](https://github.com/zondax/namadexer) and is simple to set up. +The *namada-indexer* source code can be found [here](https://github.com/anoma/namada-indexer). -The `namadexer` works best together with [Docker](https://www.docker.com/products/docker-desktop) +It's recommended to use [Docker/Docker Compose](https://www.docker.com/products/docker-desktop) to run the indexer. -```bash -git clone https://github.com/Zondax/namadexer.git -cd namadexer -make compose -``` +### Prerequisites +- *(required)*: an available Namada RPC node +- *(required)*: [Docker and Docker Compose](https://www.docker.com/products/docker-desktop) +- *(optional but recommended)*: [Just](https://github.com/casey/just) -- see the project's README for installation instructions for your system -## Running the server and db -Once the DockerFile has run, it is straightforward to both set up the postgres database as well as the server that will query the database. +### RPC configuration +To configure your RPC node to serve historical data to the indexer, you will need to open its `config.toml` file (located in `~/.local/share/namada/$CHAIN_ID` by default) +and find the setting `storage_read_past_height_limit`. Change the default value of `3600` to an appropriately high number. -Make sure that `postgres` [is installed](https://www.postgresql.org/download/) on the local machine. +If you see the following error in your logs when running the indexer, it indicates that you have this value configured too low: +``` +Info log: RPC error: Cannot query more than 3600 blocks in the past (configured via `shell.storage_read_past_height_limit`)., error code: 1 +``` -**Run postgres in docker** +## Running the indexer +The following steps will help you configure and run *namada-indexer*. + +### Clone repo +Begin by cloning the indexer repo: ```bash -make postgres -# or run (and change arguments, e.g port): -# docker run --name postgres -e POSTGRES_PASSWORD=wow -e POSTGRES_DB=blockchain -p 5432:5432 -d postgres +git clone https://github.com/anoma/namada-indexer.git +cd namada-indexer ``` -Once the postgres server is up and running, it is time to set up the server that will query the postgres db. -Execute the following command in order to set up the server +### Set environment variables +The indexer configuration is stored in its `.env` file, found in the base directory of the repo. Refer to `.env_sample` to see which values can be set. + +Create that file now: ``` -make run_server +cp .env_sample .env ``` -If successful, the server should be running as a daemon on the localhost at port `30303`. - -## Run the indexer - -First, ensure that the `Settings.toml` within `config/Settings.toml` is configured correctly. - - -```toml -log_level = "info" -network = "public-testnet-14" - -[database] -host = "0.0.0.0:5435" -user = "postgres" -password = "wow" -dbname = "blockchain" -# Optional field to configure a timeout if database connection -# fails. -connection_timeout = 20 +It will have the following default values: +``` +DATABASE_URL=postgres://postgres:password@postgres:5432/namada-indexer +TENDERMINT_URL=http://host.docker.internal:27657 +CACHE_URL=redis://dragonfly:6379 +WEBSERVER_PORT=5000 +``` +Change the value of `TENDERMINT_URL` to the url of your RPC node. -[server] -serve_at = "0.0.0.0" -port = 30303 +### (Recommended) Change Postgres username and password +The default username and password (`postgres` and `password` respectively) will work for local development, however they should be changed if your indexer will be publicly accessible. -[indexer] -tendermint_addr = "0.0.0.0" -port = 26657 +First, open the file `docker-compose-db.yml` and change the default values to something more secure: +``` +environment: + POSTGRES_PASSWORD: NEW_PASSWORD + POSTGRES_USER: NEW_USERNAME + PGUSER: NEW_USERNAME + POSTGRES_DB: namada-indexer +``` -[jaeger] -enable = false -host = "localhost" -port = 6831 +Then, update the Postgres url in your `.env` file with the new values. -[prometheus] -host = "0.0.0.0" -port = 9000 +The schema for the url is `postgres://{user_name}:{password}@{host}:{port}/{database_name}` +``` +DATABASE_URL=postgres://NEW_USERNAME:NEW_PASSWORD@postgres:5432/namada-indexer ``` - +### Build the containers +Build the indexer containers by running: +``` +docker compose build +``` - -**Interpreting the toml** +Instead of building yourself, you can check the repo's [container registry](https://github.com/anoma/namada-indexer/pkgs/container/namada-indexer) for +recent images. -It is important to change the following parameters: +### Start the indexer +Start all indexer containers with this command: +``` +just docker-up +``` +You can expect to see some database connection errors in the logs during the time the database is being initialized -- these are normal and will resolve within a couple minutes. + +Assuming you want to keep the indexer running persistently in the background, you will likely want to perform this step using something like `screen` or `tmux`. + +*Eg.* In Ubuntu, using `screen`: +1. Start a new screen session: `screen -S indexer` +2. Start the indexer: `just docker-up` +3. Detach from the session, allowing it to run in the background: Press `Ctrl+A` and then `d` +4. To re-attach to the session at a later time: `screen -d -r indexer` + +Stop the indexer with `Ctrl+c`. Remove all associated data with `docker compose down --volumes`. + -1. `indexer.tendermint_addr` - This should be the address and corresponding port of a synced Namada full node +## REST API +Once the indexer has been started, the `webserver` container will serve requests at the port given by `WEBSERVER_PORT` in the `.env` file. -2. `database.host` - This should be the tcp address (with port) where the postgres database is running. - +Available endpoints are documented in the `swagger.yml` file inside the repo. -Once the setup is complete, it is possible to start the indexer +*Eg.* to query the latest indexed block: +``` +curl localhost:5000/api/v1/chain/block/latest -```bash -make run_indexer +# response +{"block":"163445"} ``` ## Querying the database +You can also query the Postgres database directly. -The pre-defined endpoints to query the database are described in the documentation [here](https://github.com/Zondax/namadexer/blob/main/docs/04-server.md). - +*Eg.* to perform a simple query using `pgcli` on Ubuntu: + +### Install `pgcli` +``` +sudo apt install pgcli +``` +### Connect to the database +(If you changed your Postgres username and/or password above, use the updated values.) +``` +pgcli postgres://postgres:password@localhost:5435/namada-indexer +``` +### Run a query +*Eg.* Find a wrapper transaction by its hash: +``` +SELECT * FROM wrapper_transactions WHERE id = 'cece56db36322f9b0728a0f2e127ef33c410a9fab74e2b9e135f97903c6c2c4e'; +``` + +If you prefer to use a GUI, there are many free options available such as [Beekeeper Studio](https://www.beekeeperstudio.io/get-community) and [pgAdmin](https://www.pgadmin.org/download/). diff --git a/packages/docs/pages/integrating-with-namada/namadexer.mdx b/packages/docs/pages/integrating-with-namada/namadexer.mdx new file mode 100644 index 00000000..251c02b0 --- /dev/null +++ b/packages/docs/pages/integrating-with-namada/namadexer.mdx @@ -0,0 +1,110 @@ +import Expandable from '../../components/Expandable'; +import { Callout } from 'nextra-theme-docs' + +# Namadexer (deprecated) + + +Namadexer has been deprecated and is not compatible with Namada versions later than `v0.31.4`. Please refer to the section [Using the Indexer](./indexer.mdx) instead for +up-to-date instructions on configuring and using a Namada indexer. + +The original documentation for Namadexer follows below for reference purposes only. + + +In collaboration with [Zondax](https://zondax.ch/), an indexer for the Namada blockchain has been born. + +The Namada indexer (a.k.a `namadexer`) constantly queries the Namada blockchain, and together with the [SDK](./sdk.mdx), is able to map blocks, transactions, along with other valuable information into a relational database (postgres). + +This is especially useful for performing analytics over the blockchain, including storing historical data in a way that could be easily queried. + +## Setting up + +The namada indexer's source code can be found [here](https://github.com/zondax/namadexer) and is simple to set up. + +The `namadexer` works best together with [Docker](https://www.docker.com/products/docker-desktop) + +```bash +git clone https://github.com/Zondax/namadexer.git +cd namadexer +make compose +``` + +## Running the server and db +Once the DockerFile has run, it is straightforward to both set up the postgres database as well as the server that will query the database. + +Make sure that `postgres` [is installed](https://www.postgresql.org/download/) on the local machine. + +**Run postgres in docker** +```bash +make postgres +# or run (and change arguments, e.g port): +# docker run --name postgres -e POSTGRES_PASSWORD=wow -e POSTGRES_DB=blockchain -p 5432:5432 -d postgres +``` +Once the postgres server is up and running, it is time to set up the server that will query the postgres db. + +Execute the following command in order to set up the server +``` +make run_server +``` + +If successful, the server should be running as a daemon on the localhost at port `30303`. + +## Run the indexer + +First, ensure that the `Settings.toml` within `config/Settings.toml` is configured correctly. + + +```toml +log_level = "info" +network = "public-testnet-14" + +[database] +host = "0.0.0.0:5435" +user = "postgres" +password = "wow" +dbname = "blockchain" +# Optional field to configure a timeout if database connection +# fails. +connection_timeout = 20 + + +[server] +serve_at = "0.0.0.0" +port = 30303 + +[indexer] +tendermint_addr = "0.0.0.0" +port = 26657 + +[jaeger] +enable = false +host = "localhost" +port = 6831 + +[prometheus] +host = "0.0.0.0" +port = 9000 +``` + + + + +**Interpreting the toml** + +It is important to change the following parameters: + +1. `indexer.tendermint_addr` - This should be the address and corresponding port of a synced Namada full node + +2. `database.host` - This should be the tcp address (with port) where the postgres database is running. + + +Once the setup is complete, it is possible to start the indexer + +```bash +make run_indexer +``` + +## Querying the database + +The pre-defined endpoints to query the database are described in the documentation [here](https://github.com/Zondax/namadexer/blob/main/docs/04-server.md). + + From a47312d53bb15d4310f965cea6b6aa8eaebd576d Mon Sep 17 00:00:00 2001 From: iskay Date: Thu, 8 Aug 2024 09:19:41 -0400 Subject: [PATCH 3/3] add undexer --- .../pages/integrating-with-namada/indexer.mdx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/docs/pages/integrating-with-namada/indexer.mdx b/packages/docs/pages/integrating-with-namada/indexer.mdx index 677b2ba7..54e68343 100644 --- a/packages/docs/pages/integrating-with-namada/indexer.mdx +++ b/packages/docs/pages/integrating-with-namada/indexer.mdx @@ -1,13 +1,26 @@ import Expandable from '../../components/Expandable'; import { Callout, Steps } from 'nextra-theme-docs' -# Namada Indexer +# Namada Indexers + +There are two actively maintained indexers built for Namada -- *Undexer* and *namada-indexer*. + +## Undexer + +[Undexer](https://github.com/hackbg/undexer) is a community-led project developed by the Mandragora and HackBG teams. It indexes transaction details, validator set updates, +governance proposals and more, and serves the indexed data via a REST api. + +Detailed installation and usage instructions for *Undexer* can be found on the project's [repo](https://github.com/hackbg/undexer). + +## Namada-Indexer The [namada-indexer](https://github.com/anoma/namada-indexer) crawls a Namada blockchain to map details such as transactions, validator set updates, POS rewards, governance proposals and more. It stores the results in a Postgres database where it can be queried via a REST api. -Namada-indexer was created to power the [Namadillo](./interface.mdx) interface; however it can be generally useful for any application that needs to query historical data -or perform analytics over the blockchain. +*Namada-indexer* was created to power the [Namadillo](./interface.mdx) interface; however it can be generally useful for any application that needs to query historical data +or perform analytics over the blockchain. + +The remainder of this page will detail the process of configuring, running, and querying *namada-indexer*. ## Setting up