论文:The Weakest Failure Detector for Solving Consensus
本篇整理 Tushar Deepak Chandra、Vassos Hadzilacos 与 Sam Toueg 的《The Weakest Failure Detector for Solving Consensus》。正文按 Journal of the ACM Vol. 43, No. 4(1996)版本逐页翻译;每一页保留原始 PDF 页面图,failure detector、Consensus、reducibility、crash failure、simulation forest、DAG、valency 等术语按分布式系统领域惯例保留 English 或中英并列。
论文:The Weakest Failure Detector for Solving Consensus
相关文章:论文:Impossibility of Distributed Consensus with One Faulty Process · 论文:Consensus in the Presence of Partial Synchrony · 论文:Paxos Made Simple · 论文:Practical Byzantine Fault Tolerance(PBFT)
TL;DR
- 问题:在 asynchronous distributed system 中允许 crash failures 时,什么样的 failure detector 才足以解决 Consensus?
- 已知起点:eventually weak failure detector
◇𝒲足以在多数 process 正确时解决 Consensus;它只要求最终每个 crashed process 被某个 correct process 持续怀疑,并且最终存在一个不被任何 correct process 怀疑的 correct process。 - 核心结果:
◇𝒲不仅足够,而且是最弱的。任何能够用于解决 Consensus 的 failure detector𝒟,都可以被转换为 eventually trusting failure detector𝒱,再由𝒱转换为◇𝒲。 - 关键技术:把
𝒟提供的任意、可能无限范围的输出值广播成 DAG;DAG 诱导出 Consensus𝒟的 simulation forest;通过 critical index、fork/hook decision gadget 和 valency 证明抽取出的 process 必然 correct。 - 重要边界:当
n > 2f时,◇𝒲是最弱 failure detector;当n ≤ 2f时,任何可解决 Consensus 的 failure detector 都必须严格强于◇𝒲。
名词解释
| 名词 | 含义 | 本文对应物 |
|---|---|---|
| asynchronous system | 不对 message delay、clock drift 和 step execution time 设上界的系统 | 本文的基础 model |
| failure detector | 向各 process 提供可能错误的 failure hints 的 distributed oracle | 每个 process 有本地 module |
◇𝒲 | eventually weak failure detector | 最终怀疑所有 crashed process 中的每一个,并最终留下一个不被 correct process 怀疑的 correct process |
𝒱 | eventually trusting failure detector | 最终所有 correct processes trust 同一个 correct process |
| reducibility | 一个 detector 可被算法转换成另一个 detector | 𝒟 ⟹ 𝒱 表示 𝒱 可由 𝒟 模拟 |
| failure pattern | 每个时间点已经 crashed 的 process 集合 | F : 𝕋 → 2^P |
| failure detector history | 每个 process、每个时间点看到的 detector output | H : P × 𝕋 → 𝒟 的值域 |
| valency | 从 simulation state 出发可能决定的 value 集合 | 0-valent、1-valent、bivalent |
| simulation forest | 从多个 initial configuration 出发的 Consensus𝒟 simulation trees 集合 | 用来抽取一个 eventually trusted correct process |
| decision gadget | 从 bivalent pivot 通向 0-valent 与 1-valent leaf 的有限子树 | fork 或 hook |
目录
| 章节 | 内容 |
|---|---|
| 版本与来源 | JACM 版本、固定 PDF 与图像处理 |
| 原文页面与逐页翻译 | 38 个 PDF 页面按原页保留 |
| 结果与设计判断 | weakest detector、reducibility 与 proof architecture |
| 本篇验收 | 页数、图片、定理和附录覆盖 |
版本与来源
- 论文标题:The Weakest Failure Detector for Solving Consensus。
- 作者:Tushar Deepak Chandra、Vassos Hadzilacos、Sam Toueg。
- 版本:Journal of the ACM,Vol. 43,No. 4,July 1996,pp. 685–722;preliminary version 发表在 PODC 1992。
- 本地固定来源:University of Texas PDF mirror;作者与题录信息由 Cornell eCommons record 和 IBM Research record 交叉核对。
- 本地固定文件:
source/the-weakest-failure-detector-for-solving-consensus.pdf。 - PDF 固定信息:38 页;SHA-256:
d1068e16924fce1745cf96f85212035dad763907416776ea815626a7a685eb。 - 附件处理:每页按原始 PDF 页面矩形以 2× 渲染为 PNG,存放于
assets/56 The Weakest Failure Detector for Solving Consensus/,正文按600宽度嵌入,保留原页位置和原始比例。 - 版权页说明:原文允许不以盈利或商业优势为目的的个人/课堂复制,但要求保留 ACM copyright notice、标题和日期,并声明复制经 ACM 许可;其他复制、再发布、服务器张贴或列表再分发需要事先许可和/或付费。本笔记保留来源信息和原页面图,不替代出版物。
原文页面与逐页翻译
第 1 页:Abstract、分类与出版信息

The Weakest Failure Detector for Solving Consensus
作者:Tushar Deepak Chandra(IBM T. J. Watson Research Center)、Vassos Hadzilacos(University of Toronto)、Sam Toueg(Cornell University)。
Abstract
本文确定:在允许 crash failures 的 asynchronous distributed system 中解决 Consensus,需要、也只需要什么样的 failure information。
Chandra 与 Toueg 的前一篇工作表明,◇𝒲 是一种非常弱的 failure detector;在 correct processes 占多数的 asynchronous system 中,它已经足以解决 Consensus。本文证明:要解决 Consensus,任意 failure detector 至少必须提供与 ◇𝒲 一样多的信息。因此,在 correct processes 占多数的 asynchronous system 中,◇𝒲 确实是解决 Consensus 的 weakest failure detector。
Categories and Subject Descriptors:C.2.4 Computer-Communication Networks:distributed systems、distributed applications、distributed databases、network operating systems;C.4 reliability、availability、serviceability;D.1.3 concurrent programming、distributed programming;D.4.5 reliability、fault-tolerance;F.1.1 models of computation、relations among models;F.1.2 parallelism、concurrency;H.2.4 concurrency、distributed systems、transaction processing。
General Terms:Algorithms、Reliability、Theory。
Additional Key Words and Phrases:agreement problem、asynchronous systems、atomic broadcast、Byzantine Generals’ problem、commit problem、consensus problem、crash failures、failure detection、fault-tolerance、message passing、partial synchrony、processor failures。
论文列出 NSF、DARPA/NASA Ames、IBM Endicott Programming Laboratory、Siemens Corp. 以及加拿大 Natural Sciences and Engineering Research Council 的资助信息;初步版本发表于 PODC 1992,页码 147–158。
原文最后给出作者当时的通信地址,并保留 ACM 的复制许可声明:个人或课堂使用的非盈利复制可以免收费用,但必须保留 copyright notice、题目与日期,并说明复制经 ACM 许可;其他复制或再发布需要具体许可和/或费用。
第 2 页:Asynchronous model、Consensus impossibility 与 failure detector

