fbas-reward-distributor
Rank nodes in an FBAS like Stellar using the Shapley value and other node centrality measures.
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
Repository
Rank nodes in an FBAS like Stellar using the Shapley value and other node centrality measures.
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 3
- Releases: 0
Topics
Metadata Files
README.md
FBAS Reward Distributor
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, m4packages.
Build and optionally run tests
- Build:
cargo build --release - Tests
cargo test --release
Usage as a binary
- 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]).
Compute a reward distribution for the nodes in the
mobilecoin_nodes_2021-10-22.jsonFBAS usingthe Shapley-Shubik power index
cargo run --release -- rank test_data/mobilecoin_nodes_2021-10-22.json power-index-enumThis algorithm computes the players' Shapley-Shubik indices via enumeration in
O(2^n)time, and is therefore not recommended for larger FBASs.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 1000Distributions 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
- 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
- Repositories: 3
- Profile: https://github.com/cndolo
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
- 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
- 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
- actions-rs/cargo v1 composite
- actions-rs/toolchain v1 composite
- actions/checkout v3 composite
- actions-rs/cargo v1 composite
- actions-rs/toolchain v1 composite
- actions/checkout v3 composite