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

Ensure block height manager is restarted when BFT coordinator is #8308

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

matthew1001
Copy link
Contributor

@matthew1001 matthew1001 commented Feb 14, 2025

PR description

Some changes were made to the BFT mining coordinator to ensure it could be stopped and started (see #5861). A bug in those changes meant that when it was restarted, a new block height manager wasn't created.

This PR ensures that when BFT mining is restarted, so is the block height manager.

Fixed Issue(s)

Fixes #8307

matthew1001 and others added 6 commits February 19, 2025 11:09
…ithout calling reset

Signed-off-by: Matthew Whitehead <[email protected]>
Signed-off-by: Matthew Whitehead <[email protected]>
Signed-off-by: Matthew Whitehead <[email protected]>
Signed-off-by: Matthew Whitehead <[email protected]>
Signed-off-by: Matthew Whitehead <[email protected]>
@matthew1001 matthew1001 marked this pull request as ready for review February 19, 2025 14:56
@jflo jflo requested a review from jframe February 20, 2025 21:32
@@ -115,6 +115,7 @@ public void stop() {
LOG.debug("Interrupted while waiting for BftProcessor to stop.", e);
Thread.currentThread().interrupt();
}
eventHandler.reset();
Copy link
Contributor

Choose a reason for hiding this comment

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

Reset seems odd here in that we trying to stop all processing of BFT here. A stop method to prevent any more processing in the controller would make sense. With everything stopped, we won't be processing BFT events anyway so maybe it's not worth it?

And by a stop method on the controller I'm thinking it would change the started state to false as it does right now in the reset method and also replace the block height manager with the noop version so it wouldn't do any processing of events.

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.

Restarted BFT validators can fail to agree on new blocks under certain conditions
2 participants