Font Size: a A A

Research On The Method Of Data Query And Security Consensus Based On Blockchain

Posted on:2021-02-17Degree:MasterType:Thesis
Country:ChinaCandidate:X R YuFull Text:PDF
GTID:2518306497457144Subject:Electronic Science and Technology
Abstract/Summary:PDF Full Text Request
Blockchain technology is one of the hottest technologies in recent years.Its decentralized,tamper-proof,and traceable features make it have the most common problems in today’s society,such as data security,privacy protection and data traceability.unique advantage.However,when using the blockchain for data tracing,the query schemes in different scenarios are different,and there is a lack of more targeted query methods.The consensus algorithm is the bottom of the blockchain,and its security or efficiency is closely related to the quality of a blockchain application.The traditional consensus algorithm has different application scenarios according to its advantages and disadvantages,and its disadvantages are carried out while maintaining its advantages.Improvements still need to be broken.In this paper,we will focus on the above problems and conduct research on blockchain data security and traceability from two aspects: blockchain common database LevelDB and commonly used consensus algorithm Raft algorithm.The main research work is as follows:(1)A LevelDB-based memory hash index method(Memory Hash Index Method based on LevelDB,MHI-LevelDB)is proposed.This method mainly solves the problem of high freshness when a large number of precise matching traceability search scenarios are used.The problem of insufficient data query speed.This method introduces a hash index into the original memory storage of LevelDB as a built-in index,and directly finds the value of the data in the memory through the Key,and with the change of the memory storage structure of LevelDB itself,the introduced hash index will also be carried out Corresponding transformations,additions and deletions ensure that the data in LevelDB’s own memory storage structure is consistent with the data in the introduced hash index.Experimental results show that,with a small amount of insertion performance lost,the speed of tracing the source data in memory is greatly improved,and the speed of tracing the source data in the disk is also partially improved.(2)An improved Raft Consensus Algorithm based on Reviewer(R-Raft)based on the status of reviewer nodes is proposed.This algorithm is mainly aimed at the problem that the Raft consensus algorithm can only deal with node failures and cannot deal with malicious attacks.By introducing the reviewer node state without changing the original three node states in the Raft consensus algorithm,when the system is attacked by a malicious node,the node in the reviewer state uses its detection results to ensure that only the correct log can be reached a consensus And decide whether it is necessary to re-elect the leader.In the leader election,the second round of interaction between nodes is introduced to ensure the robustness of the algorithm.The nodes will judge whether the candidate node is a malicious node and decide whether to vote or conduct the second round of interaction to ensure the efficiency and flexibility of the algorithm.Experimental results show that while the improved algorithm improves robustness,it loses a small amount of performance during log replication.However,when the leader is elected,the performance will be the same as that of the Raft algorithm and will only increase the millisecond time when attacked.(3)Designed and implemented an e-commerce system based on Hyperledger Fabric which combines MHI-LevelDB and R-Raft consensus algorithm.In addition to ensuring a basic e-commerce function,the system applies MHI-LevelDB and R-Raft consensus algorithms,and designs three chains: product chain,transaction chain,and evaluation chain.The data is stored in the blockchain,and users can The block number is used to determine the block where the query information is located,to ensure the traceability of the product,the authenticity of the transaction evaluation data can be queried,to verify the feasibility of the method proposed in this application in practice,to achieve the security of the data can not be tampered and traceable query.
Keywords/Search Tags:Blockchain, Data query, Data security, LevelDB, Raft consensus algorithm
PDF Full Text Request
Related items