1. Introduction
1.1 BACKGROUND
Asynchronous distributed computing model 已被广泛研究。非正式地说,asynchronous distributed system 不对 message transmission time 和 relative processor speed 设上界。因此,面向 asynchronous system 设计的 algorithm,其 correctness 不能依赖这些 bounds。现实系统中,不可预测的 system load 会引入 asynchrony。
这个 model 很有吸引力,但许多在 synchronous system 中可解的 fault-tolerant distributed-computing 基本问题,在 asynchronous system 中不可解。特别是,即使只允许一个 crash failure,也无法 deterministic 地解决 Consensus,以及 Atomic Broadcast 等多种 reliable broadcast 问题。根本原因是:很难判断一个 process 是真的 crashed,还是只是“非常慢”。
已有的绕过方法包括 randomization、定义更弱的问题、以及研究多种 partial synchrony model。然而,Consensus 和 Atomic Broadcast 的 deterministic solution 仍是 asynchronous fault-tolerant computing 的主要障碍。
另一条路线是给 asynchronous model 增加 failure detector。failure detector 是一个 distributed oracle,会给出(可能错误的)“哪些 process 可能已经 crashed”的提示。每个 process 有一个本地 failure detector module,监控其他 process 并维护当前 suspects 列表;process 周期性读取该列表,用它来解决 Consensus。
failure detector 可能错误地怀疑仍在运行的 process;如果后来认为怀疑是错误的,也可以把该 process 从列表中移除。因此,一个 module 可能反复添加和删除 suspects;不同 process 在同一时刻也可能拥有不同的 suspect 列表。
failure detector 的错误不能阻止 correct process 按 specification 行为。例如,若用于解决 Atomic Broadcast 的 detector 永久错误地怀疑 correct process p 已 crashed,algorithm 仍必须保证:p 与其他 correct processes deliver 同一组、同一顺序的 messages;如果 p broadcast message m,所有 correct processes 都必须 deliver m。
第 3 页:Eventually weak failure detector 与问题定义

前一篇工作表明,一种非常弱的 failure detector 已足以在 correct processes 占多数时解决 Consensus 和 Atomic Broadcast。本文记作 eventually weak failure detector ◇𝒲,只满足两个性质:
- 存在某个时间点,此后每个 crashed process 始终被至少一个 correct process 怀疑。
- 存在某个时间点,此后某个 correct process 始终不被任何 correct process 怀疑。
在任意给定时间 t,process 不能用 ◇𝒲 确定某个 process 是 correct,也不能确定将来是否存在一个在 t 之后不再被怀疑的 correct process。◇𝒲 可以犯无限多次错误:它可以永远把某些 correct processes 加入、再从 suspects 列表中移除;甚至某个 correct process 在整个 execution 中都可能被其他所有 process 错误怀疑。
这两个性质使用了“最终永远成立”的表述,看起来似乎比实践中能实现的条件更强。但对需要 termination 的问题,实际上只需让它们保持足够长的时间,长到 algorithm 完成即可。在 asynchronous system 中无法量化“足够长”,因为一次 step 或一次 message transmission 都可能任意久,所以用上述较强的形式描述最方便。
1.2 THE PROBLEM
◇𝒲 的 properties 足以解决 Consensus,但是否必要?例如,可以构造 detector 𝒳:它满足性质(1),但只要求最终某个 correct process 至少被 99% 的 correct processes 不再怀疑。𝒳 明显比 ◇𝒲 弱,那么能否用 𝒳 解决 Consensus?更一般地,解决 Consensus 所需的 weakest failure detector 是什么?
第 4 页:表面上不可比较的 detectors 与 reducibility

考虑 detector 𝒴:
- 最终每个 crashed process 都始终被所有 correct processes 怀疑;
- 最终某个 correct process 始终不被多数 processes 怀疑。
𝒴 的第一条比 ◇𝒲 强,第二条比 ◇𝒲 弱,表面上两者不可比较。令人意外的是,只要 correct processes 占多数,就可以用 𝒴 解决 Consensus。若只比较 detector 的局部 properties,似乎会得出 ◇𝒲 不是 weakest,甚至 weakest detector 可能根本不存在的结论。
但 𝒴 与 ◇𝒲 可以通过一个 distributed algorithm 联系起来:存在算法 T𝒴→◇𝒲,能把 𝒴 转换成满足 ◇𝒲 两条性质的 detector。我们称 ◇𝒲 reducible to 𝒴,记作 ◇𝒲 ⪯ 𝒴;直觉上,𝒴 至少提供了与 ◇𝒲 一样多的 failure information。
1.3 THE RESULT
前一篇工作表明,当 n > 2f(n 是 process 总数,f 是最大 crash 数量)时,◇𝒲 可以解决 Consensus。本文证明:任何可用于解决 Consensus 的 failure detector 𝒟,都可以被转换成 ◇𝒲。因此,在 n > 2f 的 asynchronous system 中,◇𝒲 是 weakest failure detector;若 n ≤ 2f,任何能够解决 Consensus 的 detector 都必须严格强于 ◇𝒲。
难点有两层:第一,不能把 𝒟 的 output 限制为 suspect list,它可以是任意编码 failure information 的 value,例如 (not p) and (q or r),甚至是未知的任意复杂编码;转换 algorithm 必须能从中解码。第二,即便 output 没有编码,单独观察 𝒟 也未必能直接提取 ◇𝒲 的 properties。
第 5 页:模型概览、failure pattern 与 failure detector history

由于 𝒟 能够解决 Consensus,存在对应的 Consensus𝒟 algorithm;该 algorithm 能“解码” 𝒟 的 failure information 并解决 Consensus。本文的 reduction algorithm T𝒟→𝒱 正是借助 Consensus𝒟 完成提取。
2. The Model
考虑 asynchronous distributed system:message delay、clock drift 和执行一个 step 所需时间都没有上界。系统有 n 个 processes,记为 P = {p₁, p₂, …, pₙ};每一对 processes 通过 reliable communication channel 连接。
为简化形式化描述,假设存在 discrete global clock,取值范围为 natural numbers。它只是 fictional device,processes 无法访问。
2.1 FAILURES AND FAILURE PATTERNS
Process 可能 crash,即提前停止。failure pattern F 是从时间集合 𝕋 到 2ᴾ 的函数;F(t) 表示截至时间 t 已经 crashed 的 process 集合。crash 不会 recover,因此 F(t) ⊆ F(t+1)。定义:
crashed(F) = ⋃ₜ F(t);correct(F) = P − crashed(F)。
只考虑至少有一个 correct process 的 failure pattern。
2.2 FAILURE DETECTORS
failure detector 提供关于本次 execution 的 failure pattern 的(可能错误)information。detector 有一个可能无限的 output value range 𝒱。history H 是 P × 𝕋 → 𝒱 的函数,H(p,t) 是 process p 在时间 t 的 module output。failure detector 𝒟 把每个 failure pattern F 映射为一组允许的 histories 𝒟(F)。
以 ◇𝒲 为例,其 output 是 suspect process 的集合,值域为 2ᴾ;◇𝒲(F) 包含所有满足前述两条 eventually properties 的 histories。
第 6 页:failure detector 的 nondeterminism 与 algorithm steps

