Method and apparatus for storing state data in a blockchain system

By deploying storage services in groups for blockchain nodes, and using Merkle state trees and root hash values, efficient storage of state data and rapid addition of new nodes in the blockchain system are achieved, solving the problems of high storage costs and long addition times.

CN120045564BActive Publication Date: 2025-12-26ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510125517.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-12-26
Estimated Expiration
2045-01-26

AI Technical Summary

Technical Problem

In a blockchain system, each node needs to store all block data and state data, resulting in high storage costs. Furthermore, when a new node joins, it needs to copy all the data, which takes a long time.

Method used

Blockchain nodes are grouped and storage services are deployed in each group. The full state data is stored in the form of a Merkle state tree, with the root hash value pointing to the position of the latest state data, to achieve deduplication. Only one copy of the full data is stored in each storage service.

Benefits of technology

This reduces the cost of storing state data in the blockchain system, and new nodes can join in seconds, reducing the joining time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045564B_ABST
    Figure CN120045564B_ABST
Patent Text Reader

Abstract

The application provides a state data storage method and device in a blockchain system. Nodes are divided into at least one node group. A service platform deploys corresponding storage services for the node groups. The storage space of the storage services is used to store a Merkle state tree and root hash values corresponding to the nodes. The method is applied to any storage service and includes: obtaining a storage request sent by a blockchain node in response to consensus processing of a first block; in response to the storage request, determining whether first state data has been added to the Merkle state tree stored in the storage space of the storage service; if not, adding the first state data to the Merkle state tree stored in the storage space and updating the root hash value corresponding to the node stored in the storage space to the root hash value of the updated Merkle state tree; and if yes, updating the root hash value corresponding to the node stored in the storage space to the root hash value of the Merkle state tree stored in the storage space.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] One or more embodiments of the present application relate to the field of blockchain technology, in particular to a state data storage method and device in a blockchain system. BACKGROUND

[0002] Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus protocol, and encryption algorithm. In a blockchain system, data blocks are combined into a chain-like data structure in a sequential manner according to time sequence, and a distributed ledger is ensured to be tamper-proof and unforgeable by means of cryptography. Due to the characteristics of decentralization, information tamper-proofing, and autonomy, the application of blockchain is becoming more and more widespread.

[0003] In a blockchain system, the block data and state data on each node need to be consistent, which means that N nodes need to store N copies of full block data and N copies of full state data. As the blockchain system continues to run, the data volume of block data and state data will become larger and larger, so the storage cost of block data will also become higher and higher. In addition, if a new node is to be added, the full block data and full state data need to be copied to the node, which usually takes a long time. SUMMARY

[0004] One or more embodiments of the present application provide technical solutions as follows:

[0005] The present application provides a state data storage method in a blockchain system; wherein the blockchain nodes participating in consensus in the blockchain system are divided into at least one blockchain node group; a blockchain service platform corresponding to the blockchain system deploys a corresponding storage service for each blockchain node group; the storage space of the storage service is used to store a Merkle state tree organized by state data corresponding to blocks that have been passed through consensus processing by each blockchain node in the blockchain node group, and a root hash value corresponding to each blockchain node in the blockchain node group; the root hash value is the root hash value of the updated Merkle state tree obtained after the blockchain node corresponding thereto adds state data corresponding to the latest block that has passed through consensus processing to the Merkle state tree;

[0006] The method is applied to a target storage service corresponding to a target blockchain node group in the blockchain system, and includes:

[0007] Obtaining a storage request for first state data corresponding to a first block sent by a target blockchain node in the target blockchain node group in response to passing through consensus processing of the first block;

[0008] in response to the storage request, determining whether the first state data has been added to the Merkle state tree stored in the target storage space of the target storage service;

[0009] if the first state data has not been added to the Merkle state tree, adding the first state data to the Merkle state tree stored in the target storage space, and updating a root hash value corresponding to the target blockchain node and stored in the target storage space to a root hash value of the updated Merkle state tree;

[0010] if the first state data has been added to the Merkle state tree, updating a root hash value corresponding to the target blockchain node and stored in the target storage space to the root hash value of the Merkle state tree stored in the target storage space.

[0011] The application also provides a state data storage device in a blockchain system; wherein the blockchain nodes participating in consensus in the blockchain system are divided into at least one blockchain node group; a blockchain service platform corresponding to the blockchain system deploys a corresponding storage service for each blockchain node group; the storage space of the storage service is used to store a Merkle state tree organized by state data corresponding to blocks that have been consensus-processed by each blockchain node in the blockchain node group, and a root hash value corresponding to each blockchain node in the blockchain node group; the root hash value is a root hash value of the updated Merkle state tree obtained after the corresponding blockchain node adds state data corresponding to the latest block that has been consensus-processed to the Merkle state tree;

[0012] The device is applied to a target storage service corresponding to a target blockchain node group in the blockchain system, and comprises:

[0013] an obtaining unit that obtains a storage request for first state data corresponding to a first block sent by a target blockchain node in the target blockchain node group in response to consensus processing of the first block;

[0014] a determining unit that, in response to the storage request, determines whether the first state data has been added to the Merkle state tree stored in a target storage space of the target storage service;

[0015] a storage unit, if the first state data has not been added to the Merkle state tree, adding the first state data to the Merkle state tree stored in the target storage space, and updating the root hash value corresponding to the target blockchain node stored in the target storage space to a root hash value of the updated Merkle state tree;

[0016] an updating unit, if the first state data has been added to the Merkle state tree, updating the root hash value corresponding to the target blockchain node stored in the target storage space to the root hash value of the Merkle state tree stored in the target storage space.

[0017] The application further provides an electronic device, comprising:

[0018] a processor;

[0019] a memory for storing processor-executable instructions;

[0020] The processor implements the steps of the method according to any one of the preceding method embodiments by running the executable instructions.

[0021] The application further provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of the preceding method embodiments.

[0022] In the technical solution, the blockchain nodes participating in consensus in the blockchain system are divided into at least one blockchain node group, and the blockchain service platform corresponding to the blockchain system deploys a corresponding storage service for each blockchain node group. The storage space of the storage service is used to store a Merkle state tree formed by state data corresponding to blocks that have passed consensus processing in each blockchain node in the blockchain node group, and a root hash value corresponding to each blockchain node in the blockchain node group. The root hash value is used to indicate a root hash value of an updated Merkle state tree obtained by the blockchain node after adding state data corresponding to a latest block that has passed consensus processing to the Merkle state tree. When the storage service corresponding to any blockchain node group in the blockchain system stores state data corresponding to a block that has passed consensus processing of a certain blockchain node in the blockchain node group, the storage service can first determine whether the state data has been added to the Merkle state tree stored in the storage space of the storage service. If the state data has not been added to the Merkle state tree, the state data is added to the Merkle state tree stored in the storage space, and the root hash value corresponding to the blockchain node stored in the storage space is updated to the root hash value of the updated Merkle state tree. If the state data has been added to the Merkle state tree, the root hash value corresponding to the blockchain node stored in the storage space is directly updated to the root hash value of the Merkle state tree stored in the storage space.

[0023] In the above manner, the state data in the blockchain system can be stored by the storage service corresponding to each blockchain node group, and the deduplication processing of the state data stored in the storage space of each storage service is implemented, so that only one full amount of state data needs to be stored in the storage space of each storage service, and one full amount of state data no longer needs to be stored on each blockchain node participating in consensus. If N blockchain nodes are divided into X (1≤X≤N) blockchain node groups, only X full amounts of state data need to be stored, and N full amounts of state data no longer need to be stored, that is, the storage demand can be reduced to X / N of the original. In this way, the storage cost of the state data in the blockchain system can be reduced, and when a new node joins the blockchain system, only the root hash value set for the new node needs to be adjusted, so that the time consumption of the new node joining the blockchain system can be reduced, and the new node can be added to the blockchain system in seconds. BRIEF DESCRIPTION OF DRAWINGS

[0024] The drawings needed in the description of the exemplary embodiments will be described below.

[0025] Figure 1is a schematic diagram of a blockchain system according to an example embodiment of the present application.

[0026] Figure 2 is a schematic diagram of a deployment architecture of a blockchain storage service according to an example embodiment of the present application.

[0027] Figure 3 is a schematic diagram of a deployment architecture of another blockchain storage service according to an example embodiment of the present application.

[0028] Figure 4 is a schematic diagram of a deployment architecture of another blockchain storage service according to an example embodiment of the present application.

[0029] Figure 5 is a flowchart of a state data storage method in a blockchain system according to an example embodiment of the present application.

[0030] Figure 6 is a structural schematic diagram of an apparatus according to an example embodiment of the present application.

[0031] Figure 7 is a block diagram of a state data storage apparatus in a blockchain system according to an example embodiment of the present application. DETAILED DESCRIPTION

[0032] The example embodiments will be described in detail herein with reference to the attached drawings. The following description is made with reference to the accompanying drawings in which like reference numerals refer to like elements, unless the context of use indicates otherwise. The following description of example embodiments is not representative of all embodiments consistent with one or more aspects of the present application. Rather, they are merely examples consistent with some aspects of one or more embodiments of the present application.

[0033] It should be noted that the steps of the methods in other embodiments are not necessarily performed in the order shown and described herein. In some other embodiments, the steps of the methods can include more or less than those described herein. Furthermore, a single step described herein can be broken down into multiple steps in other embodiments; and multiple steps described herein can be combined into a single step in other embodiments.

[0034] Blockchain is generally divided into three types: Public Blockchain, Private Blockchain and Consortium Blockchain. In addition, there can be a combination of the above types, such as a combination of private blockchain and consortium blockchain, a combination of consortium blockchain and public blockchain, etc.

[0035] Among the three types of blockchains described above, the public chain has the highest degree of decentralization. Participants (also referred to as nodes in the blockchain) who join the public chain can read data records on the chain, participate in transactions, compete for the right to record new blocks, and so on. Moreover, the nodes can freely join or leave the network and perform related operations.

[0036] The private chain is the opposite, and the write permission of the network is controlled by an organization (or an entity), and the data read permission is regulated by the organization. That is, the private chain can be regarded as a weakly centralized system, which has strict restrictions on nodes and a small number of nodes. This type of blockchain is more suitable for use within a specific organization.

[0037] The consortium chain is between the public chain and the private chain, and can achieve "partial decentralization". The nodes in the consortium chain usually have corresponding organizations (or entities); the nodes join the network by authorization and form an interest-related alliance to jointly maintain the operation of the blockchain.

[0038] Please refer to Figure 1 , Figure 1 is a schematic diagram of a blockchain system according to an example embodiment of the present application.

[0039] As shown in Figure 1 , the blockchain system can maintain one or more blockchains (for example: public blockchain, private blockchain, consortium blockchain, etc.), and can include multiple nodes for carrying the one or more blockchains; for example, the nodes 1, 2, 3, 4, i, etc. shown in Figure 1 may jointly carry one or more blockchains. The blockchains included in each blockchain system can also access data across chains.

[0040] The node is a logical communication entity; multiple nodes of different types can run on the same physical server or on different physical servers. In an example embodiment, the node can be a physical device or a virtual device implemented in a server or server cluster; for example, the node can be a physical host in a server cluster, or a virtual machine created by virtualizing the hardware resources of the server or server cluster based on virtualization technology. Each node can be coupled together to form a network through various types of communication methods (for example: TCP / IP, etc.) to carry one or more blockchains.

[0041] Based on the basic characteristics of the blockchain, the blockchain is usually composed of a plurality of blocks. In these blocks, there are timestamps corresponding to the time when the block is created. All blocks strictly follow the timestamps recorded in the blocks to form a data chain that is ordered in time.

[0042] For data generated outside the blockchain, the data can be structured into a standard transaction format supported by the blockchain, and then published to the blockchain. The nodes participating in consensus in the blockchain system can reach consensus on the transaction, and execute the transaction after the consensus is completed. The transaction and the execution result can be persisted in the blockchain.

[0043] In the blockchain system, different participants can establish a distributed blockchain network through the deployed nodes. In practical applications, the connection relationship between each node and different nodes can be regarded as a blockchain network, and the connection relationship, data interaction, etc. between each node and different nodes can be regarded as a blockchain system. The decentralized (or multi-centralized) distributed ledger constructed by the chain block structure is stored on each node (or most nodes, such as consensus nodes) in the distributed blockchain network. This type of blockchain system needs to solve the consistency and correctness of the ledger data on each node of the decentralized (or multi-centralized) multiple nodes. Each node in the blockchain system runs a blockchain program, and under the design of a certain fault tolerance requirement, the consensus protocol is used to ensure that all loyal nodes have the same transaction, so as to ensure that all loyal nodes have the same execution result of the same transaction, and to package the transaction and the execution result to generate a block.

[0044] The nodes in the blockchain system can be generally divided into two categories: consensus nodes and non-consensus nodes. The consensus nodes are nodes running the consensus protocol. The non-consensus nodes can forward the received transactions sent by the client to the consensus nodes, the consensus nodes can propose transactions, attempt to construct blocks, and send the constructed blocks to other nodes, so that the consensus nodes and the non-consensus nodes can store the blocks.

[0045] Specifically, the consensus nodes in the blockchain system can reach consensus on the transactions contained in the new block to be connected to the chain block structure based on the consensus protocol, so as to ensure that each consensus node agrees on the content and order of the transactions contained in the block, and to realize the construction of the block. After the consensus is completed, the consensus nodes can send the constructed block to other nodes, so that each node can execute the transactions contained in the block in order, and complete the finalization of the block under the condition that the transaction execution results of each node are consistent. The finalization refers to the completion of the execution of the transactions contained in the block, and the transaction execution results are approved by all nodes (or a certain number of nodes, such as two-thirds of the nodes).

[0046] After each consensus node in the blockchain system finishes executing the transactions contained in a block that has been consensus completed, it can broadcast a message indicating that the block has been consensus completed and the transactions contained in the block have been executed. Thus, the consistency of the transaction execution results of each consensus node for the block can be confirmed according to the message, and the finalization of the block can be completed when the transaction execution results of each consensus node are confirmed to be consistent.

[0047] In the blockchain, the block height is the number of blocks connected in the chain structure. However, for any block in the blockchain, the block height of the block can be used as an identifier of the block. A block is usually considered to have two identifiers, one of which is the hash value of the block header, and the other of which is the block height. The hash value of the block header is obtained by performing a secondary hash calculation on the block header using the SHA256 algorithm or the like; the hash value of the block header can uniquely identify a block, and any node in the blockchain system can independently obtain the hash value of the block header by performing a hash calculation on the block header. The block height refers to the position of the block in the blockchain; the block height is not an identifier that uniquely identifies a block, although a block always has a definite and fixed block height, but a block height does not always identify a unique block, and two or more blocks can have the same block height, i.e., compete for the same position in the blockchain. The blocks in the blockchain are usually connected in a chain structure in chronological order, i.e., the chain structure is actually a chain in time order. In this case, the block height is usually set to an increasing value. For example, assuming that the block height of the last block that has been finalized is h, then the block height of the next block to be consensus is h+1; and so on.

[0048] The consensus protocol in the blockchain system can be implemented in a sliding window manner. For example, a consensus window with a length of L can be set; assuming that the block height of the block currently in the finalization process is h, then the blocks with block heights in the interval [h+1, h+L] can be consensus.

[0049] In practical applications, the blockchain data that needs to be stored and maintained usually includes block data and state data. The information contained in each block in the blockchain can be referred to as block data (Block Data), and the current state of the blockchain system at any given time point can be referred to as state data (State Data).

[0050] The block data can include a block header and a block body. The block header contains metadata of the block, such as the hash value of the previous block, the timestamp, the difficulty target, the random number, etc. The block body contains a transaction list. The block data is the historical record of the blockchain, which is arranged in chronological order, and each new block contains the hash value of the previous block, thus forming a chain. This structure ensures that once data is added to the blockchain, it is very difficult to tamper with, because any change to the block data will cause the hash value of all subsequent blocks to change.

[0051] The state data can include account balances, contract code, and storage data. The contract code and storage data refer to the running logic of the smart contract and the storage information related thereto. The state data reflects the results of all historical transactions and operations, and is a snapshot of the blockchain system at a specific point in time. It has the inherent complexity and security features of blockchain technology. The state data is dynamic and will be updated as new transactions are confirmed and added to the blockchain.

[0052] The update of the block data and the state data is very close in time, so it can be considered that it is completed in the same round of operation. Specifically, the update of the state data occurs after the block is accepted by the consensus algorithm, and then it is recorded as part of the block. Therefore, it can be considered that the update of the state data follows the update of the block data, and the two are closely connected.

[0053] When storing the various blockchain data shown above, the various blockchain data described above can be organized in the form of Key-Value pairs into a Merkle tree for storage in a database.

[0054] Merkle tree, also known as Hash Tree, is a kind of data structure. It is a binary tree or multi-tree structure, in which each leaf node contains a hash value of a data block, and non-leaf nodes contain the hash value of the content of their child nodes. In the Merkle tree, the leaf nodes represent the actual stored data blocks, and the non-leaf nodes are obtained by hashing the content of their child nodes. The root node, also known as the Merkle root or Root Hash, is the topmost node in the Merkle tree structure, which represents the comprehensive hash value of all data in the tree.

[0055] In a blockchain system, the block data and the state data on each node need to be consistent, which means that N nodes need to store N copies of full block data and N copies of full state data. As the blockchain system continues to run, the data volume of the block data and the state data will become larger and larger, and therefore the storage cost of the block data will also become higher and higher. In addition, if a new node is added, the full block data and the full state data need to be copied to the node, which usually takes a long time.

[0056] One or more embodiments of the present application provide a technical solution for implementing state data storage in a blockchain system to reduce the storage cost of state data in the blockchain system and reduce the time consumption of adding a new node to the blockchain system, so as to realize the second-level addition of the new node to the blockchain system.

[0057] It should be noted that in the present application, the state data generated after the execution of the transaction contained in the block that has passed the consensus processing is referred to as the state data corresponding to the block.

[0058] In the above technical solution, the blockchain nodes participating in the consensus in the blockchain system are divided into at least one blockchain node group, and the blockchain service platform corresponding to the blockchain system deploys a corresponding storage service for each blockchain node group. The storage space of the storage service is used to store a Merkle state tree organized by the state data corresponding to the blocks that have passed the consensus processing of each blockchain node in the blockchain node group, and a root hash value corresponding to each blockchain node in the blockchain node group, which is used to indicate the root hash value of the updated Merkle state tree obtained by the blockchain node after adding the state data corresponding to the latest block that has passed the consensus processing to the Merkle state tree. When storing the state data corresponding to the block that has passed the consensus processing of a certain blockchain node in the blockchain node group, the storage service corresponding to any blockchain node group in the blockchain system can first determine whether the state data has been added to the Merkle state tree stored in the storage space of the storage service. If the state data has not been added to the Merkle state tree, the state data can be added to the Merkle state tree stored in the storage space, and the root hash value corresponding to the blockchain node stored in the storage space is updated to the root hash value of the updated Merkle state tree. If the state data has been added to the Merkle state tree, the root hash value corresponding to the blockchain node stored in the storage space can be directly updated to the root hash value of the Merkle state tree stored in the storage space.

[0059] The basis of the above technical solution is to abstract the state data storage of the blockchain system as a basic capability, called a blockchain storage service. All blockchain nodes (in this application, the blockchain nodes can be consensus nodes) in the blockchain system can be divided into different blockchain node groups (Regions) according to the dimensions of enterprises, institutions, or regions to which they belong. Moreover, the blockchain service platform corresponding to the blockchain system can deploy a corresponding storage service for each blockchain node group. All blockchain nodes in the blockchain node group can share the storage service, and the storage service only provides state data storage services for the blockchain nodes in the blockchain node group. These storage services collectively form a blockchain storage service corresponding to the blockchain system, which can be integrated into the blockchain service platform as a distributed storage service, that is, the computing resources, storage resources, and network resources used by the blockchain storage service can be provided by the blockchain service platform. The division of the blockchain node group is determined by actual needs, and the number of blockchain nodes in each blockchain node group can be arbitrary. That is, each blockchain node can be regarded as an independent blockchain node group, all blockchain nodes can be regarded as a blockchain node group, or different blockchain node groups can have different numbers of blockchain nodes.

[0060] When each blockchain node is initialized, it can apply for storage space from the storage service deployed in the blockchain node group to which it belongs, and the storage service can divide an independent storage subspace for the blockchain node from its storage space. The blockchain storage service ensures that the storage subspace corresponding to each blockchain node is isolated from each other, and each blockchain node can only read and write state data in its own storage subspace, but cannot read and write state data in the storage subspace corresponding to other blockchain nodes. For example, the isolation of the storage subspace can be achieved through the node identifier of the blockchain node, that is, each blockchain node can carry its own node identifier in the storage request or read request it initiates, so that the state data is stored in the storage subspace corresponding to the blockchain node, or the state data is read from the storage subspace corresponding to the blockchain node, thereby realizing the isolation of the storage subspace of different blockchain nodes.

[0061] In the storage space of each storage service, a shared storage sub-space can also be divided. The shared storage sub-space can be shared by all blockchain nodes in the blockchain node group corresponding to the storage service, and the state data corresponding to the block that has been consensus processed by the majority of the blockchain nodes in the blockchain system can be stored in the shared storage sub-space. Specifically, the state data corresponding to the block that has been consensus processed by the blockchain node can be first stored in the storage sub-space of the blockchain node, and after the consensus processing of the majority of the blockchain nodes in the blockchain system for the block is passed, the state data corresponding to the block can be submitted to the shared storage sub-space for storage. Wherein, the set of a certain number of replicas required to ensure the data consistency requirement and the fault tolerance requirement of all replicas is generally a set of the majority of nodes in the distributed system, that is, the Quorum.

[0062] In addition, within the same storage service, the state data stored by each blockchain node in the blockchain node group corresponding to the storage service can be de-duplicated.

[0063] From the perspective of each blockchain node in the blockchain system, the storage service corresponding to the blockchain node group to which the blockchain node belongs can be regarded as a storage service that provides state data for the blockchain node alone, and the full amount of state data of the blockchain node is stored through the storage service, and the blockchain node has no awareness of the state data that has been de-duplicated within the storage service.

[0064] Moreover, since the above de-duplication processing is performed within the storage service, from the perspective of the outside of the blockchain system, it is actually the storage or reading of state data in the storage space of the blockchain.

[0065] Specifically, according to the characteristics of the state data on each blockchain node in the blockchain system, the state data stored by each blockchain node in the blockchain node group corresponding to the storage service can be de-duplicated within the same storage service.

[0066] Wherein, the characteristics of the state data on each blockchain node in the blockchain system include: the state data on each blockchain node must be the same; if the state data is not the same, it must be a fork; at a certain moment, the consensus progress of the blocks of each blockchain node can be inconsistent, for example, the consensus progress of the blocks of some blockchain nodes is at the 100th block, while the consensus progress of the blocks of some other blockchain nodes is at the 105th block.

[0067] Overall, the above technical solution is to keep only one full state data in each storage service; at the same time, a pointer is maintained for each blockchain node in the group of blockchain nodes corresponding to the storage service, pointing to the location of the latest block that the blockchain node has consensus processed in the full state data. For a blockchain node in the group of blockchain nodes, the blockchain node can request the storage service to store the state data corresponding to the block after the consensus processing of the block. The storage service can first check whether the same state data has been stored in the storage space of the storage service during the storage of the state data, if the same state data has not been stored in the storage space of the storage service, the storage service can store the state data obtained from the blockchain node to the storage space of the storage service to add the state data to the full state data; if the same state data has been stored in the storage space of the storage service, the pointer corresponding to the blockchain node is updated, so that the pointer points to the location of the same state data in the full state data, and the state data does not need to be stored in the storage space of the storage service. Correspondingly, the blockchain node only reads the state data in the range before the location pointed by the pointer corresponding to the blockchain node when reading the state data through the storage service.

[0068] In the above manner, the storage service corresponding to each group of blockchain nodes is deployed to store the state data in the blockchain system, and the deduplication processing of the state data is automatically performed in each storage service, so that only one full state data needs to be stored in each storage service, and one full state data no longer needs to be stored in each blockchain node. If N blockchain nodes are divided into X (1≤X≤N) groups of blockchain nodes, only X full state data needs to be stored, and N full state data no longer needs to be stored, that is, the storage demand is reduced to X / N of the original. In this way, the storage cost of the state data in the blockchain system can be reduced, and when a new node joins the blockchain system, only the pointer set for the new node needs to be adjusted, so that the time consumption of the new node joining the blockchain system can be reduced, and the new node can be added to the blockchain system in seconds.

[0069] The deployment architecture of the blockchain storage service in the technical solution provided by the present application will be described first, and then the state data storage method in the blockchain system deployed with the blockchain storage service will be described in detail.

[0070] (1) Deployment architecture of blockchain storage service

[0071] In this application, the storage service corresponding to the blockchain system can be simply referred to as a blockchain storage service, which can be a distributed storage service providing data storage services for the blockchain system. In actual application, the blockchain storage service can be a cloud service relying on a cloud disk to provide data storage services for the blockchain system, that is, uploading the blockchain data to the cloud disk for storage; or the blockchain storage service can also rely on a mechanical hard disk, a solid state disk or other storage media to provide data storage services for the blockchain system, that is, storing the blockchain data in such storage media.

[0072] There are three possible forms of deployment architecture of the blockchain storage service:

[0073] In one possible form, all the blockchain nodes in a blockchain system can be divided into a plurality of blockchain node groups, and different blockchain node groups do not trust each other. There can be only one blockchain node in a blockchain node group. At this time, a storage service can be deployed in each blockchain node group, and this actually means that a storage service is deployed for each blockchain node. In the storage space of each storage service, there can be an independent storage sub-space divided for a blockchain node in the blockchain node group corresponding to the storage service, and a shared storage sub-space. These independent storage services collectively constitute the blockchain storage service corresponding to the blockchain system.

[0074] For example, as shown in Figure 2 , four blockchain nodes in a blockchain system are divided into four blockchain node groups, and there is only one blockchain node in each blockchain node group. A storage service is deployed in each blockchain node group, that is, a storage service is deployed for each blockchain node. Specifically, the blockchain node 1 in the blockchain node group 1 can use the storage sub-space 1 in the storage service 1, and the storage space of the storage service 1 can also include a shared storage sub-space; the blockchain node 2 in the blockchain node group 2 can use the storage sub-space 1 in the storage service 2, and the storage space of the storage service 2 can also include a shared storage sub-space; the blockchain node 3 in the blockchain node group 3 can use the storage sub-space 1 in the storage service 3, and the storage space of the storage service 3 can also include a shared storage sub-space; the blockchain node 4 in the blockchain node group 4 can use the storage sub-space 1 in the storage service 4, and the storage space of the storage service 4 can also include a shared storage sub-space; and so on.

[0075] In another possible scenario, all blockchain nodes in a blockchain system can be divided into a blockchain node group. Therefore, a blockchain node group can contain multiple blockchain nodes. In this case, a storage service can be deployed within this blockchain node group, and all blockchain nodes can share this storage service. However, it should be noted that the entire storage space used by the storage service deployed within this blockchain node group can be partitioned into multiple independent storage subspaces, allowing different blockchain nodes within the group to use different storage subspaces within this storage service. Furthermore, this storage space can also include a shared storage subspace shared by all blockchain nodes in the group. This storage service itself constitutes the blockchain storage service corresponding to that blockchain system.

[0076] For example, such as Figure 3 As shown, the four blockchain nodes in the blockchain system are divided into a blockchain node group, which contains a total of four blockchain nodes. A storage service is deployed within this blockchain node group, and these four blockchain nodes can share this storage service. Specifically, blockchain node 1 in blockchain node group 1 can use storage subspace 1 within storage service 1; blockchain node 2 in blockchain node group 1 can use storage subspace 2 within storage service 1; blockchain node 3 in blockchain node group 1 can use storage subspace 3 within storage service 1; blockchain node 4 in blockchain node group 1 can use storage subspace 4 within storage service 1; the storage space of storage service 1 can also include a shared storage subspace shared by blockchain nodes 1, 2, 3, and 4 in blockchain node group 1; and so on.

[0077] In still another possible form, all blockchain nodes in a blockchain system can be divided into a plurality of blockchain node groups, and different blockchain node groups do not trust each other. There can be only one blockchain node in a blockchain node group, or there can be a plurality of blockchain nodes in a blockchain node group. At this time, a storage service can be deployed in each blockchain node group, and all blockchain nodes in the same blockchain node group can share the storage service deployed in the blockchain node group. However, it should be noted that the entire storage space used by the storage service deployed in each blockchain node group can be partitioned to divide the storage space into a plurality of storage subspaces, so that different blockchain nodes in the same blockchain node group can use different storage subspaces in the storage service deployed in the blockchain node group. In addition, in the storage space of each storage service, there can also be a shared storage subspace shared by all blockchain nodes in the blockchain node group corresponding to the storage service. These independent storage services collectively constitute the blockchain storage service corresponding to the blockchain system.

[0078] For example, as Figure 4As shown, the six blockchain nodes in the blockchain system are divided into three blockchain node groups. There is only one blockchain node in blockchain node group 1, there are four blockchain nodes in blockchain node group 2, and there are two blockchain nodes in blockchain node group 3. A storage service is deployed in each blockchain node group. That is, a storage service is deployed for the one blockchain node in blockchain node group 1; a storage service is deployed for the four blockchain nodes in blockchain node group 2, and the four blockchain nodes can share the storage service; a storage service is deployed for the two blockchain nodes in blockchain node group 3, and the two blockchain nodes can share the storage service. Specifically, the blockchain node 1 in blockchain node group 1 can use the storage subspace 1 in the storage service 1, and the storage space of the storage service 1 can further include a shared storage subspace; the blockchain node 2 in blockchain node group 2 can use the storage subspace 1 in the storage service 2, the blockchain node 3 in blockchain node group 2 can use the storage subspace 2 in the storage service 2, the blockchain node 4 in blockchain node group 2 can use the storage subspace 3 in the storage service 2, the blockchain node 5 in blockchain node group 2 can use the storage subspace 4 in the storage service 2, and the storage space of the storage service 2 can further include a shared storage subspace shared by the blockchain node 2, the blockchain node 3, the blockchain node 4, and the blockchain node 5 in blockchain node group 2; the blockchain node 6 in blockchain node group 3 can use the storage subspace 1 in the storage service 3, the blockchain node 7 in blockchain node group 3 can use the storage subspace 2 in the storage service 3, and the storage space of the storage service 3 can further include a shared storage subspace shared by the blockchain node 6 and the blockchain node 7 in blockchain node group 3; and so on.

[0079] (2) State data storage method in blockchain system

[0080] Please refer to Figure 5 , Figure 5 is a flowchart of a state data storage method in a blockchain system according to an example embodiment of the present application.

[0081] In this embodiment, the blockchain nodes participating in consensus in the blockchain system (i.e., blockchain nodes) can be divided into at least one blockchain node group.

[0082] For each blockchain node group, the blockchain service platform corresponding to the blockchain system can deploy a corresponding storage service for the blockchain node group, and all blockchain nodes in the blockchain node group share the storage service, i.e., each blockchain node in the blockchain node group can use the storage service to store state data in the storage space of the storage service.

[0083] The storage space can be used to store a Merkle state tree organized by state data corresponding to blocks that have been consensus processed by each blockchain node in the blockchain node group, and a root hash value corresponding to each blockchain node in the blockchain node group. For a blockchain node, the root hash value corresponding to the blockchain node can be a root hash value of an updated Merkle state tree obtained after the blockchain node adds state data corresponding to the latest block that has been consensus processed to the Merkle state tree to update the Merkle state tree. That is, the root hash value can serve as a pointer to the location of the state data corresponding to the latest block that has been consensus processed by the blockchain node in the full state data.

[0084] In an embodiment shown, the blockchain service platform can be a BaaS (Blockchain as a Service) platform. BaaS, or "Blockchain as a Service", is a cloud computing service model that allows enterprises and developers to easily create, host, and manage their own blockchain applications, smart contracts, and distributed ledgers through a cloud platform without worrying about the installation and maintenance of underlying hardware and software. In this case, the storage service deployed by the blockchain service platform for each blockchain node group can be a storage cloud service, and the storage space of the storage service can be a cloud storage space. The storage cloud service can be a virtual machine, a container, a microservice, or the like.

[0085] The state data storage method in the blockchain system can be applied to a storage service (referred to as a target storage service) corresponding to any one of the blockchain node groups (referred to as a target blockchain node group) in the blockchain system. As shown in the embodiment, the method can specifically include the following steps: Figure 5

[0086] Step 502: Obtain a storage request for first state data corresponding to a first block sent by a target blockchain node in the target blockchain node group in response to consensus processing of the first block.

[0087] In this embodiment, the blockchain nodes in the blockchain system can perform consensus processing on a new block to be connected to the chain structure based on a consensus protocol. The consensus processing can be verification and other operations performed by the blockchain nodes on the block to be consensus. After the majority of the blockchain nodes in the blockchain system pass the consensus processing on the block, the consensus on the block can be considered complete.

[0088] ​After a consensus process for a certain block is passed in the blockchain system, a blockchain node in the blockchain system can request a storage service corresponding to a blockchain node group to which the blockchain node belongs to store state data corresponding to the block. For example, a certain blockchain node in the target blockchain node group (which can be referred to as a target blockchain node) can send a storage request for state data corresponding to a certain block (which can be referred to as first state data) to the target storage service in response to a consensus process for the certain block (which can be referred to as a first block) being passed.

[0089] Step 504: In response to the storage request, it is determined whether the first state data has been added to the Merkle state tree stored in the target storage space of the target storage service.

[0090] In this embodiment, in response to the storage request, it can be first determined whether the first state data has been added to the Merkle state tree stored in the storage space of the target storage service (which can be referred to as a target storage space).

[0091] In actual applications, the Merkle tree has the property that it can quickly verify whether a certain data item belongs to the tree without checking the entire data set of the tree. Only the hash value on a path from a leaf node to a root node (referred to as a Merkle proof) needs to be provided to verify the existence of a specific data item. Based on this, it can be quickly verified whether the first state data has been added to the Merkle state tree stored in the target storage space.

[0092] Step 506: If the first state data has not been added to the Merkle state tree, the first state data is added to the Merkle state tree stored in the target storage space, and a root hash value corresponding to the target blockchain node stored in the target storage space is updated to a root hash value of the updated Merkle state tree.

[0093] In this embodiment, if the first state data has not been added to the Merkle state tree stored in the target storage space, the first state data can be added to the Merkle state tree stored in the target storage space to update the Merkle state tree. At the same time, the root hash value corresponding to the target blockchain node stored in the target storage space can be updated to a root hash value of the updated Merkle state tree.

[0094] Step 508: If the first state data has been added to the Merkle state tree stored in the target storage space, update the root hash value corresponding to the target blockchain node stored in the target storage space to the root hash value of the Merkle state tree stored in the target storage space.

[0095] In the embodiment, if the first state data has been added to the Merkle state tree stored in the target storage space, in order to avoid repeated storage of state data, the first state data does not need to be added to the Merkle state tree stored in the target storage space, but the root hash value corresponding to the target blockchain node stored in the target storage space can be directly updated to the root hash value of the Merkle state tree stored in the target storage space.

[0096] In an embodiment shown, the storage space of the storage service corresponding to each blockchain node group can include a storage sub-space (which can be referred to as a first sub-space) for storing the Merkle state tree organized by state data, and a storage sub-space (which can be referred to as a second sub-space) corresponding to each blockchain node in the blockchain node group, wherein the second sub-space is used to store the root hash value corresponding to each blockchain node. Since the root hash value corresponding to each blockchain node is stored in the second sub-space corresponding to the blockchain node, the root hash values corresponding to different blockchain nodes can be isolated, facilitating each blockchain node to obtain or update its own root hash value.

[0097] For example, as shown in the blockchain system Figure 4 , the shared storage sub-spaces in the storage service 1, the storage service 2 and the storage service 3 are the first sub-spaces; the storage sub-space 1 in the storage service 1, the storage sub-spaces 1, 2, 3 and 4 in the storage service 2, and the storage sub-spaces 1 and 2 in the storage service 3 are the second sub-spaces.

[0098] In the above case, if the first state data has not been added to the Merkle state tree stored in the target storage space, the first state data can be specifically added to the Merkle state tree stored in the first sub-space included in the target storage space, and the root hash value corresponding to the target blockchain node stored in the second sub-space corresponding to the target blockchain node included in the target storage space is updated to the root hash value of the updated Merkle state tree.

[0099] If the first state data has been added to the Merkle state tree stored in the target storage space, the root hash value corresponding to the target blockchain node and stored in the second subspace corresponding to the target blockchain node and included in the target storage space can be updated to the root hash value of the Merkle state tree stored in the first subspace and included in the target storage space.

[0100] For the storage space corresponding to a group of blockchain nodes, the state data stored in the second subspace corresponding to each blockchain node in the group of blockchain nodes and included in the storage space can be as shown in Table 1:

[0101] Table 1

[0102] Blockchain node Nth block 1 KV1, KV2, KV3 2 KV1, KV2, KV3 3 KV1, KV2, KV3 4 KV1, KV2, KV3

[0103] wherein KV1, KV2 and KV3 represent three Key-Value pairs respectively, and KV1, KV2 and KV3 together constitute the state data corresponding to the Nth block.

[0104] In an embodiment shown, for a group of blockchain nodes in the blockchain system, the second subspace corresponding to each blockchain node in the group of blockchain nodes and included in the storage space of the storage service corresponding thereto can also be used to temporarily store the state data corresponding to the latest block that has been consensus processed by each blockchain node. Further, after the consensus processing of the majority of blockchain nodes in the blockchain system for the latest block is passed, the state data corresponding to the latest block can be submitted to the first subspace included in the storage space for long-term storage.

[0105] In the above case, in response to the storage request for the first state data, it can be specifically determined whether the first state data has been added to the Merkle state tree stored in the first subspace included in the target storage space.

[0106] If the first state data has been added to the Merkle state tree stored in the first subspace included in the target storage space, the root hash value corresponding to the target blockchain node and stored in the second subspace corresponding to the target blockchain node and included in the target storage space can be updated to the root hash value of the Merkle state tree stored in the first subspace and included in the target storage space.

[0107] If the first state data corresponding to the first block is not added to the Merkle state tree stored in the first subspace included in the target storage space, the first state data can be temporarily stored in a second subspace corresponding to the target blockchain node and included in the target storage space, and after the consensus processing of at least the next block (the next block or the next K blocks) of the first block is passed by the target blockchain node, the first state data temporarily stored in the second subspace corresponding to the target blockchain node and included in the target storage space is added to the Merkle state tree stored in the first subspace included in the target storage space, and the root hash value corresponding to the target blockchain node and stored in the second subspace corresponding to the target blockchain node and included in the target storage space is updated to the root hash value of the updated Merkle state tree.

[0108] It should be noted that for a blockchain node, if the blockchain node requests to store the N+K (K≥1) th block, it means that the N th block previously requested to be stored by the blockchain node must be a legal block, that is, a block that has been consensus processed by the majority of blockchain nodes in the blockchain system. The reason is that if the N th block is not a legal block, the blockchain node cannot perform consensus processing on the N+K th block. Therefore, after the consensus processing of at least the next block of the first block is passed by the target blockchain node, the first state data corresponding to the first block and temporarily stored in the second subspace corresponding to the target blockchain node and included in the target storage space can be added to the Merkle state tree stored in the first subspace included in the target storage space, which ensures that the state data stored in the first subspace of the Merkle state tree is the state data corresponding to the legal block.

[0109] In an embodiment shown, to solve the problem of block bifurcation, the first block at this time and the blocks with the same block identifier (e.g., block height) as the first block and consensus processed by at least Quorum blockchain nodes in the blockchain system can be compared to determine whether the block hash values of the first block and the blocks are different. If the block hash values of the first block and the blocks are different, the first block can be determined as a bifurcation block. In this case, the first state data temporarily stored in the second subspace corresponding to the target blockchain node and included in the target storage space at this time can be marked as state data corresponding to the bifurcation block.

[0110] For the storage space corresponding to a blockchain node group, the storage space contains the block data stored in the second sub-space corresponding to each blockchain node in the blockchain node group, which can be shown in Table 2 as follows:

[0111] Table 2

[0112] Blockchain node Nth block N+1th block 1 KV4, KV5 2 KV1', KV2', KV3' (forked block) 3 KV4, KV5 4 KV4, KV5

[0113] Wherein, KV1', KV2', KV3', KV4 and KV5 represent five Key-Value pairs respectively, KV1', KV2' and KV3' together constitute the state data corresponding to the fork block, and KV4 and KV5 together constitute the state data corresponding to the N+1th block.

[0114] It should be noted that the state data corresponding to the fork block temporarily stored in the second sub-space is usually not submitted to the first sub-space for storage. Moreover, the blockchain node which has temporarily stored the state data corresponding to the fork block in the second sub-space can no longer participate in the consensus of subsequent blocks; that is, if the blockchain node has temporarily stored the state data corresponding to the Nth block marked as a fork block in the second sub-space, the blockchain node can no longer participate in the consensus processing of the N+K (K≥1) th block, and thus will not generate the state data corresponding to the N+Kth block.

[0115] In an embodiment shown, after the consensus processing of the target blockchain node for at least the next block of the first block is completed, it can be determined whether the first state data corresponding to the first block temporarily stored in the second sub-space corresponding to the target blockchain node in the target storage space is marked as the state data corresponding to the fork block. If the first state data is not marked as the state data corresponding to the fork block, the first state data can be submitted to the first sub-space in the target storage space.

[0116] Correspondingly, if the first state data is marked as the state data corresponding to the fork block, the first state data will not be submitted to the first sub-space in the target storage space, but will be retained in the second sub-space corresponding to the target blockchain node in the target storage space. In this way, it can be ensured that the state data on the Merkle state tree stored in the first sub-space in the target storage space is always the state data corresponding to the legal block.

