Skip to content

Commit ba5431c

Browse files
committed
docs: link new doc and update lmd-ghost
1 parent ba7639a commit ba5431c

3 files changed

Lines changed: 38 additions & 30 deletions

File tree

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# Consensus
66

7+
- [Slots and Intervals](./slots_and_intervals.md)
78
- [3SF-mini: Justification & Finalization](./3sf_mini.md)
89
- [LMD-GHOST Fork Choice](./lmd_ghost.md)
910

docs/introduction.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ consensus client, written in Rust.
66
This book collects the design notes and operator-facing references for ethlambda.
77
It is split into two parts:
88

9-
- **Consensus** explains the algorithms ethlambda implements: the
10-
[3SF-mini](./3sf_mini.md) justification and finalization rules, and the
11-
[LMD-GHOST](./lmd_ghost.md) fork choice algorithm. Both documents are
12-
implementation-agnostic; ethlambda-specific behaviour is called out in
13-
blockquotes.
9+
- **Consensus** explains how the chain advances: the
10+
[slot and interval structure](./slots_and_intervals.md) that schedules every
11+
validator duty, the [3SF-mini](./3sf_mini.md) justification and finalization
12+
rules, and the [LMD-GHOST](./lmd_ghost.md) fork choice algorithm. These
13+
documents are implementation-agnostic; ethlambda-specific behaviour is called
14+
out in blockquotes.
1415
- **Operations** documents observable surfaces of a running node:
1516
[Prometheus metrics](./metrics.md), [checkpoint sync](./checkpoint_sync.md),
1617
and the [fork choice visualization](./fork_choice_visualization.md) served

docs/lmd_ghost.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,9 @@ designated moments. This ensures all validators operate on a consistent view.
455455
fixed points
456456
```
457457

458-
> **In ethlambda:** The two stages are called "new" and "known" attestations, stored
459-
> in `LatestNewAttestations` and `LatestKnownAttestations` tables respectively.
460-
> Promotion happens at tick intervals 0 (if proposing) and 3 (end of slot).
458+
> **In ethlambda:** The two stages are called "new" and "known" attestations, held in
459+
> the in-memory `new_payloads` and `known_payloads` buffers of the `Store` respectively.
460+
> Promotion happens at tick intervals 0 (if proposing) and 4 (end of slot).
461461
462462
### Why Staged Promotion?
463463

@@ -618,27 +618,28 @@ source code locations, and performance.
618618

619619
### Tick-Based Scheduling
620620

621-
ethlambda divides time into **4-second slots**, each split into **4 intervals** (1 second
622-
each). Fork choice operations are scheduled at specific intervals:
621+
ethlambda divides time into **4-second slots**, each split into **5 intervals** (800 ms
622+
each), as described in [Slots and Intervals](./slots_and_intervals.md). Fork choice
623+
operations are scheduled at specific intervals:
623624

624625
```text
625-
ONE SLOT (4 seconds)
626-
┌──────────────┬────────────────────────────┬──────────────┐
627-
Interval 0 Interval 1 Interval 2 Interval 3 │
628-
(t+0s) (t+1s) │ (t+2s) │ (t+3s)
629-
├──────────────┼────────────────────────────┼──────────────┤
630-
631-
IF PROPOSER: │ NON-PROPOSER:│ update_safe │ accept_new
632-
accept new │ produce _target() │ _attestations
633-
attestationsattestation │ ()
634-
+ propose │ (2/3 vote
635-
block │ threshold) │ update_head()
636-
637-
update_head()
638-
639-
└──────────────┴────────────────────────────┴──────────────┘
640-
641-
◄─────────────── Slot N ──────────────────────────────────────►
626+
ONE SLOT (4000 ms)
627+
┌────────────┬────────────────────────────────────┬────────────┐
628+
│ Interval 0 Interval 1 Interval 2 Interval 3 │ Interval 4
629+
t+0 mst+800 ms │ t+1600 ms │ t+2400 ms │ t+3200 ms
630+
├────────────┼────────────────────────────────────┼────────────┤
631+
632+
│IF PROPOSER:│ ALL │ aggregators│update_safe │accept_new_
633+
│ accept new │ VALIDATORS:│ publish _target() │attestations
634+
attestationproduce │ aggregated │()
635+
│ + propose │ attestation│ attestation│ (2/3 vote
636+
│ block │ │ │ threshold) │update_head
637+
│()
638+
│update_head
639+
()
640+
└────────────┴────────────────────────────────────┴────────────┘
641+
642+
◄─────────────── Slot N ──────────────────────────────────────────
642643
```
643644

644645
**Detailed sequence:**
@@ -655,20 +656,25 @@ each). Fork choice operations are scheduled at specific intervals:
655656
656657
Interval 1 ─ Attestation production
657658
658-
├── Non-proposers:
659+
├── All validators, proposer included:
659660
│ └── Create attestation with:
660661
│ • head = current fork choice head (newest head)
661662
│ • target = derived from safe_target (for 3SF-mini)
662663
│ • source = latest_justified checkpoint
663664
│ Publish attestation to gossipsub
664665
665-
Interval 2 ─ Safe target update
666+
Interval 2 ─ Aggregation
667+
668+
├── Aggregators: aggregate their subnet's gossip signatures
669+
│ └── Publish the aggregated attestation to gossipsub
670+
671+
Interval 3 ─ Safe target update
666672
667673
├── Recalculate safe_target using 2/3 supermajority threshold
668674
│ └── Only blocks with ≥ ⌈2V/3⌉ attestation weight qualify
669675
│ (V = total validators)
670676
671-
Interval 3 ─ End of slot
677+
Interval 4 ─ End of slot
672678
673679
├── Promote new → known attestations
674680
└── Run fork choice → update_head()

0 commit comments

Comments
 (0)