-
Notifications
You must be signed in to change notification settings - Fork 33
Add content to "Introduction" and "Design Goals" sections #1690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add content to "Introduction" and "Design Goals" sections #1690
Conversation
12659a5 to
b357bde
Compare
| 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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| [^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). |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - 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 | |||
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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]. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 👍
b357bde to
68d3b7e
Compare
68d3b7e to
b0d476f
Compare
b0d476f to
bbcdd77
Compare
Split from #1542