Skip to content

MILP BFT Protocol Optimization is a cutting-edge repository dedicated to the optimization of Byzantine Fault Tolerance (BFT) blockchain protocols using Mixed-Integer Linear Programming (MILP) techniques

Notifications You must be signed in to change notification settings

epicchainlabs/MILP-BFT-Protocol-Optimization

Repository files navigation

MILP-BFT-Protocol-Optimization

Welcome to MILP-BFT-Protocol-Optimization, an advanced toolkit designed to optimize Byzantine Fault Tolerant (BFT) blockchain protocols through the application of Mixed-Integer Linear Programming (MILP). This repository offers comprehensive MILP models that address various failure and attack scenarios affecting BFT protocols, ensuring robust and efficient blockchain systems.

Overview

In the rapidly evolving world of blockchain technology, Byzantine Fault Tolerance (BFT) protocols play a crucial role in maintaining the integrity and reliability of distributed networks, even in the presence of faulty or malicious nodes. Ensuring the resilience of these protocols against potential failures and attacks is paramount for the success of blockchain applications. MILP-BFT-Protocol-Optimization provides a suite of MILP models that tackle these challenges, offering solutions to enhance protocol performance and security.

What You Will Find Here

  1. MILP Models: Detailed mathematical formulations for evaluating and optimizing BFT protocols under various conditions of failure and attack.
  2. Solver Integration: Compatibility with leading solvers such as CBC, GUROBI, and CPLEX, allowing you to leverage powerful optimization tools.
  3. Python-MIP Integration: A modern approach to solving MILP models using Python, with support for dBFT 2.0 and 3.0 proposals.
  4. AMPL Examples: Legacy support for generating models using AMPL, offering a historical perspective and educational value.

Executing the Models

Using Python-MIP (Recommended)

For the most up-to-date and versatile approach, we recommend using the python-mip library. This library is well-suited for handling the complexities of MILP models for dBFT 2.0 and 3.0, and is actively maintained.

  1. Installation: Begin by installing python-mip. Detailed installation instructions and documentation can be found on the Python-MIP website.

  2. Configuration: Customize the solver settings by modifying the provided Python script. The configuration can be adjusted directly in the script or via command-line arguments. For specific instructions related to dBFT 2.0 and dBFT 3.0, refer to the following README files:

Generating Models with AMPL (Deprecated but Educational)

AMPL support, while deprecated, is still available and can be valuable for educational purposes or historical analysis.

  1. Generate .lp Files: Use the following commands to convert model files into .lp format:

    glpsol --model dbft1.0/dbft1.0_Simplified.mod --data ./data/4N_TMax.dat --wcpxlp n4_dbft1.0.lp --check
    glpsol --model dbft1.0/dbft1.0_Simplified.mod --data ./data/7N_TMax.dat --wcpxlp n7_dbft1.0.lp --check
    glpsol --model dbft1.0/dbft1.0_Simplified.mod --data ./data/10N_TMax.dat --wcpxlp n10_dbft1.0.lp --check

    You can modify model discretization by editing the .dat files to suit your specific needs.

  2. Example for CPLEX: For those using CPLEX, execute the following commands to solve the generated .lp files:

    r n4.lp
    o
    w soln4.sol
    

Citation

We encourage you to cite our work if you find our models useful for your research or applications. Please use the following citation:

Vitor Nazário Coelho, Rodolfo Pereira Araujo, Haroldo Gambini Santos, Wang Yong Qiang, Igor Machado Coelho (2020). A MILP Model for a Byzantine Fault Tolerant Blockchain Consensus. Future Internet, 12(11), 185; https://doi.org/10.3390/fi12110185

@article{optframe2010,
    author = {Vitor Nazário Coelho and Rodolfo Pereira Araujo and Haroldo Gambini Santos and Wang Yong Qiang and Igor Machado Coelho},
    year = {2020},
    month = {10},
    title = {A MILP Model for a Byzantine Fault Tolerant Blockchain Consensus},
    journal = "Future Internet",
    volume = 12,
    doi = "https://doi.org/10.3390/fi12110185"
}

Contributing

We welcome contributions to enhance and extend our MILP models. If you have improvements, bug fixes, or new features to suggest, please follow the contribution guidelines provided in our repository. We value community input and collaboration to advance the field of BFT protocol optimization.

License

This project is licensed under the MIT License, providing you with the freedom to use, modify, and distribute the models while ensuring proper attribution.

Thank you for exploring MILP-BFT-Protocol-Optimization. We hope our models provide valuable insights and tools to advance the resilience and efficiency of BFT blockchain protocols. If you have any questions or need further assistance, feel free to reach out!

About

MILP BFT Protocol Optimization is a cutting-edge repository dedicated to the optimization of Byzantine Fault Tolerance (BFT) blockchain protocols using Mixed-Integer Linear Programming (MILP) techniques

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published