diff --git a/src/introduction.md b/src/introduction.md index fe988d8..0127e51 100644 --- a/src/introduction.md +++ b/src/introduction.md @@ -12,4 +12,63 @@ Making the ways the Cardano node is built **more approachable** to a wider devel After all, software quality is not only about rigor and testing, but also "how easy a system can be changed". +## Node architecture +While some documentation for [users](https://docs.cardano.org/about-cardano/explore-more/cardano-architecture/) and [developers](https://developers.cardano.org/docs/get-started/cardano-node/cardano-components) can be found, the available documents about the "inner workings" of the Cardano node is scarce. + +The main repository is [cardano-node](https://github.com/IntersectMBO/cardano-node) which integrates the several components. The linked repository do contain individual Haskell package dependency diagrams, but generally it's quite hard to read about how the various components interact with each other. + +Consequently, the **first contribution** by this document is the following component diagram: + +TODO: Draw a proper diagram here with mermaid or miro +```mermaid +block-beta + columns 2 + + TimeLock plutus["Plutus Interpreter"] + ledger["Ledger"]:2 + block:consensus:2 + cl["Consensus"] + PBFT TPraos Praos + + style cl fill:none,stroke:none + end + + block:network:2 + nl["Network"] + n2n n2c + + style nl fill:none,stroke:none + end +``` + + +### Plutus + +- Plutus core interpreter +- Cost model estimation +- Plinth: Separate compiler + +### Cardano ledger +- Validates transactions according to ledger rules +- Updates stake distribution +- Keeps reward accounts +- Governance features? +- Could host multiple languages (not only plutus)! + +### Consensus +- Ledger eras (here? or above) +- Chain selection +- Hard-fork combinator +- Multiple consensus protocols that determine which blocks are valid and who to mint them +- Currently: Praos, TPraos, PBFT (still?) + +### Network +- Node-to-node + - BlockFetch + - ChainSync + - TxSubmission +- Node-to-client + - Local variants of chain sync and tx submission + - State Query + - Mempool monitor