IntersectMBO / IntersectMBO/ouroboros-consensus
Make it possible for db-analyser to start analysis from closest snapshot
- Dominant language
- Haskell
- Stars
- 67
- Forks
- 43
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 43
Description
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:
```sh
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.
Contributor guide
Research direction
Start at the db-analyser command handling for --store-ledger and --analyse-from, using the example command and snapshot slots in the issue as the behavioral guide. Check how available snapshots are discovered, then ensure the nearest slot is selected by default while an explicit --analyse-from value still takes precedence; done means the example no longer needs --analyse-from.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- blockchain, cli, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100