CN112202703A - Block chain storage optimization method based on redundant remainder system - Google Patents

Block chain storage optimization method based on redundant remainder system Download PDF

Info

Publication number
CN112202703A
CN112202703A CN202010802419.4A CN202010802419A CN112202703A CN 112202703 A CN112202703 A CN 112202703A CN 202010802419 A CN202010802419 A CN 202010802419A CN 112202703 A CN112202703 A CN 112202703A
Authority
CN
China
Prior art keywords
remainder
data
rns
block chain
rrns
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010802419.4A
Other languages
Chinese (zh)
Inventor
高镇
郭朝晖
赵明
杨晋生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin University
Original Assignee
Tianjin University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin University filed Critical Tianjin University
Priority to CN202010802419.4A priority Critical patent/CN112202703A/en
Publication of CN112202703A publication Critical patent/CN112202703A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Detection And Correction Of Errors (AREA)

Abstract

The invention belongs to the technical field of blockchain storage, and aims to overcome the defect of safety in scenes of malicious nodes and the like, construct a uniform and safe blockchain data distributed storage optimization model and ensure the safety of blockchain account information in a complex network environment. Therefore, the technical scheme adopted by the invention is that the block chain storage optimization method based on the redundancy remainder system comprises the following steps: firstly, an RNS system is constructed, on the basis of the RNS, from the perspective of increasing data redundancy, original value information reserved by the system is increased by increasing the number of modules, and meanwhile, in a data recovery stage, an error detection and correction algorithm is designed by using redundant information, so that accurate recovery of block chain data is realized. The invention is mainly applied to the occasion of block chain storage.

Description