detector 被定义为 F 的函数,并不意味着 implementation 只能使用 F。它还可以使用 message arrival 等 execution 的其他方面。因此,同一个 F 可能产生不同的 detector histories;𝒟(F) 允许包含多个 history,实际 execution nondeterministically 选取其中一个。
2.3 ALGORITHMS
把 asynchronous channel 建模为 message buffer,其中每条 message 形如 (p, data, q),表示 p 已向 q 发送 data,而 q 尚未收到。
algorithm A 由 n 个 deterministic automata 组成,每个 process 一个。process p 的一步包含三个 atomically 执行的 phase:
- Receive phase:从 buffer 接收一条发给
p的 message,或接收 null messageλ,表示该步没有收到 message。 - Failure detector query phase:查询本地 detector;若返回值为
d,称p在该步 seesd。 - Send phase:依据 step 开始时的 local state、收到的 message 和 detector value,改变 state,并向各 process 发送 message。
实际接收哪条 message 由 nondeterministically 选择;即使 buffer 中已有 message,也可以收到 λ。message delay 可以任意大,但要求有限:只要 recipient 足够多次尝试 receive,每条发出的 message 最终都会被收到。message 可以乱序到达。
nondeterminism 来自 message buffer,而不是 process 自身的随机选择。automaton 是 deterministic 的:发送的 message 和新 state 唯一取决于旧 state、收到的 message 和 detector value。为简单起见,假设 p 至多向 q 发送同一条 message 一次;也可通过给 message 加 counter 消除该假设。
第 7 页:configuration、schedule、partial run 与 run

2.4 CONFIGURATIONS, RUNS AND ENVIRONMENTS
configuration 是 (s, M):s 把每个 process 映射到 local state,M 是当前 message buffer 中的 triples 集合。algorithm 的 initial configuration 中,所有 process 处于各自 initial state,M 为空。
一个 step 由 process p、收到的 message m、看到的 detector value d 唯一确定,写成 (p,m,d,A)。若 m 位于 buffer 或 m=λ,则该 step 对 configuration applicable。
schedule 是 algorithm steps 的有限或无限序列;空 schedule 记为 ε。如果有限 schedule S 对 configuration C applicable,S(C) 表示执行后的 configuration。C′ 是 (S,C) 的 configuration,当且仅当它是 S 某个有限 prefix 应用到 C 的结果。
使用 detector 𝒟 的 partial run 为 R = ⟨F,H𝒟,I,S,T⟩:F 是 failure pattern,H𝒟 ∈ 𝒟(F),I 是 initial configuration,S 是 finite schedule,T 是记录各 step 时间的递增有限序列。每个 step 执行时,process 尚未 crashed,且看到的 d 等于 H𝒟(p,T[i])。
run 与 partial run 相同,但 S 和 T 都是 infinite。它还必须满足:每个 correct process 在 S 中执行无限多步;每条发给 correct process 的 message 最终都会被收到。
第 8 页:Consensus 的四个 correctness 条件

前一篇工作表明,用 ◇𝒲 解决 Consensus 需要 n > 2f;其他 detector 的要求可能不同,因此把环境 𝓔 定义为一组允许的 failure patterns。
3. The Consensus Problem
每个 process 的 initial value 是 0 或 1,并且必须不可撤销地决定其中一个值。algorithm 为每个 process 提供表示 initial value 的两个 initial states,以及两个 disjoint 的 decision-state 集合 Decide₀ 与 Decide₁。
称 algorithm A 在 environment 𝓔 中使用 detector 𝒟 解决 Consensus,当且仅当所有 F ∈ 𝓔 的 runs 都满足:
- Termination:每个 correct process 最终进入
Decide₀ ∪ Decide₁。 - Irrevocability:一旦 correct process 决定
k,以后始终处于Decideₖ。 - Agreement:任意两个 correct processes 的 decision values 相同。
- Validity:若 correct process 决定
v,则某个 process 的 initial value 是v。
形式化地说,validity 要求:若某个 correct process 在以 initial configuration I 开始的 run 中决定 k,则存在某个 process q,其 initial state 表示 k。
第 9 页:Reducibility 与结果路线图

4. Reducibility
定义 algorithm T𝒟→𝒟′ 如何在 environment 𝓔 中把 detector 𝒟 转换为 detector 𝒟′。算法在每个 process p 维护变量 outputₚ,它模拟 𝒟′ 在 p 的输出;在 run R 中,所有 output variables 组成 history Oᴿ。
若 T𝒟→𝒟′ 使用 𝒟 的任意 run 都满足 Oᴿ ∈ 𝒟′(F),则称它在 𝓔 中把 𝒟 转换为 𝒟′。已有需要 𝒟′ 的 algorithm B 时,可以让 process 并发运行转换算法,并把 B 中的 detector query 改为读取 outputₚ。
若存在这样的转换,就写作 𝒟′ ⪯𝓔 𝒟,称 𝒟′ 在 𝓔 中 reducible to 𝒟,或称 𝒟 至少与 𝒟′ 一样强。reducibility 是 transitive 的。转换不需要模拟 𝒟′ 的所有可能 histories,只需保证生成的每个 history 都属于 𝒟′(F)。
5. An Outline of the Result
本文先定义一个 detector 𝒱,它至少与 ◇𝒲 一样强;再证明任意能够解决 Consensus 的 𝒟 至少与 𝒱 一样强。因此得到 𝒟 ⪰ 𝒱 ⪰ ◇𝒲。
第 10 页:Eventually trusting detector 𝒱 与主要定理

𝒱 的 module output 是一个 process q,表示 process p 当前认为 q 是 correct,即 p trusts q。𝒱 的 history 满足:最终存在一个 correct process q,使所有 correct processes 永远 trust q。
THEOREM 5.1. 对任意 environment 𝓔,𝒱 ⪯𝓔 ◇𝒲。
证明(sketch):process p 周期性把 outputₚ 设置为 P − {q},其中 q 是 𝒱 当前 trust 的 process。最终所有 correct processes trust 同一 correct q,因此最终都不把 q 加入 suspects;任何 crashed process 最终都会被所有 correct processes 的 output 包含。于是得到 ◇𝒲 的两条性质。
THEOREM 5.2. 对任意 environment 𝓔,若 detector 𝒟 可在 𝓔 中用于解决 Consensus,则 𝒟 ⪰𝓔 𝒱。
这是全文核心定理,第 6 节给出 reduction algorithm T𝒟→𝒱。
COROLLARY 5.3. 若 𝒟 可用于解决 Consensus,则 𝒟 ⪰𝓔 ◇𝒲。
当 n > 2f 时,前一篇工作已证明 ◇𝒲 可以解决 Consensus,因此:
THEOREM 5.4. 在所有满足 n > 2f 的 environment 中,◇𝒲 是可用于解决 Consensus 的 weakest failure detector。
6. The Reduction Algorithm
6.1 OVERVIEW
固定 environment 𝓔、可以解决 Consensus 的 detector 𝒟,以及使用 𝒟 的 Consensus𝒟 algorithm。本文构造 T𝒟→𝒱。
第 11 页:从 detector samples 构造 DAG

固定 T𝒟→𝒱 的一条 run,其 failure pattern 为 F ∈ 𝓔,detector history 为 H𝒟 ∈ 𝒟(F)。process 周期性查询 𝒟,并把看到的 values 互相发送。由这些 samples 及其部分 temporal relationships 构造 directed acyclic graph(DAG)。
例如,q₁ 第 k₁ 次查询看到 d₁,向所有 process 发送 [q₁,d₁,k₁];q₂ 收到后把该 vertex 放入本地 DAG。之后 q₂ 第 k₂ 次查询看到 d₂,就加入 [q₂,d₂,k₂],以及从第一个 vertex 指向第二个 vertex 的 edge,表示前者先于后者。周期性传播本地 DAG 后,每个 correct process 都能构造同一个 infinite limit DAG G 的不断增长的 finite approximation。
G 可以用来模拟 Consensus𝒟 的 runs:这些 runs 假设使用的是 𝒟,并具有 F 和 H𝒟。G 的一条 path 给出 process、detector value 和 step 顺序;每个 step 仍可选择从模拟 buffer 接收哪条 message 或 null message。
固定一个 initial configuration I,所有与 G 的 path compatible 且对 I applicable 的 schedules 组成一棵 simulation tree;对多个 initial configurations,则得到 simulation forest Y。Y 是 infinite 且不能由 process 直接计算,但用于抽取 p* 所需的 crucial finite subgraph 最终会出现在每个 process 的 approximation 中。
第 12 页:DAG 的四个 properties 与 simulation forest

