ouroboros-consensus icon indicating copy to clipboard operation
ouroboros-consensus copied to clipboard

Make it possible for db-analyser to start analysis from closest snapshot

Open dnadales opened this issue 3 years ago • 0 comments

When we use the store-ledger option, it seems sensible that db-analiser would start from the most recent snapshot. We should modify db-analiser so that we incorporate this behaviour.

For instance, if we have snapshots at slots 6 and 8, and we want to store a snapshot at slot 10, currently we have to specify the snapshot we want to start from. Eg:

cabal run exe:db-analyser -- cardano \
    --config $NODE_HOME/configuration/cardano/mainnet-config.json \
    --db $NODE_HOME/mainnet/db \
    --analyse-from 8 \
    --only-immutable-db --store-ledger 10

In this case, the sensible option is to start from the snapshot that is closest to the slot we want to take the new snapshot for. This ticket is about automatically determining what the closest slot is so that analyse-from is no longer necessary. If analyse-from is specified, then we start from the specified slot.

dnadales avatar Oct 04 '22 15:10 dnadales