Block chain storage optimization method based on redundant remainder system
Technical Field
The invention relates to a method for effectively reducing data storage quantity of each node in a public block chain system (bitcoin and Ether workshop) on the premise of not damaging core characteristics of traceable, decentralized and the like of a block chain. The method provides an effective error correction mechanism for the scene of malicious nodes while improving the expansibility of the block chain system.
Background
The block chain is a core support technology of a digital encryption currency system represented by bit currency, is essentially a decentralized, distrusted and self-excited distributed database, has the characteristics of traceability and non-falsification, provides a brand-new idea for solving the problems of poor data reliability, low safety, high trust cost and the like in the existing centralized mode, and is widely concerned and applied in the fields of finance, medical treatment, education, food safety and the like. Meanwhile, with the development of the internet of things and wearable equipment, the safety and traceability of data storage and transmission are gradually improved, and the combination of the internet of things, 5G, artificial intelligence and block chain technology will meet bright prospects.
By the end of 2018, the data size of the Ether house blockchain exceeds 110GB, and the data size of the bitcoin exceeds 190 GB. The storage problem becomes a key bottleneck restricting the development of the common block chain. Of this enormous amount of data, a large part is account balance information of the blockchain system. Account balance information (balance) generally has a fixed bit width (256bits), and changes of the balance information are linear operations such as addition and subtraction. The account-balance information in the ether house is stored in the StateDB database of the node in the form of "world state", and the account information is stored in the bitcoin on a transaction record called "Unspent transaction output (UTXO)". The huge amount of data limits the possibility of resource-limited light nodes (smartphones, tablets, etc.) to join the blockchain. Currently, many scholars, blockchain communities and enterprises have proposed many optimization ideas for blockchain storage issues. Such as "partitioning node roles" written in the white paper of bitcoin, "lightning networks" that utilize "private channels" to reduce storage overhead and increase transaction throughput, "fragmentation techniques" that are discussed extensively in etherhouses, and the like.
Aiming at solving the problems of complex rules, weakening of the core characteristics of a block chain and the like commonly existing in the conventional thinking, the invention firstly starts from the data compression perspective and provides a data compression method based on a remainder system, so that the large-scale compression, recovery and quick update of account data are realized by using simple rules and limited communication overhead, and a brand-new thinking is provided for the expansion of the performance of the block chain.
However, the storage optimization model based on the remainder system reduces the storage burden of each node, and brings a new problem. Under the new model, the complete account information is mapped into different remainders which are distributed and stored in each node. Whether the account information is recovered correctly or not depends on the accuracy of the remainder collected from each node. Due to the complexity of the network environment, and the fact that the public blockchain is used as an open network, an identity authentication and admission mechanism is lacked, so that malicious nodes inevitably exist, local remainder can be tampered, a brand new account book is attempted to be manufactured, and the security of the blockchain system is threatened. Therefore, the subsequent reference communication coding technology introduces necessary redundant information on the basis of the RNS storage optimization scheme to construct a redundant remainder system, endows the data with error detection and correction capabilities in the data recovery process, and improves the fault tolerance of the whole system.
After the construction of the RNS storage system is completed, the system is expanded, and a Redundant remainder system (RRNS) is built by introducing more moduli on the basis of the RNS, so that necessary Redundant information is increased. The compression, fast update process and recovery algorithm of the data are completely the same as those of the RNS storage optimization system. The method is characterized in that when data recovery is carried out, a corresponding screening strategy and error detection and correction algorithms are designed, so that the balance information of the account can be accurately recovered under the scene of malicious nodes.
Disclosure of Invention
A block chain storage optimization model based on a remainder system is constructed firstly to realize distributed storage of data. In order to overcome the safety deficiency in scenes such as malicious node attack and the like under the model, the Redundancy Residue Number System (RRNS) is expanded on the basis of the model, corresponding screening and fault-tolerant algorithms in a data recovery stage are designed, short boards of the RNS storage optimization system in data recovery reliability and availability are supplemented, a uniform and safe block chain data distributed storage optimization model is constructed, and the safety of the block chain account information in a complex network environment is ensured. Therefore, the technical scheme adopted by the invention is that the block chain storage optimization method based on the redundancy remainder system comprises the following steps: firstly, an RNS system is constructed, on the basis of the RNS, from the perspective of increasing data redundancy, original value information reserved by the system is increased by increasing the number of modules, and meanwhile, in a data recovery stage, an error detection and correction algorithm is designed by using redundant information, so that accurate recovery of block chain data is realized.
The method comprises the following specific steps:
the specific steps of constructing the RNS system are as follows:
RNS is composed of a set of moduli m called "residue baseiThe composition is that i is 1,2,3 … n, the modulus is relatively prime between two,
Figure BDA0002627885860000021
the minimum common multiple of all the modulus, called the dynamic range; any positive integer X ≦ M-1 less than the dynamic range can be represented in RNS as a remainder vector { X } by performing a Gaussian modulo operation on the remainder base1,x2,x3…xnThis mapping from the original data to the remainder system is called "forward conversion"; the data bit width compression can be realized by selecting a group of prime numbers smaller than the account data bit width as a remainder base, performing forward conversion on the account data and mapping the account data into a group of remainder vectors;
in the block chain, the change of any account balance is addition and subtraction operations, and by utilizing the characteristic that the RNS has parallelism to linear operation, when the transfer transaction is completed and the account content needs to be changed, local remainder is independently and parallelly updated at each node so as to realize the updating of data;
and iii, carrying out weighted combination on the modulus and the remainder which are stored in each node in a distributed manner through a Chinese remainder theorem CRT (Chinese remainder generator) to recover the data.
Step iii is embodied in that a set of residue bases { m } is known1,m2,m3…mnAnd the corresponding remainder vector { x under RNS1,x2,x3…xnAt the time of the previous stage, the original data before compression is passed through the equation
Figure BDA0002627885860000022
Is uniquely determined wherein
Figure BDA0002627885860000023
Figure BDA0002627885860000024
Referred to as MiThe "inverse element" of
Figure BDA0002627885860000025
The original data X must satisfy the formula that X is less than or equal to M-1
Figure BDA0002627885860000026
Called the Chinese Remainder Theorem (CRT). The CRT ensures recoverability of original data.
The RRNS system is expanded to: adding new co-prime modulus to form a new remainder base m based on the established RNS remainder systemi‘That is, a redundant remainder system is formed, i' is 1,2,3 … r, r +1, r +2, … r + k, and m is defined1<m2<m3<…<mr<mr+1<…<mr+kWherein m is1~mrThe total number of r is 'information base', mr+1~mr+kThe total number of k is 'redundancy base', and r + k is the total length of the residue base.
Figure BDA0002627885860000027
To be the "dynamic range",
Figure BDA0002627885860000028
to "error margin", the RRNS inherits all the properties of the RNS during data compression, update and recovery, according to the theory of RNS and RRNS, MrThe maximum value of the block chain account balance (2) will be covered256-1),MrMe>>2256-1And thus MeIs partially made ofAnd designing a corresponding fault-tolerant algorithm when data needs to be recovered according to the redundant information.
Designing an error detection and correction algorithm in a data recovery stage:
RRNS provides a theoretical basis for designing a block chain storage optimization model with fault tolerance, and X is a correct remainder vector phi ═ X1,x2,x3…xNRestored correct original data, X 'is a remainder vector Φ' X 'containing an error component'1,x′2,x′3…x′NThe restored error data has an overflow judgment theorem according to the RRNS theory: for a remainder vector Φ 'containing errors, any (l + t) -dimensional subset of components Φ'l+tIf the l-dimension component thereof
Figure BDA0002627885860000031
Correct, l is greater than or equal to r, t dimensional component
Figure BDA0002627885860000032
If t is more than or equal to 1, the data restored by phi' is
Figure BDA0002627885860000033
Falls within an "error Range" Me
Designing an error detection and correction mechanism suitable for a block chain by using an overflow judgment theorem, wherein in the block chain, the bit width of account information is fixed to be 256bits, so that the threshold value for performing overflow judgment is 2256, and if the recovered account data is smaller than the threshold value, the recovery is correct; if the recovered account data exceeds the threshold and falls into an error range, the recovery is failed, and a malicious node tampers with the local remainder and tries to manufacture a false account.
One error correction algorithm is to select an appropriate number of subsets from the N collected pairs of "modulus-remainder" and to repeat CRT until the recovery is less than a threshold; another error correction algorithm is to select a subset with length L from the collected N modulus and calculate the least common multiple, then to use the error-recovery account data to calculate the modulus of the least common multiple, if the remainder is less than the threshold, the error correction is completed, the remainder is the correct account data; if the remainder exceeds the threshold, a subset of the same length is selected from all the modulus again, and the error correction algorithm is repeated until the remainder is less than the threshold.
Due to the inherent relevance of the RNS and the RRNS, the RNS is regarded as the RNS extension, and the RNS is also regarded as the part of the RRNS containing the information base, so although the design of the RNS and the RRNS is logically divided into two layers, in practical application, the RNS and the RRNS system can be simultaneously constructed.
The invention has the characteristics and beneficial effects that:
on the basis of a block chain storage optimization model based on a remainder system, the error detection and correction properties of the redundant remainder system are combined, an effective fault-tolerant mechanism is provided when a malicious node acts on a malicious scene under the condition of keeping the advantages of the RNS, even if the number of the malicious nodes exceeds 30 percent, the data can be correctly recovered, and the reliability of the block chain data is greatly ensured.
Description of the drawings:
fig. 1 shows RRNS-based data compression, update, and recovery processes.
Fig. 2 shows two error detection and correction methods based on RRNS.
FIG. 3 shows the correspondence between the ratio of malicious nodes and the error correction efficiency.
Detailed Description
Account security is a cornerstone of further development of digital cryptocurrency. The RRNS-based storage optimization scheme is characterized in that on the premise of fully combining RNS characteristics and actually considering a complex network environment, the loophole of a malicious node tampering local remainder in the RNS storage optimization system is repaired by increasing the number of moduli and designing a fault-tolerant algorithm, so that the problem of system availability in a Byzantine scene is solved. The method and the device utilize the advantages of the RNS and the RRNS, ensure the safety based on RRNS distributed storage through small storage, communication and calculation expenses, and have simple rule, high efficiency in operation and practicability.
The block chain system has the characteristic of openness, and for the nodes and users in various shapes and colors in a complex network environment, a corresponding identity authentication and access mechanism is lacked, so that part of malicious nodes tamper local data by using the vulnerability, and a fake account is attempted to be manufactured. Under the original blockchain storage model, each node keeps a complete data copy, each node can independently audit the whole network transaction, and the probability of success of malicious nodes is greatly reduced by combining a PoW consensus algorithm. However, after the RNS storage optimization scheme is applied, each node loses independent audit capability while reducing storage burden, and data recovery has to depend on cooperation of a large number of nodes, so that risks of malicious nodes tampering data and damaging consensus are introduced again. Therefore, on the basis of the RNS, the RRNS is constructed by introducing redundant remainder bases, and an error detection and correction algorithm is designed to make up the vulnerability of an RNS storage optimization model, so that malicious node interference is eliminated from the algorithm level.
A block chain storage optimization model based on a remainder system is constructed firstly to realize distributed storage of data. In order to overcome the safety deficiency in scenes such as malicious node attack and the like under the model, the Redundancy Residue Number System (RRNS) is expanded on the basis of the model, corresponding screening and fault-tolerant algorithms in a data recovery stage are designed, short boards of the RNS storage optimization system in data recovery reliability and availability are supplemented, a uniform and safe block chain data distributed storage optimization model is constructed, and the safety of the block chain account information in a complex network environment is ensured. Therefore, the technical scheme adopted by the invention is that the block chain storage optimization method based on the redundancy remainder system comprises the following steps: first, an RNS system is constructed. On the basis of the RNS, from the perspective of increasing data redundancy, original value information reserved by a system is increased by increasing the number of modules, and meanwhile, in a data recovery stage, an error detection and correction algorithm is designed by using redundant information to realize accurate recovery of block chain data. While retaining all the advantages of RNS storage optimization systems.
The method comprises the following specific steps:
1) constructing an RNS system:
RNS is composed of a set of moduli m called "residue basei(i-1, 2, 3.. n), the moduli are relatively prime in pairs,
Figure BDA0002627885860000041
the minimum common multiple of all the modulus, called the dynamic range; any positive integer X ≦ M-1 less than the dynamic range can be represented in RNS as a remainder vector { X } by performing a Gaussian modulo operation on the remainder base1,x2,x3...xnThis mapping from the original data to the remainder system is called "forward conversion"; by selecting a group of prime numbers smaller than the bit width of the account data as a residue number base, performing forward conversion on the account data, and mapping the account data into a group of residue number vectors, the bit width compression of the data can be realized, and the effect of compressing the memory space is achieved.
in blockchains, any change in account balance is an add, subtract operation. By utilizing the characteristic that the RNS has parallelism to linear operation, when the transfer transaction is executed and the account content needs to be changed, independently and parallelly updating local remainder at each node so as to realize data updating;
the modulus and the remainder which are stored in each node in a distributed mode can be combined together in a weighted mode through a Chinese Remainder Theorem (CRT) to recover data; the specific steps are that a set of residue bases { m } is known1,m2,m3...mnAnd the corresponding remainder vector { x under RNS1,x2,x3...xnAt the time of the previous stage, the original data before compression is passed through the equation
Figure BDA0002627885860000042
Is uniquely determined wherein
Figure BDA0002627885860000043
Referred to as MiThe "inverse element" of
Figure BDA0002627885860000044
The original data X must satisfy X is less than or equal to M-1. A formula
Figure BDA0002627885860000045
Called the Chinese Remainder Theorem (CRT). The CRT ensures recoverability of original data.
2) The RRNS system is expanded to: adding new relatively prime modulus to form a new remainder base m based on the established remainder systemiAnd (i ═ 1,2, 3.. r, r +1, r + 2.. r + k), namely a redundant remainder system is formed. Stipulate m1<m2<m3<…<mr<mr+1<…<mr+k. Wherein m is1~mrThe total number of r is 'information base', mr+1~mr+kThe total number of k is "redundancy base". And r + k is the total length of the residue base.
Figure BDA0002627885860000046
To be the "dynamic range",
Figure BDA0002627885860000047
is "error range". The RRNS inherits all of the properties of the RNS in data compression, update, and recovery processes. According to the theory of RNS and RRNS, MrThe maximum value of the block chain account balance (2) will be covered256-1),MrMe>>2256-1And thus MeThe portions may provide redundant information. According to the redundant information, when the data needs to be recovered, a corresponding fault-tolerant algorithm can be designed.
3) Designing an error detection and correction algorithm in a data recovery stage:
RRNS provides a theoretical basis for designing a block chain storage optimization model with fault tolerance. Let X be the correct remainder vector Φ ═ X1,x2,x3...xNRestored correct original data, X 'is a remainder vector Φ' X 'containing an error component'l,x′2,x′3...x′NThe recovered erroneous data. Then according to RRNS theory, there is the "overflow decision theorem": for a remainder vector Φ 'containing errors, any (l + t) -dimensional subset of components Φ'l+tIf l (l ≧ r) is the dimensional component
Figure BDA0002627885860000051
Correct, t (t ≧ 1) dimensional component
Figure BDA0002627885860000052
If it is wrong, phi' restores the data
Figure BDA0002627885860000054
Falls within an "error Range" Me
And ii, designing an error detection and correction mechanism suitable for the block chain by using the overflow judgment theorem. In the blockchain, the account information bit width is fixed to 256bits, so the threshold value for performing the overflow determination is 2256. If the recovered account data is less than the threshold value, the recovery is correct; if the recovered account data exceeds the threshold and falls into an error range, the recovery is failed, and a malicious node tampers with the local remainder and tries to manufacture a false account. A simple but computationally complex error correction algorithm is to select an appropriate number of subsets from the N collected "modulus-remainder" pairs and iterate the CRT until the recovery is less than a threshold. Another more appropriate error correction algorithm would select a subset of length L from the N collected moduli and compute its least common multiple, which is then modulo the error-recovered account data. If the remainder is less than the threshold, error correction is complete, and the remainder is the correct account data. If the remainder exceeds the threshold, a subset of the same length is selected from all the modulus again, and the error correction algorithm is repeated until the remainder is less than the threshold.
Due to the inherent relevance of RNS and RRNS, while RRNS is considered an RNS extension, RNS may also be considered as part of an RRNS containing information base. Therefore, although the design of the RNS and RRNS is logically divided into two layers, in practical applications, the RNS and RRNS systems can be constructed simultaneously. Through the design, the invention can realize the efficient compression, the quick update and the accurate recovery of the data.
The present invention will be described in further detail with reference to the following drawings and specific examples.
The invention comprises the following steps:
step 1: selecting parameters
The bit width of the account data in the blockchain is typically 256 bits. The invention selects a group of 32 remainder bases m with 16 bit widths1~m32And performing data compression operation. m is1~m32Shown below:
Figure BDA0002627885860000053
in order to take account of the compression rate and the success rate of error correction, when an error correction algorithm is executed, the size L of the subset selected each time is 17.
Obviously, since from m1~m32The dynamic range of any 17 numbers can cover 2256Therefore, any subset with length 17 can be regarded as a remainder base of a remainder system, and can also be regarded as an information base of an RRNS extended by the RNS. Accordingly, the remaining 15 moduli can be considered as redundancy bases of the RRNS extended by the RNS, the least common multiple of which is the "error range".
Step 2: establishing block chain storage optimization model based on RRNS
1) Each node from m1~m32Independently randomly selecting a local modulus mi. Once the modulus of each node is determined, the modulus cannot be changed;
2) at each node, account balance information is selected for m of the node in paralleliPerforming modulo operation, and storing remainder distributively on each node, thereby establishing a redundancy remainder system in the block chain network;
and step 3: planning block chain work flow based on redundancy remainder system storage model
According to different implementation functions, the nodes in the block chain are divided into transfer nodes, consensus nodes and storage nodes. In the block chain storage optimization model designed by the invention, the transfer node is used for initiating a new transfer transaction, and the consensus node is used for verifying, forwarding and executing the transaction. The storage nodes are exclusively responsible for the distributed storage of data. The storage nodes can be subdivided into nodes which are newly added into the block chain and nodes which have already finished data synchronization. Compared with the traditional block chain storage model, under the new model, the basic functions of the transfer node and the consensus node are kept unchanged, the consensus node also has to be responsible for realizing the recovery of the original data and the error detection and correction in the recovery process, and the storage node needs to realize the compression and the quick update of the data. The transfer node may initiate a transaction at any time. The consensus node is required to provide the original data for account balance verification before initiating the transaction. The recovery and compression of data occurs at the time the new node joins the network, and the parallel updating of data occurs after the transaction is performed. For a new node which just joins the blockchain network and has not finished synchronization, the data recovery is carried out by receiving the remainder-modulus pair by the consensus node, and then the compression operation is carried out on the recovered original data locally. For storage nodes that have joined the blockchain network and completed synchronization, only an update of the local remainder occurs. And the compression, the update and the recovery of the data correspond to different roles in the blockchain network, and no obvious sequence exists. For convenience of description, the workflow and the tasks of various nodes will be described in the order of adding a new node into a block chain and initiating a transaction by a transaction node:
1) and adding a new node as a storage node into the block chain, firstly synchronizing the data of the block chain, compressing the original data and then storing the compressed data into the local.
2) The transfer node initiates a transfer transaction.
3) The consensus node receives the modulus and the corresponding remainder sent by the storage node.
4) And the consensus node correctly restores the original data and verifies the account balance according to the checking and error correcting rules.
5) The consensus node agrees on the operand (transfer amount). After the consensus is reached, the operand is broadcast to the storage nodes.
6) And the storage node updates data according to the operand.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A block chain storage optimization method based on a redundancy remainder system is characterized in that an RNS system is firstly constructed, on the basis of the RNS, original value information reserved by the system is increased by increasing the number of modules from the perspective of increasing data redundancy, and meanwhile, in a data recovery stage, error detection and correction algorithms are designed by using redundant information to realize accurate recovery of block chain data.
2. The method for optimizing block chain storage based on redundant remainder system of claim 1, comprising the steps of:
RNS is composed of a set of moduli m called "residue baseiThe composition is that i is 1,2,3 … n, the modulus is relatively prime between two,
Figure FDA0002627885850000011
the minimum common multiple of all the modulus, called the dynamic range; any positive integer X ≦ M-1 less than the dynamic range can be represented in RNS as a remainder vector { X } by performing a Gaussian modulo operation on the remainder base1,x2,x3…xnThis mapping from the original data to the remainder system is called "forward conversion"; the data bit width compression can be realized by selecting a group of prime numbers smaller than the account data bit width as a remainder base, performing forward conversion on the account data and mapping the account data into a group of remainder vectors;
in the block chain, the change of any account balance is addition and subtraction operations, and by utilizing the characteristic that the RNS has parallelism to linear operation, when the transfer transaction is completed and the account content needs to be changed, local remainder is independently and parallelly updated at each node so as to realize the updating of data;
and iii, carrying out weighted combination on the modulus and the remainder which are stored in each node in a distributed manner through a Chinese remainder theorem CRT (Chinese remainder generator) to recover the data.
3. The method as claimed in claim 2, wherein step iii is embodied by the step of storing the residue in a given set of residue bases { m }1,m2,m3…mnAnd the corresponding remainder vector { x under RNS1,x2,x3…xnAt the time of the previous stage, the original data before compression is passed through the equation
Figure FDA0002627885850000012
Is uniquely determined wherein
Figure FDA0002627885850000013
Referred to as MiThe "inverse element" of
Figure FDA0002627885850000014
The original data X must satisfy the formula that X is less than or equal to M-1
Figure FDA0002627885850000015
Figure FDA0002627885850000016
Called the Chinese Remainder Theorem (CRT).
4. The method of claim 2 for optimizing block chain storage based on redundant remainder system, wherein the extensions to the RRNS system: adding new co-prime modulus to form a new remainder base m based on the established RNS remainder systemi‘That is, a redundant remainder system is formed, i' is 1,2,3 … r, r +1, r +2, … r + k, and m is defined1<m2<m3<…<mr<mr+1<…<mr+kWherein m is1~mrThe total number of r is 'information base', mr+1~mr+kThe total number of k is 'redundancy base', and r + k is the total length of the residue base.
Figure FDA0002627885850000017
To be the "dynamic range",
Figure FDA0002627885850000018
to "error margin", the RRNS inherits all the properties of the RNS during data compression, update and recovery, according to the theory of RNS and RRNS, MrThe maximum value of the block chain account balance (2) will be covered256-1),MrMe>>2256-1And thus MeAnd the part can provide redundant information, and a corresponding fault-tolerant algorithm is designed when data needs to be recovered according to the redundant information.
5. The method as claimed in claim 4, wherein the step of designing the fault-tolerant algorithm in the data recovery stage comprises: RRNS provides a theoretical basis for designing a block chain storage optimization model with fault tolerance, and X is a correct remainder vector phi ═ X1,x2,x3…xNRestored correct original data, X 'is a remainder vector Φ' X 'containing an error component'1,x′2,x′3…x′NThe restored error data has an overflow judgment theorem according to the RRNS theory: for a remainder vector Φ 'containing errors, any (l + t) -dimensional subset of components Φ'l+tIf the l-dimension component thereof
Figure FDA0002627885850000019
Correct, l is greater than or equal to r, t dimensional component
Figure FDA00026278858500000110
If t is more than or equal to 1, the data restored by phi' is
Figure FDA00026278858500000111
Falls within an "error Range" Me
6. The method as claimed in claim 5, wherein the "overflow decision theorem" is utilized to design an error detection and correction mechanism suitable for the blockchain, in the blockchain, the bit width of the account information is fixed to 256bits, so that the threshold for performing the overflow judgment is 2256, and if the recovered account data is smaller than the threshold, the recovery is correct; if the recovered account data exceeds the threshold and falls into an error range, the recovery is failed, and a malicious node tampers with the local remainder and tries to manufacture a false account.
7. The method of claim 6, wherein an error correction algorithm selects a proper number of subsets from the N collected modulo remainder pairs, and iteratively performing CRT until the recovery result is less than a threshold; another error correction algorithm is to select a subset with length L from the collected N modulus and calculate the least common multiple, then to use the error-recovery account data to calculate the modulus of the least common multiple, if the remainder is less than the threshold, the error correction is completed, the remainder is the correct account data; if the remainder exceeds the threshold, a subset of the same length is selected from all the modulus again, and the error correction algorithm is repeated until the remainder is less than the threshold.
8. The method of claim 4, wherein due to the inherent relevance between RNS and RRNS, the RNS is considered as the RNS extension and the RRNS is considered as the information base-containing part, so that the RNS and RRNS can be constructed simultaneously in practical application, although the RNS and RRNS are logically divided into two layers.
CN202010802419.4A 2020-08-11 2020-08-11 Block chain storage optimization method based on redundant remainder system Pending CN112202703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010802419.4A CN112202703A (en) 2020-08-11 2020-08-11 Block chain storage optimization method based on redundant remainder system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010802419.4A CN112202703A (en) 2020-08-11 2020-08-11 Block chain storage optimization method based on redundant remainder system