若本地 approximation 已包含 crucial subgraph,extraction algorithm 就会永久选择同一个 correct process p*;这正是 𝒱 所要求的性质。后续顺序为:定义 DAG 和 induced forest;给 forest tagging;用 critical index、decision gadget 找 correct process;最后说明 distributed computation 能收敛到同一选择。
6.2 A DAG AND A FOREST
给定 F 和 H𝒟,取满足以下四个 properties 的 infinite DAG G。每个 vertex 是 [p,d,k]:
- vertex 带有时间 label。若 label 为
t,则p在t尚未 crashed,且d = H𝒟(p,t);若 edgev₁ → v₂,则v₁的 label 小于v₂的 label。 - 对同一 process
p,若两个 vertices 的 query counters 满足k < k′,则[p,d,k] → [p,d′,k′]。 G是 transitively closed。- 对
G的任意 finite vertex subsetV和任意 correct processp,都存在d,k,使得V中每个 vertex 都能沿 edge 到[p,d,k]。
G 只需包含 failure detector values 的 sampling 及部分 temporal relationships,不必包含所有 values 或所有时间关系;property 4 保证每个 correct process 有无限多个 samples。
path g = [q₁,d₁,k₁], [q₂,d₂,k₂], … 与 schedule compatible,当且仅当 schedule 的第 i 步由 qᵢ 执行并看到 dᵢ,而收到的 message 可以是任意 applicable message 或 null。
第 13 页:Simulation tree 与 richness lemmata

给定 Consensus𝒟 的 initial configuration I,定义 Yᴳᴵ:其 vertices 是与 G compatible 且对 I applicable 的 finite schedules;root 是空 schedule ε;若 S′ = S ∘ e,则有从 S 到 S′ 的 edge,edge label 为 e。
LEMMA 6.2.1. 若 S 是从 root 出发的 finite path 所对应的 schedule,则存在时间序列 T,使 ⟨F,H𝒟,I,S,T⟩ 是 Consensus𝒟 的 partial run。
LEMMA 6.2.2. 若 S 是 infinite path 对应的 schedule,且其中每个 correct process 执行无限多步、发给 correct process 的 messages 最终都被收到,则存在 T,使 ⟨F,H𝒟,I,S,T⟩ 是 run。
LEMMA 6.2.3. 对任意两个 initial configurations I,I′,若 S 是 Yᴳᴵ 的 vertex 且对 I′ applicable,那么 S 也是 Yᴳᴵ′ 的 vertex。
LEMMA 6.2.4. 若 S 是 Yᴳᴵ 的 vertex,p correct,且 m 是 S(I) 中发给 p 的 message 或 null message,则存在某个 d,使 S ∘ (p,m,d) 是 Yᴳᴵ 的 child。
LEMMA 6.2.5. 若 S′ 是 S 的 descendent,且 S′ ∘ (p,m,d) 在树中,则从 S 到 S′ 路径上的每个 vertex S₀ 都有 child S₀ ∘ (p,m,d)。
LEMMA 6.2.6. 对任意 vertices S,S₀,S₁,存在只包含 correct processes steps 的 finite schedule E,使得 S ∘ E 中所有 correct processes 都已决定;并且如果 E 对 S₀(I) 或 S₁(I) applicable,则对应的扩展仍在 Yᴳᴵ 中。
令 Iᵢ 为前 i 个 processes 的 initial value 为 1、其余为 0 的 configuration。由 G 诱导的 simulation forest 是 {Yᴳᴵ⁰,…,Yᴳᴵⁿ}。
第 14 页:Tagging、valency 与 critical index

6.3 TAGGING THE SIMULATION FOREST
若 vertex S 的某个 descendent S′ 中有 correct process 决定 k,则给 S 打 tag k。令 Yᵢ 表示被 tagging 的 Yᴳᴵⁱ,Y 表示整个 tagged forest。
LEMMA 6.3.1. Yᵢ 的每个 vertex 至少有一个 tag。
证明:由 Lemma 6.2.6,从任意 vertex 都能沿只包含 correct steps 的有限 schedule 到达一个所有 correct processes 都已决定的 descendent。
只有一个 tag 的 vertex 称为 monovalent;同时有 tags 0、1 的 vertex 称为 bivalent。只有 tag k 的 vertex 称为 k-valent。
LEMMA 6.3.2. 每个 vertex 都是 0-valent、1-valent 或 bivalent。
LEMMA 6.3.3. bivalent vertex 的 ancestors 都 bivalent;k-valent vertex 的 descendents 都 k-valent。
LEMMA 6.3.4. 若 S 有 tag k,则在 S(Iᵢ) 中没有 correct process 已决定 1−k。
LEMMA 6.3.5. 若 S bivalent,则在 S(Iᵢ) 中没有 correct process 已决定。
由于 I₀ 中所有 initial values 都是 0,Iₙ 中都为 1:
LEMMA 6.3.6. Y₀ 的 root 是 0-valent;Yₙ 的 root 是 1-valent。
如果 Yᵢ 的 root bivalent,或 Yᵢ₋₁ 的 root 是 0-valent 而 Yᵢ 的 root 是 1-valent,则 index i 称为 critical;分别称为 bivalent critical 和 monovalent critical。
第 15 页:Decision gadget、fork 与 hook

LEMMA 6.3.7. 存在 critical index i,满足 0 < i ≤ n。
关键 index 用来抽取 correct process:若是 monovalent critical,pᵢ 必须 correct;若是 bivalent critical,则聚焦 Yᵢ,寻找 decision gadget。
6.4 OF HOOKS AND FORKS
decision gadget 是 Yᵢ 的 finite subtree,root 是 ε,恰有一个 0-valent leaf 和一个 1-valent leaf;两者的 least common ancestor 称为 pivot,必然 bivalent。
- Fork:两个 leaf 都是 pivot 的 children,并由同一 process
p执行不同 steps 得到。p是 deciding process。 - Hook:一个 leaf 是
S ∘ e,另一个是S ∘ (p,m,d) ∘ e。决定值取决于p是否在e之前执行该 step,因此p是 deciding process。
后续将证明:无论 fork 还是 hook,deciding process 都必须 correct。直觉是:如果它 crashed,其他 processes 无法知道决定分叉的那一步是否发生,因而无法安全地作出 decision,这会违背 Consensus𝒟 的 correctness。
LEMMA 6.4.1. 若 i 是 bivalent critical,则 Yᵢ 至少包含一个 decision gadget。
证明从 bivalent root 开始,以 round-robin 顺序考虑 correct processes。对当前 process p,取 buffer 中发给 p 的 oldest message(若没有则取 null),尽量选择仍为 bivalent 的 child。若该过程无限延长,则每个 correct process 执行无限多步、每条 message 最终被收到,从而形成一个 run;但整条 path 都 bivalent,依据 Lemma 6.3.5 没有 process 能决定,违反 termination。因此 path 必然 finite;其退出条件保证在某处出现 fork 或 hook。
第 16 页:Bivalent path 的终止与 gadget 起点

