Skip to content

Commit 26ea88e

Browse files
Nicholas Clarkenc6
authored andcommitted
Formatting
- Add mdformat as a formatting tool. - Reflow ledger/README.md to 80 chars
1 parent 9ca208f commit 26ea88e

File tree

2 files changed

+31
-14
lines changed

2 files changed

+31
-14
lines changed

flake.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
rec {
2424
inherit inputs;
2525
legacyPackages = pkgs;
26-
2726
defaultPackage = packages.mdbook;
2827
packages.mdbook = pkgs.stdenv.mkDerivation {
2928
name = "cardano-blueprint-book";

src/ledger/README.md

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,46 @@
44
>
55
> This blueprint is a work in progress.
66
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.
7+
The Ledger is responsible for validating Blocks and represents the actual
8+
semantics of Cardano transactions. The format of blocks and transactions is
9+
defined in so-called **eras**: `Byron`, `Shelley`, `Allegra`, `Mary`, `Alonzo`,
10+
`Babbage` and `Conway`.
11+
12+
This blueprint is currently more of an entrypoint to already existing
13+
implementation-independent descriptions of Cardano transactions and the ledger
14+
rules. While existing work covers a lot already, the `cardano-blueprint` may
15+
serve as an incubation or staging area for material to cover gaps.
16+
For starters, the [EUTxO Crash Course](https://aiken-lang.org/fundamentals/eutxo)
17+
from Aiken is a very good introduction about Cardano transactions.
18+
See [Transaction fee](./transaction-fee.md) for an informal write-up on how
19+
transaction fees are currently calculated.
1420

1521
## Ledger rules
1622

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.
23+
The [Formal Specification](https://intersectmbo.github.io/formal-ledger-specifications/site/index.html)
24+
is the source of truth for ledger semantics. While it is currently being
25+
made more accessible by interleaving explanations with Agda definitions, its
26+
very dense on the Agda and actively worked on to close the gap latest era
27+
descriptions and the old era definitions. The Haskell implementation of the
28+
ledger holds a list of [design documents and ledger specifications](https://github.com/IntersectMBO/cardano-ledger?tab=readme-ov-file#cardano-ledger)
29+
for all eras. See [Block Validation](./block-validation.md) for a description
30+
of the `Conway` era block validation rules.
2031

2132
## Block and transaction format
2233

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).
34+
The [.cddl files in cardano-ledger](https://github.com/search?q=repo%3AIntersectMBO%2Fcardano-ledger+path%3A.cddl&type=code)
35+
define the wire-format of blocks and transactions for each era. These are
36+
self-contained for each era and are referenced in
37+
[other blueprint CDDL schemas](../codecs#cddl).
2538

2639
> [!WARNING]
2740
> TODO: make ledger cddls available through blueprint directly
2841
2942
## Conformance tests
3043

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.
44+
Despite the formal specification provides a precise definition for semantics,
45+
testing the behavior of ledger implementations against the specification
46+
and also the ledger implementations against each other is crucial. For this
47+
purpose, a conformance test suite with [implementation-independent test
48+
vectors](https://github.com/cardano-scaling/cardano-blueprint/tree/main/src/ledger/conformance-test-vectors)
49+
can be used.

0 commit comments

Comments
 (0)