A simple application indexing custom data from the stardust-migration objects. Please note that a running fullnode instance is required for syncing the data.
To build the Docker image (forcing a fresh build without using cached layers), run:
docker compose build --no-cache
To start the container in detached mode, run:
docker compose up -d
To stop the running container and remove the associated resources, use:
docker compose down
The application uses a pre-existing .env
file for configuration. You can modify it if needed.
OBJECTS_DB_URL
: The SQLite database URL. Used to store Migrations Objects.PROGRESS_STORE_DB_URL
: The SQLite database URL. Used to store latest synced checkpoints.REMOTE_STORE_URL
: The fullnode REST API URL used to fetch checkpoint data and synchronize.REST_API_SOCKET_ADDRESS
: Address where the REST API will listen (e.g.,0.0.0.0:3000
).METRICS_SOCKET_ADDRESS
: Address where the Prometheus metrics will be exposed (e.g.,0.0.0.0:3001
).
LOG_LEVEL
: Logging level (e.g.,INFO
,DEBUG
).DB_CONNECTION_TIMEOUT_SECS
: Timeout (in seconds) for database connections.DB_POOL_SIZE
: Maximum database connection pool size.DOWNLOAD_QUEUE_SIZE
: Max queue size of checkpoints for the Indexer to process.CHECKPOINT_PROCESSING_BATCH_DATA_LIMIT
: Limit indexing parallelism on big checkpoints to avoid OOM, by limiting the total size of batch checkpoints to ~20MB.RESET_DB
: Indicates whether to reset the database on startup (true
orfalse
).PACKAGE_ID
: Instruct the Indexer to store Objects generated by these package IDs.
- Any changes to the
.env
file will take effect the next time the container is built or restarted. - Keep the
.env
file secure, as it may contain sensitive information.
- Install Diesel CLI
- Run
diesel setup
$ cargo run
$ cargo test
Access the Swagger documentation at /swagger-ui
.
- Index expiration unlock conditions for shared Nft and Basic outputs.
- Set a custom package defining the stardust outputs, assuming that the type layout is the same as in [iota-framework][].
- Expose a REST API to serve the indexed data.