设上述 bivalent path 的最后 vertex 为 S,下一个 round-robin process 为 p,其 oldest message 为 m。由于 S bivalent,扩展 S ∘ (p,m,d) 不可能对所有 d 都 bivalent;由 Lemma 6.2.4 至少有一个 child 存在,并由 Lemma 6.3.2 是 monovalent。不妨设它是 0-valent。
CLAIM 6.4.2. bivalent path 必然 finite。
若它 infinite,associated schedule 会让每个 correct process 无限执行,并 eventually receive 所有 messages;Lemma 6.2.2 给出一个 run。由于每个 vertex 都 bivalent,Lemma 6.3.5 禁止任何 correct process 决定,和 Consensus termination 矛盾。
CLAIM 6.4.3. 存在 d′ 和 S′,使 S′ ∘ (p,m,d′) 是 1-valent,且 S 到 S′ 的路径不含 label (p,m,–)。
证明分两种情况:若从 S 到某个 1-valent descendent 的路径没有接收 m,则直接在该 descendent 后追加 (p,m,d′);若路径中第一次接收 m,就取该 edge 的 source。利用 bivalence path 的退出条件和 Lemma 6.2.5,可以把同一 (p,m,d′) extension 沿中间路径向前传播。
第 17 页:由两个分支构造 fork 或 hook

沿 S 到 S′ 的路径,每个 S₀ ∘ (p,m,d′) 都是 monovalent。特别地,S ∘ (p,m,d′) 也是 monovalent。分两种情况:
- 如果它是 1-valent,而另一个
S ∘ (p,m,d)是 0-valent,则以S为 pivot 得到 fork。 - 如果它是 0-valent,则从
S到S′的路径上必有相邻两个 vertices,使追加该 step 后的前者为 0-valent、后者为 1-valent;以两者的 parent 为 pivot 得到 hook。
这就证明了 Lemma 6.4.1:bivalent critical tree 中存在 decision gadget。
第 18 页:Monovalent critical 与 decision-gadget process

6.5 EXTRACTING THE CORRECT PROCESS
LEMMA 6.5.1. 若 index i 是 monovalent critical,则 pᵢ correct。
反证:假设 pᵢ crashed。由 Lemma 6.2.6,可以只执行 correct processes 的 steps,使 Yᵢ 的 root 到达所有 correct processes 都决定的 configuration。由于 i 是 monovalent critical,Yᵢ root 为 1-valent,所以它们都决定 1。Iᵢ 与 Iᵢ₋₁ 只在 pᵢ 的 state 上不同,而该 schedule 不包含 pᵢ 的 steps,因此它也适用于 Iᵢ₋₁,并使其他 processes 的 states 相同。于是 Yᵢ₋₁ root 也有 tag 1,与其 0-valent 矛盾。
LEMMA 6.5.2. 若 S bivalent,S₀、S₁ 分别是 0-valent 和 1-valent descendents,且从 S 到两者的 paths 都只包含同一 process p 的 null steps,则 p correct。
反证时若 p crashed,可以执行只包含 correct processes 的 schedule E。由于 p 不执行,S₀ 与 S₁ 对其他 processes 的 states 及 messages 相同;把 E 从一个分支复制到另一个分支,会使 1-valent branch 也产生 0-tag,矛盾。
第 19 页:Decision gadget 的 deciding process 必然 correct

LEMMA 6.5.3. 任意 decision gadget 的 deciding process 都 correct。
若 gadget 是 fork,直接使用 Lemma 6.5.2。若是 hook,设 0-valent leaf 为 S₀ = S ∘ (p′,m′,d′),1-valent leaf 为 S₁ = S ∘ (p,m,d) ∘ (p′,m′,d′)。
- 若
p=p′,使用 Lemma 6.5.2。 - 若
p≠p′,假设pcrashed。由于S₀和S₁只差一个p的 step,而后续E只含 correct steps,S₀ ∘ E中所有 correct processes 的 0-decision 可以复制到S₁ ∘ E;于是 1-valentS₁获得 0-tag,矛盾。
因此每个 decision gadget 都能给出一个 correct process。
第 20 页:全局 selection rule 与 Theorem 6.5.4

simulation forest 中可能有多个 critical indices 和多个 decision gadgets。selection rule 如下:
- 选择最小 critical index
i。 - 若
imonovalent critical,返回pᵢ。 - 若
ibivalent critical,按某种 graph encoding 选择Yᵢ中最小的 decision gadget,并返回它的 deciding process。
finite graph 可以编码为 natural number,因此“最小 gadget”是良定义的。
THEOREM 6.5.4. Figure 8 的 algorithm 总是选择一个 correct process。
证明:critical index 必然存在;monovalent critical 情况由 Lemma 6.5.1;bivalent critical 情况由 Lemma 6.4.1 保证 decision gadget 存在,再由 Lemma 6.5.3 保证其 deciding process correct。
第 21 页:Reduction algorithm 的 communication/computation 两个 components

6.6 THE REDUCTION ALGORITHM T𝒟→𝒱
Figure 8 的 selection method 仍是 centralized 的,并且使用 infinite forest。要得到 distributed algorithm,每个 process 协作构造同一个 simulation forest 的不断增长的 finite approximation。最终这些 approximation 会包含选择 p* 所需的 decision gadget 和 tagging information。
selection method 有三个阶段:构造 failure-detector samples 的 DAG G;构造并 tagging 由 G 诱导的 simulation forest;在 forest 上选择 correct process。
T𝒟→𝒱 有两个 components:
- Communication component:process 不断 query
𝒟,交换看到的 values,构造同一个 DAGG的 finite approximations。 - Computation component:process 对当前 DAG approximation 构造并 tagging simulation forest,然后选择一个 process;这一 component 不需要 communication。
6.6.1 THE COMMUNICATION COMPONENT
记 process p 当前的 DAG approximation 为 Gₚ。它不断执行:
- 收到
G_q时,将Gₚ替换为Gₚ ∪ G_q。 - 查询自己的 detector;若这是第
k次查询并看到d,则加入 vertex[p,d,k],并从插入前Gₚ的每个 vertex 加一条 edge 指向新 vertex。 - 把更新后的
Gₚ发送给所有 processes。
每轮对应模型中的一个 step,并按 receive、detector query、send 三个 phases 原子执行。Gₚ(t) 表示 p 在 t 时该 step 结束时的 graph。
第 22 页:Local graphs 的增长与共同 limit graph

LEMMA 6.6.1.1. 对任意 correct p 和时间 t:
Gₚ(t)是Gₚ(t′)的 subgraph,其中t′ ≥ t。- 对任意 correct
q,存在t′ ≥ t,使Gₚ(t)是G_q(t′)的 subgraph。
证明依赖于:graph 中没有 vertex 或 edge 被删除;p 最终会把自己的 graph 发给 q,而 q 最终会收到并合并它。
因此可定义 Gₚ^∞ = ⋃ₜ Gₚ(t)。
LEMMA 6.6.1.2. 对任意 correct p,q,Gₚ^∞ = G_q^∞。
证明:任意出现在 Gₚ^∞ 中的 vertex 或 edge,最终会传播到 q;反向同理。于是可定义共同的 limit graph G。
接下来需要证明 G 是满足 Section 6.2 四个 properties 的 infinite DAG。
第 23 页:Vertex/edge 的 earliest appearance 与 local graph properties

