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

Inventorize ouroboros-consensus symbols used by clients

Open bartfrenk opened this issue 2 years ago • 2 comments

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

bartfrenk avatar Mar 09 '23 15:03 bartfrenk

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.

dnadales avatar Mar 27 '23 20:03 dnadales

It's wise to do this after UTxO-HD is merged, otherwise, we'll have a yet bigger changeset to merge.

dnadales avatar Aug 21 '23 13:08 dnadales

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:

  1. a list of every symbol usage in every built module
  2. a list of every module imported by every built module
  3. 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.

fraser-iohk avatar Feb 13 '25 11:02 fraser-iohk