Skip to content

Blockchain-Technology-Lab/software-decentralization

Repository files navigation

software-decentralization

Tool that analyzes blockchain decentralization on the software layer

Installation

To install the software decentralization analysis tool, simply clone this GitHub repository:

git clone https://github.com/Blockchain-Technology-Lab/software-decentralization.git

The tool is written in Python 3, therefore a Python 3 interpreter is required in order to run it locally.

The requirements file lists the dependencies of the project. Make sure you have all of them installed before running the scripts. To install all of them in one go, run the following command from the root directory of the project:

python -m pip install -r requirements.txt

Replace python with your python version if necessary, e.g. python3.9 (same for all following commands).

Execution

To run the tool, simply execute the run.py script from the root directory of the project:

python run.py

If the script is executed for the first time, it will clone the repositories of the projects listed in the config.yaml file and extract data about their commit history.

Some blockchains are implemented by more than one independent client (e.g. Bitcoin Cash has both bitcoin-cash-node and BCHUnlimited). In these cases, the commit histories of all the client repositories configured for that blockchain are merged into a single, chronologically ordered history before any metrics are calculated. Decentralization is therefore measured at the level of the blockchain as a whole (across all of its client implementations), rather than per individual repository. Note that Ethereum's execution and consensus clients are treated separately (ethereum_execution and ethereum_consensus) for this purpose. See the Clients considered section below for the exact set of repositories that make up each blockchain in the current configuration.

These data are then used to calculate various metrics that quantify the decentralization of the projects.

The script will generate an output directory with the results of the analysis, organised in subdirectories depending on the type of output (data file or figure), contribution type (one of lines changed, commits, or merge commits), contributor type (author or committer), and number of commits per sample window.

To configure the analysis (e.g. change which repositories will be analysed or which metrics will be calculated), you can modify the config.yaml file. Repositories are listed under the name of the blockchain (ledger) they belong to; every repository listed under the same blockchain has its commit history merged together, as described above. To add another repository to a blockchain, list it under that blockchain in config.yaml and add its details (owner, default branch, and host - github or gitlab) to data_collection/repo_info.json. Commenting out a repository in config.yaml excludes it from the analysis without needing to remove its entry from repo_info.json.

Clients considered

The table below lists, for each blockchain in the current config.yaml configuration, the client repositories whose commit histories are merged together for that blockchain's decentralization analysis.

Blockchain Clients
Bitcoin bitcoin
Bitcoin Cash bitcoin-cash-node, BCHUnlimited
Cardano cardano-node
Ethereum (consensus) lighthouse, lodestar, nimbus-eth2, prysm, teku, grandine
Ethereum (execution) besu, erigon, go-ethereum, nethermind, reth
Litecoin litecoin
Polkadot polkadot-sdk
Solana solana
Tezos tezos
XRPL rippled
Zcash zcash, zebra

About

Tool that analyzes blockchain decentralization on the software layer

Resources

License

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages