Blockchain state storage method based on SQL database

A state storage and database technology, applied in database indexing, electronic digital data processing, structured data retrieval, etc., can solve problems such as query, organization, and inability to support big data or complex data structures, so as to achieve rich functions and reduce docking effect of difficulty

Active Publication Date: 2017-06-20
HANGZHOU RIVTOWER TECH CO LTD
View PDF6 Cites 47 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] This kind of semi-structured data cannot organize the data according to the table structure like the widely used SQL database at present, nor can it s

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] A kind of block chain state storage method based on SQL database of the present invention comprises the following steps

[0018] (1) Generate the genesis block configuration file. After the basic configuration, add the configuration of SQL database software selection, software version, protocol version, database name, user name, password, etc. The configuration method of the protocol version is:

[0019] (1.1) Based on the existing SQL basic protocol, specify the addition, deletion, modification, and query operations of SQL syntax for tables, table structures, and table data.

[0020] (1.2) Delete functions in the existing SQL protocol that will cause inconsistencies in the distributed system, such as functions such as random number random.

[0021] (1.3) Modify the implementation of the current time in the existing SQL protocol, from obtaining from the local system time to obtaining from the timestamp of the height block, such as functions such as now and today.

[0...

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 discloses a blockchain state storage method based on an SQL database. By the adoption of the method, when a blockchain is initialized, a database is generated, a plurality of data sheets can be built by each contract, creating, reading, updating, deleting operations based on SQL grammar can be conducted on sheet structures and sheet data by contracts, and some interfaces with permission are encapsulated to be called by other accounts. A database change log (log) is generated by nodes after each transaction is highly executed, and the log is used as hash depository receipt, wherein a world state continuously proceeds to ensure the accordance of each node data. According to the method, the present situation that only simple data structures can be stored in blockchains is changed, a data sheet structure used widely is adopted, the creating, reading, updating, deleting operations are supported, even a cross-contract conjunctive query is carried out, the functions which intelligent contracts on the blockchain can perform are enriched, and at the same time, the docking difficulty of systems out of blockchain is reduced.

Description

technical field [0001] On the basis of the existing blockchain protocol and smart contract technology, the present invention adds a protocol related to state storage, especially a data organization and storage method based on an SQL database. Background technique [0002] Blockchain is a new distributed technology. It consists of sequentially arranged transactions to form blocks, and then sequentially arranged blocks to form a chain. Each block contains a self-increasing height as a number, and also There is a timestamp used to record the packing time. Smart contracts expand the original simple function of recording balances for addresses, allowing accounts to have rich state data and record complex data structures. At present, most of these data storage structures of smart contract technology are sequentially arranged semi-structured data, supporting some basic data types and some array-like data structures. The external account is stored by a pre-defined unified data str...

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): G06F17/30
CPCG06F16/22G06F16/2282
Inventor 谢晗剑岳利鹏
Owner HANGZHOU RIVTOWER 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