Inventorize ouroboros-consensus symbols used by clients
In the effort of defining a more formal interface for the ouroboros-consensus package it it useful to understand which symbols are actually used by users of the package. This issue is a meta-issue to keep track of which for which users this has been inventorized.
- [ ] db-analyser
- [ ] Galois tutorials
- [ ] node
- [ ] db-sync
- [ ] hydra
See several occurences of as Consensus in cardano-node, eg:
import qualified Ouroboros.Consensus.Byron.Ledger as Consensus
import qualified Ouroboros.Consensus.Cardano.Block as Consensus
import qualified Ouroboros.Consensus.Cardano.ByronHFC as Consensus (ByronBlockHFC)
import Ouroboros.Consensus.HardFork.Combinator as Consensus (EraIndex (..), eraIndexSucc,
eraIndexZero)
import qualified Ouroboros.Consensus.Protocol.Praos as Consensus
import qualified Ouroboros.Consensus.Protocol.TPraos as Consensus
import qualified Ouroboros.Consensus.Shelley.HFEras as Consensus
import qualified Ouroboros.Consensus.Shelley.ShelleyHFC as Consensus
from module Cardano.Api.Modes.
It's wise to do this after UTxO-HD is merged, otherwise, we'll have a yet bigger changeset to merge.
There's now a (basic) tool for detecting which ouroboros-consensus symbols are used in a given package: https://github.com/fraser-iohk/reverse-dep-finder
At the moment, it just generates three basic CSVs:
- a list of every symbol usage in every built module
- a list of every module imported by every built module
- a list of every symbol exported by every built module
Once we've decided what we want to do with this information, we can extend the tool to handle those use cases.