LEMMA 6.6.1.3. 设 v=[p,d,k] 是某个 local graph 的 vertex,t 是它首次出现在任意 local graph 的时间,则:
- 第一个包含
v的 graph 是Gₚ(t);此时p正在看到d,并且k是它的 query counter。 - 若 edge
u→v出现在某个 graph 中,它也出现在Gₚ(t)。 - 任意包含
v的 local graph 都包含Gₚ(t)。
这些结论来自 graph union protocol:vertex 不能凭空在其他 process 首次出现;edge 也不能比其首次出现更早地从远端传播回来。
定义 vertex 的 label 为它首次出现在任意 local graph 的时间。
LEMMA 6.6.1.4. 任意 correct p、任意 t,Gₚ(t) 满足:
- vertices 形如
[p′,d′,k′];label 反映 process 在该时刻尚未 crashed 且 detector value 为d′,并且任何 edge 都从较早 label 指向较晚 label。 - 同一 process 的 query counter 按顺序递增时,前 vertex 指向后 vertex。
- graph transitively closed。
- 存在稍晚时刻、某个
d,k,使Gₚ(t)中所有 vertices 都指向[p,d,k]。
由此,Gₚ(t) 是 acyclic 的。
第 24 页:Limit DAG 满足四个定义 properties

对 Lemma 6.6.1.4 的证明:
- property 1 来自 vertex 首次插入时对应 process 的真实 detector query,以及 edge 只在旧 graph 和新 query 之间加入。
- property 2 来自同一 process 的 query counter 永不递减:较小 counter 的 vertex 必然先出现,因此插入较大 counter 时会添加 edge。
- property 3:沿 graph path 归纳,最后一个 process 插入路径末 vertex 时,已经拥有前面的 path,于是按 algorithm 加入 transitive edge。
- property 4:correct
p会在t之后再次 query detector 并插入新 vertex;由于它合并了旧 graph,新 vertex 从所有旧 vertices 可达。
COROLLARY 6.6.1.5. limit graph G 满足 Section 6.2 定义的四个 DAG properties。
因此可以对这个实际构造出来的 G 使用之前的 tagged simulation forest 和 selection rule。
第 25 页:Computation component 与有限 forest

6.6.2 THE COMPUTATION COMPONENT
由于 limit graph G 满足四个 properties,Figure 8 的 centralized method 能选择 correct process。computation component 中,process p 周期性执行:
- 用当前 finite
Gₚ构造并 tagging finite simulation forestYₚ; - 对
Yₚ使用同一 selection rule。
Yₚ 的 limit 是 Y,而选择 p* 所需的信息位于 Y 的 finite subgraph 中,所以最终 p 会永远选择 p*。
实际 tagging 不能使用“所有 correct processes 是否在 descendent 中决定”这一全局信息;p 给 vertex S 打 tag k,当且仅当在 Yₚ 中存在 descendent S′,使 p 自己在 S′(Iᵢ) 中决定 k。若 p crashed,则不关心其 tagging。
如果当前 finite forest 尚无 critical index 或 decision gadget,process 暂时选择自己;这些结构最终会出现。
第 26 页:有限 forest 的逼近性与 tagging 收敛

令 Yₚ(t) 为 Gₚ(t) 诱导的 finite simulation forest。
LEMMA 6.6.2.1. 对任意 correct p 和时间 t:
Yₚ(t)是Y的 subgraph(忽略 tags)。Yₚ(t)是Yₚ(t′)的 subgraph,其中t′ ≥ t。⋃ₜ Yₚ(t) = Y。
证明 1:Gₚ(t) 是 G 的 subgraph,因此任何 compatible schedule 也与 G compatible。证明 2 来自 local graph 的单调增长。证明 3:Y 中任意 finite path 只使用有限个 G vertices,而 G 是 local graphs 的 union,所以该 path 最终出现在某个 Gₚ(t) 中;edges 同理。
LEMMA 6.6.2.2. 对任意 correct p 和 Yₚ 中任意 vertex S,最终 S 在 Yₚ 中的 tags 与 Y 中相同。
若 p 在某个 descendent 中决定 k,由于 p correct,该 tag 在真正的 Y 中也存在。反向地,若 S 在 Y 中有 tag k,可由 Lemma 6.2.6 延伸到一个所有 correct processes(包括 p)都决定 k 的 descendent;Lemma 6.6.2.1 说明该有限路径最终出现在 Yₚ,于是 p 最终也给 S 打 k tag。
第 27 页:有限 approximation 最终选择同一个 gadget

由于每个 root 的 tags 最终与 Y 相同,有限 approximation 最终会识别相同的 critical indices。令最小 critical index 为 i:
- 若
imonovalent critical,selection rule 直接返回pᵢ,与全局p*相同。 - 若
ibivalent critical,令g*为Yᵢ中 encoding 最小的 decision gadget。g*是 finite subgraph,所以最终会进入Yₚᵢ,且其所有 tags 最终稳定。
问题是,早期的 Yₚᵢ 可能存在 encoding 比 g* 更小、但只是因为 tags 尚未完整而暂时看起来像 gadget 的 fake gadgets。由于比 g* 小的 graphs 只有有限多个,且每一个的 tags 最终都会稳定,所有 fake gadgets 最终都会被排除,g* 成为有限 approximation 中的最小真正 gadget。
第 28 页:Theorem 6.6.2.3 与主要 reduction 定理

THEOREM 6.6.2.3. 对每个 correct process p,存在时间点,此后 outputₚ = p* 永远成立。
证明分两种情况。若全局最小 critical index 是 monovalent,root tags 稳定后每次都返回对应 pᵢ。若是 bivalent,有限的 g* 最终出现并稳定;所有 encoding 更小的 graph 最终不是 decision gadget,于是之后每次都返回 g* 的 deciding process p*。
因此得到 Section 5 的核心结论:
THEOREM 5.2. 对任意 environment 𝓔,若 detector 𝒟 可以用于解决 Consensus,则 𝒟 ⪰𝓔 𝒱。
证明:在 T𝒟→𝒱 的任意 execution 中,Theorem 6.6.2.3 保证所有 correct processes 最终永远输出同一 p*;Theorem 6.5.4 保证 p* correct。因此该 algorithm 确实把 𝒟 转换为 𝒱。
第 29 页:Atomicity 更弱的 model

7. Discussion
7.1 GRANULARITY OF ATOMIC ACTIONS
本文 model 对 step atomicity 采用了较强假设:一个 step 的 receive、detector query、send 三个 phases 不可分割并且发生在同一时间;process 不会在 step 中途 crash;send phase 一次向所有 processes 发送;不同 steps 不会同时发生。
这些假设与 FLP 使用的 model 一致,并简化了形式化描述。但前一篇工作采用了更弱的 model:三个 phases 可以在不同时间发生,send 给不同 processes 的 messages 也可能在不同时间发出;process 可能在 send phase 中途 failure,导致只有部分 correct processes 收到 message;不同 processes 的 actions 也可以同时发生,只需保证 message receive 晚于 send。
由于前一篇工作主要研究 failure detector 能解决哪些问题,较弱 model 反而使其结果更强。本文自然要问:reduction 结果是否也适用于较弱 model?答案是肯定的。
如果 𝒟 在弱 model 中可以解决 Consensus,那么它当然也能在强 model 中解决;本文结果先给出强 model 中的转换。随后检查 communication component:弱 model 中需要区分 process query detector 的时间 t 和把 value 插入 Gₚ 的时间 t′,但 t ≤ t′,因此 Lemma 6.6.1.4 仍成立。证明会更繁琐,但核心 reasoning 不变。
所以结果并非强 atomicity 假设带来的偶然现象;它跨越不同 asynchrony models 的 robustness,进一步说明 ◇𝒲 的重要性。
第 30 页:Failure detection 与 partial synchrony

