fbas-reward-distributor

Rank nodes in an FBAS like Stellar using the Shapley value and other node centrality measures.

https://github.com/cndolo/fbas-reward-distributor

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: sciencedirect.com
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.3%) to scientific vocabulary

Keywords

blockchain centrality mobilecoin rust shapley-value stellar
Last synced: 6 months ago · JSON representation ·

Repository

Rank nodes in an FBAS like Stellar using the Shapley value and other node centrality measures.

Basic Info
  • Host: GitHub
  • Owner: cndolo
  • License: mit
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 229 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • Open Issues: 3
  • Releases: 0
Topics
blockchain centrality mobilecoin rust shapley-value stellar
Created almost 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

FBAS Reward Distributor

MIT CI codecov dependency status

Framework for the computation of a node's influence and reward distribution in a Federated Byzantine Agreement Systems (FBASs) like Stellar.

The framework is suitable for usage as both a binary and a library and can mainly do the following:

  • read node data in stellarbeat's JSON format;
  • rank the nodes using a variety of implemented algorithms;
  • based on the rankings, compute a reward distribution for each node.

Required toolchain

  • A working Rust environment

    • Install: https://www.rust-lang.org/tools/install
  • A minimal gcc and g++ toolchain is required by some of the dependencies. Should be covered by the build-essential, m4 packages.

Build and optionally run tests

  1. Build: cargo build --release
  2. Tests cargo test --release

Usage as a binary

  1. Command line arguments ``` cargo run --release -- {distribute | rank} [-i -p -r reward] {node-rank|power-index-approx|power-index-enum}
- fbas-path: Path to file describing the FBAS.
    If no path is passed, the program will attempt to read from the command line.
- i: Ignore inactive nodes in the FBAS. Optional. Default = false.
- r reward: reward value that is to be distributed - only used with the rank subcommand. Default = 1.
- p: Include the nodes' public keys in the output. Default = false.

```

The rank subcommand is similar to distribute with the exception that it only calculates the nodes' weights without allocating rewards. The output is always a sorted list of tuples: (NodeID, Public Key (where available), Ranking, [Reward]).

  1. Compute a reward distribution for the nodes in the mobilecoin_nodes_2021-10-22.json FBAS using

    1. the Shapley-Shubik power index

      cargo run --release -- rank test_data/mobilecoin_nodes_2021-10-22.json power-index-enum

      This algorithm computes the players' Shapley-Shubik indices via enumeration in O(2^n) time, and is therefore not recommended for larger FBASs.

    2. As an alternative, we provide a polynomial time approximation algorithm using Castro et al.'s algorithm based on sampling.

      cargo run --release -- rank test_data/mobilecoin_nodes_2021-10-22.json power-index-approx 1000

    3. Distributions can also be computed based on a graph-theoretic (NodeRank) metric:

      ``` cargo run --release -- rank testdata/mobilecoinnodes_2021-10-22.json node-rank

      ```

Usage as a library

[dependencies] fbas-reward-distributor = { git = "https://github.com/p2p-research-tools/fbas-reward-distributor", default-features = true}

See the fbas-graph-generator for some examples.

Performance and approximation measurements

  1. Build with

cargo build --release --features "measurements" 2. then run performance measurements using the selected ranking algorithm

target/release/performance_tests -m $MAX_TOP_TIER --no-quorum-intersection -r $ITERATIONS -o $OUTPUT_FILE -j $JOBS -u $FBAS_TYPE $RANKING_ALGO 3. and/or approximation measurements

target/release/approximation_tests -m $MAX_TOP_TIER --no-quorum-intersection -r $ITERATIONS -o $OUTPUT_FILE -j $JOBS -u $FBAS_TYPE

Owner

  • Name: Charmaine N
  • Login: cndolo
  • Kind: user
  • Location: Berlin, Germany
  • Company: Humboldt-University, Berlin/ @trudi-group

Citation (CITATION.cff)

cff-version: 1.2.0
message: >-
  If you use this software, please cite it using the
  metadata from this file.
title: "Fair Reward Distribution in Federated Byzantine Agreement Systems"
repository-code: 'https://github.com/cndolo/fbas-reward-distributor'
type: inproceedings
authors:
  - given-names: Charmaine
    family-names: Ndolo
    affiliation: Humboldt University of Berlin
  - given-names: Martin
    family-names: Florian
    affiliation: Humboldt University of Berlin / Weizenbaum Institute
  - given-names: Florian
    family-names: Tschorsch
    affiliation: Humboldt University of Berlin
booktitle: "5th Conference on Blockchain Research & Applications for Innovative Networks and Services (BRAINS)"
year: 2023
publisher: "IEEE"
doi: 10.1109/BRAINS59668.2023.10316929

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 1
  • Total pull requests: 22
  • Average time to close issues: 6 days
  • Average time to close pull requests: 15 days
  • Total issue authors: 1
  • Total pull request authors: 3
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.91
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 15
Past Year
  • Issues: 0
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 month
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.33
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 3
Top Authors
Issue Authors
  • cndolo (1)
Pull Request Authors
  • dependabot[bot] (22)
  • cndolo (7)
  • Benjamin-Loison (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (22) rust (14) github_actions (8)

Dependencies

Cargo.toml cargo
  • approx 0.5.1 development
  • assert_cmd 2.0.4 development
  • predicates 2.1.1 development
  • bit-set 0.5.2
  • csv 1.1
  • env_logger 0.9
  • fbas_analyzer 0.7
  • hex 0.4.3
  • itertools 0.10.3
  • lazy_static 1.4.0
  • log 0.4
  • par-map 0.1
  • rand 0.8.5
  • rug 1.15.0
  • serde 1.0
  • sha3 0.10.0
  • structopt 0.3.26
.github/workflows/coverage.yml actions
  • actions-rs/tarpaulin v0.1 composite
  • actions-rs/toolchain v1 composite
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v3 composite
.github/workflows/lint.yml actions
  • actions-rs/cargo v1 composite
  • actions-rs/toolchain v1 composite
  • actions/checkout v3 composite
.github/workflows/test.yml actions
  • actions-rs/cargo v1 composite
  • actions-rs/toolchain v1 composite
  • actions/checkout v3 composite