Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Transaction data storage method, system and device based on state tree and P2P network

A P2P network and transaction data technology, applied in the Internet field, can solve problems such as performance degradation

Pending Publication Date: 2021-05-14
上海树图区块链研究院 +1
View PDF0 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

As the amount of transaction data increases, the depth of the state tree also increases, so each update of the key-value pair will result in the update of multiple keys in the database, thereby degrading performance

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Transaction data storage method, system and device based on state tree and P2P network
  • Transaction data storage method, system and device based on state tree and P2P network
  • Transaction data storage method, system and device based on state tree and P2P network

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not constitute a conflict with each other.

[0029] The MPT data structure is used in the Ethereum blockchain system. Each Ethereum block header includes a state tree of the MPT data structure. The Ethereum client can query the current balance of an account and whether an account exists through the state tree, and What is the output of a transaction made by a contract. It can be seen that the state tree stores the state data of the accoun...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a transaction data storage method based on a state tree, and the method comprises the steps of constructing an incremental tree corresponding to the state tree of a certain block in a memory of a block chain node, and the incremental tree and the state tree have the same MPT data structure; when the transaction state is changed, writing newly added transaction state data into the incremental tree; and when the incremental tree is full, taking the incremental tree as a middle tree, generating an empty incremental tree, continuing to perform newly added transaction data writing operation, and merging the middle tree into the state tree to update the state tree. According to the invention, the size of the tree for maintaining the latest data is reduced, and the depth of the tree is reduced, so that the number of nodes needing to be modified when any key value is written and the number of nodes needing to be read when the recently written key value is read are reduced.

Description

technical field [0001] The invention belongs to the technical field of the Internet, and in particular relates to a method and system for storing transaction state data in a block chain system. Background technique [0002] In Ethereum, an important application platform of the blockchain, the state of the world after all transactions are executed is represented as a key-value pair. In order to provide proof for light nodes, these key-value pairs representing the state are stored in the LeveIDB database in the form of a state tree, and the state tree has an MPT data structure (Merkle Patricia Trie). As the amount of transaction data increases, the depth of the state tree also increases, so each update of a key-value pair will result in the update of multiple keys in the database, thereby degrading performance. [0003] It is a common practice in the blockchain system using the account model to store the state of the world in the data structure of the MPT (Merkle Patricia Tri...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/22G06F16/2455G06F16/27
CPCG06F16/27G06F16/22G06F16/2246G06F16/2455
Inventor 杨哲李沛伦
Owner 上海树图区块链研究院
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products