CN115952235A - AMTs-based block chain verifiable storage method - Google Patents

AMTs-based block chain verifiable storage method Download PDF

Info

Publication number
CN115952235A
CN115952235A CN202211569397.7A CN202211569397A CN115952235A CN 115952235 A CN115952235 A CN 115952235A CN 202211569397 A CN202211569397 A CN 202211569397A CN 115952235 A CN115952235 A CN 115952235A
Authority
CN
China
Prior art keywords
version
key
amts
node
tree
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
CN202211569397.7A
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.)
Shanghai Shutu Blockchain Research Institute
Original Assignee
Shanghai Shutu Blockchain Research Institute
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 Shanghai Shutu Blockchain Research Institute filed Critical Shanghai Shutu Blockchain Research Institute
Priority to CN202211569397.7A priority Critical patent/CN115952235A/en
Publication of CN115952235A publication Critical patent/CN115952235A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A block chain verifiable storage method based on AMTs comprises the steps of constructing a changed AMTs tree used as an updated version, wherein nodes in the tree are used for storing key and version number information (key, version); a Merkle tree is constructed for storing key, version and data value information (key, version, value) for each transaction block. The change of the stored information is embodied by the change of the version number stored in the AMTs and the way of storing the changed value by adding nodes on the Merkle tree, and corresponding proofs are generated. From the key and version number information (key, version) of the nodes on the AMTs tree, the Value of the node on the Merkle tree can be found and the result can be verified. According to the technical scheme, the expensive elliptic curve multiplication operation of the current AMTs can be effectively avoided by storing the version number change of the AMTs, the time for generating the certificate is saved, the I/O reading and writing of the bottom layer can be greatly reduced, and the verification storage efficiency and the block chain execution throughput are improved.

Description

AMTs-based block chain verifiable storage method
Technical Field
The invention relates to the technical field of big data processing and information, in particular to a verifiable storage method of a block chain based on a verifiable Multipoint Evaluation tree (AMTs).
Background
With the development of the blockchain technology and the gradual enrichment of application scenes, a storage module is certainly included in the complete blockchain system, and the blockchain system can really play a role in persisting data as a whole. Currently, a typical blockchain system adopts a Key-Value form to store the state of a blockchain ledger, a main Key is a keyword, and a Value is a Value.
The Key-value type distributed storage system is high in query speed, large in data storage amount, high in support concurrency and very suitable for query through a main Key, and the Key-value database is a database for storing data by Key value pairs and is similar to a map in Java. The entire database can be understood as a large map, with each key corresponding to a unique value.
However, the key-value form of distributed storage system cannot perform complex conditional queries. When one key-Value key Value pair is modified, all the node Hash on the path from the leaf node to the root node needs to be calculated and updated.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a key-value type distributed storage system. As shown in fig. 1, each update on the route will amplify the I/O read/write operations stored in the underlying storage, such as a simple payment transaction also including at least two state updates of the ledger, i.e. deducting and adding the balance of two accounts. Since the throughput of current new blockchains has approached thousands of transactions per second, storage has become a new bottleneck for blockchain development.
Some solutions exist in the industry to optimize the above problems, such as performing timing update based on AMTs (automated multi-point evaluation tree), which can reduce the reading and writing of I/O.
For example, with n =8 as an example, AMTs calculates its lagrangian interpolation, i.e., satisfies f (i) = a i (wherein, I is more than or equal to 1 and less than or equal to 8), and the principle is as follows:
its F (X) is first split into two functions: f 0 (X) and F 1 (X) that is
F(X)=F 0 (X)+F 1 (X)
Wherein the content of the first and second substances,
Figure BDA0003987371970000021
Figure BDA0003987371970000022
similarly, F can be split down in sequence 0 (X) resolution into F 0,0 (X) and F 0,1 (X), i.e. F 0 (X)=F 0,0 (X)+F 0,1 And (X) repeating the steps to obtain the composition of each node of the AMTs.
Referring to FIG. 2, FIG. 2 is a block diagram of a structure of an AMTs capable of verifying the composition of each node tree. As shown in fig. 2, each node in the AMTs tree consists of two parts:
(1) A commitment of a function;
(2) This function is always a batch proof of the index of 0.
Referring to fig. 3, fig. 3 is a diagram illustrating the alternate paths involved in the AMTs verifying the update of the value at x =7 and the verifiable certification points. As shown in fig. 3, when a storage entry needs to be updated, AMTs may go from Root to a leaf node corresponding to the entry, and update the associated elements on the path, and the remaining nodes do not change, and when proving, it only needs to prove that the value of its neighbor node is 0; thus, AMTs schemes may take less time to maintain the proof than MPT schemes.
However, AMTs methods also have their disadvantages, in that they use complex and expensive elliptic curve multiplication operations, and the updating of the state may be slower than MPT (Merkle Patricia Tree). That is, although AMTs spend less time updating the proof of promise, this time is still significant for blockchain systems, as the following figures show the results of testing on Intel i9-10900K machines, the elliptical computation time of AMTs takes roughly 0.1ms, which is even slower than accessing disk storage (as shown in FIG. 4).
For this reason, AMTs uses a complex and expensive elliptic curve multiplication operation, i.e. C '= C + δ G, where C' represents a new state to be calculated, C represents a previous state, δ represents a difference value on a changed path, G is a starting parameter of a selected elliptic curve, and G is a constant in the case of an elliptic curve determination. The state update may be slower than the existing MPT (Merkle Patricia Tree) because of the computation of elliptic curve multiplication operations. Therefore, the problem of the read-write bottleneck of the underlying storage I/O cannot be well solved only by using AMTs.
That is, the AMTs solution, although it may improve the amount of verification maintenance and save more time, cannot really solve the efficient verifiable storage problem because it uses expensive elliptic multiplication.
Disclosure of Invention
The invention aims to provide a verifiable block chain storage method based on AMTs, which can effectively improve the efficiency of block chain storage.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a block chain verifiable storage method based on AMTs comprises a block chain storage step S1 and a verifiable step S2 based on AMTs:
the step S1 specifically includes:
step S11: constructing an AMTs tree of changes for use as an updated version, each node in the AMTs tree consisting of two parts:
(1) the commitment formula of the function;
(2) a proof that there is always a function of 0 outside the function;
the AMTs tree is used for storing key and version information of verifiable stored data; when a storage item needs to be added, calculating a Key word Key of a node according to the storage item, and setting a Version to an initial value; when a storage entry of one node needs to be updated, updating version information in a keyword and a version (key, version) of verifiable storage data on the node from a Root of an AMTs tree to the node corresponding to the storage entry, namely when the data of the leaf node changes, only adding 1 to the version number of an associated node on a path from the node to the Root node;
step S12: constructing a Merkle tree by using the data extension of the storage entry in each block, wherein the Merkle tree is used for storing the key, the version and the data value information (key, version, value) of each transaction block;
when the AMTs tree needs to add a storage item, a new node is added to the Merkle tree, the Key Value, the version number information are set to be 1 and the Value is stored in one node of the Merkle tree, the data of the Key Value, the version Value information and the data Value information (Key, version, value) are formed, and a verifiable storage certificate is generated;
when the AMTs tree needs to modify a storage item, adding a new node to the Merkle tree, storing a Key, version number information added with 1 and a Value of Value on one node of the Merkle tree, forming data of the Key, the version and data Value information (Key, version, value), and generating a verifiable storage certificate;
the verifiable step S2 includes:
and finding the Value of the node on the AMTs tree according to key and version number information (key, version) of the node on the AMTs tree by adopting the node added to the Merkle tree.
The invention also provides a readable storage medium, which stores executable instructions for executing the AMTs-based blockchain verifiable storage method.
The present invention further provides a data processing terminal, configured to serve as a consensus node of a P2P network, receive, perform consensus verification, and store a block in the P2P network, where the data processing terminal includes:
the above-mentioned readable storage medium;
a processor that invokes and executes executable instructions in the readable storage medium to perform the AMTs-based blockchain verifiable storage method.
The invention also provides a P2P network, and the common node of the P2P network is the data processing terminal.
According to the technical scheme, the novel verifiable block chain storage method based on the AMTs tree and used for updating the proof in a versioning mode is provided, compared with the MPT scheme and the pure AMTs scheme in the existing scheme, the proof is generated and maintained faster, the storage efficiency of the block chain can be effectively improved, compared with the existing MPT scheme and the pure AMTs scheme, the speed is 7 times faster through experimental data comparison, and compared with the pure AMTs scheme, the speed is 2.7 times faster.
Drawings
FIG. 1 is a schematic structural diagram of a key-value distributed storage system
FIG. 2 is a schematic diagram of a structure of AMTs capable of verifying the composition of each node tree stored in AMTs
FIG. 3 is a diagram illustrating the reroutes and verifiable certification points involved in AMTs being able to verify the update of the value at x =7
FIG. 4 is a graph illustrating the time spent in the elliptic calculation-related operation of the prior art AMTs method
FIG. 5 is a schematic diagram illustrating AMTs tree being utilized to store version number information according to an embodiment of the present invention
FIG. 6 is a block chain verifiable storage method based on AMTs according to a preferred embodiment of the present invention
Detailed Description
The following provides a more detailed description of embodiments of the present invention, with reference to the accompanying drawings.
In the following detailed description of the embodiments of the present invention, in order to clearly illustrate the structure of the present invention and to facilitate explanation, it should be understood that the structure shown in the drawings is not drawn to general scale and is partially enlarged, modified or simplified, so that the present invention is not limited thereto.
In the following description of the present invention, please refer to fig. 5, wherein fig. 5 is a schematic diagram illustrating an embodiment of the present invention utilizing an AMTs tree to store version number information. As shown in fig. 5, the method includes an AMTs-based block chain storing step S1 and a verifiable step S2.
In the step S1 of storing the blockchain based on the LVMT, the AMTs-based scheme of the present invention provides a versioned novel method for verifiable storage of blockchain, and the core idea of the invention is as follows: storing key and version number information of verifiable stored data through an AMTs tree, namely (key, version); and then, using the merkle tree to store the key, version and data value information (key, version, value).
The step S1 specifically includes:
step S11: constructing an AMTs tree of changes for use as an updated version, each node in the AMTs tree consisting of two parts:
(1) the commitment formula of the function;
(2) there is a proof of a function that is always 0 outside the function.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating a data storage manner on AMTs according to an embodiment of the present invention. As shown in fig. 6, the AMTs tree is used to store key and version information of each node; when a storage item needs to be added, calculating a Key word Key of a node according to the storage item, and setting a Version to an initial value; when the storage entry of one node needs to be updated, updating the data change of the version information in the node (key, version) from the Root of the AMTs tree to the node corresponding to the storage entry, namely when the data of the leaf node changes, only adding 1 to the version number of the associated node on the path from the node to the Root node, and generating a verifiable storage certificate.
Referring to fig. 5 again, the amts tree is used as a change of the update version, that is, a key and version information data of the update node, when the information data of the node changes, only the version number on the path from the node to the root node needs to be added by 1, and the operation is addition, C '= C + G, where C' represents a new state to be calculated, C represents a previous state, G represents a starting parameter of the elliptic curve, and if the elliptic curve is determined, it is a constant.
Please refer to the right hand illustration of fig. 6:
step S12: constructing a Merkle tree by using the data extension of the storage entry in each block, wherein the Merkle tree is used for storing the key, the version and the data value information (key, version, value) of each transaction block;
when the AMTs tree needs to add a storage entry, adding a new node to the Merkle tree, and storing a Key, version number information, and Value on one node of the Merkle tree to form data of the Key, version, and data Value information (Key, version, value).
When the AMTs tree needs to modify a storage item, a new node is added to the Merkle tree, the Key, version number information is set to be the Value added with 1 and Value, and the Value is stored in one node of the Merkle tree to form the data of the Key, version and data Value information (Key, version, value).
That is, the extended Merkle tree can be used as key, version, and data value information (key, version, value), which utilizes the Merkle tree to add nodes and generate the proving speed (because the modification and updating of data are slow, the Merkle tree is not updated), only data is added, so that each block is correspondingly generated into one Merkle tree, and the change of each version is added as a node of the Merkle tree.
Therefore, it can be seen from the above technical solution of the present invention that it can change the multiplication calculation of the proof on the AMTs tree into the addition calculation (the multiplication calculation needs 160us, and the addition calculation only needs 1 us), and can verify the generation and maintenance of the storage, thereby saving a lot of time.
Further, by performing key, version and data value information (key, version, value) node generation on the extended merkle tree, value change does not perform value update on the merkle tree, but a new node is added on the merkle tree through version change first, and a proof is generated, thereby saving a lot of time.
The verifiable step S2 includes:
and finding the Value of the node on the AMT tree according to key and version number information (key, version) of the node on the AMTs by adopting the node added to the Merkle tree.
To summarize, in the embodiment of the present invention, if the stored Value is to be modified, it is necessary to add 1 to the version information on the AMTs and generate the proof, and store (key, version, value) information on the extended market tree and generate the proof.
Specifically, modifying the value of a certain storage node, firstly finding out a point corresponding to the AMTs according to the key value, adding 1 to the version number, and simultaneously adding 1 to the node versions along the line; that is to say, the AMTs tree is used for storing version number information, the change of the value of the node is replaced by the change of the version number, the polynomial multiplication operation of the AMTs is converted into the addition operation, the calculation time is saved, and meanwhile, the read-write times of the bottom layer I/O are reduced.
And, add a node on the extended merkle tree, store the key, version number information added with 1 and Value on a new node of the merkle tree, and generate verifiable storage proof, prove according to (key, version), can really find this Value. Namely, the (key, version, value) is stored through an extended merkle tree, and the proof is generated, the tree only increases the efficiency of verifiable storage by adding nodes for storing values without modifying the values.
The invention also provides a readable storage medium, which stores executable instructions for executing the AMTs-based blockchain verifiable storage method.
The present invention further provides a data processing terminal, configured to serve as a consensus node of a P2P network, receive, perform consensus verification, and store a block in the P2P network, where the data processing terminal includes: a readable storage medium; a processor to retrieve and execute executable instructions in the readable storage medium to perform an AMTs-based blockchain verifiable storage method.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by a program instructing associated hardware (e.g., a processor) and the program may be stored in a readable storage medium, such as a read-only memory, a magnetic or optical disk, etc. All or some of the steps of the above embodiments may also be implemented using one or more integrated circuits. Accordingly, the modules in the above embodiments may be implemented in hardware, for example, by an integrated circuit, or in software, for example, by a processor executing programs/instructions stored in a memory. Embodiments of the invention are not limited to any specific form of hardware or software combination.
The present invention further provides a P2P network, wherein the common node of the P2P network is the aforementioned data processing terminal.
The above description is only for the preferred embodiment of the present invention, and the embodiment is not intended to limit the scope of the present invention, so that all the equivalent structural changes made by using the contents of the description and the drawings of the present invention should be included in the scope of the present invention.

