Skip to content

Commit 9c57bcc

Browse files
authored
chore: remove containers markdown docs (#89)
* chore: remove unused client yaml files * chore: move containers markdown docs to doc comments
1 parent 4c0ac5b commit 9c57bcc

File tree

8 files changed

+62
-117
lines changed

8 files changed

+62
-117
lines changed

docs/client/containers.md

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

src/lean_spec/client/nodes.yaml

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

src/lean_spec/client/validators.yaml

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

src/lean_spec/subspecs/containers/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
"""The container types for the Lean consensus specification."""
1+
"""
2+
The container types for the Lean consensus specification.
3+
4+
All containers use SSZ encoding. SSZ provides deterministic serialization and
5+
efficient merkleization.
6+
7+
Hash functions used for merkleization differ by devnet. Early devnets use
8+
SHA256. Later devnets will switch to Poseidon2 for better SNARK compatibility.
9+
"""
210

311
from .attestation import (
412
AggregatedAttestations,

src/lean_spec/subspecs/containers/attestation/attestation.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
"""Attestation-related container definitions."""
1+
"""
2+
Attestation-related container definitions.
3+
4+
Attestations are how validators express their view of the chain.
5+
Each attestation specifies:
6+
7+
- What the validator thinks is the chain head
8+
- What is already justified (source)
9+
- What should be justified next (target)
10+
11+
Attestations can be aggregated to save space, but the current specification
12+
doesn't do this yet.
13+
"""
214

315
from lean_spec.subspecs.containers.slot import Slot
416
from lean_spec.types import Bytes4000, Container, Uint64

src/lean_spec/subspecs/containers/block/block.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
"""Block Containers for the Lean Ethereum consensus specification."""
1+
"""
2+
Block Containers for the Lean Ethereum consensus specification.
3+
4+
A block proposes changes to the chain. It references its parent block, creating
5+
a chain. The block includes a state root that represents the result of
6+
applying this block.
7+
8+
Each block has a proposer who created it. The slot determines which validator
9+
can propose.
10+
"""
211

312
from lean_spec.subspecs.containers.slot import Slot
413
from lean_spec.types import Bytes32, Uint64
@@ -9,7 +18,12 @@
918

1019

1120
class BlockBody(Container):
12-
"""The body of a block, containing payload data."""
21+
"""
22+
The body of a block, containing payload data.
23+
24+
Currently, the main operation is voting. Validators submit votes which are
25+
packaged into blocks.
26+
"""
1327

1428
attestations: Attestations
1529
"""Plain validator attestations carried in the block body.
@@ -20,7 +34,16 @@ class BlockBody(Container):
2034

2135

2236
class BlockHeader(Container):
23-
"""The header of a block, containing metadata."""
37+
"""
38+
The header of a block, containing metadata.
39+
40+
Block headers summarize blocks without storing full content. The header
41+
includes references to the parent and the resulting state. It also contains
42+
a hash of the block body.
43+
44+
Headers are smaller than full blocks. They're useful for tracking the chain
45+
without storing everything.
46+
"""
2447

2548
slot: Slot
2649
"""The slot in which the block was proposed."""

src/lean_spec/subspecs/containers/checkpoint.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
"""Checkpoint Container."""
1+
"""
2+
Checkpoint Container.
3+
4+
A checkpoint marks a specific moment in the chain. It combines a block
5+
identifier with a slot number. Checkpoints are used for justification and
6+
finalization.
7+
"""
28

39
from typing import Self
410

src/lean_spec/subspecs/containers/state/state.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
"""State Container for the Lean Ethereum consensus specification."""
1+
"""
2+
State Container for the Lean Ethereum consensus specification.
3+
4+
The state contains everything needed for consensus. It tracks the current slot,
5+
recent blocks, and validator votes. State also records which blocks are
6+
justified and finalized.
7+
"""
28

39
from typing import Any, Dict, List
410

0 commit comments

Comments
 (0)