Publications (1)

Publication Number Publication Date
CN112202703A true CN112202703A (en) 2021-01-08

Family

ID=74004864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010802419.4A Pending CN112202703A (en) 2020-08-11 2020-08-11 Block chain storage optimization method based on redundant remainder system

Country Status (1)

Country Link
CN (1) CN112202703A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113225370A (en) * 2021-03-08 2021-08-06 河北工业大学 Block chain multi-objective optimization method based on Internet of things
CN113378110A (en) * 2021-06-11 2021-09-10 电子科技大学 FFT system based on RNS dynamic range extension
CN116016571A (en) * 2022-12-29 2023-04-25 中国科学技术大学 Distributed storage method, system, equipment and storage medium based on RCRT

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110062034A (en) * 2019-04-01 2019-07-26 中科天御(苏州)科技有限公司 A kind of big file safety storage method of block chain and system
CN110335218A (en) * 2019-07-10 2019-10-15 李小平 Secure images restoration methods based on redundant-residue-number-system
US20200211005A1 (en) * 2017-08-22 2020-07-02 Peter Bodorik System and method for tracking of provenance and flows of goods, services, and payments in responsible supply chains

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200211005A1 (en) * 2017-08-22 2020-07-02 Peter Bodorik System and method for tracking of provenance and flows of goods, services, and payments in responsible supply chains
CN110062034A (en) * 2019-04-01 2019-07-26 中科天御(苏州)科技有限公司 A kind of big file safety storage method of block chain and system
CN110335218A (en) * 2019-07-10 2019-10-15 李小平 Secure images restoration methods based on redundant-residue-number-system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHAOHUI GUO 等: "Design and Optimization for Storage Mechanism of the Public Blockchain Based on Redundant Residual Number System", 《IEEE》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113225370A (en) * 2021-03-08 2021-08-06 河北工业大学 Block chain multi-objective optimization method based on Internet of things
CN113225370B (en) * 2021-03-08 2022-09-20 河北工业大学 Block chain multi-objective optimization method based on Internet of things
CN113378110A (en) * 2021-06-11 2021-09-10 电子科技大学 FFT system based on RNS dynamic range extension
CN116016571A (en) * 2022-12-29 2023-04-25 中国科学技术大学 Distributed storage method, system, equipment and storage medium based on RCRT

Similar Documents

Publication Publication Date Title
CN112202703A (en) Block chain storage optimization method based on redundant remainder system
CN110602148B (en) Method and device for generating state tree of block and verifying data on chain
KR102315473B1 (en) Systems and Methods for Parallel-Processing Blockchain Transactions
CN107193490A (en) A kind of distributed data-storage system and method based on block chain
CN111095218B (en) Method, system and device for storing shared block chain data based on error correction coding
CN112286963B (en) Block chain terminal data credible query system and implementation method thereof
CN111723149A (en) Block chain storage optimization system and method based on remainder system
CN109194646A (en) A kind of safety certification data access method based on block chain
US11354335B2 (en) Method and apparatus for obtaining number for transaction-accessed variable in blockchain in parallel
CN112738035B (en) Block chain technology-based vertical federal model stealing defense method
CN116628083B (en) Block chain transaction data capacity expansion storage method and system
CN106612272A (en) Verification and recovery algorithm for data tampering in cloud storage
WO2021227319A1 (en) Engineering collaborative blockchain data structure and application method
CN115454712B (en) Check code recovery method, system, electronic equipment and storage medium
Khalifa et al. Quantum attacks and defenses for proof-of-stake
CN112131609A (en) Merkle tree-based electric energy quality data exchange format file integrity verification method and system
Na et al. A derivative PBFT blockchain consensus algorithm with dual primary nodes based on separation of powers-DPNPBFT
CN115514644B (en) Entry consistency checking method, electronic equipment and storage medium
CN116614519A (en) Video and related information lightweight trusted uplink method based on optimization consensus algorithm
WO2023045962A1 (en) Anti-parallel-attack lightweight blockchain system
CN109472600A (en) A kind of block chain trust authentication method and device
CN115758477A (en) Novel data integrity verification method
CN115277668B (en) Cloud file dynamic integrity protection and verification method based on Ethernet and interstellar file systems
CN114637472A (en) DHT-based block chain storage expansion method, electronic equipment and storage medium
CN112365247A (en) Block chain storage optimization method based on remainder system and RAFT algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210108

WD01 Invention patent application deemed withdrawn after publication