7.2 FAILURE DETECTION AND PARTIAL SYNCHRONY
完全 asynchronous system 中无法解决 Consensus,直觉原因是无法可靠区分 crashed process 和 merely slow process;也就是准确 failure detection 不可能。完全 synchronous system 中,已知 message delay 和 process speed bounds,可以用 timeout 实现 perfect failure detector:没有 false suspicion,且 faulty process 最终会被怀疑。
这启发了把 asynchronous model 与 failure detector 结合起来。failure detector 可以犯无限多次错误,但只要满足 eventually properties,仍可能解决 Consensus。
另一种路线是研究 synchronous 与 asynchronous 之间的 partial synchrony models:例如 process speed 相同但 message delay 仅有限而无界;message delay 有界但 bound 未知;或者 eventual maximum delay 已知,但初始有限且未知的时间内 messages 可能更慢。Dolev 等人通过五个 favorable/unfavorable 参数给出了 32 个 models,并确定其中 Consensus 可解的 minimal models;Dwork 等人也研究了 solvability boundary。
failure detector 提供了一种更抽象、模块化的方式来表达 partial synchrony。与其直接依赖 message delay、timeout 等 operational features,不如指定 detector 必须满足的 axiomatic properties;具体 system 是否能实现该 detector,是另一个独立问题。
在 message delay 有界且最大 delay 已知时,可实现 perfect detector;若 delay 有界但 bound 未知,可使用不断增长的 timeout,最终不再怀疑 correct process;若只有 eventual known bound,也能实现相同 detector。由此可见,更强的 partial synchrony 通常对应更强的 detector,但同一 detector 也可能在多个、甚至互不可比较的 models 中实现。
Studying failure detectors has two advantages:一方面,若某个 detector 可解决 Consensus,就同时确定了所有可以实现该 detector 的 systems 中 Consensus 的可解性;另一方面,依赖 detector axioms 的 algorithm 比依赖某个具体 partial-synchrony mechanism 的 algorithm 更 general、更 modular,也更容易理解。
于是,“解决 Consensus 所需的 least amount of synchrony”可以改写为“解决 Consensus 所需的 weakest failure detector”。本文与只找到多个 minimal partial-synchrony models 的工作不同,给出了一个 single minimum detector;其中起关键作用的 technical device 就是 failure-detector reducibility。
第 31 页:Weak Consensus 与 nontriviality

7.3 WEAK CONSENSUS
Fischer 等人还证明,Weak Consensus 也无法在 asynchronous system 中 deterministic 地解决。它和 Consensus 相同,但把 validity 换成更弱的 Nontriviality:protocol 至少有一个 run 让 correct processes 决定 0,也至少有一个 run 让它们决定 1。
自然的问题是:若 detector 𝒟 可用于 Weak Consensus,是否仍有 𝒟 ⪰ 𝒱?按原始 nontriviality 定义,定理并不成立,问题在于定义本身。
第 32 页:为什么原始 nontriviality 会被 detector “作弊”

构造一个 detector 𝒟:对每个 failure pattern F,𝒟(F)={H₀,H₁},其中 Hᵢ(p,t)=i 对所有 processes 和 times 都成立。也就是说,在一次 run 中,它向所有 process 永远返回同一个 binary value,而且与 failure pattern 无关。
process 只需 query 𝒟 并决定返回值,就能满足 Weak Consensus 的原始 nontriviality。但这个 detector 完全没有提供 process failure information;它只是 nondeterministically 选择了 decision value。于是 𝒟 不可能被转换成 𝒱。
可以限制 failure detector 的定义来排除这种情况,但这又可能错误地排除复杂编码的、真正有用的 detectors。更好的办法是加强 nontriviality,使 decision 不能仅由 detector values 决定。
设 R 的 schedule 为 (p₁,m₁,d₁),(p₂,m₂,d₂),…,定义 fd(R) 为 [p₁,d₁],[p₂,d₂],…。定义 runs 间关系 R ≈ R′,当且仅当 fd(R)=fd(R′);这是 equivalence relation。
新的 Nontriviality 要求:对 ≈ 的每个 equivalence class,都存在一个 correct processes 决定 0 的 run,以及一个 correct processes 决定 1 的 run。这样,decision value 不能只依据看到的 detector values 确定,还必须依赖 initial values、message schedule 或其他 run characteristics。
第 33 页:Gray code forest 与 Weak Consensus 的 critical index

在这个更强的 nontriviality 定义下,Theorem 7.3.1 成立。证明只需修改 valency forest 的 initial configurations。
不再只考虑 I₀,…,Iₙ,而是考虑所有 2ⁿ 个 initial configurations。把每个 configuration 的 n 个 initial values 看作 n-bit vector,固定一个 n-bit Gray code;相邻 vectors(包括首尾)只差一位。按 Gray code 顺序排列 I₀,…,I₂ⁿ⁻¹,得到对应的 trees Y₀,…,Y₂ⁿ⁻¹。
index i critical,当 Yᵢ root bivalent,或 Yᵢ root 1-valent 而 Yᵢ₋₁ root 0-valent;下标按 modulo 2ⁿ 计算。
LEMMA 7.3.2. 存在 critical index i,0 ≤ i < 2ⁿ。
证明先说明 forest 中存在 0-tag 和 1-tag 的 nodes。若某 node 有 0-tag,取其一条 infinite extension;由 Lemma 6.2.2 得到一个 run。更强的 nontriviality 保证在同一 fd equivalence class 中还存在决定 1 的 run,其 finite prefixes 出现在另一个 initial configuration 的 tree 中,于是产生 1-tags。由 ancestors/descendents 的 valency 性质,必有 root 0-valent 和 root 1-valent;沿 Gray-code 环走一圈,要么遇到 bivalent root,要么从 0-valent 跳到 1-valent,得到 critical index。
此后 fork、hook、correct-process extraction 以及 distributed approximation 的证明保持不变。
第 34 页:Infinite-range failure detector

7.4 FAILURE DETECTORS WITH INFINITE RANGE OF OUTPUT VALUES
前一篇工作中的 detectors 只输出 suspect process lists,因为 P 有限,所以 output range 也有限。本文允许 detector 的 range 任意,甚至无限;每一个实际 output value 仍可以是 finite 的。
考虑一个实际问题:若 detector module 在 t₁ 输出 d₁,在 t₂ 短暂输出 d₂,随后在 t₃ 又回到 d₁,而 process 在 t₁ 到 t₃ 之间没有执行 step,那么 process 永远不会观察到短暂的 d₂。
可以定义 detector 𝒟′:它维持与 𝒟 相同的 suspect list,但每次 query 返回截至当前时间的完整 suspect-list history。这样 correct process 一定能发现每次变化。随着 execution 继续,output value 包含的 history 越来越长,因此 𝒟′ 有 infinite output range。
但 𝒟′ 仍然是 failure pattern F 的函数,可以纳入本文 model;因此本文结果同样适用于这种 natural infinite-range failure detector。
Appendix A:Simulation-tree lemmata
第 35 页:DAG 的辅助 lemmata 与 Lemma 6.2.1

