Skip to content

Split mithril-common crate - Phase 2 #2392

Open
@jpraynaud

Description

@jpraynaud

Why

We want to implement the phase 2 of the split of the mithril-common crate and delegate some of its responsibilities to new crates.

What

Split responsibilities to new crates:

  • Mithril era
  • Mithril ticker
  • Cardano node internal database
  • Cardano node mini protocols
  • Web test tools (Test HTTP server and API spec)

How

  • Mithril Era:
    • Create a new crate internal/mithril-era
    • Move mithril-common/era to src
    • Except for mithril-common/era/supported_era.rs which is moved to mithril-common/entities
  • Mithril ticker:
    • Create a new crate internal/mithril-ticker
    • Move mithril-common/ticker_service.rs to src
  • Cardano node internal database:
    • Create a new crate in internal/cardano-node/mithril-cardano-node-internal-database
    • Move mithril-common/digester to src/digester
    • Move digester/immutable_file_observer.rs in src
    • Move digester/dummy_cardano_db.rs in src/test
    • Move digester/immutable_file.rs to src/entities
    • Move digester/ledger_file.rs to src/entities
    • Add the publication of the crate on crates.io
  • Cardano node chain:
    • Create an new crate in internal/cardano-node/mithril-cardano-node-chain
    • Move mithril-common/chain_observer to src
    • Move mithril-common/chain_reader to src
    • Move mithril-common/cardano_chain_scanner to src and rename it to chain_scanner
    • Move entities from src/chain_reader and src/chain_scanner to an src/entity module (ChainScannedBlocks, ScannedBlock, RawCardanoPoint, ChainBlockNextAction)
  • Web test tools (Test HTTP server and API spec):
    • Create new crates in internal/tests/mithril-api-spec and internal/tests/mithril-test-http-server
    • Remove the dependency to SupportedEra in APISpec and replace it with a String
    • Move mithril-common/test_utils/apispecs.rs to mithril-api-spec/src
    • Move mithril-common/test_utils/test_http_server.rs to mithril-test-http-server/src
    • Add the publication of the crate on crates.io
  • Remove the unnecessary features in mithril-common
  • Add testing of mithril-common in Windows tests in the CI
  • Update the crates to build/test in Hydra CI

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions