Skip to content

hackbg/undexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Undexer

This is the Undexer. It decodes historical data from a Namada node, and caches it into PostgreSQL, so that you don't have to.

Undexer is the pilot project for Fadroma 2.0. See @fadroma/namada and @hackbg/borshest.

API reference and endpoints

For all endpoints available please refer to the OpenAPI specs.

Running

Dockerless staging deployment

Requires:

  • Git
  • Node.js (tested with 22.3.0)
  • PNPM (tested with 9.4.0)
  • Rust (tested with 1.79.0)
  • wasm-pack (tested with 0.12.1)
  • protoc (tested with 25.3)
  • PostgreSQL (tested with 16.2)

Setup:

git clone --recursive https://github.com/hackbg/undexer
cd undexer
pnpm i
pnpm build:wasm:dev # or pnpm build:wasm:prod
pnpm start # concurrently runs api and indexer
  • You may need to create an .env file to provide at least DATABASE_URL (for connecting to your PostgreSQL instance). See src/config.js for other environment variables.

  • You can use Docker Compose to launch Postgres and hack on the rest outside of the container.

Dockerized staging deployment

Requires:

  • Git
  • Docker (tested with 24.0.9)
  • Docker Compose (tested with 2.28.1, should come built-in to Docker)
  • Just (optional but recommended; tested with 1.29.1)

Setup:

git clone --recursive https://github.com/hackbg/undexer
cd undexer
just up # or `docker compose up`, etc.

Production deployment

  • We use NixOS/systemd/Docker to run this in production.

  • Undexer does not manage TLS certificates or terminate HTTPS. We use NGINX and automatic ACME/LetsEncrypt cert management provided by NixOS.

Troubleshooting

The submodule

./fadroma is a Git submodule. Handle accordingly. For example, if the directory is empty, this usually means you cloned the Undexer repo without submodules. To populate it, use:

git submodule update --init --recursive

Others

If you catch anything breaking, get in touch by filing an issue or PR in this repository.