Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] cardano-db-sync - Analyse possibility of testing rollbacks with framework #2653

Open
ArturWieczorek opened this issue Sep 30, 2024 · 1 comment
Labels
db-sync enhancement New feature or request

Comments

@ArturWieczorek
Copy link
Collaborator

Analyse if it would make sense to test db-sync rollbacks with cardano-node-tests framework.
Currently the only way to invoke rollback is to stop current db-sync process and start it again with flag --rollback-to-slot :

Usage: cardano-db-sync (COMMAND | --config FILEPATH --socket-path FILEPATH 
                         [--state-dir FILEPATH] --schema-dir FILEPATH 
                         [--pg-pass-env ENV] [--disable-epoch] [--disable-cache]
                         [--disable-ledger] [--skip-fix] [--fix-only] 
                         [--force-indexes] [--disable-multiassets] 
                         [--disable-metadata] [--disable-plutus-extra] 
                         [--disable-offline-data] [--turbo] [--full] 
                         [--consumed-tx-out] [--prune-tx-out] 
                         [--rollback-to-slot WORD])

This might be a time consuming process - however on a test blockchain with minimal amount of data this could be a faster process than on real networks either test ones or mainnet.

This should be probably run after all regular cluster tests are finished so we have test data including all conway era tests and check if rollback propagates properly and deletes all data. Currently some columns , tables might be ignored during rollbacks.

Detailed list of tables / columns / cases (flag configurations causing issues) would be needed in case this would make sense to implement and we wanted to proceed with idea - but for now just the concept itself can be checked from the efficiency point of view and how much time consuming it would be.

@ArturWieczorek ArturWieczorek added enhancement New feature or request db-sync labels Sep 30, 2024
@ArturWieczorek
Copy link
Collaborator Author

Update: When sync db-sync with consumed_tx_out option it does not update epoch table and values inconsumed_by_tx_id column of tx_out table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
db-sync enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant