Tighten gc_round invariant checks in FlexCommitter's build_commit - #27759
Open
lexfrl wants to merge 3 commits into
Open
Tighten gc_round invariant checks in FlexCommitter's build_commit#27759lexfrl wants to merge 3 commits into
lexfrl wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
No behavior change — replaces assert!(!is_empty(), ...) with if/panic! on is_empty() directly.
Check leader.round() > gc_round before mutating dag_state, instead of asserting it in aggregate after the DFS finishes. Fold the ancestor is_committed check into set_committed's existing check-and-set. Behavior unchanged: full consensus-core suite passes (337 tests), and try_commit_multi_leader_shared_ancestor_visited_once confirms shared ancestors are still deduplicated correctly.
lexfrl
force-pushed
the
flex-committer-gc-round-cleanup
branch
from
August 19, 2026 18:56
a7c5bcf to
1122865
Compare
lexfrl
marked this pull request as ready for review
August 19, 2026 18:59
lexfrl
temporarily deployed
to
sui-typescript-aws-kms-test-env
August 20, 2026 04:47 — with
GitHub Actions
Inactive
lexfrl
temporarily deployed
to
sui-typescript-aws-kms-test-env
August 20, 2026 04:47 — with
GitHub Actions
Inactive
This reverts commit f409a44.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
build_commit's gc_round check ran once, in aggregate, after the DFS finished. This moves the leader check to beforedag_stateis mutated, drops the now-redundant aggregate check, and folds the ancestoris_committedpre-check intoset_committed's existing check-and-set.Test plan
Added
try_commit_multi_leader_shared_ancestor_visited_once, covering shared ancestors discovered by multiple leaders within onebuild_commitcall — not covered by existing tests, whose shared ancestors are always genesis blocks excluded beforedag_stateis touched. Fullconsensus-coresuite passes (337 tests).Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.