Skip to content

Conversation

@dnadales
Copy link
Member

Split from #1542

@dnadales dnadales force-pushed the dnadales/add-content-to-introduction-and-design-goals branch 2 times, most recently from 12659a5 to b357bde Compare September 24, 2025 15:11
For example, validating headers before downloading block bodies prevents attackers from forcing nodes to process potentially invalid blocks.
The design often seeks a balance between the cost for an attacker to induce work and the cost for a node to defend against it.

[^1]: See the IOSim monad and the `io-classes` package of [`io-sim`](https://github.com/input-output-hk/io-sim).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[^1]: See the IOSim monad and the `io-classes` package of [`io-sim`](https://github.com/input-output-hk/io-sim).
[^1]: See the `IOSim` monad and the `io-classes` package of [`io-sim`](https://github.com/input-output-hk/io-sim).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly could be reformulated to point to https://input-output-hk.github.io/io-sim/

This design allows different ledgers (like the Byron or Shelley ledgers) and different Ouroboros protocol instances (like Praos or TPraos) to be integrated into the abstract consensus framework.
To reflect this design, the repository is structured into different sub-repositories.
- The polymorphic implementations and abstract classes, which define the core consensus logic independently of specific ledger or protocol details, can be found in the [`ouroboros-consensus`](https://github.com/IntersectMBO/ouroboros-consensus/tree/main/ouroboros-consensus) sub-directory.
- The Cardano specific instantiations, which provide the concrete implementations, reside in the [ouroboros-consensus-cardano](https://github.com/IntersectMBO/ouroboros-consensus/tree/main/ouroboros-consensus-cardano) sub-directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The Cardano specific instantiations, which provide the concrete implementations, reside in the [ouroboros-consensus-cardano](https://github.com/IntersectMBO/ouroboros-consensus/tree/main/ouroboros-consensus-cardano) sub-directory.
- The Cardano specific instantiations, which provide the concrete implementations, reside in the [`ouroboros-consensus-cardano`](https://github.com/IntersectMBO/ouroboros-consensus/tree/main/ouroboros-consensus-cardano) sub-directory.

@@ -1 +1,63 @@
# Design Goals
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this document have a "see also" section at the bottom with relevant links to the documentation for the various protocols / eras? or have them linked inline?

Whenever possible, we should abstract over IO, enabling simulations of various failures (such as disk or network errors) to verify system recovery capabilities[^1].
Additionally, to leverage the property-based methodology, tests must be relatively inexpensive.
The design should also support testing rare but expected scenarios (such as multiple slot leaders in Praos) by allowing overrides in protocol or ledger behavior at specific points.
Furthermore, the system should facilitate the isolation testing of individual components.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"isolated testing"?

This repository houses the Haskell implementation of three crucial components utilized by the [`cardano-node`](https://github.com/IntersectMBO/cardano-node): Consensus, Storage, and Mempool.
- The [Consensus component](https://cardano-scaling.github.io/cardano-blueprint/consensus/index.html) implements the [Ouroboros](https://iohk.io/en/research/library/papers/ouroboros-a-provably-secure-proof-of-stake-blockchain-protocol/) family of Proof-of-Stake protocols.
- The [Storage component](https://cardano-scaling.github.io/cardano-blueprint/storage/index.html) is responsible for providing efficient access to the blockchain data, as well as maintaining the current and recent past ledger states, and storing ledger state snapshots.
- The [Mempool component](https://cardano-scaling.github.io/cardano-blueprint/mempool/index.html) serves as a buffer for valid transactions that are waiting to be included in a block. It is used by Consensus component when forging a block and by the Network layer's transaction submission mini-protocol when adding or getting transactions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"adding or getting" sounds very vague here, and it might not be clear exactly what's meant

Ensuring the thorough testability of the consensus layer is a critical design goal.
As a core component of the Cardano Node, which manages the cryptocurrency, the consensus layer must adhere to strict correctness standards.
Currently, we extensively employ property-based testing.
Whenever possible, we should abstract over IO, enabling simulations of various failures (such as disk or network errors) to verify system recovery capabilities[^1].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"IO" instead of "IO"? I don't know how much (if any) Haskell knowledge we're expecting a reader to have

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to IO. I think that since this is a Haskell-based implementation of the Cardano node we could expect the reader to be familiar with the language 👍

@dnadales dnadales force-pushed the dnadales/add-content-to-introduction-and-design-goals branch from b357bde to 68d3b7e Compare September 26, 2025 16:04
@dnadales dnadales force-pushed the dnadales/add-content-to-introduction-and-design-goals branch from 68d3b7e to b0d476f Compare September 30, 2025 18:30
@dnadales dnadales force-pushed the dnadales/add-content-to-introduction-and-design-goals branch from b0d476f to bbcdd77 Compare September 30, 2025 19:27
@dnadales dnadales added this pull request to the merge queue Oct 1, 2025
Merged via the queue into main with commit 41fef0a Oct 1, 2025
16 of 17 checks passed
@dnadales dnadales deleted the dnadales/add-content-to-introduction-and-design-goals branch October 1, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants