Skip to content

Commit 35abd22

Browse files
committed
Write intro of Ledger section
1 parent 68ee1bf commit 35abd22

File tree

4 files changed

+29
-11
lines changed

4 files changed

+29
-11
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/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/multi-era.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.

0 commit comments

Comments
 (0)