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

[consensus] Revert consensus handler change where commits from the same round are ignored #18248

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

arun-koshy
Copy link
Contributor

When Narwhal is running it is still possible on restarts to resend a commit from the same round. Mysticeti should not return more than one commit per round unless something is broken so it is okay to keep this check for now.

Copy link

vercel bot commented Jun 14, 2024

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 Jun 14, 2024 1:11am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Jun 14, 2024 1:11am
sui-kiosk ⬜️ Ignored (Inspect) Jun 14, 2024 1:11am
sui-typescript-docs ⬜️ Ignored (Inspect) Jun 14, 2024 1:11am

Copy link
Member

@mwtian mwtian left a comment

Choose a reason for hiding this comment

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

Let's remember to revert forward after Narwhal is deprecated. I think the logic to verify no commit is skipped can be added to Mysticeti commit observer instead. The logic to ignore duplicated commits can be added to Narwhal executor too, but we probably don't want to make significant changes to Narwhal codebase anymore.

@arun-koshy arun-koshy merged commit 55f370f into main Jun 14, 2024
49 checks passed
@arun-koshy arun-koshy deleted the ak/consensus_handler branch June 14, 2024 03:24
Comment on lines +238 to +248
assert!(round >= last_committed_round);
if last_committed_round == round {
// we can receive the same commit twice after restart
// It is critical that the writes done by this function are atomic - otherwise we can
// lose the later parts of a commit if we restart midway through processing it.
warn!(
"Ignoring consensus output for round {} as it is already committed. NOTE: This is only expected if Narwhal is running.",
round
);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess an alternative here would be to check which consensus engine is running and adapt the checks - or as @mwtian said offline, move the Mysticeti check in commit observer. It's still nice to have consensus_handler do a sanity check as separate component though.

tx-tomcat pushed a commit to tx-tomcat/sui-network that referenced this pull request Jul 29, 2024
…me round are ignored (MystenLabs#18248)

When Narwhal is running it is still possible on restarts to resend a
commit from the same round. Mysticeti should not return more than one
commit per round unless something is broken so it is okay to keep this
check for now.
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