Git Product home page Git Product logo

libbft's Introduction

libbft

Current TravisCI build status. Current neo version. License.

A lightweight and multi-language library collection for byzantine fault tolerance

Byzantine Fault Tolerance (BFT) is the core mechanism for building attack-resistant and self-adaptive systems. It is a widespread concept since the proposal of a Practical BFT (by Miguel Castro and Barbara Liskov), with multiple implementations nowadays (such as dBFT on Neo Blockchain). This project intends to allow easy implementation of BFT protocols on C++ and multiple languages (portability for cross-language is fundamental!).

It is intended to be also used as the official dBFT for neopt, a C++ implementation of Neo Blockchain components, focused on portability. It may also help the development of other ecosystem tools, protocols, and even develop other blockchain and fail-safe storage technologies.

Build Instructions

Currently, C++ spec is the reference one. After that, focus will be on Go, Python and C# ports.

cmake is your friend! Please install latest version (you can use Snappy to ensure that!): sudo snap install cmake --classic

(If you don't have snap, you can install it on debian-based using: sudo apt install snapd)

Builds for C++

Existing frameworks use high-level languages that may not be suitable for very lightweight architectures, such as microcontrollers with very limited computing capabilities.

C/C++ is interoperable with nearly all existing languages, so the idea is to provide modules that can be reused on other projects (on other languages too).

On debian-based systems (or ubuntu), just type make cpp && ./spec/cpp/build/app_test.

Getting submodules: git submodule update --init --recursive and git pull --recurse-submodules.

Installing graphviz: sudo apt install graphviz

tests for C++

It will also configure test library (as long as you cloned this project with --submodules too). To test, just run make test.

Note: tests are still under development.

C++ Standard

Currently, C++11 is adopted, in order to keep the best compatibility between conversors and compilers. However, it is recommended to migrate to C++17 as soon as possible, if this does not break compatibility with any existing modules and tools.

Let's please follow the CppCoreGuidelines.

vscode IDE

If using vscode IDE, it is recommended to install the following extensions:

  • C/C++ (currently 0.23.0-insiders2)
  • C++ Intellisense (currently 0.2.2)
  • GoogleTest Adapter (currently 1.8.3)

C++ Format Style

The currently adopted style for C++ is Mozilla, with indentation level set to 3. Recommended configuration for vscode:

{
    "[cpp]": {
        "editor.tabSize" : 3,
        "editor.detectIndentation": false
    },
    "C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle : Mozilla , ColumnLimit : 0, IndentWidth: 3, AccessModifierOffset: -3}"
}

Variable Naming Style

Let's please follow the CppCoreGuidelines, and as usual, classic CamelCase C++ naming is welcome :)

Builds for Go

Still under development.

Builds for C#

Still under development.

Builds for Python

Still under development.

License

Code follows MIT License.

libbft's People

Contributors

igormcoelho avatar rodoufu avatar vncoelho avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.