[0117] More specifically, whether the error update of the Merkle state tree stored in the first subspace included in the target storage space based on the state data corresponding to the fork block occurs can be determined by comparing the root hash value corresponding to each blockchain node stored in the second subspace corresponding to each blockchain node included in the target storage space with the root hash value of the Merkle state tree stored in the first subspace included in the target storage space.

[0118] In an embodiment shown, for a blockchain node group in the blockchain system, the second subspace corresponding to each blockchain node included in the storage space of the storage service corresponding to the blockchain node group can also be used to temporarily store the state data corresponding to the last block of the blockchain node group.

[0119] In the case where the first state data is not added to the Merkle state tree stored in the first subspace included in the target storage space, before adding the first state data to the Merkle state tree stored in the first subspace included in the target storage space and updating the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node included in the target storage space to the root hash value of the updated Merkle state tree, it can be determined whether the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node included in the target storage space is consistent with the root hash value of the Merkle state tree stored in the first subspace included in the target storage space.

[0120] If the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node included in the target storage space is consistent with the root hash value of the Merkle state tree stored in the first subspace included in the target storage space, it indicates that there is no error update of the Merkle state tree. Therefore, the first state data can be added to the Merkle state tree stored in the first subspace included in the target storage space, and the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node included in the target storage space can be updated to the root hash value of the updated Merkle state tree.

[0121] However, if the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node contained in the target storage space is inconsistent with the root hash value of the Merkle state tree stored in the first subspace contained in the target storage space, it is highly likely that there is a misupdate of the Merkle state tree. In this case, the Merkle state tree stored in the first subspace contained in the target storage space can be rolled back (Rollback) processing, specifically, the state data corresponding to the last block of the first block can be deleted from the Merkle state tree stored in the first subspace contained in the target storage space, and the state data corresponding to the last block of the first block temporarily stored in the second subspace corresponding to the target blockchain node contained in the target storage space is added to the Merkle state tree stored in the first subspace contained in the target storage space, and the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node contained in the target storage space is updated to the root hash value of the updated Merkle state tree, and the first state data corresponding to the first block temporarily stored in the second subspace corresponding to the target blockchain node contained in the target storage space is added to the Merkle state tree stored in the first subspace contained in the target storage space, and further the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node contained in the target storage space is updated to the root hash value of the updated Merkle state tree.

[0122] For example, assuming that the first block is the Nth block, if the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node contained in the target storage space is inconsistent with the root hash value of the Merkle state tree stored in the first subspace contained in the target storage space, the state data corresponding to the N-1th block can be deleted from the Merkle state tree stored in the first subspace contained in the target storage space, and the state data corresponding to the N-1th block temporarily stored in the second subspace corresponding to the target blockchain node contained in the target storage space is added to the Merkle state tree stored in the first subspace contained in the target storage space, and the first state data corresponding to the Nth block temporarily stored in the second subspace corresponding to the target blockchain node contained in the target storage space is added to the Merkle state tree stored in the first subspace contained in the target storage space.

[0123] In the shown embodiment, in the case that the first state data has been added to the Merkle state tree stored in the first subspace contained in the target storage space, before the root hash value corresponding to the target blockchain node and stored in the second subspace corresponding to the target blockchain node and contained in the target storage space is updated to the root hash value of the Merkle state tree stored in the first subspace contained in the target storage space, it can be determined whether the first state data temporarily stored in the second subspace corresponding to the target blockchain node and contained in the target storage space is consistent with the first state data on the Merkle state tree stored in the first subspace contained in the target storage space.

[0124] If the first state data temporarily stored in the second subspace corresponding to the target blockchain node and contained in the target storage space is consistent with the first state data on the Merkle state tree stored in the first subspace contained in the target storage space, it indicates that there is no case of mis-update of the Merkle state tree. Therefore, the root hash value corresponding to the target blockchain node and stored in the second subspace corresponding to the target blockchain node and contained in the target storage space can be updated to the root hash value of the Merkle state tree stored in the first subspace contained in the target storage space.

[0125] If the first state data temporarily stored in the second subspace corresponding to the target blockchain node and contained in the target storage space is inconsistent with the first state data on the Merkle state tree stored in the first subspace contained in the target storage space, it indicates that there is a high possibility of mis-update of the Merkle state tree. In this case, the Merkle state tree stored in the first subspace contained in the target storage space can be rolled back, specifically, the first state data can be deleted from the Merkle state tree stored in the first subspace contained in the target storage space, and the first state data temporarily stored in the second subspace corresponding to the target blockchain node and contained in the target storage space can be added to the Merkle state tree stored in the first subspace contained in the target storage space, and the root hash value corresponding to the target blockchain node and stored in the target storage space is updated to the root hash value of the updated Merkle state tree.

[0126] For example, assuming that the first block is the Nth block, if the first state data temporarily stored in the second subspace corresponding to the target blockchain node included in the target storage space is inconsistent with the first state data on the Merkle state tree stored in the first subspace included in the target storage space, the state data corresponding to the Nth block can be deleted from the Merkle state tree stored in the first subspace included in the target storage space, and the first state data (i.e., the first state data corresponding to the Nth block) temporarily stored in the second subspace corresponding to the target blockchain node included in the target storage space can be added to the Merkle state tree stored in the first subspace included in the target storage space, and the root hash corresponding to the target blockchain node stored in the target storage space can be updated to the root hash of the updated Merkle state tree.

[0127] In an embodiment shown, after storing the state data to the storage space of the storage service deployed inside the blockchain node group, each blockchain node in the blockchain node group can also read the state data from the storage space.

[0128] Specifically, the target blockchain node can read the second block from the target storage space in response to a read request for state data (which can be referred to as second state data) corresponding to a certain block (which can be referred to as a second block).

[0129] Further, in an embodiment shown, when reading the second state data from the target storage space, the target blockchain node can first determine whether the second state data has been temporarily stored in the second subspace corresponding to the target blockchain node included in the target storage space.

[0130] If the second state data has been temporarily stored in the second subspace corresponding to the target blockchain node included in the target storage space, the target blockchain node can read the second state data temporarily stored in the second subspace corresponding to the target blockchain node included in the target storage space.

[0131] If the second state data is not stored in the second subspace corresponding to the target blockchain node in the target storage space, the second state data can be read from the Merkle state tree stored in the first subspace included in the target storage space. Specifically, it can be further determined whether the second state data has been stored in the Merkle state tree stored in the first subspace included in the target storage space. If the second state data has been stored in the Merkle state tree stored in the first subspace included in the target storage space, the second state data can be read from the Merkle state tree stored in the first subspace included in the target storage space. If the second state data has not been stored in the Merkle state tree stored in the first subspace included in the target storage space, a prompt message indicating that the reading fails can be returned.

[0132] The technical scheme provided in the present application can be used for state data storage in a blockchain system. The blockchain nodes participating in consensus in the blockchain system are divided into at least one blockchain node group, and a blockchain service platform corresponding to the blockchain system deploys a corresponding storage service for each blockchain node group. The storage space of the storage service is used to store blocks that have been processed by consensus in each blockchain node in the blockchain node group and indication information corresponding to each blockchain node in the blockchain node group. The indication information is used to indicate the latest block that has been processed by consensus in the blockchain node. When storing a block that has been processed by consensus in a certain blockchain node in the blockchain node group, the storage service corresponding to any blockchain node group in the blockchain system can first determine whether the block has been stored in the storage space of the storage service. If the block has not been stored in the storage space, the block and the indication information indicating that the block is the latest block that has been processed by consensus in the blockchain node can be stored in the storage space. If the block has been stored in the storage space, the indication information corresponding to the blockchain node stored in the storage space can be updated to the indication information indicating that the block is the latest block that has been processed by consensus in the blockchain node, and the block does not need to be stored in the storage space.

[0133] In this way, the state data in the blockchain system can be stored through the storage service corresponding to each blockchain node in the grouping deployment, and the deduplication processing of the state data stored in the storage space of each storage service is implemented, so that only one full state data needs to be stored in the storage space of each storage service, and one full state data no longer needs to be stored on each blockchain node participating in consensus. If the N blockchain nodes are divided into X (1≤X≤N) blockchain node groups, then only X full state data needs to be stored, and N full state data no longer needs to be stored, that is, the storage demand can be reduced to X / N of the original. In this way, the storage cost of the state data in the blockchain system can be reduced, and when a new node joins the blockchain system, only the root hash value set for the new node needs to be adjusted, so that the time consumption of the new node joining the blockchain system can be reduced, and the new node can be added to the blockchain system in seconds.

[0134] Corresponding to the foregoing embodiments of the state data storage method in the blockchain system, the present application also provides embodiments of a state data storage device in the blockchain system.

[0135] Reference is made to Figure 6 , Figure 6 is a structural schematic diagram of a device according to an example embodiment of the present application. At the hardware level, the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610, and of course can also include other required hardware. One or more embodiments of the present application can be implemented in a software manner, such as reading a corresponding computer program from the non-volatile memory 610 into the memory 608 by the processor 602 and then running. Of course, in addition to the software implementation, one or more embodiments of the present application do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic module, but can also be hardware or a logic device.

[0136] Reference is made to Figure 7 , Figure 7 is a block diagram of a state data storage device in a blockchain system according to an example embodiment of the present application.

[0137] The state data storage device in the blockchain system described above can be applied to a target storage service corresponding to a target blockchain node grouping in the blockchain system running on the device shown in Figure 6 to implement the technical solutions of the present application.

[0138] The blockchain nodes participating in consensus in the blockchain system are divided into at least one blockchain node group; a blockchain service platform corresponding to the blockchain system deploys a corresponding storage service for each blockchain node group; a storage space of the storage service is used to store a Merkle state tree organized by state data corresponding to blocks that have been passed through consensus processing by each blockchain node in the blockchain node group, and a root hash value corresponding to each blockchain node in the blockchain node group; the root hash value is a root hash value of the updated Merkle state tree obtained after the blockchain node corresponding thereto adds state data corresponding to the latest block that has passed through consensus processing to the Merkle state tree.

[0139] The apparatus comprises:

[0140] The acquisition unit 702 acquires a storage request for first state data corresponding to a first block sent by a target blockchain node in the target blockchain node group in response to passing through consensus processing of the first block;

[0141] The determination unit 704 determines whether the first state data has been added to the Merkle state tree stored in the target storage space of the target storage service in response to the storage request;

[0142] The storage unit 706 adds the first state data to the Merkle state tree stored in the target storage space and updates the root hash value corresponding to the target blockchain node stored in the target storage space to a root hash value of the updated Merkle state tree if the first state data has not been added to the Merkle state tree;

[0143] The update unit 708 updates the root hash value corresponding to the target blockchain node stored in the target storage space to a root hash value of the Merkle state tree stored in the target storage space if the first state data has been added to the Merkle state tree.

[0144] In an embodiment shown, the blockchain service platform is a BaaS platform; and the storage space is a cloud storage space.

[0145] In an embodiment shown, the storage space comprises a first sub-space for storing a Merkle state tree organized by state data, and a second sub-space corresponding to each blockchain node in the blockchain node group; and the second sub-space is used to store the root hash value corresponding to the each blockchain node;

[0146] adding the first state data to the Merkle state tree stored in the target storage space, and updating the root hash value corresponding to the target blockchain node stored in the target storage space to a root hash value of the updated Merkle state tree, comprises:

[0147] adding the first state data to the Merkle state tree stored in the target storage space, and updating the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node to a root hash value of the updated Merkle state tree;

[0148] updating the root hash value corresponding to the target blockchain node stored in the target storage space to a root hash value of the Merkle state tree stored in the target storage space, comprises:

[0149] updating the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node to a root hash value of the Merkle state tree stored in the target storage space.

[0150] In an embodiment shown, the second subspace corresponding to each blockchain node in the group of blockchain nodes contained in the storage space is further configured to temporarily store state data corresponding to the latest block that has passed consensus processing of each blockchain node;

[0151] adding the first state data to the Merkle state tree stored in the target storage space, comprises:

[0152] temporarily storing the first state data in the second subspace corresponding to the target blockchain node, and adding the first state data temporarily stored in the second subspace corresponding to the target blockchain node to the Merkle state tree stored in the first subspace after consensus processing of at least a next block of the first block by the target blockchain node.

[0153] In an embodiment shown, adding the first state data to the Merkle state tree stored in the target storage space, and updating the root hash value corresponding to the target blockchain node stored in the target storage space to a root hash value of the updated Merkle state tree, comprises:

[0154] determining whether the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node is consistent with the root hash value of the Merkle state tree stored in the first subspace;

[0155] If the two are consistent, the first state data is added to the Merkle state tree stored in the first subspace, and the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node is updated to the root hash value of the updated Merkle state tree.

[0156] In an embodiment shown, adding the first state data to the Merkle state tree stored in the target storage space, and updating the root hash value corresponding to the target blockchain node stored in the target storage space to the root hash value of the updated Merkle state tree further comprises:

[0157] If the two are inconsistent, the state data corresponding to the last block of the first block is deleted from the Merkle state tree stored in the first subspace, the state data corresponding to the last block of the first block temporarily stored in the second subspace corresponding to the target blockchain node, and the first state data are sequentially added to the Merkle state tree stored in the first subspace, and the root hash value corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node is updated to the root hash value of the updated Merkle state tree.

[0158] In an embodiment shown, updating the root hash value corresponding to the target blockchain node stored in the target storage space to the root hash value of the Merkle state tree stored in the target storage space comprises:

[0159] Determining whether the first state data temporarily stored in the second subspace corresponding to the target blockchain node is consistent with the first state data on the Merkle state tree stored in the first subspace;

[0160] If the two are consistent, the root hash value corresponding to the target blockchain node stored in the target storage space is updated to the root hash value of the Merkle state tree stored in the target storage space.

[0161] In an embodiment shown, updating the root hash value corresponding to the target blockchain node stored in the target storage space to the root hash value of the Merkle state tree stored in the target storage space further comprises:

[0162] If the two are inconsistent, the first state data stored in the Merkle state tree in the first subspace is deleted, and the first state data temporarily stored in the second subspace corresponding to the target blockchain node is added to the Merkle state tree stored in the first subspace, and the root hash value corresponding to the target blockchain node stored in the target storage space is updated to the root hash value of the updated Merkle state tree.

[0163] In an embodiment shown, the apparatus further comprises:

[0164] The reading unit reads the second state data from the target storage space in response to a reading request for the second state data corresponding to a second block sent by the target blockchain node.

[0165] In an embodiment shown, reading the second state data from the target storage space comprises:

[0166] Determining whether the second state data has been temporarily stored in the second subspace corresponding to the target blockchain node;

[0167] If the second state data has been temporarily stored, reading the second state data temporarily stored in the second subspace corresponding to the target blockchain node;

[0168] If the second state data has not been temporarily stored, reading the second state data from the Merkle state tree stored in the first subspace.

[0169] In the 1990s, it was relatively easy to distinguish whether an improvement in a technology was a hardware improvement (e.g., an improvement in the circuit structure of a diode, transistor, switch, etc.) or a software improvement (an improvement in a method flow). However, as technology has evolved, many improvements in method flows today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flows into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming the PLD, rather than by ordering a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented using "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.

[0170] The controller can be implemented in any suitable way, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. The skilled person will also appreciate that, in addition to implementing the controller in pure computer readable program code, it is possible to implement the controller in the form of logic gates, switches, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller, etc. to perform the same functions by logically programming the method steps. Such a controller can therefore be considered to be a hardware component, and the means included therein to perform the various functions can also be considered to be structures within the hardware component. Alternatively, or even additionally, the means to perform the various functions can be considered to be both a software module implementing the method and a structure within a hardware component.

[0171] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not rule out that with the development of future computer technologies, computers implementing the functions of the above embodiments can be personal computers, laptop computers, vehicle human-computer interaction devices, cellular phones, camera phones, smart phones, personal digital assistants, media players, navigation devices, email devices, game consoles, tablet computers, wearable devices, or combinations of any of these devices.

[0172] Although the one or more embodiments of the present application provide method operation steps as described in the embodiments or flowcharts, more or less operation steps can be included based on conventional or non-inventive means. The order of steps listed in the embodiments is only one of the many execution orders of the steps, and does not represent the only execution order. In actual device or terminal product execution, the method order shown in the embodiments or the drawings can be executed in sequence or in parallel (for example, in a parallel processor or multi-thread processing environment, or even in a distributed data processing environment). The terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, product or equipment. Without more limitations, it does not exclude the presence of other same or equivalent elements in the process, method, product or equipment including the elements. For example, if the first, second, etc. terms are used to represent names, they do not represent any particular order.

[0173] For the convenience of description, the above device is described as various modules described in function. Of course, when implementing one or more of the present application, the functions of each module can be implemented in the same or more software and / or hardware, or modules implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The above described device embodiments are only illustrative, for example, the division of the units is only a logical function division, and actual implementation can have another division method, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between devices or units, which can be electrical, mechanical or other forms.

[0174] The present application is described with reference to flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices produce a device for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The device for implementing the functions specified in one flow or multiple flows and / or blocks. Figure 1 The device for implementing the functions specified in one flow or multiple flows and / or blocks.

[0175] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.

[0176] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.

[0177] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0178] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.

[0179] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage, graphene storage, or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0180] As will be appreciated by one skilled in the art, aspects of the present application can be embodied as a method, system, or computer program product. Accordingly, aspects of the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, aspects of the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) having computer-usable program code embodied in the medium.

[0181] One or more embodiments of the application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. One or more embodiments of the application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.

[0182] Embodiments in the application are described with progressive manner, and the same or similar parts among the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, the system embodiments are described simply because they are basically similar to the method embodiments. In the description of the application, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the application. The illustrative description of the above terms in the application does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any suitable manner in one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the application and the features of the different embodiments or examples without contradiction.

[0183] The above descriptions merely illustrate one or more embodiments of the application and are not intended to limit the one or more embodiments of the application. The one or more embodiments of the application can have various changes and modifications for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the application shall be included in the scope of claims.

[0184] The user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are information and data authorized by the user or authorized by all parties, and the collection, use and processing of the related data need to comply with the relevant laws, regulations and standards of the country and region, and provide corresponding operation entrances for the user to choose authorization or refusal.

Claims

1. A method of storing state data in a blockchain system; wherein, The blockchain nodes participating in consensus in the blockchain system are divided into at least one blockchain node group; a blockchain service platform corresponding to the blockchain system deploys a corresponding storage service for each blockchain node group; a storage space of the storage service is used to store a Merkle state tree organized by state data corresponding to blocks that have been passed through consensus processing by each blockchain node in the blockchain node group, and a root hash value corresponding to each blockchain node in the blockchain node group; the root hash value is a root hash value of an updated Merkle state tree obtained after the blockchain node corresponding thereto adds state data corresponding to the latest block that has passed through consensus processing to the Merkle state tree; The method is applied to a target storage service corresponding to a target blockchain node group in the blockchain system, and includes: obtaining a storage request for first state data corresponding to a first block sent by a target blockchain node in the target blockchain node group in response to passing through consensus processing on the first block; in response to the storage request, determining whether the first state data has been added to the Merkle state tree stored in a target storage space of the target storage service; if the first state data has not been added to the Merkle state tree, adding the first state data to the Merkle state tree stored in the target storage space, and updating a root hash value corresponding to the target blockchain node stored in the target storage space to a root hash value of the updated Merkle state tree; if the first state data has been added to the Merkle state tree, updating the root hash value corresponding to the target blockchain node stored in the target storage space to a root hash value of the Merkle state tree stored in the target storage space.

2. The method of claim 1, wherein the blockchain service platform is a BaaS platform; and the storage space is a cloud storage space. 3.The method of claim 1, wherein the storage space comprises a first sub-space for storing a Merkle state tree organized by state data, and a second sub-space corresponding to each of the blockchain nodes in the group of blockchain nodes. The second sub-space is used to store the root hash value corresponding to the respective blockchain nodes; adding the first state data to the Merkle state tree stored in the target storage space, and updating the root hash value corresponding to the target blockchain node stored in the target storage space to a root hash value of the updated Merkle state tree, includes: adding the first state data to the Merkle state tree stored in the target storage space, and updating the root hash value corresponding to the target blockchain node stored in the second sub-space corresponding to the target blockchain node to a root hash value of the updated Merkle state tree; updating the root hash value corresponding to the target blockchain node stored in the target storage space to a root hash value of the Merkle state tree stored in the target storage space, includes: updating the root hash corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node as the root hash of the Merkle state tree stored in the target storage space. 4.The method of claim 3, wherein the storage space comprises the second subspace corresponding to each of the blockchain nodes in the group of blockchain nodes, and the second subspace corresponding to each of the blockchain nodes is further configured to temporarily store state data corresponding to the latest block that has passed the consensus processing of each of the blockchain nodes. adding the first state data to the Merkle state tree stored in the target storage space comprises: temporarily storing the first state data in the second subspace corresponding to the target blockchain node, and adding the first state data temporarily stored in the second subspace corresponding to the target blockchain node to the Merkle state tree stored in the first subspace after the consensus processing of at least the next block of the first block by the target blockchain node passes. 5.The method of claim 4, wherein adding the first state data to the Merkle state tree stored in the target storage space and updating the root hash corresponding to the target blockchain node stored in the target storage space as the root hash of the updated Merkle state tree comprises: determining whether the root hash corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node is consistent with the root hash of the Merkle state tree stored in the first subspace; if the two are consistent, adding the first state data to the Merkle state tree stored in the first subspace and updating the root hash corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node as the root hash of the updated Merkle state tree. 6.The method of claim 5, further comprising: if the two are inconsistent, deleting the state data corresponding to the last block of the first block from the Merkle state tree stored in the first subspace, adding the state data corresponding to the last block of the first block temporarily stored in the second subspace corresponding to the target blockchain node and the first state data to the Merkle state tree stored in the first subspace in turn, and updating the root hash corresponding to the target blockchain node stored in the second subspace corresponding to the target blockchain node as the root hash of the updated Merkle state tree. 7.The method of claim 4, wherein updating the root hash corresponding to the target blockchain node stored in the target storage space as the root hash of the Merkle state tree stored in the target storage space comprises: determining whether the first state data temporarily stored in the second subspace corresponding to the target blockchain node is consistent with the first state data stored in the Merkle state tree in the first subspace; if consistent, updating the root hash value corresponding to the target blockchain node stored in the target storage space as the root hash value of the Merkle state tree stored in the target storage space.

8. The method of claim 7, further comprising: if inconsistent, deleting the first state data from the Merkle state tree stored in the first subspace, adding the first state data temporarily stored in the second subspace corresponding to the target blockchain node to the Merkle state tree stored in the first subspace, and updating the root hash value corresponding to the target blockchain node stored in the target storage space as the root hash value of the updated Merkle state tree.

9. The method of claim 3, further comprising: in response to a read request for second state data corresponding to a second block sent by the target blockchain node, reading the second state data from the target storage space.

10. The method of claim 9, reading the second state data from the target storage space, comprising: determining whether the second state data has been temporarily stored in the second subspace corresponding to the target blockchain node; if the second state data has been temporarily stored, reading the second state data temporarily stored in the second subspace corresponding to the target blockchain node; if the second state data has not been temporarily stored, reading the second state data from the Merkle state tree stored in the first subspace.

11. A state data storage apparatus in a blockchain system; wherein, The blockchain nodes participating in consensus in the blockchain system are divided into at least one blockchain node group; the blockchain service platform corresponding to the blockchain system deploys a corresponding storage service for each blockchain node group; the storage space of the storage service is used to store a Merkle state tree organized by state data corresponding to blocks that have been consensus-processed by each blockchain node in the blockchain node group, and a root hash value corresponding to each blockchain node in the blockchain node group; the root hash value is the root hash value of the updated Merkle state tree obtained after the blockchain node corresponding thereto adds state data corresponding to the latest block that has been consensus-processed to the Merkle state tree; The device is applied to a target storage service corresponding to a target blockchain node group in the blockchain system, comprising: an obtaining unit that obtains a storage request for first state data corresponding to a first block sent by a target blockchain node in the target blockchain node group in response to consensus processing of the first block; A determining unit, in response to the storage request, determines whether the first state data has been added to the Merkle state tree stored in the target storage space of the target storage service; A storing unit, if the first state data has not been added to the Merkle state tree, adds the first state data to the Merkle state tree stored in the target storage space, and updates a root hash value corresponding to the target blockchain node and stored in the target storage space to a root hash value of the updated Merkle state tree; An updating unit, if the first state data has been added to the Merkle state tree, updates the root hash value corresponding to the target blockchain node and stored in the target storage space to the root hash value of the Merkle state tree stored in the target storage space.

12. An electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor, by running the executable instructions, implements the method of any one of claims 1 to 10.

13. A computer-readable storage medium having stored thereon computer instructions, which, when executed by a processor, implement the method of any one of claims 1 to 10.

Citation Information

Patent Citations

  • Shared blockchain data storage

    CN111448781A

  • Block chain state storage method, block chain state verification method and block chain node

    CN116049170A