Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fastpath] propose blocks with transaction votes #21564

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mwtian
Copy link
Contributor

@mwtian mwtian commented Mar 21, 2025

Description

  • Recover transaction votes after restarts, by re-evaluating transactions that need to be rejected, on blocks that has not been linked by proposed blocks.
  • Include reject transaction votes from blocks newly linked by proposed blocks.

Test plan

CI


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.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Sorry, something went wrong.

@mwtian mwtian requested a review from a team as a code owner March 21, 2025 08:26
Copy link

vercel bot commented Mar 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2025 1:04am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Mar 25, 2025 1:04am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Mar 25, 2025 1:04am

@mwtian mwtian temporarily deployed to sui-typescript-aws-kms-test-env March 21, 2025 08:26 — with GitHub Actions Inactive
@mwtian mwtian force-pushed the tmw/propose-vote branch from 41c4eab to 6ff719d Compare March 21, 2025 17:40
@mwtian mwtian temporarily deployed to sui-typescript-aws-kms-test-env March 21, 2025 17:40 — with GitHub Actions Inactive
/// Returns the list of blocks that are newly linked.
/// The returned blocks are guaranteed to be above the GC round.
/// NOTE: this function should only be called with GC enabled.
pub(crate) fn recursive_hard_link(&mut self, root_block: BlockRef) -> Vec<BlockRef> {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a unit test for this in dag state, unless you think its thoroughly tested elsewhere

/// A transaction is certified if a quorum of authorities voted to accept it. A block is certified
/// if every transaction in the block is either certified or rejected. TransactionCertifier outputs
/// blocks certified in the causal history own proposed blocks.
/// A transaction is certified if a quorum of authorities in the causal history of a proposed block
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the very clear comment! 😄

})
.collect::<Vec<_>>();
let certified_blocks = certifier_state.add_voted_blocks(voted_blocks);
self.send_certified_blocks(certified_blocks);
Copy link
Contributor

Choose a reason for hiding this comment

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

This could actually end up sending duplicated certified blocks after recovery, correct? Not an issue, probably just have to dedupe on the Sui side.

i.e. Block A1 containing just Tx1 is rejected and certifed via fastpath but not yet proposed so it will get sent to Sui but after the node goes down and recovers it will resend this certified block to Sui?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes similar to consensus commits, sending previously executed transactions is possible and ok.

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.

2 participants