Skip to content

Commit b8c2723

Browse files
authored
Merge pull request #50 from cardano-scaling/blueprint-resources
Blueprint resources
2 parents 68ee1bf + 85b89e9 commit b8c2723

File tree

8 files changed

+75
-18
lines changed

8 files changed

+75
-18
lines changed

src/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
- [Ledger](ledger/README.md)
2222
- [Transaction fee](ledger/transaction-fee.md)
2323
- [Block Validation](ledger/block-validation.md)
24-
- [CDDL Specs](ledger/cddls.md)
2524
- [Plutus](plutus/README.md)
2625
- [Syntax](plutus/syntax.md)
2726
- [Builtin Types and Functions](plutus/builtin.md)

src/consensus/README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
# The Consensus Layer
1+
# Consensus
2+
3+
> [!WARNING]
4+
>
5+
> This blueprint is a work in progress.
6+
> See also [Resources](#resources)
27
38
This document describes the components of the Consensus layer of a Cardano node,
49
serving as a reference for Cardano developers who want to implement a node or
510
interact with the Consensus layer of an existing implementation. We strive to
611
provide implementation-agnostic requirements and responsibilities for the
712
Consensus layer.
813

9-
> [!WARNING]
10-
>
11-
> This document is a work in progress.
12-
1314
The Consensus Layer runs the Consensus Protocol and invokes the [Ledger
1415
layer](../ledger) to validate chains produced according to the
1516
protocol. The chain is then persisted in the [Storage
@@ -215,6 +216,13 @@ view_. We require not just that the ledger can provide a view of the current
215216
ledger state but also that it can predict what view will be for slots in the
216217
near future.
217218

219+
220+
## Resources
221+
222+
- [Technical report: Data Diffusion and Network][network-design]: Original design document of the peer-to-peer network protocols and diffusion semantics
223+
- [Technical report: Cardano Consensus and Storage Layer](https://ouroboros-consensus.cardano.intersectmbo.org/pdfs/report.pdf): Documentation of the Haskell implementation of consensus components
224+
- [Website: ouroboros-consensus > For Developers](https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers): Collection of developer articles on the Haskell implementation of consensus components
225+
218226
[feature-table]: https://github.com/cardano-foundation/CIPs/blob/master/CIP-0059/feature-table.md
219227
[network-design]: https://ouroboros-network.cardano.intersectmbo.org/pdfs/network-design/network-design.pdf
220228
[Classic]: https://iohk.io/en/research/library/papers/ouroboros-a-provably-secure-proof-of-stake-blockchain-protocol/

src/ledger/README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
# Ledger
22

3-
Cardano uses the Extended Unspent Transaction Output (EUTxO) ledger model...
3+
> [!WARNING]
4+
>
5+
> This blueprint is a work in progress.
46
5-
```agda
6-
data S
7-
```
7+
The Ledger is responsible for validating Blocks and represents the actual semantics of Cardano transactions. The format of blocks and transactions is defined in so-called **eras**: `Byron`, `Shelley`, `Allegra`, `Mary`, `Alonzo`, `Babbage` and `Conway`.
8+
9+
This blueprint is currently more of an entrypoint to already existing implementation-independent descriptions of Cardano transactions and the ledger rules. While existing work covers a lot already, the `cardano-blueprint` may serve as an incubation or staging area for material to cover gaps.
10+
11+
For starters, the [EUTxO Crash Course](https://aiken-lang.org/fundamentals/eutxo) from Aiken is a very good introduction about Cardano transactions.
12+
13+
See [Transaction fee](./transaction-fee.md) for an informal write-up on how transaction fees are currently calculated.
14+
15+
## Ledger rules
16+
17+
The [Formal Specification](https://intersectmbo.github.io/formal-ledger-specifications/site/index.html) is the source of truth for ledger semantics. While it is currently being made more accessible by interleaving explanations with Agda definitions, its very dense on the Agda and actively worked on to close the gap latest era descriptions and the old era definitions. The Haskell implementation of the ledger holds a list of [design documents and ledger specifications](https://github.com/IntersectMBO/cardano-ledger?tab=readme-ov-file#cardano-ledger) for all eras.
18+
19+
See [Block Validation](./block-validation.md) for a description of the `Conway` era block validation rules.
20+
21+
## Block and transaction format
22+
23+
The [.cddl files in cardano-ledger](https://github.com/search?q=repo%3AIntersectMBO%2Fcardano-ledger+path%3A.cddl&type=code) define the wire-format of blocks and transactions for each era. These are self-contained for each
24+
era and are referenced in [other blueprint CDDL schemas](../codecs#cddl).
25+
26+
> [!WARNING]
27+
> TODO: make ledger cddls available through blueprint directly
28+
29+
## Conformance tests
30+
31+
Despite the formal specification provides a precise definition for semantics, testing the behavior of ledger implementations against the specification and also the ledger implementations against each other is crucial. For this purpose, a conformance test suite with [implementation-independent test vectors](https://github.com/cardano-scaling/cardano-blueprint/tree/main/src/ledger/conformance-test-vectors) can be used.

src/ledger/block-validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Ledger: Block Validation
22

33
Block validation is the process of applying a set of ledger rules to a candidate block before adding it to the blockchain and updating the state of the ledger.
4-
Each [era](../consensus/README.md#multi-era-considerations) has it's own set of rules for block validation.
4+
Each [era](../consensus/multiera.md) has it's own set of rules for block validation.
55

66
> [!NOTE]
77
> TODO: Write a full introduction here with relevant terminology and concepts defined.

src/ledger/cddls.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/mempool/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Mempool
22

3+
> [!WARNING]
4+
>
5+
> This blueprint is a work in progress.
6+
> See also [Resources](#resources)
7+
38
In Cardano, for blocks to have useful data, they have to contain transactions,
49
which are codifications of operations on the Ledger state that only some
510
authorized actors can enact. Notice that such transactions are what makes up the
@@ -82,3 +87,7 @@ original transaction is the one that will be forwarded to other peers, i.e. the
8287
> [!WARNING]
8388
>
8489
> TODO: describe fairness and what should mempools do in this regard.
90+
91+
## Resources
92+
93+
- [Technical report: Cardano Consensus and Storage Layer](https://ouroboros-consensus.cardano.intersectmbo.org/pdfs/report.pdf): Documentation of the Haskell implementation of consensus components

src/network/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Network
22

3+
> [!WARNING]
4+
>
5+
> This blueprint is a work in progress.
6+
> See also [Resources](#resources)
7+
38
The network layer is responsible of implementing the Node-To-Node interface of a
49
node, for transmitting data between nodes.
510

@@ -29,7 +34,7 @@ graph TB
2934
> the networking layer of a node but it is not mandatory. For more information
3035
> see [Client interfaces](../client).
3136
32-
### Node-to-node mini-protocols
37+
## Node-to-node mini-protocols
3338

3439
> Current node-to-node protocol version: v14
3540
@@ -44,3 +49,10 @@ network (combined by the multiplexing wrapper) is:
4449
* [Keep Alive](node-to-node/keep-alive) - for maintaining and measuring timing of the connection
4550
* [Peer Sharing]() - for exchanging peer information to create the peer-to-peer
4651
(P2P) network
52+
53+
54+
## Resources
55+
56+
- [Technical report: Data Diffusion and Network](https://ouroboros-network.cardano.intersectmbo.org/pdfs/network-design/network-design.pdf): Original design document of the peer-to-peer network protocols and diffusion semantics
57+
- [Ouroboros Network Specification](https://ouroboros-network.cardano.intersectmbo.org/pdfs/network-spec/network-spec.pdf): Document generated from the Haskell implementation of the Cardano network stack. Contains definitions of all mini-protocols and some documentation the connection management.
58+

src/storage/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# The Storage Layer
1+
# Storage
2+
3+
> [!WARNING]
4+
>
5+
> This blueprint is a work in progress.
6+
> See also [Resources](#resources)
27
38
The Storage layer is responsible of storing the blocks on behalf of the
49
Consensus layer. It is also involved in serving the data for [Chain
@@ -77,3 +82,8 @@ of messages a protocol is composed by. It is possible to run an interaction of
7782
the protocol exchanging data that does not follow the intended semantics (for
7883
example an evil node sending all the chains it knows about instead of only the
7984
best selection).
85+
86+
## Resources
87+
88+
- [Technical report: Cardano Consensus and Storage Layer](https://ouroboros-consensus.cardano.intersectmbo.org/pdfs/report.pdf): Documentation of the Haskell implementation of consensus components
89+
- [Website: ouroboros-consensus > For Developers](https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers): Collection of developer articles on the Haskell implementation of consensus components

0 commit comments

Comments
 (0)