jhult / mina-indexer

The Mina Indexer is a re-designed version of the software collectively called the "Mina archive node."

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mina Indexer

Build status

The Mina Indexer is a redesigned version of the software collectively called the "Mina archive node."

Note: As the project is in active development, be aware that the public APIs and functionalities are subject to change.

Motivation

Working with the Mina Archive Node can be complex and time-consuming. It requires the exact configuration of multiple components — a Mina Node, an Archive Node, and a Postgres database — and an in-depth knowledge of SQL and the Mina blockchain.

Additionally, even with a proper setup, the Archive Node system is prone to missing blocks, creating gaps in the data. These gaps require manual intervention for resolution, which adds layers of complexity to the system's management.

A major problem with the Archive Node is its reliance on a pg_dump from a currently active node for initial setup. This approach centralizes data, necessitating trust from the operator's side.

Solution

The Mina Indexer addresses this by simplifying the initial configuration by using precomputed blocks as the source of truth, bypassing the need for external database dumps.

We designed the Mina Indexer to be a comprehensive replacement for the Mina Archive Node, providing an easier-to-use platform with native support for the Rosetta API. We aim to streamline blockchain interaction for developers within the Mina ecosystem by providing developers and operators with a better toolset optimized for the Mina ecosystem.

Getting Started

Prerequisites

  1. Install Nix here.
  2. Enable Flakes using this guide.
  3. Install Direnv.

Building the Project

Run just build to compile the project. This will compile the mina-indexer binary. Run just start-server to start an instance.

Running Tests

Unit Tests

Execute unit tests to validate code functionality with:

just test-unit

Regression Tests

To perform regression tests, which check for new bugs in existing features after updates, use:

just test-regression

Generating OCI Images With Nix

Building the OCI (Docker) image from Nix must happen from an x86-64-linux machine.

Issue the following command to build the image and load it into Docker.

just build-image

License

Copyright 2022-2024 Granola Systems Inc.

This software is licensed under the Apache License, Version 2.0.

Contributing

This project uses C4(Collective Code Construction Contract) process for contributions.

About

The Mina Indexer is a re-designed version of the software collectively called the "Mina archive node."

License:Apache License 2.0


Languages

Language:Rust 93.9%Language:Shell 5.5%Language:Nix 0.4%Language:Just 0.2%