Skip to content

Commit 6ae4375

Browse files
Nicholas Clarkenc6
authored andcommitted
Add a plan for working on the ledger blueprint
1 parent 26ea88e commit 6ae4375

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

src/ledger/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
> [!WARNING]
44
>
5-
> This blueprint is a work in progress.
5+
> This blueprint is a work in progress. See [./plan.md] for the intended
6+
> restructuring.
67
78
The Ledger is responsible for validating Blocks and represents the actual
89
semantics of Cardano transactions. The format of blocks and transactions is

src/ledger/plan.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Ledger Blueprint Planning
2+
3+
The aim is to restructure this documentation with the aim of providing a guide
4+
to somebody who might wish to implement the ledger for a compatible node.
5+
6+
To that end, we break down the documentation in various sections. Certain
7+
things make sense to document in certain ways. We wish to avoid any duplication
8+
of work already done - for example, the formal specs remain probably the best
9+
way to document the precise implementation of a pure function. However, we can
10+
provide guidance for people trying to read the specifications.
11+
12+
It is the fundamental nature of documentation to go out of date. As such, we
13+
also want to avoid referring to details of specific eras etc (which are in any
14+
case covered in the formal specs) and instead cover the general principles and
15+
details needed by all potential implementations.
16+
17+
- Concepts
18+
- Blocks
19+
- The header/body split
20+
- Transactions
21+
- Eras
22+
- The structure of an epoch
23+
- The ledger state transition
24+
- How to read the specs
25+
- Old-style semi-formal specs
26+
- New-style Agda specifications
27+
- Ledger interfaces
28+
- To the consensus layer
29+
- Applying a block
30+
- Ticking
31+
- On an era boundary
32+
- Forecasting
33+
- Nonces
34+
- The stake distribution
35+
- To the mempool
36+
- Validating a transaction
37+
- Revalidating a transaction
38+
- To the CLI
39+
- Forecasting the leader schedule
40+
- Understanding parts of the transition
41+
- Non-integral math
42+
- Transaction fee calculation
43+
- Reward calculation
44+
- Ledger serialisation
45+
- Transaction and block formats
46+
- The ledger state
47+
- Decomposition - large and small parts
48+
- Constraints on the ledger
49+
- Computational concerns
50+
- Avoiding spikes
51+
- Implications of the header/body split
52+
- Rollbacks and storage

0 commit comments

Comments
 (0)