1. Introduction
With the introduction of bitcoin, a cryptocurrency, back in 2008 [
1], the era of blockchain began. The core innovation behind bitcoin was blockchain, a technology based on immutability, decentralization, and interminability. After the achievement of bitcoin, many cryptocurrencies were introduced including Ethereum, Ripple, Solana, Dot, etc., and with them were developed new platforms for developing blockchain-based systems, with Ethereum and Hyperledger being the main toolkits [
2]. Following the introduction of Ethereum, blockchain applications expanded beyond bitcoin, and smart contracts phenomena came into existence. A smart contract is a small software program that exists in the blockchain and is activated when specific criteria are satisfied or when contacted by an external source [
3]. Decentralized applications were first launched using smart contracts, and then we progressed toward developing complete systems on the blockchain, which included ERPs, supply chain management systems, e-voting systems, etc. [
4,
5]. Blockchain essentially creates a distributed record or database that is shared across all workers/group members in the network. There is currently no demand for outsider verification, as the system is now safer and completely decentralized. [
6]. The external exchange authority end is completed by utilizing cryptography’s capacity to provide dependable responses for the blockchain’s members. Mainly, if using the proof of authority consensus algorithm, this carefully marks, reviews, and authorizes any modifications (if required) to the blockchain record, and a copy of the record is retained, making trades safe, completely decentralized, time-stamped, and tamper-proof. [
6]. Usually, the copy is kept in multiple locations like a peer-to-peer network but now many different blockchain architectures have been introduced. The major three types of blockchains are private, public, and consortium blockchains, each having different architecture and subtypes. [
7].
Blockchain innovation has been used in numerous enterprises like healthcare, financial systems, logistics, document management, and accounting [
7]. The blockchain mining hub executes, confirms, and stores information in blocks. Blockchain has become one of the most advertised innovations nowadays; however, putting away enormous archives is still pricey as blockchain restricts the document, meaning a large amount of data cannot be stored in a blockchain. The vital need for storing enormous size records has been met by utilizing decentralized file storage frameworks like the InterPlanetary File System (IPFS), file coin, Storj, OrbitDB, Skeps, SWARM, and Sia [
8,
9,
10]. Blockchain has also been merged with other fields like artificial intelligence [
10] and cloud computing [
11,
12]. Regional Chain and Edge Computing [
13], Inventory networks, supply chain management [
14], Decentralized storage scheme Blockchain has a vigorous and decentralized foundation, so it is applied to deal with issues connected with trust, effectiveness, security, and information sharing [
15]. In our proposed approach with BDA-SCV we have used IPFS as a decentralized file storage system and record details are kept in blockchain, both linked with the file reference being stored in block data. The blockchain is incapable of storing massive volumes of information yet it is demonstrated successful when it stores hashes of documents and only important information in the chain, rather than the actual record being linked by the hash of the next block. Fundamentally, a hash against the document is created each time a record is transferred to the IPFS, and this hash is used in the smart agreement/contract that is used to get to the document [
16]. The hash value is changed each time, so any time changes are made in the data of the document it is considered as a new document. In this way, the integrity of information is confirmed.
Software configuration management is a field of software engineering that is specifically for managing change during and after the development of a software system [
17]. The fundamental concepts in software configuration management are making baselines and versioning different lower-level components known as configuration items. Change can arise from any place or part, e.g., it can arise from the development team or it can arise from the user or any stakeholder as a new requirement. These changes are versioned and stored in a repository. The changes that are not controlled properly can cause chaos in software. Software configuration management helps in erasing confusion that can be caused after a change and it records every piece of information about the change as it is made. The earlier the change, the easier it is to manage. Software configuration management is a central part of software quality assurance [
18]. Software configuration management is for controlling change during the software product life [
19]. The integration of the SCM process in the development process is shown in
Figure 1 [
20]. We tend to implement a version control system that is a subpart of software configuration management in blockchain technology.
Figure 1 shows the SCM process.
In traditional software configuration management tools, the version control is usually managed by a single entity that can also change data or place files directly to the project, which can be devastating and can lead to software failure. In existing systems that are used for version control purposes, the majority of current version control systems are centralized, meaning they have a single repository and are also managed by the authority that can manipulate or temper the repository’s data. The disadvantages are that clients do not have unlimited oversight of the report or file, and that documents can be erased, controlled, or altered, which can cause havoc in the development process [
21].
In the software development process, changes are done frequently and need to be looked after in a managed way.
Figure 2 shows a traditional version control architecture, which includes procedures to ‘update’ the localized document’s new version and ‘commit’ procedures to upgrade the document from the working copy onto the central repository. The data will then be pushed and pulled in and out of the central repository. This shows a very simple representation of a version control system that becomes very complicated when there are hundreds of files and many people working on the project [
22]. However, the main database is primarily centralized, with administrators and a central authority in charge. Before a file is ‘committed’ to the repository, the verification requires the confirmation of one of the authorities in case of a modification. By using the blockchain-based version control system, we are proposing a decentralized, distributed blockchain-based version control system, because, in existing distributed systems, this centralized notarization and verification management causes trust issues between different stakeholders of the project [
23]. The concept of a distributed system is the decentralized storage of the data to maintain transparency and backup of the data. In a blockchain-based system, the data is stored in a distributed location to maintain the transparency of the data and achieve data integrity. However, in a centralized system, all the records are stored in a central location and, therefore, for a version control system, it is difficult to maintain data integrity. Blockchain technology variants and consensus selection are also important factors. While proposing the system, it is understood that the selection of a blockchain variant is important to maintain efficacy and the consensus algorithm. If the private blockchain variant is selected, then we face the issue of centralized security and data privacy being compromised somewhere. Moreover, the centralized solution is the same as the earlier version control systems that are already working. We adopted the Hyperledger Fabric network to develop the decentralized blockchain to maintain data integrity and proposed an efficient blockchain-based version control system.
One of the areas where blockchain technology can help is document sharing and version control. To improve security and scalability, a decentralized version control solution without the need for a single authority and central repository is required. The document version approval process typically involves a large number of approvers, each of whom has a log that must be updated depending on the signatures received from all approvers across the distributed network. As a result, all parties involved in the registration process must keep a consistent record, which is not supported by current document version control systems [
24]. In this paper, we propose BDA-SCV, a blockchain-based decentralized architecture for software version control, on top of which all SCM processes can be implemented. We have used smart contracts to create a blockchain-based system for version control for code files, which diminishes the need for a trusted third-party authentication between the developers and the approvers. The four major components of our proposed approach are a decentralized repository, blockchain, smart contract, and consensus algorithm. For a distributed repository, we have considered the IPFS distributed file system. We have used a proof of authority consensus algorithm, where the authority is responsible for adding development to the specific project. The Hyperledger toolset is used for implementation and the Hyperledger Fabric Client is deployed on a cloud environment, to which the developers will be connected, and the Hyperledger network is deployed where the ledger and IPFS system are deployed.
This paper’s main contributions can be summarized as follows:
Review of work done previously on the version control system and blockchain;
Proposal of a decentralized blockchain-based architecture for software version control;
Implementation of the proposed approach using Hyperledger Fabric on a cloud platform.
The rest of the paper is structured as follows. First, we discuss the background study for the research, followed by related work in which we explain the different related papers. Then, that we propose our approach to BDA-SCV and present implementation, ending the article with future work and conclusions.
2. Background
The blockchain is a distributed digital ledger (a digital record of transactions or data kept in several locations on a computer system) that is immutable (meaning that a transaction or file stored cannot be updated). The notion or protocol that makes the blockchain system work is known as blockchain technology. Cryptocurrencies like bitcoin are made feasible by blockchain technology, much as email is made possible by the internet. It has various applications outside of cryptocurrencies. Carrying out a blockchain from the beginning includes managing a progression of components that are not instinctive from the start. The hubs that collaborate should be synchronized at the network level, handle the approvals of consensus strategies, manage the web customer with which the client collaborates with the framework, and more. If a framework administrator has to control all of this, they can be overwhelmed by the intricacy of administrations that cooperate to keep the network working. In this sense, BaaS suppliers have arisen, which permit businesses to utilize predefined answers to produce, construct, and host the vital components in the cloud for the activity of a blockchain [
25]. The service administrator manages the administrations of the provider, which permits the chairman to exploit the important assets, for example, dealing with the character/identity of the clients, adding security components, and heightening client honors, alongside security for the capacity of information in the cloud. First, we will discuss blockchain technology.
2.1. Blockchain Technology
A blockchain is defined as a “distributed database that maintains a continuously expanding list of ordered records, known as blocks”, which are “connected using encryption”. A cryptographic hash of the preceding block, a timestamp, and transaction data are all included in each block. A blockchain is a decentralized and distributed, and a public digital ledger is used to record transactions across many computers in such a way that the record cannot be changed retrospectively without affecting all following blocks and the network’s consensus [
6].
Figure 3 shows the structure of the blockchain ledger.
2.2. Software Configuration Management and Software Version Control
As we want to implement a version control system in blockchain technology, we should know how the software configuration process works. We will look at the basic elements of software configuration management. The baseline, configuration item, versions, and configuration control board are the four core elements of SCM. Software configuration management is a whole process in which changes are managed in software. There are different elements in the software configuration management process, which are discussed below. The version is the major component of software configuration management and version control is a process to manage multiple versions in a software process.
2.3. Proof of Authority Consensus
Proof of authority (PoA) is a consensus mechanism for a blockchain platform. Furthermore, permissionless (bitcoin, Ethereum) and permissioned (bitcoin, Ethereum) consensus processes can be found on blockchain platforms (Apla, Ethereum Private). All nodes are pre-authenticated on a permissioned blockchain. This advantage enables the adoption of consensus types that, in addition to other advantages, give a high transaction rate. PoA is a new type of consensus algorithm that is both fast and reliable. In PoA, nodes that have demonstrated their authority to generate new blocks are granted the right to do so. A node must pass a preliminary authentication to get this power and the ability to create new blocks. If we further look into the advantage of PoA, then we can see that it can help to defend against attacks [
29]. If we compare PoA with other commonly used consensus algorithms like proof of stake (PoS) and proof of work (PoW) then, for our problem, PoA is the best choice as it provides security and is energy efficient.
To disrupt the operation of a particular network node and make it unavailable, an attacker sends a high number of transactions and blocks to that node.
Block generation rights can only be given to nodes that can withstand DoS assaults since network nodes are pre-authenticated;
A validating node can be removed from the list of validating nodes if it is unavailable for a while.
2.4. Blockchain and Version Control System Structure
If we look at blockchain structure and file structure in a version control system, there is a similarity between both technologies. There is a sheer need for immutability in the version control system as a direct change to file content can cause issues in development and cause a delay in the development of software.
Figure 5 shows the blockchain-based version control architecture. The version control system follows a sequential structure in which we have a main trunk or branch that contains the main file, and then we have sub-branches that are being merged into main branch. Blockchain also has a sequence of blocks, and version control systems can naturally be implemented in the blockchain.
The development cost of the blockchain system is usually high compared with the traditional system, and it requires more computational power to compute the desired hashes by finding and adding the nonce value. However, blockchain technology is flexible with other technologies. We can develop the front-end using C++, Python, and dotnet by developing the blockchain in Ethereum or using the Hyperledger platform, which provides the opportunity for adoption. We can simply write the smart contract and deploy it using these platforms, which reduces costs and allows for efficient systems to be developed in accordance with the marked trends.
3. Related Work
Here we look at the work that has been done by many writers in relation to the usage of blockchain technology for version control, as well as how controlled data exchange of digital documents might be handled.
The authors of one paper [
30] present a method and framework for document sharing and version control based on blockchain technology for multi-user collaboration and change tracking in a safe, secure, and decentralized manner without the requirement for a centralized third party or trusted entity. This is a decent approach based on governing and regulating document version control functions among the document’s creators and developers, as well as its validators, utilizing Ethereum smart contracts. In addition, the proposed method takes advantage of the benefits of storing documents on an IPFS-based decentralized file system (InterPlanetary File System). Interactions between different users, such as developers and testers, are automated by the suggested approach. Smart contracts are created using the Solidity programming language and the capabilities of smart contracts are tested using the Remix IDE (integrated development environment). The approach was tested and verified. This is the basis for our proposed blockchain-based decentralized architecture for version control.
If we look into the usage/implementation of blockchain in the field of healthcare, we can see that different authors have worked to prove the successful usage of blockchain for decentralized and secure transfer of data among multi-users. Kumar et al. [
31] planned off-chain circulated capacity for clinical patient information where the hash of the documents was put away on a consortium blockchain, saving the trustworthiness of the information and security of the patients. The insurance of data by maintaining the honesty of the information was studied by Agyekum et al. [
32], where the IPFS and blockchain were consolidated to produce a design zeroed in on ensuring the uprightness of copyright and information security.
One paper [
24] presented an approach for a decentralized package version control using blockchain. Blockchain and distributed consensus are popular among cryptocurrencies because no one owns the data or transactions but the coin users. Open-source repositories are similar in that the data belong to the users. The idea of having a repository for software programs in a blockchain with distributed consensus is described in this study, which is also supported by the idea of the demonstrated proof-of-download. In another paper [
33], Bell et al. discussed about combining smart contract and blockchain technology; such a system may ensure end-to-end integrity of scientific data and outcomes while also facilitating collaborative research.
The authors of one study [
34] used an experimental setting to examine and explain the impact of an access-controlled IPFS. The authors focused on how we could increase file storage space in blockchain, because it is inefficient to store huge files on the blockchain. Because of the block size constraints, files must be divided and reassembled off-chain. This article primarily addressed the need for blockchain applications to transfer larger files, particularly those that include sensitive data. The authors addressed the design and implementation of aclIPFS, which uses Ethereum smart contracts to manage the access control list, for this purpose. A use case for aclIPFS has been given, as well as tested, to demonstrate the system’s impact in comparison with the original IPFS.
Other authors [
35] concentrated on computerized systems and software that have evolved in the business and allow for the optimization and planning of manufacturing, storing, shipping, selling, and distributing operations. As a proof of concept, the authors created a decentralized and permitted blockchain technology for stockpiling and retrieving global task-scheduling schemes using the Hyperledger Fabric v2 architecture and IPFS off-chain storage, which is enabled by a Hyperledger Fabric v2 framework. Vue.js was used to construct the web interface for this system, which was deployed in Chainstack. This paper is a unique contribution that adds an extra degree of security to scheduling systems. The authors described the newest edition of Hyperledger Fabric, which allows for the establishment of effective tiers of approval and regulations for access to information while maintaining notable levels of security and privacy, preventing the system being deceived or scammed by cybercriminals.
The author of Records Keeper [
36] has proposed a non-proprietary, workable blockchain ecosystem with elevated cryptography and blockchain technology that may be used for managing records and document protection. The goal of proposing this high-level solution is to provide a platform that allows for more secure data transport and authorization. With better security, document sharing between groups of users through a decentralized storage network becomes easy. Conventional database platforms like MySQL as well as Oracle do not have a framework for creating immutable records that cannot be tampered with. This paradigm governs document version control, but there is no practical implementation.
If we look at the use of blockchain in the field of management, we can see that the Swedish government [
37] is using a management system based on blockchain technology to register and record land papers and land titles in order to record and manage the real estate field. National Lands of Sweden is developing a proof-of-concept model in collaboration with ChromaWay, a blockchain firm. This system will be used to check how blockchain can reduce the possibility of human mistake or errors. The goal of this strategy is to make a system that is more reliable and secure for transmitting papers/data across parties and amending existing documents. This technology that is being proposed can also be used in a smart contract-based system to authenticate the user’s identity.
Query performance is important in considering acquiring data from external sources through blockchain. Zhang et al. propose a middleware system [
38] for query performance in blockchain that can save storage while also storing files for blockchain. The current blockchain cannot provide storage version control and multi-person collaboration, and this study presents a solution. Another paper [
39] presents an improved P2P file system using IPFS and blockchain. The paper also solves the performance issue in file transfer; a zig-zag-based model is proposed to improve the block storage model.
In recent years, blockchain and artificial intelligence (AI) have received the most research attention. Blockchain is a network of participants sharing a distributed ledger of trustworthy digital records. Blockchain technology has the potential to revolutionize many industries, including international payment, secure data sharing and marketing, and supply chain management. On the other hand, AI is used to create machines that can perform tasks that require intelligence. Blockchain enables AI to scale to provide more actionable insights, manage data usage and model sharing, and create a trustworthy and transparent data economy by providing access to large volumes of data from within and outside the organization [
40]. Data are the input for various artificial intelligence (AI) algorithms to mine valuable features, but data on the Internet is scattered everywhere and controlled by various stakeholders who do not trust each other, and data usage in complex cyberspace is difficult to authorize or validate. As a result, enabling data sharing in cyberspace for real big data and real powerful AI is extremely difficult [
41]. Artificial intelligence (AI) and blockchain have recently emerged as two of the most popular and disruptive technologies. Blockchain technology has the potential to automate cryptocurrency payments and provide decentralized, secure, and trusted access to a shared ledger of data, transactions, and logs. With smart contracts, blockchain can also govern interactions among participants without the need for an intermediary or a trusted third party. Artificial intelligence, on the other hand, provides intelligence and decision-making capabilities for machines that are similar to humans [
42]. “AI and Blockchain as New Triggers in the Education Arena”, promotes dialogue in the promising field of AI and blockchain in the educational sector as new triggers in the development of new approaches to academic management, learning contexts, and AI- and blockchain-based technology applications and tools devoted to education [
43].
Blockchain is a cutting-edge technology that has transformed the way culture interacts and trades. It could be defined as a chain of blocks in a fully decentralized network that contains data with digital signatures. The author of [
44] examines the use of blockchain in a variety of fields, including finance, healthcare, information systems, wireless communications, the Internet of Things, smart grids, governmental services, security, and smart cities. Smart cities can provide the best services to improve citizens’ daily lives in healthcare, mass transit, energy usage, and education. The authors of [
45] present cutting-edge blockchain technology to address smart city security issues. Although blockchain offers a valuable solution in a number of fields, by maintaining privacy, security, anonymity, decentralization, and immutability, it also provides valuable benefits to a number of fields and subjects, including the Internet of Things, energy, finance, medical services, and government, which stand to benefit disparately from its implementation [
46] Blockchain technology has a wide range of applications. It is also suitable for automated software testing. In [
47], an automated testing method for DApps that works in two stages is proposed. To begin, random events are used to derive an abstract relationship between browser-side events as well as blockchain-side contracts. Second, a procedure yields a set of test cases based on inferred relations and arranges the test cases according to a read–write graph. Paper [
48] introduces blockchain-oriented software (BoS) testing, particularly at the smart contract level. Concentrating on dynamic testing, it begins by providing a classification of 20 studies based on smart contract code accessibility. Second, it provides an insight into each identified work, emphasizing its benefits and limitations. In this paper, we propose the blockchain-based version control system to promote the education arena more and make the work scalable and stable.
Table 1 shows the list of papers previously published that we have discussed above in detail where version control is merged or implemented with blockchain technology. The majority of research involving large data files makes use of IPFS for file storage with blockchain addresses, one of the main reasons we would use IPFS to implement our proposed system. Integration of blockchain with version control has received limited attention, and the majority of studies have been presented at conferences.
4. Proposed Approach
In this section, we explain our proposed approach that uses blockchain for version control, which is an important component of software configuration management. We are using a repository that uses an immutability protocol for distributed file sharing, mainly IPFS. The Inter Planetary File System (IPFS) is a peer-to-peer network and distributed file system technology for data storage [
49]. The main quality of IPFS is that it is distributed, and a traditional version control system works on a centralized approach. So, IPFS fits perfectly with our approach of a blockchain-based distributed solution for version control; each block will contain data about one document being uploaded by a developer. Private blockchain will be used with a proof of consensus algorithm. The authority will be responsible for adding developers to the private blockchain.
Following are the major components of our proposed approach.
File Repository;
Smart Contract;
Blockchain;
Consensus Algorithm.
The proposed architecture BDA-SCV is modeled in
Figure 6. Next, we discuss each component in detail.
4.1. File Repository
As, we have proposed a distributed solution to the centralized approach for version control, we need a distributed repository. IPFS has been proposed for this. IPFS is a decentralized file sharing network that recognizes files based on their content. It is a distributed file system protocol and peer-to-peer network for data storage, and we will be using it for our approach. It employs a distributed hash table (DHT) to determine location of files and nodes integration. In addition, it is not possible and inefficient to store complete code files in blockchain because blockchain can only store limited amounts of data, so we will also give a reference of the file in blockchain that will be stored in the IPFS system. With the reference we will also store the developer ID with which the file and version is associated. A unique cryptographic hash will be generated for each file.
4.2. Smart Contract
Smart contracts, which are stored on a blockchain, are essentially programs that run when specific conditions are met. They are typically used to automate the execution of a contract so that all parties can be certain of the outcome immediately, without the need for any intermediaries or wasted time. They can also automate a workflow by starting the next phase once certain conditions are met [
50]. Smart contracts will be used to create new blocks, register users, and provide developers with permission to use a certain project version control blockchain. Everything will be regulated by the system’s smart contracts. Uploading documents, which creates a new block for each entry, will be the most important smart contract in our system.
4.3. Blocks Contain the Data
With our distributed repository, we have a self-constructing blockchain with blocks containing data about the project being developed, its version, timestamp and reference to the file stored in IPFS. Following data will be stored in each block.
The blockchain will be constructed based on the hash of the previous block. The first block as we know in blockchain is known as the genesis block. The genesis block in our case will contain some basic information about the project being developed, and the next blocks will contain data specifically related to the changes made. For calculating the hash, Hyperledger Fabric uses the SHA256 algorithm that is also used for hash calculation in bitcoin blockchain [
1]. SHA256 is an encryption algorithm that returns a string of fixed length when passed with any amount of data [
51]. Our input to the encryption algorithm will be all the above-mentioned data stored in a single block, then the hash of the block will be generated and that hash will be stored in the next block, making a blockchain just like in the link list in which we have pointers working together to make a list.
Figure 7 illustrates how our blockchain will work.
Two essential blockchain qualities are immutability and distributed structure, and because the ledger is immutable you can always rely on it to be correct. Its decentralized nature protects it against network threats. On the ledger, each transaction or record is stored in a “block”. Blocks on the bitcoin blockchain, for example, typically contain more than 500 bitcoin transactions, so on same structure our block will contain a limited amount of data. A block’s data is dependent on and related to the data in the preceding block, forming a chain of transactions across time.
4.4. Consensus Algorithm
For our approach we will be using proof of authority (PoA) consensus algorithm. In PoA-based networks, transactions and blocks are validated by approved accounts, known as validators. Validators run software allowing them to put transactions in blocks. The process is automated, so validators do not have to keep an eye on their computers all the time. It does, however, necessitate keeping the computer (the authority node) secure. Individuals who earn the right to become validators through PoA have an incentive to keep the position they have earned.
5. Implementation
In this section we present the implementation of the model proposed in the above section. Our proposed model is implementing the version control system in blockchain technology and it consists of multiple components, i.e., distributed repository, smart contract, private blockchain, and consensus algorithm.
Figure 8 shows the implementation model based on the proposed approach. The implementation is performed on a Hyperledger toolset. Hyperledger are a group of open-source tools for blockchain development, which notably consist of Hyperledger Besu, Fabric and Sawtooth [
52]. We use Hyperledger Fabric because it is now the most common tool for developing private blockchain and writing smart contracts. Hyperledger Fabric is a plug-and-play blockchain architecture that serves as a foundation for constructing blockchain-based goods, solutions, and applications for private organizations. Hyperledger Fabric was founded by Digital Asset and IBM and has since evolved into a collaborative cross-industry effort hosted by the Linux Foundation. Fabric was the first Hyperledger project to pass through the “incubation” stage and enter the “active” stage in March 2017 [
53].
We have divided our implementation into three major modules, with one consisting of developers who will be responsible for uploading document. Next, we have a Hyperledger Fabric Client and Fabric network. The developers will be connected to the Fabric Client and it will be responsible for communication with the network. The Fabric Client will be hosted on a cloud environment, so that anyone from any place can use our distributed version control system. Authorizers who will be connected directly with the network will be responsible for enrolling developers in the Hyperledger network. Authorizers will not be able to make any change to the blockchain data or files in IPFS and will only have authority to enroll developers into using the version control blockchain using smart contacts. All the programming is done through smart contracts, which are written using JavaScript in the Hyperledger network.
For deployment of our application, we require a platform. For the purpose we have used Docker. It is a platform for creating containers on which applications can be deployed and could easily be integrated in cloud environment [
54]. We have deployed both Hyperledger client and server on different containers on Docker and accessed that from a third source, which will act as the developer. We have used the InterPlanetary File System (IPFS) for storing the file versions, and only reference to the file and cryptographic hash against the file will be stored in blockchain as storing large amount of data will not be possible in blockchain. The cryptographic hash will be unique against each file and for change a new file will be stored to the blockchain against the file ID but with a new version.
So, the flow of application will be:
Developer will connect to Fabric Client;
Client will send all requests to Fabric network;
Fabric network will be responsible for making all the changes in to ledger;
Each block in ledger will be associated to a file placed in distributed repository (IPFS);
Cryptographic hash generated for each file in IPFS will be stored in the ledger.
Figure 9 shows the flow of a document being uploaded from the developer’s end to IPFS. First of all, the developer will be connected to the Hyperledger Fabric network. The first request will be sent to the Fabric network from where it will be sent to the smart contract implemented in the blockchain network that contains the ledger. First, the ledger will be updated, and then the document will be uploaded to the IPFS repository. A confirmation email will be issued to the developer confirming the successful upload of the file and ledger entry. The developer will then provide the file ID if he wants to add content to the same file.
The flow of a new developer joining the project is shown in
Figure 10. The authorizer will be responsible for adding new developers to the project and registering them.
Figure 11 and
Figure 12 also shows the code for this SD. At this time, the developer will be assigned to only one project.
Figure 11 and
Figure 12 show smart contracts code for creating a new developer in ledger. The developer ID is used as the key to store the developer object in ledger, and the developer’s first name and last name are added with the developer ID. Once this is done, the developer is associated with a project; in the case of our implementation we have considered only one project.
Figure 12 shows the code for creating and validating a new developer on ledger, and after creation of a new developer on ledger the object will be sent back to create the developer method, as earlier shown in
Figure 8, where they will be associated with a project. This method is managed by the authorizer, who is responsible for adding and deleting developers on specific project.
We have created the developer end on the dotnet framework from which they can upload files to the Hyperledger network using a restful API call.
Figure 13 shows the authorizer end view from which they will register the developer in the ledger. The details that they need to enter are developer ID, first name, last name, project name, and project ID. The smart contracts shown in
Figure 11 and
Figure 12 will be executed against the view in
Figure 13.
Figure 14 shows the developer end from where they will enter the system to upload files to the network, which will end up in IPFS with a cryptographic hash being stored in the ledger.
The file upload view for the developer is shown in
Figure 15. The developer will enter the file id and browse the file to add to the network. The developer will enter the file ID that will be stored in the ledger. The version of the file will be automatically created by the smart contract to the ledger.
The authenticator will be responsible for creating the project in blockchain and then adding the developers to the specific project. The developer will upload document that will be created as the unique block on the blockchain, with the specific file being stored on IPFS with reference in the block data.