Claims (4)

1. A verifiable multipoint evaluation tree based block chain verifiable storage method is characterized by comprising an AMTs-based block chain storage step S1 and a verifiable step S2:
the step S1 specifically includes:
step S11: constructing an AMTs tree of changes for use as an updated version, each node in the AMTs tree consisting of two parts:
(1) the commitment formula of the function;
(2) a proof that there is always a function of 0 outside the function;
moreover, the AMTs tree is used for storing information that can verify the keyword and version of the stored data, i.e. (key, version) information; when a storage item needs to be added, calculating a Key word Key of a node according to the storage item, and setting a Version to an initial value; when a storage entry of one node needs to be updated, updating version information in key and version (version) of verifiable storage data on the node from a Root of an AMTs tree to the node corresponding to the storage entry, namely when the data of the leaf node changes, only adding 1 to the version number of an associated node on a path from the node to the Root node;
step S12: constructing a Merkle tree by using the data extension of the storage entry in each block, wherein the Merkle tree is used for storing the key, version and data value information (key, version, value) of each transaction block;
when the AMTs tree needs to be added with a storage item, adding a new node to the Merkle tree, storing a Key, version number information and Value of a Key on one node of the Merkle tree, forming data of the Key, the version and data Value information (Key, version, value), and generating a verifiable storage certificate;
when the AMTs tree needs to modify a storage item, adding a new node to the Merkle tree, storing a Key, version number information added with 1 and a Value of Value on one node of the Merkle tree, forming data of the Key, the version and data Value information (Key, version, value), and generating a verifiable storage certificate;
the verifiable step S2 includes:
and finding the Value of the node on the AMTs tree according to key and version number information (key, version) of the node on the AMTs tree by adopting the node added to the Merkle tree.
2. A readable storage medium storing executable instructions for performing the AMTs-based blockchain verifiable storage method of claim 1.
3. A data processing terminal, configured to serve as a consensus node of a P2P network, receive, perform consensus verification, and store a block in the P2P network, the data processing terminal comprising:
the readable storage medium of claim 2;
a processor that retrieves and executes executable instructions in the readable storage medium to perform an AMTs-based blockchain verifiable storage method.
4. A P2P network, characterized in that the readable storage medium is a data processing terminal as claimed in claim 3, wherein the consensus node of the P2P network is the consensus node of the P2P network.
CN202211569397.7A 2022-12-08 2022-12-08 AMTs-based block chain verifiable storage method Pending CN115952235A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211569397.7A CN115952235A (en) 2022-12-08 2022-12-08 AMTs-based block chain verifiable storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211569397.7A CN115952235A (en) 2022-12-08 2022-12-08 AMTs-based block chain verifiable storage method

