
Generated by DALL·E 3
Enhancing transparency in buyer-driven commodity chains for complex products: a blockchain-based traceability framework demonstrated through an apparel supply chain simulation
This repository contains the chaincodes and scripts necessary to simulate the cotton-to-shirt trace discussed in Section 3 of the paper.
Read the paper»
Table of Contents
From the paper: Buyer-driven commodity chains are characterized by commercial relationships between buyers and sellers that may obscure accountability due to complexity, thereby undermining sustainability efforts. Conventional methods to trace production, including ineffective human-led audits, risk reorienting global corporate governance towards the interests of private business and away from social benefit by limiting the role of objective data in the process. This study examines the relevant features of private, permissioned blockchain towards harnessing the transparency challenge by demonstrating the efficacy of our proposed framework against a simulation of a real-world multi-tier apparel supply chain. The simulation integrates a set of functional and operational requirements achieved through a combination of programmable smart contracts and underlying blockchain architecture. We then evaluate the framework both qualitatively and quantitatively before discussing the limitations of our work.
- Hyperledger Fabric version 2.5.9
- Go version 1.22.4
- jq version 1.6
- Docker Desktop
Please follow the detailed instructions on the Hyperledger Fabric website to install the necessary prerequisites (including those listed above) required to run a local Docker-based Fabric network based on your operating system:
- macOS
- Linux
- Windows
- For Windows: it is strongly recommended to use WSL2 (Windows Subsystem for Linux version 2) and thereon follow the Linux instructions
In order to use this repository to simulate an apparel supply chain trace, one must:
- Clone this repository and navigate there to make it the working directory for the following steps
- Download the Fabric install script and make it (and all existing scripts) executable:
curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh && find . -type f -name "*.sh" -exec chmod +x {} \;
- Use this newly installed script to download the v2.5.9 binaries:
If executed succesfully, this will create 2 directories within the working directory:
./install-fabric.sh --fabric-version 2.5.9 binary
bin/
andbuilders/
- Navigate to the admin-channel chaincode directory, i.e.,
chaincode/admin-channel/
, and create thevendor/
directory:Then, do the same for the production-channel chaincode directory, i.e.,go mod vendor
chaincode/production-channel/
. At the end of this step, bothadmin-channel/
andproduction-channel/
should contain avendor
directory.
Now that the prerequisites and go dependencies for the chaincode are installed, we can begin the simulation. As discussed in the paper, the network topology comprises 2 separate channels for administrative reasons:
Consequently: the chaincode(s), the ledger, and ultimately, the trace, are unique to each channel. The admin-channel trace contains higher-level transactions, like purchase order generation and proposals to add upstream factories to fulfill the manufacturing tasks. The production-channel trace provides a low-level view of the actual manufacturing tasks to fulfill the 200 shirts order placed in the admin-channel. Let us start with generating the admin-channel trace:- Navigate to the test-network directory, i.e.,
cd test-network/
- Ensure that the necessary Fabric binaries are accessible in your PATH and that important functions are, too:
export PATH=${PWD}/../bin:$PATH && export FABRIC_CFG_PATH=$PWD/../config/ && source ./scripts/envVar.sh
- Start the network from a known initial state:
./network.sh down
- Start the necessary containers and join them to the admin-channel:
./networkSetup.sh
- Package and deploy the admin-channel chaincode(s) and generate the trace as discussed in Section 4.3 of the paper:
./initAdminLedger.sh
- Navigate to the test-network directory, i.e.,
cd test-network/
- Ensure that the necessary Fabric binaries are accessible in your PATH and that important functions are, too:
export PATH=${PWD}/../bin:$PATH && export FABRIC_CFG_PATH=$PWD/../config/ && source ./scripts/envVar.sh
- Optional: Start the network from a known initial state:
You may choose to skip this step and keep the network running if all that has been done is generating the admin-channel trace.
./network.sh down
- Start the necessary containers and join them to the production-channel:
By adding a 1 to the execution, the script creates and runs the remaining containers that were unnecessary for generating the admin-channel trace, i.e., org4 (RM), org5 (TX), and org6 (FS).
./networkSetup.sh 1
- Package and deploy the production-channel chaincode(s) and generate the trace as discussed in Section 4.4 of the paper and shown below:
Running
./initProductionLedger_${ORDER_QUANTITY}.sh
initProductionLedger_${ORDER_QUANTITY}.sh
will take significantly longer thaninitAdminLedger.sh
given the deployment of more complex chaincode(s) and increased function invocations due to the requirements of a production-grade trace... Obviously, ${ORDER_QUANTITY} also determines how long the simulation will take to run!
R. Takkar, K. Birman, and H. O. Gao, “Enhancing transparency in buyer-driven commodity chains for complex products: a blockchain-based traceability framework demonstrated through an apparel supply chain simulation,” Procedia Computer Science, vol. 253, pp. 2703–2712, Feb. 2025, doi: 10.1016/j.procs.2025.01.330
@article{TAKKAR20252703,
title = {Enhancing transparency in buyer-driven commodity chains for complex products: a blockchain-based traceability framework demonstrated through an apparel supply chain simulation},
journal = {Procedia Computer Science},
volume = {253},
pages = {2703-2712},
year = {2025},
note = {6th International Conference on Industry 4.0 and Smart Manufacturing},
issn = {1877-0509},
doi = {https://doi.org/10.1016/j.procs.2025.01.330},
url = {https://www.sciencedirect.com/science/article/pii/S1877050925003382},
author = {Ritwik Takkar and Ken Birman and H. Oliver Gao},
keywords = {Blockchain, Traceability, Supply Chain Management, Manufacturing},
}
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache-2.0 license. See LICENSE.txt
for more information.
Ritwik Takkar - [email protected]
Project Link: https://github.com/ritwiktakkar/ism_WEave