# BloodChain: A Blood Donation Network Managed by Blockchain Technologies
## 2 Background
### Hyperledger Fabric  
Hyperledger Fabric [25] is an open-source enterprise-grade permission distributed ledger technology (DLT) platform intended for significant business utilization that offers a few essential capacities that separate it from other distributed ledger or blockchain platforms. The Fabric has a modular, configurable architecture, allowing for innovation, is adaptable, and advanced for some utilizing cases, including banking, finance, insurance, healthcare, human resource, and supply chain. The simple architecture of a Hyperledger Fabric (Figure 1) network includes:  
* **N**: Network.
* **NC**: Network Configuration.
* **C**: Channel. A collection of organizations with a certain role in the same business process. For example, two organizations, such as car manufacturers and car distributors, will be in a channel about buying and selling cars.
* **CC**: Channel Configuration.
* **R**: Organization.
* **O**: Orderer Node. In public blockchain, all network nodes participate in the consensus process; in Hyperledger Fabric, only the orderer participates in that process.
* **P**: Peer is the point of interaction between members of the organization corresponding to the channel. All user actions must go through the peer.
* **S**: Smart Contract (Chaincode) is installed on the channel, clearly defining structs, actions that users can perform to interact with the state of the struct stored in the ledger.
* **CA**: Certificate Authority. Issue identity assigned to user or node of the respective organization. For example, user A is a member of Organization R1. When he wants to join the network, he will request CA1. Then, CA1 will generate an identity consistingof a private key, a public key, and associated properties. Then, CA1 returns it to user A. From then on, A uses the identity to perform interactions with the network. The network automatically knows that it is user A from organization R1.
* **A**: Application. An application or an interface (web, mobile app) helps users interact with the system more easily.  
This paper applies Hyperledger Fabric to implement our proof-of-concept for three main reasons. The first reason is the Hyperledger Fabric architecture is based on a modular architecture separating the transaction processing into three phases: distributed logic processing and agreement called chaincode (i.e., smart contract), transaction ordering, and and validating and committing a transaction. This separation offers several advantages, such as less trust and verification levels required across node types and optimized performance and network scalability. The second reason is the data structure, which requires a need-to-know basis. In particular, personal data security, which considers the necessity of specific data elements' privacy, can be achieved through data partitioning on the blockchain. Channels, supported in Hyperledger Fabric, allow data to reach only those parties that need to know. Finally, Hyperledger Fabric supports massive queries based on an immutable distributed ledger where the ledger is a sequenced record of state transitions for a blockchain application. Each transaction results in a set of asset key-value pairs committed to the ledger upon creation, update, or deletion.