Publications (1)

Publication Number Publication Date
CN115952235A true CN115952235A (en) 2023-04-11

Family

ID=87295981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211569397.7A Pending CN115952235A (en) 2022-12-08 2022-12-08 AMTs-based block chain verifiable storage method

Country Status (1)

Country Link
CN (1) CN115952235A (en)

Similar Documents

Publication Publication Date Title
WO2021017421A1 (en) Blockchain state data recovery method and device, and electronic device
TWI731595B (en) Block chain state data storage method and device, and electronic equipment
Ruan et al. A transactional perspective on execute-order-validate blockchains
CN107577427B (en) data migration method, device and storage medium for blockchain system
US20200167345A1 (en) Method and apparatus for storing blockchain state data and electronic device
CN107688999B (en) Block chain-based parallel transaction execution method
US20200167367A1 (en) Block chain state data synchronization method, apparatus, and electronic device
CN111597015B (en) Transaction processing method and device, computer equipment and storage medium
Armbrust et al. Scads: Scale-independent storage for social computing applications
US9245011B2 (en) Data model versioning for document databases
JP2023546249A (en) Transaction processing methods, devices, computer equipment and computer programs
US11036720B2 (en) Blockchain-based hierarchical data storage
Escriva et al. Warp: Lightweight multi-key transactions for key-value stores
US11386054B2 (en) Blockchain-based hierarchical data storage
US20060101452A1 (en) Method and apparatus for preserving dependancies during data transfer and replication
US11288247B2 (en) Blockchain based hierarchical data storage
CN111444192A (en) Method, device and equipment for generating Hash of global state in block chain type account book
Perrin et al. Update consistency for wait-free concurrent objects
CN114564500A (en) Method and system for implementing structured data storage and query in block chain system
CN111680019A (en) Data capacity expansion method and device for block chain
CN112463857B (en) Data processing method and system for supporting backtracking data query based on relational database
CN112800050A (en) Transaction data storage method, system and device based on state tree and P2P network
CN115952235A (en) AMTs-based block chain verifiable storage method
CN116010405A (en) Method for improving verifiable storage efficiency through multi-level AMTs
CN112288586A (en) Insurance industry data integration method based on HBase and related equipment

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