Repository navigation
Starfish-Speed consensus upgrade #46
VorobyevIlya
started this conversation in
Featured Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Abstract
Starfish Speed is an optimistic extension of Starfish (IIP-2). Each voter attaches a strong vote to its round-(r+1) vote for the round-r
leader, attesting that the voter has the full payload of the leader block and of every block the leader acknowledges. A quorum of such strong votes lets the leader's acknowledged payloads be sequenced at commit
time, instead of waiting for separate data-availability certificates to accumulate. The commit rule is extended with a metastate that distinguishes optimistic commits (which sequence the leader's acknowledged
payloads immediately) from standard commits (which behave as in base Starfish).
Motivation
Unlike its predecessors (e.g. Mysticeti), Starfish decouples block headers from payloads and only sequences a payload after a Data Availability Certificate (DAC) is observed. Each acknowledged payload must
therefore wait at least one extra round for its DAC to accumulate. In the happy case, however, the leader and most honest voters already hold the payloads the leader acknowledges, so this extra wait is pure
latency overhead.
Starfish Speed removes that overhead on the optimistic path while preserving Starfish's safety and liveness guarantees: payloads in
L.acksare sequenced at the same latency as the base commit ofL— matchingMysticeti's per-payload latency. When the optimistic conditions are not met, the protocol falls back to base Starfish behaviour.
In effect, Starfish Speed combines the best of both protocols: it inherits Starfish's robustness — Reed-Solomon-encoded payload dissemination and the push-based DAG that decouples headers from transactions — while
matching Mysticeti's commit latency in the happy case.
Specification
Starfish Speed modifies Starfish in the following places:
strongVotefield is added. In a round-(r+1) block voting for the round-r leaderL, the strong vote attests to data availability iff the voter holds the full payload ofLand of allblocks in
L.acks; otherwise it does not. The commit rules depend only on this attestation; the on-wire encoding is an implementation detail.δ_ST, a party may create its block once it hasL's payload, all payloads inL.acks, and either 2f+1 attesting strongvotes for the previous leader or a skip-pattern quorum. After
δ_ST, the base-Starfish weak path applies. The hard timeout (δ_LT = 2Δ) and catch-up rule are unchanged.L_riff its causal history contains 2f+1 round-(r+1) blocks from distinct parties that vote forL_rwith strong votesattesting to data availability. A strong blame quorum (2f+1 round-(r+1) voters for
L_rwhose strong votes do not attest) is mutually exclusive with a strong vote quorum.Commitslots gain a metastate:optif a quorum of StrongQCs is observed at round r+2,stdif a strong blame quorum is observed at round r+1, otherwisepend.pendslots arecommitted (they never become
Skip) but block sequencing until the indirect rule resolves them tooptorstdusing the next committed anchor.Commit(std)slots, appendhist_DA(L)as in base Starfish. ForCommit(opt)slots, appendhist_DA(L)thenL.acks. Sequencing stops at the firstCommit(pend)orUndecidedslot.Starfish Speed is gated by a protocol flag (
consensus_starfish_speed) and activated together with the new block header version (BlockHeaderV2) and commit message version (Commit V3). Wrong-version blocks andcommits are rejected when the flag state does not match.
Rationale
L.payloadand every payload inL.acksmakes a StrongQC equivalent to a DAC for all acknowledged payloads: at least f+1 honest parties already hold themat commit time.
opt/std/pendclassificationwithout dispute resolution.
pendmetastate. Apendslot is committed but non-final. It blocks sequencing likeUndecided, but unlikeUndecidedit serves as a committed anchor for the indirect rule, avoiding cascading-undecided.δ_STprevents a single slow validator from indefinitely blocking block creation; the weak fallback restores base-Starfish progress conditions, so liveness reducesto the base-Starfish liveness argument.
Backwards Compatibility
Starfish Speed is not compatible with Starfish at the block-header, commit-message, or linearization level:
BlockHeaderV2carries the newstrongVotefield,Commit V3carries the metastate annotations, andCommit(opt)slots sequenceL.acksimmediately whereas base Starfish would defer them.Mitigation. Activation is atomic via the
consensus_starfish_speedprotocol flag at an upgrade boundary; block and commit versions are validated against the flag. When the flag is disabled, behaviour isidentical to IIP-2.
Test Cases
In addition to the existing Starfish test suite, the implementation should cover: correct computation of
strongVote(including emptyL.acksand missing-payload cases); direct classification intoCommit(opt),Commit(std), andCommit(pend)for the corresponding DAG patterns; indirect resolution ofpendslots via anchors; the mutual-exclusivity invariant; and slow-validator scenarios where the optimistic pathdegrades to the weak fallback without harming liveness.
Reference Implementation
A reference implementation is available on the
consensus/feat/starfish-speedbranch ofiotaledger/iota. It extends the existing Starfishconsensus crate with
BlockHeaderV2,Commit V3, strong-vote computation, the optimistic linearizer path, and theconsensus_starfish_speedprotocol flag.The figure below compares base Starfish (left half of each panel) with Starfish Speed (right half) on a 19-validator network. Block commit latency is roughly unchanged (left panel, p50 ≈ 181 ms in both regimes),
while transaction commit latency drops from ≈ 206 ms (p50) under base Starfish to ≈ 174 ms under Starfish Speed — the ~15% optimistic-path win expected from folding the data-availability acknowledgment into the
leader vote.
All reactions