Block chain state data storage and rollback method and device and storage medium

A state data and blockchain technology, applied in the blockchain field, can solve the problems of huge number of logs and low efficiency, and achieve the effect of improving efficiency and correctness

Active Publication Date: 2020-06-12
HANGZHOU QULIAN TECH CO LTD
View PDF11 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the traditional blockchain system, a large amount of state data (such as account address, account balance, contract status, etc.) will be generated during the execution of the transaction. After the data is generated, it will be directly written into the underlying database of the blockchain, which is inefficient. When a rollback event occurs (such as a fork, a block root hash inconsistency, etc.), the world state must be rolled back through the redo log (Journal), and the number of blocks rolled back is relatively large. When , the number of logs that need to be redone will be very large, and the efficiency of this method is very low

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
  • Block chain state data storage and rollback method and device and storage medium
  • Block chain state data storage and rollback method and device and storage medium
  • Block chain state data storage and rollback method and device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The application 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 related inventions, rather than to limit the invention. It should also be noted that, for ease of description, only parts related to the invention are shown in the drawings.

[0029] It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.

[0030] figure 1 It is a flowchart of a method for storing blockchain state data provided by an embodiment of the present invention.

[0031] Such as figure 1 As shown, in this embodiment, the present invention provides a method for storing blockchain state data, the method sets the block height ...

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 provides a block chain state data storage and rollback method and device and a storage medium, and the method comprises the steps: setting the block height of a check point, and settinga check interval: writing the first state data of a first block into a first pre-writing log, and enabling the first pre-writing log to uniquely correspond to the first block; storing the first pre-written log in a temporary database; whether the first block height of the first block is a set first stable check point or not is judged, if yes, the temporary database is traversed, the content is persisted into a bottom-layer database, and meanwhile a pre-written log of a first check interval in the temporary database is deleted. According to the method, the state data in front of the stability check point is persisted into the disk database; the state data stored in the disk is ensured to be consensus, the correctness of the state data is greatly improved, and new state data can be generatedwithout deleting the disk to recalculate the log during rollback, so that the rollback efficiency is greatly improved.

Description

technical field [0001] The present application relates to the technical field of blockchain, in particular to a storage and rollback method, device and storage medium of blockchain state data. Background technique [0002] In the blockchain account model (Account Model), data can be divided into blockchain data and account data. The former includes data such as blocks, transactions, receipts, etc., and the latter refers to the status information of accounts in the blockchain. After receiving a block, the node executes the transactions in the block sequentially on the basis of the original state, and continuously updates the account state until the execution of the batch of transactions is completed, so that the state of the blockchain is changed. Here, the blockchain state refers to the collection of all account states on the blockchain. This state set is collectively called the world state, and this part of the data is called account data, also known as state data. [0003...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/27G06F16/23G06F16/21
CPCG06F16/27G06F16/219G06F16/2358Y02D10/00
Inventor 蔡亮李伟邱炜伟匡立中叶晨宇
Owner HANGZHOU QULIAN TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products