# 用 AI 和 TLA+ 验证 Raft 实现模型

Original title: Verifying formal models of Raft implementations

> Hacker News story 50577353 · language: zh · submitted 2026-11-20
> Web version: https://zeli.app/zh/story/50577353
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 6 · by [alpaylan](<https://news.ycombinator.com/user?id=alpaylan>) · 💬 0
[original](<https://antithesis.com/blog/2026/verifying-formal-models/>) · [HN discussion](<https://news.ycombinator.com/item?id=50577353>)

## Summary

在 Antithesis，我们利用 AI 和形式化方法不仅寻找分布式系统中的漏洞，更致力于从根源上消除特定类别的缺陷。本文展示了我们如何结合 AI、TLA+ 和 Antithesis 平台，对 HashiCorp Raft 和 etcd-raft 这两个主流生产库进行形式化建模与验证。尽管两者都实现了 Raft 协议，但在设计细节上存在显著差异。通过模型检查、Antithesis 测试和证明尝试的迭代循环，我们不仅修复了代码中的已知和新发现漏洞，还完善了模型本身。最终，我们成功证明了这些特定设计在核心安全属性（如选举安全、状态机安全）上符合 Raft 论文的理论保证，为分布式系统的一致性验证提供了新的范式。

## Key quote

> 我们的流程证明了，在应用了必要的工作坊和修复后，HashiCorp Raft 和 etcd-raft 中体现的特定设计确实提供了与 Raft 论文相同的保证。

---

## Cite

- Page: https://zeli.app/zh/story/50577353
- Date: 2026-11-20
- Source: antithesis.com (https://antithesis.com/blog/2026/verifying-formal-models/)
- Hacker News: https://news.ycombinator.com/item?id=50577353

## Other languages

- en: https://zeli.app/story/50577353 · markdown: https://zeli.app/story/50577353.md
- ja: https://zeli.app/ja/story/50577353 · markdown: https://zeli.app/ja/story/50577353.md
- ko: https://zeli.app/ko/story/50577353 · markdown: https://zeli.app/ko/story/50577353.md
- de: https://zeli.app/de/story/50577353 · markdown: https://zeli.app/de/story/50577353.md
- es: https://zeli.app/es/story/50577353 · markdown: https://zeli.app/es/story/50577353.md
- ru: https://zeli.app/ru/story/50577353 · markdown: https://zeli.app/ru/story/50577353.md
