# MirBFT Diagnostics (`mircat`)
## Description
### The MirBFT project
The MirBFT project aims at developing a production-quality implementation of:
- a general framework for easily implementing distributed protocols
- a Byzantine fault-tolerant consensus protocol using the framework.
This implementation (in the Go language) will be available as the open-source `mirbft` library.
Our aim is integration with Hyperledger Fabric, specifically its ordering service.
Being framed as a library, however, MirBFT's goal is also to serve as a general-purpose high-performance BFT component of other projects.
The first fault-tolerant consensus protocol implemented within `mirbft` is ISS (next generation of the [MirBFT consensus protocol](https://arxiv.org/abs/1906.05552), to appear at EuroSys22 as [State Machine Replication Scalability Made Simple](https://2022.eurosys.org/program/accepted-papers/)). However, the framework is general enough to facilitate the implementation of other distributed protocols in the future. The framework is highly modular, allowing the developer of the distributed protocol to focus on the protocol logic, without having to care about network transport, storage, and cryptographic primitives, etc.
At the same time, the high modularity facilitates creating custom protocol implementations tailored to the consumer's needs. MirBFT hopes to be a building block of a next generation of distributed systems.
The ISS implementation using MirBFT will (when finished) improve on traditional leader-based atomic broadcast protocols like PBFT and Raft, which always have a single active leader, by allowing concurrent leaders and reconciling total order in a deterministic way. The multi-leader nature of ISS should lead to exceptional performance especially on wide area networks, but should be suitable for LAN deployments as well.
The `mirbft` library is in development and not usable yet. This project is one of the ways to accelerate its development.
### Problems and opportunities
Part of the `mirbft` framework are tools that facilitate implementation and diagnostics of distributed protocols. The main such tool, `mircat`, should be able to record traces of events occurring at a node in the distributed network, analyze those traces, edit them (or even construct new artificial ones), and replay them to a node in debug mode. Such a tool greatly improves the development, testing and debugging of protocols built usin `mirbft`.
Currently, `mircat` only has very rudimentary features: printing a list of events, potentially applying a simple filter on it. The goal of this project is to extend `mircat` by the above-mentioned features.
To implement the missing features of `mircat`, it is necessary need to:
- Become familiar with the existing code base and understand the event-handling mechanism of `mirbft`.
- Identify concrete features for analyzing traces of these events, to maximize usefulness and insights into the inner workings of `mirbft`.
- Implement those features.
- Extend the main `mirbft` code to support replaying recorded events.
## Additional Information
GitHub: https://github.com/hyperledger-labs/mirbft
MirBFT protocol research paper: https://arxiv.org/abs/1906.05552
## Learning Objectives
- Experience in working collaboratively on an open-source project
- Using Git and GitHub, as well as improving skills in Go programming
- Introduction to distributed systems and their implementation in general, consensus protocols in particular
## Expected Outcome
The `mircat` analysis tool that, given a trace of `mirbft` events, can:
- Display the event trace in an insightful manner.
- Simulate the occurrence of these events to a `mirbft` node.
- (Optional): Create / edit artificial event traces to test behavior in specific scenarios.
## Education Level
No specific education level is strictly necessary.
## Skills
Required:
- Experience in programming in the Go programming language
- Basic knowledge in the usage of the Git version control system.
- Profficiency in the English language
Bonus:
- Understanding of distributed systems theory and consensus protocols
## Future plans
The contributor is more than welcome to continue contributing to the MirBFT project beyond the scope of this project. There are many opportunities for extending `mirbft`, including additional features, tools, or even new distributed protocols.
Apart from open source contributions, spreading the word about the project, promoting its use by the community and extending the community itself are further collaboration opportunities.
## Contact Info
Matej Pavlovic, matopavlovic@gmail.com, Protocol Labs