Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a "Phoenix Protocol" for the HBBFT consensus engine to detect and recover from stalled consensus situations. The protocol monitors block production timing and performs controlled recovery by temporarily deferring outgoing messages, resetting the HoneyBadger consensus instance, and then resuming normal operation.
Key changes:
- Adds a periodic timer-based recovery mechanism that triggers when no new blocks are produced for a configurable time period
- Implements message deferral and storage capabilities to temporarily hold outgoing consensus messages during recovery
- Provides a reset mechanism for the underlying HoneyBadger consensus instance while preserving other state
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| crates/ethcore/src/engines/hbbft/hbbft_state.rs | Adds reset_honeybadger method to reset only the HoneyBadger instance while preserving network info |
| crates/ethcore/src/engines/hbbft/hbbft_engine.rs | Implements the Phoenix Protocol with timer-based monitoring, message deferral, and recovery logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Every re-try gets 2 minutes more time to create the block. The first 2 minutes validators receive but do not send hbbft messages. This is to account for up to 2 minutes timing differences between validators.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phoenix Protocol