本附录中 G 是满足 Section 6.2 四个 properties 的 DAG。
LEMMA A.1. 对 G 的任意 finite vertex subset V,存在 infinite path g:V 中每个 vertex 都指向 g 的第一个 vertex;且 g 上的 vertices 都属于 correct processes,每个 correct process 在 g 上有无限多个形如 [p,–,–] 的 vertices。
证明:反复应用 DAG property 4。
LEMMA A.2. S 是从 Yᴳᴵ root 出发的 path 所对应的 schedule,当且仅当 S 与 G compatible 且对 I applicable。
有限 schedule 的情形直接来自定义。无限 schedule S=e₁,e₂,… 的正向证明:每个 finite prefix 都是 compatible 且 applicable,因此都是 tree vertex,并由相邻 prefix 组成 root-to-infinite path。反向证明:tree 中的每个 prefix 都 applicable;每个 prefix 与某条 G path compatible。利用各 path 上 query counter 的最小值、同一 process counter edge 和 transitive closure,可以拼出一条兼容全部 S 的 infinite path。
LEMMA 6.2.1. finite tree path 对应 partial run。
证明:由 Lemma A.2,schedule 与 G 的某条 finite path compatible;把 path vertices 的 time labels 作为 T。DAG property 1 保证每个 process 在对应时间尚未 crashed 且看到正确 detector value,property 1(b) 保证时间严格递增。
第 36 页:Lemma 6.2.4–6.2.6 的证明起点

LEMMA 6.2.4. 对 tree vertex S、correct process p 和 buffer 中发给 p 的 message m(或 null),存在 d 使 S ∘ (p,m,d) 仍在 tree 中。
证明:S 与 G 的某条 path compatible。由 property 4,path 的末 vertex 可到达某个 [p,d,k];因此加入该 step 后仍与 G compatible,且 m 在 buffer 中所以对 S(I) applicable。
LEMMA 6.2.5. 若 S′ 是 S 的 descendent,且 S′ ∘ (p,m,d) 在 tree 中,则 S 到 S′ 路径上的每个 S₀ 都有同样的 child。
证明使用 transitive closure,先把 S₀ 与目标 vertex 连接起来;若 m 非 null,由于每条 message 最多发送一次且 m 在起点和终点都仍在 buffer 中,中间 path 没有消费 m,所以 extension 对 S₀ 仍 applicable。
LEMMA 6.2.6. 对任意 S,S₀,S₁,存在只含 correct steps 的 finite E,使 S∘E 中所有 correct processes 已决定,且 E 可从 S₀、S₁ 复制时仍留在 tree 中。
证明从三个 schedules 的末 vertices 出发,应用 Lemma A.1 得到一条只包含 correct processes、且每个 correct process 无限出现的 common continuation path。按 Figure A.1 反复选择 oldest pending message 或 null,得到 fair schedule。由 Consensus termination,该 run 的某个 finite prefix 使所有 correct processes 决定;取其对应的 E,即可得到结论。
第 37 页:Appendix proof 余下部分与致谢

继续上一页的构造。由 common continuation path 的 property,每个 correct process 在 E∞ 中执行无限多步;由于每次优先接收 oldest message,任何发给 correct process 的 message 最终都被接收。Lemma 6.2.2 将它提升为 Consensus𝒟 的 run。
若所有 correct processes 在 S 本身已经决定,取空 schedule 即可;否则取达到全体决定的 finite prefix S∘E。由于 E 只包含 continuation path 上的 correct-process steps,它可以从 S₀、S₁ 复制;只要复制后仍对 initial configuration applicable,就仍然属于 Yᴳᴵ。这就完成 Lemma 6.2.6。
ACKNOWLEDGMENTS:作者感谢 Prasad Jayanti、Cynthia Dwork、Dexter Kozen、Cornell distributed systems group 以及 anonymous referees 的评论和讨论。
第 38 页:References

REFERENCES
- Attiya, H., Bar-Noy, A., Dolev, D., Koller, D., Peleg, D., and Reischuk, R. 1987. Achievable cases in an asynchronous environment. FOCS 1987, 337–346。
- Biran, O., Moran, S., and Zaks, S. 1988. A combinatorial characterization of the distributed tasks which are solvable in the presence of one faulty processor. PODC 1988, 263–275。
- Bridgland, M. F., and Watro, R. J. 1987. Fault-tolerant decision making in totally asynchronous distributed systems. PODC 1987, 52–63。
- Chandra, T. D., and Toueg, S. 1996. Unreliable failure detectors for reliable distributed systems. JACM 43(2), 225–267。
- Chor, B., and Dwork, C. 1989. Randomization in Byzantine agreement. Advances in Computing Research 5, 443–497。
- Dolev, D., Dwork, C., and Stockmeyer, L. 1987. On the minimal synchronism needed for distributed consensus. JACM 34(1), 77–97。
- Dolev, D., Lynch, N. A., Pinter, S. S., Stark, E. W., and Weihl, W. E. 1986. Reaching approximate agreement in the presence of faults. JACM 33(3), 499–516。
- Dwork, C., Lynch, N. A., and Stockmeyer, L. 1988. Consensus in the presence of partial synchrony. JACM 35(2), 288–323。
- Fischer, M. J., Lynch, N. A., and Paterson, M. S. 1985. Impossibility of distributed consensus with one faulty process. JACM 32(2), 374–382。
- Ricciardi, A. M., and Birman, K. P. 1991. Using process groups to implement failure detection in asynchronous environments. PODC 1991, 341–351。
结果与设计判断
1. 为什么 ◇𝒲 是“最弱”
“最弱”不是说它输出的信息量最少,而是说对任意能解决 Consensus 的 detector 𝒟,都有 ◇𝒲 ⪯ 𝒟:𝒟 可以模拟 ◇𝒲。论文通过中间层 𝒱 把这个关系从语义 properties 变成可构造的 distributed reduction。
2. 证明结构
| 层次 | 作用 |
|---|---|
𝒟 outputs | 可以是任意编码、任意 range 的 failure information |
DAG G | 保存 detector samples 和 temporal order |
Simulation forest Y | 枚举 Consensus𝒟 可能的 runs |
| Tags/valency | 识别 0/1 decision 的可达性 |
| Critical index | 定位 initial configuration 边界 |
| Fork/hook | 把 bivalence 转成一个必须 correct 的 process |
| Finite approximations | 让 centralized mathematical proof 变成 distributed algorithm |
3. 与前后论文的关系
- 论文:Impossibility of Distributed Consensus with One Faulty Process 给出完全 asynchronous model 下的 impossibility。
- 论文:Consensus in the Presence of Partial Synchrony 研究通过 timing assumptions 恢复 Consensus 的边界。
- 本文把“需要多少 synchrony”抽象成“需要多强的 failure detector”,并给出一个 single weakest detector。
- Chandra 与 Toueg 的 companion paper 证明
◇𝒲确实足以解决 Consensus;本文证明其 necessity,从而闭合 weakest-detector characterization。
本篇验收
- [x] 38 个 PDF 页面均有对应页面标题和原始页面图。
- [x] 38 张 PNG 均按
weakest-failure-detector-p01.png至p38.png顺序嵌入。 - [x] Abstract、Introduction、Model、Consensus、Reducibility、Theorem 5.1–5.4、Reduction Algorithm、Lemmata 6.2–6.6、Discussion、Weak Consensus、Infinite-range detector、Appendix A 和 References 均已覆盖。
- [x] 保留 failure detector、DAG、simulation forest、valency、fork、hook、reducibility 等关键术语及原编号。
- [x] 已记录本地 PDF、来源 URL 和 SHA-256;待专栏索引和总计划登记后完成全库 checker/lint 验收。
评论 (0)