Advance Sustainable Science. Engineering and Technology (ASSET) Vol. No. January 2024, pp. 02401017-01 02401017-07 ISSN: 2715-4211 DOI: https://doi. org/10. 26877/asset. Developing Decentralized Data Storage Network Using Blockchain Technology to Prevent Data Alteration Ryan Adi Putra*. Rizka Ardiansyah. Yazdi Pusadan. Anita Ahmad Kasim. Yuri Yudhaswana Joefrie Information Technology Department. Faculty of Engineering. Tadulako University. Jl. Soekarno Hatta No KM 9 Palu 94148. Central Sulawesi. Indonesia *ryannadiputraa@gmail. Abstract. In the face of escalating global data exchange, the pronounced vulnerability of traditional centralized storage networks to manipulation and attacks poses a pressing challenge. Digital service providers, entrusted with vast datasets, grapple with the formidable task of ensuring the security, integrity, and continuous availability of their stored information. This paper tackles these multifaceted issues by proposing a decentralized data storage network empowered by blockchain technology. This approach systematically mitigates the inherent susceptibilities of centralized systems, thereby providing heightened resilience against unauthorized alterations and malicious attacks that compromise digital information integrity. Moreover, the decentralized model holds significant promise for securing public data. leveraging the transparency and immutability of blockchain ledgers, this approach not only safeguards against unauthorized access but also actively fosters transparency and accountability in data management. This makes it particularly well-suited for ensuring the security and integrity of public data, addressing concerns related to trust and reliability in the ever-evolving landscape of information exchange. Keywords: Blockchain. Decentralization. Data Storage. Data Security (Received 2023-12-14. Accepted 2023-12-24. Available Online by 2024-01-. Introduction The exchange of data has experienced a significant global increase compared to the last few decades. The management of data in the digital realm has become an integral part of various industrial sectors. The rise in volume and complexity of data generated by various digital service providers poses challenges in ensuring the security, integrity, and availability of data. The conventional approach of storing data in centralized networks poses significant obstacles in terms of security, integrity, and One critical challenge that has garnered attention is the vulnerability of centralized systems to data manipulation and alteration. The inherent centralization makes these systems susceptible to unauthorized access and malicious activities, leading to potential compromises in data integrity. Decentralized platform systematically mitigates these issues by encrypts and distributes data across a decentralized network, with the use of blockchain technology as a distributed ledger to verify and authenticated every transcation in the network using public-key encryption and consensus protocol . Blockchain is a technology that amalgamates various disciplines, including computer science, mathematics, and cryptography. Blockchain technology enables the formation of a decentralized data storage network resistant to changes, manipulation, or network-based attacks . Blockchain technology is characterized by trustlessness, eliminating dependence on centralized storage providers through the implementation of a transparent and decentralized system. The decentralized system does not involve third parties or intermediaries. instead, it utilizes a peer-to-peer (P2P) method allowing direct communication between nodes, and with the consensus protocol that eliminates the potential for data fraud in the network . , . This research aims to develop a decentralized data storage network infrastructure by implementing blockchain technology to prevent data manipulation by centralized data storage. The findings of this research are expected to contribute insights into the development of blockchain as a decentralized data storage solution. Methods Type of Research This research employs an exploratory research type and qualitative method. Exploratory research examines existing knowledge on a particular topic and other relevant information. The aim of this research is to provide fundamental knowledge on a topic as an introduction for further studies. And by employing qualitative methods, this research seeks to offer in-depth explorations that serve as an insightful introduction, laying the groundwork for subsequent studies . System Development The system development is carried out using the prototype method. The programming language used is Go for the blockchain nodes, and Typescript with the NestJS framework for the API Gateway. Badger DB is utilized as persistent and fast key-value database on each node in the blockchain network. Internode communication in the blockchain network is facilitated through the gRPC protocol, while REST API is employed in the API Gateway. Containerization is achieved using Docker to simplify system deployment and configuration . The use of the prototype method allows developers to design a running prototype as a sample of the developed system. Results and Discussion Planning The planning phase begins with identifying issues and conducting a literature review on both centralized data storage systems and decentralized systems as a solution to the identified problems. The exploratory research method is then determined by implementing fundamental aspects of decentralized blockchain systems based on related studies. Analysis During this phase, it was found that the decentralized nature not only mitigates the risk of a single point of failure but also ensures data immutability through cryptographic mechanisms. Additionally, the increased transparency and trust derived from blockchain technology contribute significantly to the reliability of data transactions. Despite the promising benefits, the analysis reveals noteworthy challenges in the development and maintenance of decentralized data storage with blockchain. The intricate nature of blockchain technology demands specialized expertise, making system development more resource-intensive. Interoperability issues and scalability concerns also emerge as potential challenges, requiring careful consideration to ensure seamless integration and sustained performance. System Design The system network infrastructure can be seen in the Figure 1, consists of multiple nodes to handle blockchain transcations built based on microservice architecture, with each node run within an internal These nodes can later be configured and added to scale the network . Inter-node communication is facilitated using the gRPC protocol, which is an RPC (Remote Procedure Cal. protocol developed by Google. gRPC utilizes Protocol Buffers . as the Interface Definition Language (IDL), and it operates over HTTP/2, making inter-node communication faster and more efficient . Clients make HTTP calls to an API Gateway, which then forwards the requests to be processed by the blockchain network through NGINX as a load balancer . , . Figure 1. Blockchain Data Storage Network System Prototype The prototype utilizes a blockchain node capable of receiving, hashing, and storing data in JSON This prototype features the primary function of blockchain storage in the system under Implementation The system development is divided into two components: the blockchain node where data is stored as blocks in the blockchain network, and the API Gateway that connects applications to the blockchain The hashing algorithm used in blockchain storage employs the SHA256 algorithm with the Proof of Work (POW) consensus algorithm. In the Proof of Work (POW) consensus algorithm, nodes in the network must use a significant amount of computing resources to add a block to the blockchain. This computation involves a hashing process that combines the hash of the previous data, current data and a random value. As shown in Figure 2 the new block depends on the previous block hash, this hashing process ensures that any changes to the data will result in a different hash outcome . Figure 2. Block Data Structure Each node in the blockchain network receives data in JSON format from NGINX as a load balancer. The node receiving the data executes the consensus algorithm and adds the data as a block in the blockchain, then sends the data to other nodes using gRPC to be stored in their respective blockchains. The communication mechanism employed is the Gossip Protocol, allowing each node in the blockchain network to receive data received from the API, additionally the system will check the previous hash wether it matchs or not . , . If previoush hash didnAot match with the hash that stored in the node, it will then retrieve the full copy of blockchain from other nodes to repair itself, this aims to prevent data manipulation that purposely change the data block in the blockchain. During the development phase, docker compose were utlize to run multiple service in the blockchain network inside Docker container, while also simulate the full function of the system networks, the example of configurations can be seen on Figure 3. Figure 3. Docker Compose Configuration The creation of the API Gateway serves as a bridge between applications and the blockchain network as a decentralized data storage, using NodeJS with the NestJS framework. The API Gateway forwards HTTP requests to NGINX as a load balancer, which is subsequently processed by nodes in the blockchain network. There are three endpoints for data transactions in the blockchain network through the API Gateway, including adding and retrieving data from blocks in the blockchain network, as well as retrieving the full copy of blockchain. Data payload can be any type as long it is a valid JSON object. Figure 4. Send Block and Get Latest Block Request Figure 4 and 5 show the example of API Request and Response on the API Gateway, the API will accept any kind of data structure as long as it was sends in JSON format, this will enable client to be flexible for storing their data. The Au/blocksAy endpoint is utilized to add data using the POST method, meanwhile, the GET method returns the latest block from the blockchain network. Additionally, the Au/blockchainsAy endpoint returns the full copy of blockchain, containing the history from the first or genesis block to the latest block in the blockchain. Figure 5. Retrieve The Full Copy of Blockchain System Testing Testing conducted using black box testing method to ensure the developed system meet the specified decentralized data storage system requirements. The system will be tested by matching the expected output and the result by each API endpoints. Testing will also include the data manipulation simulation in a blockchain node, to verified the system capability to endure data manipulation. Table 1. System Testing Results Test Case Description Result Add data to system Send HTTP POST request with JSON data payload that will then addeds data in blockchain network Success Retrieve latest data Send HTTP GET request that will return latest data from blockchain network Success Retrieve full copy of Send HTTP GET request that will return full copy of blockchain that contain data from genesis block to the latest Success Alter data from Manually modify the data from the blockchain and then run the system to allow nodes to repair themselves when consensus fails during a transaction by downloading a valid copy of the blockchain from the nearest configured blockchain node Success Alter data from the middle of blockchain nodes . hange data Manually change data from the middle block on the blockchain then run the system to allow node to repair itself when consensus is failing since the hash and previous hash block didnAot match Success Conclusion Based on the system testing results and observation, this research successfully developed a decentralized data storage network by implementing blockchain technology to prevent data alteration. The adoption of a transparent and decentralized system, with the use of blockchain technology as a distributed ledger, effectively addresses the inherent challenges posed by centralized data storage This approach not only enhances the security, integrity, and availability of data but also presents a viable solution to the limitations associated with traditional systems. The results of the system testing unveil the prowess of the decentralized data storage system in navigating diverse scenarios, ranging from seamless addition and retrieval of data to the efficient acquisition of the latest block and retrieval of the complete blockchain. Notably, the system's adeptness in repairing an invalid node through the Gossip Protocol stands as a testament to its resilience and commitment to maintaining the integrity of data within the blockchain network. Future research endeavors may chart a course toward scalability enhancements, optimization of consensus algorithms, and strategic considerations for network scaling and deployments. By delving deeper into these avenues, the research community can continue to advance the frontiers of decentralized data storage, ushering in an era of heightened data security, efficiency, and adaptability. In essence, this research not only contributes to the current understanding of decentralized systems but also paves the way for transformative innovations in the broader realm of data storage and management. References