Lab Test 英文自测|S1-S10
现有材料范围内的非官方复习,含英文术语、成立条件与自拟练习解析。
手机上宽表格可左右滑动;自测答案默认收起,点击题目下方按钮查看。
非官方自拟练习,考试安排与范围以讲师通知为准。 先用英文作答,再逐题展开解析。
测验类型与范围边界
非官方 Lab Test 复习资料,不是 Midterm 真题。 现有课程信息列 Lab 10 Test:11-11,20:20-21:20,一小时、占 10%。最新考试安排与范围以讲师通知为准。Lab Test 的开闭卷尚未确认;期末开卷不能推导这次也开卷。
本页 S1–S10 覆盖 2PC 实验、L06 的 2PC、Tutorial 1 的时钟,以及 HotStuff Part 1/2 的状态推演。HotStuff 采用课程教学演示口径,不冒充所有同名变体的规则。3PC、BFT/PBFT、VR、Paxos 的题在英文自测 2(S11–S22)。课表列出主题不等于已给出考题范围。
推荐每次先写三件事:故障模型(crash / Byzantine)、网络假设、当前状态与收到的证据。然后逐事件更新表格,最后检查 safety 与 liveness。只背“多数通过”会把原子提交和拜占庭共识混在一起。
英文自测
S1 · Lamport implication
If L(a)<L(b), must a have happened before b? Explain the direction that is guaranteed.
S1 · 查看答案与解析
No. “Happened-before implies increasing Lamport timestamps, but the converse is false.” 独立进程上的并发事件也可以具有不同标量时间;不能只凭 < 推因果。
S2 · Vector receive
P2 has vector (0,2,1) and receives a message timestamped (3,1,1). Using merge-then-increment, give its new vector. Are events timestamped (2,0,1) and (1,2,1) causally ordered?
S2 · 查看答案与解析
New vector (3,3,1); the two listed events are concurrent. 合并先得 (3,2,1),只给 P2 的第二分量加一。两个事件向量各有一维大于对方,因此互不支配。
S3 · 2PC votes
In basic 2PC with three fixed participants, the coordinator receives YES, YES and NO. Should it commit because a majority voted YES?
S3 · 查看答案与解析
No; abort. “Basic 2PC requires every participant to vote YES before a commit decision.” 固定参与者集合中一个 NO 足以否定提交前提,不能套多数票。
S4 · 2PC timeout
A participant has voted YES. The coordinator is unreachable and the participant has not learned the decision. May it abort solely because its local timer expired?
S4 · 查看答案与解析
No. “Another participant may already have received COMMIT. The prepared participant must learn a reliable decision or wait.” 查询其他节点可能有帮助,但在所有可联系节点都不知道结果时仍可能阻塞。这里不是协调者尚未收齐 YES 的超时分支。
S5 · Quorum arithmetic
For n=7 and f=2, use the standard q=2f+1 threshold. What is q, what is the minimum intersection of two quorums, and how many honest nodes are guaranteed in that intersection?
S5 · 查看答案与解析
q=5; intersection at least 3; at least 1 honest node. 交集下界 2×5−7=3,减最多 2 个恶意节点还剩 1。结合诚实投票与锁规则才可讨论安全。
S6 · Strictly higher QC
A replica is locked at view 4. A conflicting proposal carries a valid justify QC at view 4. Does it satisfy the higher-QC branch of safeNode? If the QC were at view 5, would that alone prove that every voting check passes?
S6 · 查看答案与解析
No; and no. 4 不严格大于 4;改为有效 view 5 QC 可过该分支,但仍须检查当前 view、leader、关联父块以及本 view 是否已投票。“Satisfying one predicate is not a complete validation.”
S7 · Normal three-chain
Starting from genesis, receive QCs for B1, B2 and B3 in order. The blocks are directly linked and have consecutive views 1,2,3. Give (highQC, lockedQC, commit) after each QC under the course demo.
S7 · 查看答案与解析
(B1,B0,B0), (B2,B1,B0), (B3,B2,B1). 第一张证书只认证 B1;后继证据逐步推动锁与祖先提交。英语记作 certify / lock / commit,不能全部译为“确认完了”。
S8 · Missing view and missing votes
Under the same demo, can certified blocks in views 1,2,4 directly trigger the consecutive three-chain rule? In the four-node one-fault setup, should a leader lower the quorum to two when only two nodes respond?
S8 · 查看答案与解析
No to both. 跳 view 不满足题定连续规则;只有两票不足固定三票阈值。“Stalling beyond the fault budget does not justify weakening the quorum.” 两个不响应已超出一个故障预算。
S9 · Execution order
Alice, Bob and Charlie each start with 100. In a committed block, Alice→Charlie 70 executes before Alice→Bob 60. There are no fees, minting or other transfers. Give the final balances and the outcome of each transfer.
S9 · 查看答案与解析
First succeeds, second fails; Alice=30, Bob=100, Charlie=170. 第一笔后余额只剩 30,小于 60;第二笔不改变余额。总额 300 守恒。失败交易的确定性回执与共识提交是不同层次。
S10 · Duplicate execution
An already executed transaction with the same id is observed again. Should it change balances again? Does this id check alone prevent reuse of an authorization under a different id?
S10 · 查看答案与解析
No; and no. “Return the recorded receipt for the same id without applying the transfer again. A different-id replay needs separate authorization-level protection.” 去重、认证、nonce/域绑定是不同责任,不能用一个集合代替所有安全设计。
个人整理的学习笔记,不是官方材料;数字与结论以课件和讲师为准。