ccchain

A scalable blockchain-based distributed system to satisfy supply chain collaborators' needs

https://github.com/bajelidze/ccchain

Science Score: 57.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
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary
Last synced: 8 months ago · JSON representation ·

Repository

A scalable blockchain-based distributed system to satisfy supply chain collaborators' needs

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

Description

This code is associated with my Master's thesis titled "A Company-Centric Approach for Incrementally Deployable Blockchain-Based Supply Chain Management".

The thesis later served as the foundation for a research paper published in IEEE, titled "Scalable and Privacy-Focused Company-Centric Supply Chain Management".

The paper is available at: https://doi.org/10.1109/ICBC54727.2022.9805503

See CITATION.cff for the citation information.

Setup

Building all the necessary components and running them is a multi-step process. We tried to write down all the steps such that they use specific versions of dependencies and still work in the future.

Build the Bootnode

Ethereum nodes require a bootnode to be able to discover other nodes in the network. For that, we have a special Docker image that builds a bootnode image. To build it, run:

bash bootnode/build.sh

Create the Docker Network

The collaborator nodes run in a pre-created Docker network, which we need to create manually. To create the network, run:

bash docker network create --subnet 172.255.0.0/16 --gateway 172.255.255.254 ccchain

As you can notice, we are intentionally reassigning the default gateway IP to 172.255.255.254. That's just so that the nodes' IP addresses start from 172.255.0.1 and onward.

Install Dependencies

Install Python

We require Python version 3.9 to be installed and available in PATH as python3.9. On Arch Linux, you can install it from AUR:

bash yay -S python39

You could also try installing it with: https://github.com/pyenv/pyenv

Install the Solidity Compiler

We require solc version 0.8.19.

You can download a static binary and install it in PATH from here: https://github.com/ethereum/solidity/releases/tag/v0.8.19

Setup the Python Virtual Environment

```bash python3.9 -m venv venv virtualenv venv source venv/bin/activate

pip3.9 install web3==5.20.0 py-solc==3.2.0 ```

Running

To start up a 2 node CCChain collaborator network, run:

bash python3.9 scripts/chain.py -n 2

This will deploy 7 Docker containers. One for the bootnode, and 3 for each of the two collaborators. Each of those 3 containers are: - A CCChain instance - A MongoDB instance - A Geth instance

As a part of the chain.py script, the first collaborator, will also deploy the smart contract located at contracts/global.sol.

See python3.9 scripts/chain.py -h for more deployment options.

Using the API

We do not have a concrete documentation of the CCChain API, as this was a research prototype.

To see how the API is used in practice, check out the Python code in the sim directory. The sim/simDemo.py would be a good start.

Owner

  • Name: Irakli Bajelidze
  • Login: bajelidze
  • Kind: user
  • Location: Nuremberg, Germany
  • Company: @exasol

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it using these metadata.
title: Scalable and Privacy-Focused Company-Centric Supply Chain Management
authors:
  - family-names: Wagner
    given-names: Eric
    orcid: "https://orcid.org/0000-0003-3211-1015"
  - family-names: Matzutt
    given-names: Roman
    orcid: "https://orcid.org/0000-0002-4263-5317"
  - family-names: Pennekamp
    given-names: Jan
    orcid: "https://orcid.org/0000-0003-0398-6904"
  - family-names: Bader
    given-names: Lennart
    orcid: "https://orcid.org/0000-0001-8549-1344"
  - family-names: Bajelidze
    given-names: Irakli
    orcid: "https://orcid.org/0009-0008-2609-4048"
  - family-names: Wehrle
    given-names: Klaus
    orcid: "https://orcid.org/0000-0001-7252-4186"
  - family-names: Henze
    given-names: Martin
    orcid: "https://orcid.org/0000-0001-8717-2523"
date-released: "2022-05-04"
identifiers:
  - type: "doi"
    value: "10.1109/ICBC54727.2022.9805503"
license: MIT
repository-code: "https://github.com/bajelidze/ccchain"

GitHub Events

Total
  • Create event: 2
Last Year
  • Create event: 2

Dependencies

Dockerfile docker
  • ubuntu 20.04 build
bootnode/Dockerfile docker
  • ethereum/client-go alltools-v1.10.2 build
docker-compose.yml docker
  • ccchain latest
  • geth latest
  • mongo 4.4.5
geth/Dockerfile docker
  • ethereum/client-go v1.10.2 build
go.mod go
  • github.com/btcsuite/btcd v0.21.0-beta
  • github.com/ethereum/go-ethereum v1.10.2
  • github.com/gorilla/handlers v1.5.1
  • github.com/gorilla/mux v1.8.0
  • github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88
  • github.com/mattn/go-colorable v0.1.8
  • go.mongodb.org/mongo-driver v1.5.1
  • golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b
  • golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
  • golang.org/x/tools v0.1.5
go.sum go
  • 697 dependencies