Skip to Content
FAQ

Frequently Asked Questions (FAQ)

This page addresses common questions and provides solutions to help you get the most out of Yaci Store.


General Questions

Why does the utxo column in the adapot table always show 0?

The utxo column in the adapot table currently contains a default value of 0. This is a planned feature that will be implemented in a future release.

Current workaround:

No action is required. The default value does not affect the accuracy of other ledger state calculations, including rewards, treasury, and reserves.


Troubleshooting

What’s the first thing I should do when encountering data discrepancy errors during synchronization?

When you encounter data-related errors or discrepancies during synchronization, the first recommended action is to use the Rollback CLI to restore your database to a known good state.

Why rollback first?

Data discrepancies can occur for various reasons - network issues, interrupted synchronization, or edge cases in data processing. Rather than waiting for a fix or troubleshooting extensively, rolling back to a stable epoch allows you to:

  • Quickly restore operations to a working state
  • Isolate the problematic epoch to better understand the issue
  • Continue synchronization from a clean checkpoint
  • Provide better bug reports with specific epoch information

How to perform a rollback:

The Yaci Store Admin CLI provides a straightforward rollback feature:

  1. Stop the Yaci Store application to prevent further synchronization

  2. Identify the last known good epoch (check your logs or database state before the error occurred)

  3. Run the rollback command:

    The command differs depending on your distribution type:

    For Docker Distribution

    Use the admin-cli.sh script in non-interactive mode by passing commands and arguments directly:

    ./admin-cli.sh rollback --epoch <EPOCH_NUMBER>

    Replace <EPOCH_NUMBER> with the epoch you want to roll back to.

    Example:

    ./admin-cli.sh rollback --epoch 450

    For ZIP (JAR) Distribution

    The ZIP distribution requires using the Admin CLI in interactive mode:

    1. Start the Admin CLI prompt:

      ./bin/admin-cli.sh
    2. Once in the Admin CLI prompt, run the rollback command:

      admin-cli> rollback --epoch <EPOCH_NUMBER>

    Example:

    ./bin/admin-cli.sh admin-cli> rollback --epoch 450
  4. Verify the rollback by checking your database state

  5. Restart Yaci Store and monitor the synchronization process

When you run rollback-data --epoch X, the system finds the last block of epoch X-1 and sets the sync cursor to that point. After restart, synchronization resumes from the first block of epoch X.

After rolling back:

  • Monitor the logs carefully as synchronization resumes
  • If the error persists at the same epoch, check the Known Issues page
  • Report the issue with specific epoch and error details to help improve Yaci Store
  • Consider enabling debug logging for more detailed diagnostics

Best practices:

  • Maintain regular database backups
  • Document the epoch where errors occur for future reference
  • Test rollback procedures in non-production environments first
  • Keep your Yaci Store version up to date to benefit from the latest fixes

How do I check if AdaPot calculation has errors?

The adapot_jobs table tracks the status and errors of AdaPot/reward calculations for each epoch.

Checking for errors:

Query the adapot_jobs table and look at the status and error_message columns:

SELECT epoch, status, error_message FROM adapot_jobs WHERE error_message IS NOT NULL

The status column can be: NOT_STARTED, STARTED, or COMPLETED. If a job has STARTED status with a non-null error_message, it means the calculation failed for that epoch.

How to retry failed calculations:

  1. Stop the Yaci Store application

  2. Rollback to the epoch before the failed one using the Admin CLI:

    First, try rollback-ledger-state-data — this rolls back only ledger state data (AdaPot, rewards, stake snapshots, DRep distribution) without affecting other indexed data (blocks, transactions, UTXOs):

    # Docker distribution ./admin-cli.sh rollback-ledger-state-data --epoch <FAILED_EPOCH> # ZIP distribution ./bin/admin-cli.sh admin-cli> rollback-ledger-state-data --epoch <FAILED_EPOCH>

    For example, if the AdaPot job failed at epoch 100, run rollback-ledger-state-data --epoch 100. The system will automatically find the last block of epoch 99 as the rollback point and reset all ledger state jobs from epoch 100 onward.

    If the issue persists after retrying, or you suspect broader data corruption, use rollback-data instead to roll back all data including blocks, transactions, and UTXOs:

    # Docker distribution ./admin-cli.sh rollback-data --epoch <FAILED_EPOCH> # ZIP distribution ./bin/admin-cli.sh admin-cli> rollback-data --epoch <FAILED_EPOCH>
  3. Restart Yaci Store with the ledger-state profile to re-trigger the calculation:

The application will re-process the epoch and recalculate the AdaPot values from scratch.


PostgreSQL does not start after a crash: “could not create file … File exists”

This is a rare scenario. It needs PostgreSQL to stop uncleanly (a crash, an out-of-memory kill, a power loss, or a container stopped with a very short timeout) within a few minutes of an epoch’s stake snapshot or DRep distribution calculation.

Symptom: PostgreSQL fails during crash recovery and does not start. Its log ends with:

LOG: redo done at ... FATAL: could not create file "base/16384/405207": File exists LOG: startup process (PID ...) exited with exit code 1

Yaci Store waits for the database and then exits, logging Database 'dataSource' still not reachable ... Giving up.

Cause: With the ledger-state profile, the stake snapshot and DRep distribution calculations use UNLOGGED working tables (named ss_*). They are dropped and created again at every epoch. Unlogged tables are used because they are fast, and they stay in the database, so you can inspect them after a calculation. PostgreSQL has a known crash-recovery issue with unlogged tables that are created or dropped shortly before a crash (BUG #17731 ): an empty data file is left behind, and recovery stops on it.

No Yaci Store data is lost. PostgreSQL empties unlogged tables during crash recovery anyway, and Yaci Store rebuilds the ss_* tables at the next calculation.

Workaround:

  1. Keep PostgreSQL stopped. Find the file named in the error under the PostgreSQL data directory:
    • With the Docker Compose files shipped with Yaci Store, the data directory is db-data/yaci-store on the host. On PostgreSQL 18 the file is under db-data/yaci-store/18/docker/, and on 17 under db-data/yaci-store/.
    • Otherwise it is under $PGDATA.
  2. Check that the file is empty (0 bytes) and that a file with the same name plus _init exists next to it:
    ls -l <data-dir>/base/16384/405207 <data-dir>/base/16384/405207_init
  3. Move the empty file out of the data directory. Moving it, rather than deleting it, keeps a copy:
    mv <data-dir>/base/16384/405207 /path/to/a/backup/folder/
  4. Start PostgreSQL. It finishes crash recovery and accepts connections.
  5. Start Yaci Store. It resumes from where it stopped, and an interrupted AdaPot job runs again.

Only move the file if it is empty and has a matching _init file. If the file named in the error contains data, or has no _init file, it is a different problem: do not move it.


Need More Help?

If your question isn’t answered here, please:

Last updated on