Granola-Team / mina-indexer

The Mina Indexer is a re-imagined version of the software collectively called the "Mina archive node."
Apache License 2.0
18 stars 10 forks source link

Problem: when `--blocks-dir` is not given, the mina-indexer still seeks a blocks directory #1272

Closed robinbb closed 1 month ago

robinbb commented 2 months ago

If --blocks-dir is not given on the command line to server start, a user would expect that no blocks will be watched for. However, instead, the blocks are sought in a default directory. Worse, that location is often not accessible to the user, and so the mina-indexer crashes with a cryptic error message.

The behaviour should be that if --blocks-dir is not given, then no directory is watched for blocks.

The same is true for --staking-ledger-dir.

robinbb commented 2 months ago

... this causes --blocks-dir and --staking-ledgers-dir command line options to have to be given to server commands where it does not make sense. Makes for confusing ops code.

Isaac-DeFrain commented 2 months ago

Out of curiosity, why do want to start an indexer without a watched blocks/staking ledgers directory? You just want a static database to query?

robinbb commented 2 months ago

@Isaac-DeFrain Yes. It is a simpler mode of operation that will help debug other issues. It is has also been the only "production" mode of operation for the last many months.