-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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.
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; | ||
} |
There was a problem hiding this comment.
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.
…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.
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.