Git Product home page Git Product logo

fbas_analyzer's Introduction

FBAS analyzer

Cargo Documentation CI codecov

Library and tools for analyzing the quorum structure of Federated Byzantine Agreement Systems (FBASs) like Stellar and MobileCoin. Related research paper here.

Among other things, the implementation here can:

  • read node and organizations data in stellarbeat's JSON format
  • determine quorum intersection
  • find all minimal quorums (minimal here means that each existing quorum is a superset of one of the minimal quorums)
  • find all minimal blocking sets (minimal indispensable sets for liveness)
  • find all minimal splitting sets (minimal indispensable sets for safety)
  • simulate different quorum set configuration policies, yielding synthetic FBASs for further analysis

Powers our analysis websites for the Stellar and MobileCoin networks.

Usage as tools

  1. Install Rust
  2. (optional) Run unit tests and functional tests:
scripts/tests.py
  1. Build:
cargo build --release
  1. Try tool using older data from stellarbeat:
target/release/fbas_analyzer test_data/stellarbeat_nodes_2019-09-17.json --merge-by-org test_data/stellarbeat_organizations_2019-09-17.json -a -p -S --only-core-nodes
  1. Get some new data from stellarbeat:
scripts/get_latest_stellarbeat_data.sh
  1. Play around some more:
target/release/fbas_analyzer -h
target/release/bulk_fbas_analyzer -h

You can also just cargo install fbas_analyzer, of course.

Usage as Rust library

Add this to your Cargo.toml:

[dependencies]
fbas_analyzer = { version = "0.7", default-features = false }

Or this, if you need simulation functionality:

[dependencies]
fbas_analyzer = { version = "0.7", default-features = false, features = ["qsc-simulation"] }

Check out the API Reference and how the API is used by the tools in src/bin/ and the example in examples.

See also / Acknowledgements

...and of course the awesome stellarbeat.io :)

fbas_analyzer's People

Contributors

cndolo avatar marfl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fbas_analyzer's Issues

fbas_analyzer crashes on current stellarbeat data

Following "Usage as tools" in the README, I ran scripts/get_latest_stellarbeat_data.sh (step 5) and then target/release/fbas_analyzer test_data/stellarbeat_nodes_2023-09-13.json --merge-by-org test_data/stellarbeat_organizations_2023-09-13.json --ignore-inactive-nodes -apdS --only-core-nodes (as suggested in the output of the previous command). This results in:

Reading FBAS JSON from file...
thread 'main' panicked at 'Error parsing FBAS JSON: Error("invalid type: null, expected struct RawQuorumSet", line: 1, column: 50659)', src/io/core_types.rs:47:36
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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.