| From its birth to the present,the Internet has produced many new technologies,which have brought earth-shaking changes to human life.Blockchain technology is one of these new technologies.Blockchain technology is the lower supporting technology of Bitcoin.It first appeared when Satoshi Nakamoto published bitcoin in 2008,which combines encryption algorithms,distributed storage,timestamp,consensus mechanism,point-to-point transmission,and incentive mechanism ensuring data integrity and data immutability,so as to solve the problems of poor reliability,low security,high cost and low efficiency in the centralized model.For recent decades,blockchain technology has attracted a lot of attention with its unique advantages,and related research and applications have shown a trend of blowout for a while.Blockchain technology in a broad sense is expected to completely reshape the form of human social activities and bring profound changes to the fields of finance,technology,culture,and politics.NAS technology is anotherone.With the full name of Network Attached Storage,NAS means special device dedicated to data storage.It is data-centric,completely separates storage devices from servers,and centrally manages data,thereby releasing bandwidth,improving performance,reducing total costs,and protecting Invest.Compared with normal servers,NAS has much higher efficiency but less cost.With the increase in the amount of data,the necessity of NAS has gradually become prominent.More and more companies have begun to provide NAS services,and more and more people have chosen NAS services.However,the existing NAS services are all based on the central server,which has problems such as single point of failure,and the security of its data cannot be guaranteed.Combining blockchain with NAS can better solve these problems.At present,there are a large number of consensus algorithms in the research of blockchain,but each of these algorithms has some defects,and it is impossible to closely integrate the blockchain with the storage system.To solve these problems,an aggregate consensus algorithm is designed,and a distributed NAS application is designed for this algorithm,which can ensure the security and reliability of data.The main work is as follows:This thesis designs an aggregate consensus algorithm.The algorithm consists of a blockchain consensus part and a storage consensus part.In the blockchain consensus part,the probability of a node becoming a miner node is proportional to the amount of data it stores.It needs to serve as a management node for the storage consensus part and provide data access functions.The aggregate consensus algorithm is the first algorithm to combine the data synchronization content of the storage layer with the consensus algorithm,and also the first algorithm with a blockchain layer and a storage layer that can be applied to a blockchain-based storage system to ensure data security and reliability.This thesis designs a distributed NAS applcation based on blockchain to provide distributed NAS services.The system relies on aggregate consensus technology,uses Merkle file tree to construct meta-information for data as well as consistency re-hash technology to provide routing,and relies on incentive mechanism to form a complete blockchain network.Compared with the existing distributed storage system based on blockchain,the system has the advantage of faster access rate.This thesis conducts simulation experiments on the designed consensus algorithm and system,tests its reliability,and compares its performance with the existing blockchain-based distributed storage systems.The results show that the proposed scheme can guarantee The security and reliability of data,as well as good performance,can be applied to the NAS field to provide NAS services. |