Skip to content

Conversation

@mwtian
Copy link
Contributor

@mwtian mwtian commented Dec 2, 2025

Description

When proposing a block, only votes on blocks within DagState GC round at proposal time are included.
So when considering votes in CommitFinalizer, if GC round is <= R when proposing block B, any block with round <= R should not receive votes from B.

Test plan

CI
antithesis

@mwtian mwtian requested a review from a team as a code owner December 2, 2025 22:26
@vercel
Copy link

vercel bot commented Dec 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sui-docs Ready Ready Preview Comment Dec 5, 2025 5:04am
2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
multisig-toolkit Ignored Ignored Preview Dec 5, 2025 5:04am
sui-kiosk Ignored Ignored Preview Dec 5, 2025 5:04am

@mwtian mwtian temporarily deployed to sui-typescript-aws-kms-test-env December 2, 2025 22:26 — with GitHub Actions Inactive
@mwtian mwtian temporarily deployed to sui-typescript-aws-kms-test-env December 3, 2025 05:41 — with GitHub Actions Inactive
@mwtian mwtian requested a review from mystenmark as a code owner December 4, 2025 09:00
@mwtian mwtian temporarily deployed to sui-typescript-aws-kms-test-env December 4, 2025 09:00 — with GitHub Actions Inactive
@mwtian mwtian temporarily deployed to sui-typescript-aws-kms-test-env December 4, 2025 09:01 — with GitHub Actions Inactive
@mwtian mwtian changed the title [mfp] use more conservative filter for transaction votes [mfp] do not vote on potentially GC'ed blocks Dec 4, 2025
@mwtian mwtian temporarily deployed to sui-typescript-aws-kms-test-env December 4, 2025 09:03 — with GitHub Actions Inactive
})
.join(", ");
let digest = self.rejected_transactions_digest();
format!("{str}; digest: {digest}")
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the purpose of the rejected transactions digest? Is it just to provide an identifier for the set of rejected transactions in a committed subdag? If so should the identifier be first in the debug statement?

while let Some(block_ref) = targets.pop_front() {
// This is only correct with GC enabled.
// No need to collect and mark blocks at or below GC round. These blocks will not be included in new commits
// and do not need their transactions to be voted on.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Maybe you can change how the comments are structured across the PR if you agree with this. Other than maybe the root block, technically the transactions in the causal history have already been voted on. The thing we are not doing now is counting votes of GCd blocks/transactions

finalized_transactions
}

// Returns true if the pending block round can be GC'ed when proposing blocks in current commit.
Copy link
Contributor

Choose a reason for hiding this comment

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

why only "can be GC'ed" and not "has been GC'ed"?

let skip_votes = curr_block_ref.author == curr_origin_ancestor_ref.author
&& pending_block_ref.round < curr_origin_ancestor_ref.round
&& !blocks_map.contains_key(curr_origin_ancestor_ref);
// When proposing the current block, if it is possible that the pending block has already been GC'ed,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Instead of saying "proposing" block can we say "counting votes" or "counting tx votes", it seems clearer as to what we are doing here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants