Skip to content

State the assumptions of BlockDag and Sailfish - #233

Open
lemmy wants to merge 1 commit into
masterfrom
mku-dag-consensus
Open

State the assumptions of BlockDag and Sailfish#233
lemmy wants to merge 1 commit into
masterfrom
mku-dag-consensus

Conversation

@lemmy

@lemmy lemmy commented Aug 22, 2026

Copy link
Copy Markdown
Member

@nano-o, you contributed this spec: Could you please review and approve the following refactorings?
The goal is to eventually prove properties of the Disruptor, which needs the assumptions stated and named so a proof can cite them, and the model bounds out of the way since they are not part of what would be proved.

@munimthahmid

Copy link
Copy Markdown

The new CorrectNodesFormQuorum assumption seems to address the concern I raised about Liveness in specula-org/tlaps-bench#131. I checked the change at 8fa4ac5 with TLC using the following model.

N == {a, c, b}
F == {b}
R == 1..3
GST == 1
Leader(r) == c
IsQuorum(Q) == {a, b} \subseteq Q
IsBlocking(B) == a \in B

IsQuorum is upward closed, and this model satisfies every other Sailfish assumption added in the PR. However, N \ F = {a, c} is not a quorum.

Without CorrectNodesFormQuorum, TLC violates Liveness at state 8. Node a reaches round 3 with an empty log, while c is the correct leader for round 1. With the assumption enabled, TLC rejects the same model immediately.

@nano-o nano-o left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine even if some of the assumptions may be redundant.

Comment thread specifications/dag-consensus/Sailfish.tla Outdated
Comment thread specifications/dag-consensus/Sailfish.tla
@lemmy

lemmy commented Aug 26, 2026

Copy link
Copy Markdown
Member Author
THEOREM SomeNodeIsCorrectIsRedundant ==
    ASSUME NEW N, NEW F, NEW IsQuorum(_), NEW IsBlocking(_),
           \* CorrectNodesFormQuorum:
           IsQuorum(N \ F),
           \* QuorumMinusByzantineIsBlocking:
           \A Q \in SUBSET N : IsQuorum(Q) => IsBlocking(Q \ F),
           \* BlockingSetsIntersectQuorums:
           \A B,Q \in SUBSET N : IsBlocking(B) /\ IsQuorum(Q) => B \cap Q # {}
    \* SomeNodeIsCorrect:
    PROVE  N \ F # {}
    <1>1 (N \ F) \in SUBSET N
        OBVIOUS
    <1>2 IsBlocking((N \ F) \ F)
        BY <1>1
    <1>3 (N \ F) \ F = N \ F
        OBVIOUS
    <1>4 IsBlocking(N \ F)
        BY <1>2, <1>3
    <1>5 (N \ F) \cap (N \ F) # {}
        BY <1>1, <1>4
    <1> QED
        BY <1>5

Agreement and Liveness rest on premises the modules left implicit: that
F is a subset of N, that Leader maps rounds to nodes, that rounds are
positive integers, and that the correct nodes form a quorum. Stated one
by one, they are premises TLAPS can cite.

TLC ignores the assumptions of an instantiated module, so TLCSailfish1,
TLCSailfish2 and BlockDagTest assume each of them again.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
@lemmy
lemmy force-pushed the mku-dag-consensus branch from 8fa4ac5 to 4cf9a6c Compare August 26, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants