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

Make consensus state machine asynchronous (BFT-406) #56

Merged
merged 37 commits into from
Jan 25, 2024
Merged

Conversation

moshababo
Copy link
Contributor

@moshababo moshababo commented Jan 10, 2024

Goals

  • leader being unable to block colocated replica (and vise versa).
  • Having an inbound message queue with the capability to invalidate/remove messages from the same validator.

Main changes

  • sync::prunable_mpsc module has been added to provide a channel-like FIFO queue with additional functionality for removal of specific pending values.
  • Introduced one background task for each state machine (replica/leader), which consumes corresponding messages from the inbound queue. Top-level processing includes only send() operation, without waiting for the processing response.

Follow-up:

  • Consider additional asynchronous pipelines within each role
  • Re-evaluate caching and transitioning within the state machines

@moshababo moshababo changed the title (WIP) Make consensus state machine asynchronous (BFT-406) Make consensus state machine asynchronous (BFT-406) Jan 16, 2024
@moshababo moshababo marked this pull request as ready for review January 16, 2024 23:55
Copy link
Collaborator

@pompon0 pompon0 left a comment

Choose a reason for hiding this comment

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

approach lg in general, I've added comments about conventions and expected usage of structured concurrency. The important comment is the one about pruning semantics which won't work as is, but should be easy to fix.

@moshababo moshababo merged commit a766bd2 into main Jan 25, 2024
4 checks passed
@moshababo moshababo deleted the bft_async branch January 25, 2024 14:13
@matter-labs matter-labs deleted a comment from pompon0 Jan 25, 2024
@matter-labs matter-labs deleted a comment from pompon0 Jan 25, 2024
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