docs: add explanation of LMD-GHOST and 3SF-mini#128
docs: add explanation of LMD-GHOST and 3SF-mini#128MegaRedHand wants to merge 8 commits intomainfrom
Conversation
🤖 Kimi Code ReviewDocumentation Review – PR #128Overall: Excellent, comprehensive documentation that clearly explains 3SF-mini and LMD-GHOST. No critical issues, only minor suggestions. 3sf_mini.md
ghost-fork-choice.md
3sf-mini-infographic.html
Security ConsiderationsNo security issues identified in the documentation itself. The clear explanation of the justifiability schedule and finalization conditions is crucial for consensus correctness and appears accurate. Suggestions
Conclusion: The documentation is high-quality and accurate. The minor issues noted above don't affect consensus correctness. Automated review by Kimi (Moonshot AI) · custom prompt |
🤖 Claude Code ReviewNow I have enough context. This is a documentation-only PR that adds comprehensive explanations of LMD-GHOST and 3SF-mini. Let me provide my review: PR Review: Documentation of LMD-GHOST and 3SF-miniSummaryThis PR adds extensive documentation explaining ethlambda's fork choice (LMD-GHOST) and finality (3SF-mini) mechanisms. The changes are documentation-only — no code modifications. The additions include:
Overall Assessment✅ Approved — This is high-quality documentation that will significantly help developers understand the consensus layer. The explanations are clear, well-structured, and include helpful visualizations. Detailed Review1.
|
🤖 Codex Code ReviewSummary Findings
Notes
If you want, I can suggest exact wording for the finalization rule that matches the implementation. Automated review by OpenAI Codex · custom prompt |
a8cffaa to
403f887
Compare
0bc7489 to
79d959d
Compare
🤖 Kimi Code ReviewReview SummaryThis PR adds comprehensive documentation for ethlambda's fork choice and finalization mechanisms. The documentation is well-structured and technically accurate. Here are my observations: Strengths
Minor Issues
Suggestions
These are minor documentation issues that don't affect correctness. The technical content is solid and will be valuable for understanding ethlambda's consensus mechanisms. Automated review by Kimi (Moonshot AI) · custom prompt |
🤖 Codex Code ReviewSummary Findings
Notes Automated review by OpenAI Codex · custom prompt |
Greptile SummaryAdds comprehensive documentation for two core consensus mechanisms. The Key additions:
Note: The PR description lists TODOs including reviewing the LMD-GHOST doc and explaining differences from Casper FFG - the author acknowledges this is work in progress. Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| docs/3sf_mini.md | Expanded from minimal placeholder to comprehensive 308-line guide explaining justification, finalization, and justifiability schedule with accurate code references and clear examples |
| docs/ghost-fork-choice.md | New 759-line comprehensive guide to LMD-GHOST fork choice algorithm with historical context, clear examples, accurate code references, and ethlambda-specific implementation details |
Last reviewed commit: 79d959d
🤖 Claude Code ReviewPR #128 Review —
|
| delta | Rule | Formula |
|---|---|---|
| 36 | 2 | 6² |
The formula column makes this worse: 6²=6×6 visually pattern-matches the pronic format used above (2×3, 3×4, 4×5, 5×6), reinforcing the false impression that 36 is a pronic. Changing it to simply 6² removes the ambiguity.
Note: the visualization directly above the table (the two rows of ✓ / · marks) is actually correct — there is only one ✓ at delta=36, consistent with it being a perfect square only. The inconsistency is between the visualization and the table.
Minor Issues
docs/ghost-fork-choice.md — Tiebreaker direction
The document states "lexicographically higher block root hash wins." This is a concrete protocol detail that affects consensus correctness if two nodes apply opposite tiebreakers. It would be worth adding an inline reference to the relevant line in compute_lmd_ghost_head() so readers can verify the actual comparison direction without having to dig into the code.
Acknowledged gap
The PR description lists "Explain how 3SF-mini differs from Casper FFG" as a TODO. The current LMD-GHOST doc briefly mentions Casper FFG in the two-layer diagram but doesn't do a detailed comparison. Since this is already tracked in the PR, just noting it for completeness.
What Looks Good
- The worked examples in both documents are correct. The 4-validator justification/finalization example in
3sf_mini.md, the 5-validator LMD-GHOST head-selection example, and the 4-phase backoff scenario (with the math checked: 30²=900, 31²=961, 31×32=992, 32²=1024) are all accurate. - The finalization check logic is described correctly:
try_finalize()usesoriginal_finalized_slot(not the current one) to avoid artifacts from mid-processing finalization advancement. This matchesCLAUDE.md. - The two-layer consensus framing (LMD-GHOST for fork choice, 3SF-mini for finality) clearly explains why the fork choice descent starts from the justified checkpoint, not genesis.
- The attestation pipeline section correctly identifies the asymmetry between gossip attestations (pending) and on-chain attestations (active), and the reasoning for the proposer's own attestation entering as pending is well-explained.
- The differences-from-Ethereum-Beacon-Chain table (no proposer boost, no balance weighting, no equivocation discounting) is accurate and useful context.
- Performance characteristics and the proto-array TODO reference are appropriate callouts for implementers.
Automated review by Claude (Anthropic) · custom prompt
This PR adds documentation about LMD-GHOST and 3SF-mini to the repo.