Shared blockchain data storage

By communicating the consensus node with external trusted nodes in the blockchain network, storing and retrieving the historical status information of the blockchain, the problem of storage resource occupation in the blockchain network is solved, and efficient storage space utilization and data are achieved. reliability.

CN111837115BActive Publication Date: 2024-09-10ANTCHAIN TECHNOLOGY PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980004379.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-11
Publication Date
2024-09-10
Estimated Expiration
2039-07-11

AI Technical Summary

Technical Problem

In a blockchain network, as transactions increase, the size of status data and block data becomes very large, causing storage to occupy a large amount of space. It is difficult for existing technology to effectively save storage resources without affecting processing efficiency.

Method used

By communicating between the consensus node in the blockchain network and external trusted nodes, the consensus node sends the current state information to the trusted node and stores the historical state information as a historical state tree. The consensus node can be retrieved by hash value and verify account status, thus saving storage resources without storing the entire historical status tree.

Benefits of technology

It achieves saving the storage resources of blockchain nodes without significantly reducing computing efficiency, improves storage space usage, and ensures data reliability and security by tolerating a certain number of failed consensus nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111837115B
    Figure CN111837115B
Patent Text Reader

Abstract

Disclosed herein are methods, systems, and devices for communicating and sharing blockchain data, including computer programs encoded on computer storage media. One of the methods includes: a consensus node in a blockchain network sends current state information associated with a current block of the blockchain to a trusted node with authorization proof outside the blockchain network; sends a hash value to the trusted node to retrieve an account state stored in a historical state tree; receives the account state in a response to sending the hash value; and verifies whether the account state is part of the blockchain based on the hash value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article deals with shared storage of blockchain data. Background Art

[0002] A distributed ledger system (DLS), which may also be referred to as a consensus network and / or a blockchain network, enables participating entities to store data securely and immutably. Without reference to any specific use case, a DLS is often referred to as a blockchain network. Examples of types of blockchain networks may include public blockchain networks, private blockchain networks, and consortium blockchain networks. A consortium blockchain network is provided for a selected group of entities, which control the consensus process and include an access control layer.

[0003] Blockchain-based programs can be executed by distributed computing platforms such as Ethereum. For example, the Ethereum Virtual Machine (EVM) provides a runtime environment for smart contracts in Ethereum. The Ethereum blockchain can be viewed as a transaction-based state machine. The state data in Ethereum can be aggregated into a global shared state called the world state. The world state includes a mapping between Ethereum account addresses and account states. The world state can be stored in a data structure such as a Merkle Patricia tree (MPT).

[0004] In addition to state data, a blockchain network can also store other types of data, such as block data and index data. Block data can include a block header and a block body. A block header can include identity information for a specific block, and a block body can include transactions confirmed with that block. As more and more transactions enter the blockchain, the size of the state data and block data can become very large. In some DLSs, each node stores a copy of the entire blockchain, which takes up a lot of storage space, even if some old block data or state data is not frequently accessed.

[0005] Therefore, it is desirable to reduce the amount of data stored on at least some nodes in a DLS to save storage costs without significantly affecting processing efficiency. Summary of the invention

[0006] Techniques for communicating and sharing blockchain data are described herein. These techniques generally involve: a consensus node in a blockchain network sending current state information associated with a current block of the blockchain to a trusted node with authorization proof outside the blockchain network, wherein the consensus node stores the current state information, the trusted node stores historical state information associated with each block of the blockchain as a historical state tree, the historical state tree including a key-value pair (KVP) whose value is an account state of an account associated with the blockchain network and whose key is a hash value corresponding to the account state; the consensus node sending a hash value to the trusted node to retrieve the account state stored in the historical state tree; the consensus node receiving the account state in a response to sending the hash value; and the consensus node verifying that the account state is part of the blockchain based on the hash value.

[0007] Also provided herein is one or more non-transitory computer-readable storage media coupled to one or more processors and having instructions stored thereon, which, when executed by the one or more processors, cause the one or more processors to operate in accordance with an embodiment of the method provided herein.

[0008] The present invention also provides a system for implementing the method provided herein. The system includes one or more processors and a computer-readable storage medium coupled to the one or more processors and having instructions stored thereon, and when the instructions are executed by the one or more processors, the instructions cause the one or more processors to perform operations according to the embodiments of the method provided herein.

[0009] It should be understood that the method according to this article may include any combination of aspects and features described herein. That is, the method according to this article is not limited to the combination of aspects and features specifically described herein, but also includes any combination of aspects and features provided.

[0010] The details of one or more embodiments of the present invention are set forth in the accompanying drawings and the description below. Other features and advantages of the present invention will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 An example of an environment that can be used to perform embodiments herein is depicted.

[0012] Figure 2 An example of an architecture according to embodiments herein is depicted.

[0013] Figure 3 Depicted is an example of a fixed-depth Merkle tree (FDMT) data structure according to embodiments herein.

[0014] Figure 4 An example of a database for storing blockchain data according to embodiments herein is depicted.

[0015] Figure 5 Depicted is an example of a blockchain network using shared storage according to embodiments herein.

[0016] Figure 6 Depicted is another example of a blockchain network using shared storage according to embodiments herein.

[0017] Figure 7 Yet another example of a blockchain network using shared storage according to embodiments herein is depicted.

[0018] Figure 8 Depicted are examples of processes that may be performed according to embodiments herein.

[0019] Fig. 9 Examples of modules of an apparatus according to embodiments herein are depicted.

[0020] Like reference numbers and designations in the various drawings indicate like elements. DETAILED DESCRIPTION

[0021] Techniques for communicating and sharing blockchain data are described herein. These techniques generally involve: a consensus node in a blockchain network sending current state information associated with a current block of a blockchain to a trusted node external to the blockchain network with proof of authorization, wherein the consensus node stores the current state information, the trusted node stores historical state information associated with each block of the blockchain as a historical state tree, the historical state tree including a key-value pair (KVP) whose value is an account state of an account associated with the blockchain network and whose key is a hash value corresponding to the account state; the consensus node sending a hash value to the trusted node to retrieve the account state stored in the historical state tree; the consensus node receiving the account state in a response to sending the hash value; and the consensus node verifying that the account state is part of the blockchain based on the hash value.

[0022] The technology described herein produces several technical effects. For example, embodiments of the subject matter can allow for saving storage resources of blockchain nodes without significantly reducing computing efficiency. Since most of the data in the historical state tree is "cold" data that is not frequently used, by only storing the "cold" data in the shared storage node, the storage space utilization rate across the blockchain network can be significantly improved. If the shared storage node is a POA node or is elected by voting based on the PBFT consensus, the historical state tree only needs to be stored in the shared storage node, and does not have to be stored on each blockchain node. If the shared storage node is a part of the blockchain consensus node without POA, then for a blockchain network with N consensus nodes, where N is equal to 3f+1, 3f+2 or 3f+3, f is the maximum number of faulty consensus nodes, (Nf-1) / N blockchain consensus nodes only need to store "hot" data as the current state tree, without storing both "cold" and "hot" data as historical state trees.

[0023] In addition, for a blockchain network of N consensus nodes that uses f+1 nodes as shared storage nodes to store the historical state tree, at most f faulty consensus nodes can be tolerated. In other words, saving storage space does not compromise data reliability. By tolerating f faulty consensus nodes and saving a copy of the entire blockchain only on f+1 nodes, consensus nodes in the blockchain network can be properly served. Since f+1 shared storage nodes ensure the reliability of the system, data security can be improved and is relatively independent of the security level of the underlying service platform.

[0024] To provide further context for the embodiments herein, and as described above, a distributed ledger system (DLS), also referred to as a consensus network (e.g., composed of peer-to-peer nodes) and a blockchain network, enables participating entities to conduct transactions and store data securely and immutably. Although the term "blockchain" is often associated with a specific network and / or use case, "blockchain" is used herein to refer generally to a DLS without reference to any specific use case.

[0025] Blockchain is a data structure that stores transactions in a way that transactions cannot be tampered with. Therefore, transactions recorded on the blockchain are reliable and trustworthy. Blockchain includes one or more blocks. Each block in the chain is linked to the previous block by including the encrypted hash value of the previous block immediately before it in the chain. Each block also includes a timestamp, its own encrypted hash value, and one or more transactions. Transactions that have been verified by blockchain network nodes are hashed and compiled into a Merkle tree. A Merkle tree is a data structure in which the data at the leaf nodes of the tree are hashed, and all hash values ​​in each branch of the tree are concatenated at the root of the branch. The process continues along the tree until the root of the entire tree, and a hash value representing all the data in the tree is stored at the root of the entire tree. By determining whether the hash value is consistent with the structure of the tree, it is possible to quickly verify whether the hash value is the hash value of the transaction stored in the tree.

[0026] A blockchain is a decentralized or at least partially decentralized data structure for storing transactions, and a blockchain network is a network of computing nodes that manage, update, and maintain one or more blockchains by broadcasting, verifying, and confirming transactions. As described above, a blockchain network may be provided as a public blockchain network, a private blockchain network, or a consortium blockchain network. The embodiments of the present invention are described in more detail herein with reference to a consortium blockchain network. However, it is contemplated that the embodiments of the present invention may be implemented in any suitable type of blockchain network.

[0027] Typically, consortium blockchain networks are private among participating entities. In a consortium blockchain network, the consensus process is controlled by an authorized set of nodes, which may be referred to as consensus nodes, and one or more consensus nodes are operated by the corresponding entity (e.g., financial institution, insurance company). For example, a consortium consisting of 10 entities (e.g., financial institutions, insurance companies) can operate a consortium blockchain network, with each entity operating at least one node in the consortium blockchain network.

[0028] In some examples, within a consortium blockchain network, a global blockchain is provided as a blockchain replicated across all nodes. That is, all consensus nodes are in full state consensus relative to the global blockchain. In order to reach consensus (e.g., agree to add a block to the blockchain), a consensus protocol is implemented within the consortium blockchain network. For example, the consortium blockchain network can implement a Practical Byzantine Fault Tolerance (PBFT) consensus, which is described in further detail below.

[0029] Figure 1A diagram depicting an example of an environment 100 that can be used to perform embodiments of the present invention is depicted. In some examples, the environment 100 enables entities to participate in a consortium blockchain network 102. The environment 100 includes computing systems 106, 108 and a network 110. In some examples, the network 110 includes a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and connects websites, user devices (e.g., computing devices), and backend systems. In some examples, the network 110 can be accessed through a wired and / or wireless communication link. In some examples, the network 110 enables communication with or within the consortium blockchain network 102. In general, the network 110 represents one or more communication networks. In some cases, the computing systems 106, 108 can be nodes of a cloud computing system (not shown), or each computing system 106, 108 can be a separate cloud computing system that includes multiple computers interconnected by a network and used as a distributed processing system.

[0030] In the depicted example, computing devices 106, 108 may each include any suitable computing device capable of participating as a node in consortium blockchain network 102. Examples of computing devices include, but are not limited to, servers, desktop computers, laptop computers, tablet computing devices, and smart phones. In some examples, computing devices 106, 108 host one or more computer-implemented services for interacting with consortium blockchain network 102. For example, computing device 106 may host a computer-implemented service, such as a transaction management system, for a first entity (e.g., user A), for example, the first entity uses the transaction management system to manage its transactions with one or more other entities (e.g., other users). Computing device 108 may host a computer-implemented service, such as a transaction management system, for a second entity (e.g., user B), for example, the second entity uses the transaction management system to manage its transactions with one or more other entities (e.g., other users). Figure 1 In the example of FIG. 1 , the consortium blockchain network 102 is shown as a peer-to-peer network of nodes, and computing devices 106 and 108 provide nodes of a first entity and a second entity participating in the consortium blockchain network 102 , respectively.

[0031] Figure 2An example of an architecture 200 according to an embodiment of the present invention is depicted. The exemplary conceptual architecture 200 includes participant systems 202, 204, 206 corresponding to participant A, participant B, and participant C, respectively. Each participant (e.g., user, enterprise) participates in a blockchain network 212 provided as a peer-to-peer network, the peer-to-peer network including a plurality of nodes 214, at least some of which record information in an unalterable manner in a blockchain 216. As further detailed herein, although a single blockchain 216 is schematically depicted in the blockchain network 212, multiple copies of the blockchain 216 are provided and maintained on the blockchain network 212.

[0032] In the depicted example, each participant system 202, 204, 206 is provided by or on behalf of participant A, participant B, and participant C, respectively, and functions as a respective node 214 in the blockchain network. As used herein, a "node" generally refers to a single system (e.g., a computer, a server) that is connected to the blockchain network 212 and enables the corresponding participant to participate in the blockchain network. Figure 2 In the example of , a participant corresponds to each node 214. However, it is contemplated that one participant may operate multiple nodes 214 within the blockchain network 212, and / or multiple participants may share a node 214. In some examples, the participant systems 202, 204, 206 communicate with or through the blockchain network 212 using a protocol (e.g., Hypertext Transfer Protocol Secure (HTTPS)) and / or using remote procedure calls (RPCs).

[0033] Nodes 214 may have different levels of participation within blockchain network 212. For example, some nodes 214 may participate in the consensus process (e.g., as miner nodes that add blocks to blockchain 216), while other nodes 214 do not participate in this consensus process. As another example, some nodes 214 store a complete copy of blockchain 216, while other nodes 214 store only a copy of a portion of blockchain 216. For example, data access privileges may limit the blockchain data that a corresponding participant stores within their corresponding system. Figure 2 In the example of FIG. 2 , participant systems 202 , 204 , 206 store complete copies 216 ′, 216 ″, 216 ′″ of blockchain 216 , respectively.

[0034] Blockchain (e.g. Figure 2The blockchain 216 includes a chain of blocks, each of which stores data. Examples of data include transaction data representing a transaction between two or more participants. Although "transaction" is used herein by way of non-limiting example, it is contemplated that any suitable data (e.g., documents, images, videos, audio) may be stored in the blockchain. Examples of transactions may include, but are not limited to, exchanging valuables (e.g., assets, products, services, currency). Transaction data is stored in an unalterable manner in the blockchain. That is, the transaction data cannot be changed.

[0035] Before storing the transaction data in the block, the transaction data is hashed. Hashing is the process of converting the transaction data (provided as string data) into a fixed-length hash value (also provided as string data). The hash value cannot be de-hashed to obtain the transaction data. Hashing ensures that even a slight change in the transaction data will result in a completely different hash value. In addition, as mentioned above, the hash value has a fixed length. That is, regardless of the size of the transaction data, the length of the hash value is fixed. Hashing includes processing the transaction data through a hash function to generate a hash value. Examples of hash functions include, but are not limited to, the Secure Hash Algorithm (SHA)-256 that outputs a 256-bit hash value.

[0036] The transaction data of multiple transactions are hashed and stored in a block. For example, the hashes of two transactions are provided and they themselves are hashed to provide another hash. This process is repeated until a single hash is provided for all transactions to be stored in a block. This hash is called the Merkle root hash and is stored in the header of the block. Any change to a transaction will cause its hash to change and ultimately cause the Merkle root hash to change.

[0037] Blocks are added to the blockchain through a consensus protocol. Multiple nodes in the blockchain network participate in the consensus protocol and perform the work of adding blocks to the blockchain. Such nodes are called consensus nodes. The PBFT introduced above is used as a non-limiting example of a consensus protocol. Consensus nodes execute the consensus protocol to add transactions to the blockchain and update the overall state of the blockchain network.

[0038] In more detail, the consensus node generates a block header, hashes all transactions in the block, and combines the hashes in pairs to generate further hashes until a single hash (Merkle root hash) is provided for all transactions in the block. This hash is added to the block header. The consensus node also determines the hash of the most recent block in the blockchain (i.e., the last block added to the blockchain). The consensus node also adds a random number (nonce) value and a timestamp to the block header.

[0039] In general, PBFT provides practical Byzantine state machine replication that tolerates Byzantine faults (e.g., faulty nodes, malicious nodes). This is achieved in PBFT by assuming that failures will occur (e.g., assuming that there are independent node failures and / or manipulated messages sent by consensus nodes). In PBFT, consensus nodes are provided in a sequence that includes a primary consensus node and a backup consensus node. The primary consensus node is changed periodically. Transactions are added to the blockchain by reaching a consensus on the global state of the blockchain network by all consensus nodes within the blockchain network. In this process, messages are transmitted between consensus nodes, and each consensus node proves that the message is received from a designated peer node and verifies that the message has not been tampered with during transmission.

[0040] In PBFT, the consensus protocol is provided in multiple stages with all consensus nodes starting from the same state. First, the client sends a request to the primary consensus node to invoke a service operation (e.g., execute a transaction within the blockchain network). In response to receiving the request, the primary consensus node multicasts the request to the backup consensus nodes. The backup consensus nodes execute the request and each sends a reply to the client. The client waits until a threshold number of replies are received. In some examples, the client waits to receive f+1 replies, where f is the maximum number of faulty consensus nodes that can be tolerated within the blockchain network. The end result is that a sufficient number of consensus nodes agree on the order in which records are added to the blockchain, and the record is accepted or rejected.

[0041] In some blockchain networks, cryptography is implemented to maintain the privacy of transactions. For example, if two nodes want to keep a transaction private so that other nodes in the blockchain network cannot see the details of the transaction, the two nodes can encrypt the transaction data. Examples of encryption include, but are not limited to, symmetric encryption and asymmetric encryption. Symmetric encryption refers to encryption that uses a single key to both encrypt (generate ciphertext from plaintext) and decrypt (generate plaintext from ciphertext). In symmetric encryption, the same key can be used for multiple nodes so that each node can encrypt / decrypt transaction data.

[0042] Asymmetric encryption uses key pairs, each of which consists of a private key and a public key, where the private key is known only to the corresponding node and the public key is known to any or all other nodes in the blockchain network. A node can encrypt data using the public key of another node, and the encrypted data can be decrypted using the private key of the other node. For example, referring again to Figure 2 , participant A uses participant B's public key to encrypt data and sends the encrypted data to participant B. Participant B can use its private key to decrypt the encrypted data (ciphertext) and extract the original data (plaintext). Messages encrypted using a node's public key can only be decrypted using the node's private key.

[0043] Asymmetric encryption is used to provide digital signatures, which enables participants in a transaction to confirm the other participants in the transaction and the validity of the transaction. For example, a node can digitally sign a message, and another node can confirm that the message was sent by the node based on the digital signature of participant A. Digital signatures can also be used to ensure that the message has not been tampered with during transmission. For example, again referring to Figure 2 , participant A sends a message to participant B. Participant A generates a hash value of the message and then encrypts the hash value using its private key to provide a digital signature that is an encrypted hash value. Participant A appends the digital signature to the message and sends the message with the digital signature to participant B. Participant B decrypts the digital signature using participant A's public key and extracts the hash value. Participant B hashes the message and compares the hash values. If the hash values ​​are the same, participant B can confirm that the message is indeed from participant A and has not been tampered with.

[0044] As mentioned earlier, a blockchain network can store different types of data, such as state data, block data, and index data. State data is usually stored as a content-addressed state tree (such as MPT or FDMT). The content-addressed state tree is incremental in nature. That is, changes in account status are reflected by adding a new tree structure instead of updating the existing state tree. Therefore, when blocks are continuously added to the blockchain, the size of the content-addressed state tree can become very large. On the other hand, most of the data in the tree is historical state data that is not frequently used. Storing this historical state data in each blockchain node may be inefficient in terms of the use of storage resources.

[0045] Under the FDMT storage scheme, the state data can be divided into the current state data associated with the current block and the historical state data associated with all blocks of the blockchain. In order to save storage resources without substantially affecting computing efficiency, the historical state data can be stored in one or more trusted storage locations or one or more shared storage nodes elected by voting. Access to the historical state data can then be shared by other nodes of the blockchain network.

[0046] In addition to sharing historical state data, block data can also be shared. Instead of storing every transaction and block generated on the blockchain, regular consensus nodes can store block headers instead of entire blocks. When a blockchain transaction needs to be verified, the consensus node can query the shared storage node that stores the complete block. Since the consensus node stores the current state data associated with the current block, such data can be used to execute smart contracts. Therefore, by sharing historical state data and block data, the storage consumption of the blockchain network can be reduced without significantly reducing the efficiency of transaction processing.

[0047] Figure 3 An example of an FDMT data structure 300 according to an embodiment of the present invention is depicted. Under the FDMT, account states can be stored as key-value pairs (KVPs) in the structure of a historical state tree 302 and a current state tree 304. The key corresponds to an address that uniquely identifies a blockchain account. The historical state tree 302 can include a complete copy of the available state information of the blockchain. The current state tree 304 can include the state information of the current block. Therefore, the size of the current state tree 304 can be significantly smaller than the size of the historical state tree 302.

[0048] In some embodiments, current state tree 304 may be a location-addressed state tree. For a location-addressed state tree, the node value of current state tree 304 may be retrieved based on a key that uniquely identifies the node (i.e., a node ID). When a new node is added to current state tree 304, the node value may be associated with its unique node ID (e.g., ID 1-1, ID 2-1, etc. of current state tree 304), regardless of its content. In some cases, the KVP of current state tree 304 may be represented as<node ID,node value> In some cases, the key in the KVP may further include the corresponding block ID of the node value. In this case, the node ID may serve as a prefix of the key, and the block ID may serve as a suffix of the key. The KVP of the current state tree 304 may then be represented as<node ID+block ID,node value> .

[0049] In some embodiments, the history state tree 302 may be a content-addressed state tree. For a content-addressed state tree, each account value may have a content address that is uniquely associated with the value of the information content itself. In order to retrieve information from the history state tree 302, a content identification may be provided from which the location of the account value may be determined and retrieved. Similar to the MPT, each node of the history state tree 302 may include a hash value of a pointer to the next node of the tree (e.g., Hash1, Hash2, and Hash3 under the history state tree 302). Along the path of the pointer, the last element stores the hash value of the end portion of the key (e.g., Hash4, Hash5, Hash6, and Hash7 under the history state tree 302) and the values ​​paired with those keys. The KVP of the history state tree 302 may be represented as<hash(node value),node value> .

[0050] Since the node address of the content-addressed tree depends on the node value, new state information can be added to the history state tree 302 as an additional tree structure instead of changing the existing tree, thereby preserving the tree structure and improving data storage / retrieval efficiency.

[0051] Figure 4An example of a database 400 for storing blockchain data according to an embodiment of the present invention is depicted. Database 400 may be a key-value database such as LevelDB or RocksDB. Database 400 may store data under an FDMT data structure, which includes a historical database 410 for storing a historical state tree and a current database 412 for storing a current state tree. Figure 4 , block i-2 402, block i-1 404, and block i 406 are previously completed blocks. Block i+1 408 is the current block. Each block may have a block header and a block body. The block header may include information such as a root hash value of the world state. The root hash value may be used as a secure and unique identifier of the state tree. In other words, the root hash value may be cryptographically dependent on the account state. The block body may include confirmed transactions for the corresponding block.

[0052] The historical database 410 may store a historical state tree. The current database 412 may store a current state tree. The historical state tree may store historical account states, and the current state tree may store current account states. Ethereum blockchain accounts may include externally owned accounts and contract accounts. Externally owned accounts may be controlled by private keys and are not associated with any code for executing smart contracts. Contract accounts may be controlled by their contract code associated with the code for executing smart contracts.

[0053] The state of an Ethereum account may include four components: a random value, a balance, a code hash value, and a storage root. If the account is an externally owned account, the random number may represent the number of transactions sent from the account address. The balance may represent the digital assets owned by the account. The code hash value may be a hash value of an empty string. The storage root may be empty. If the account is a contract account, the random number may represent the number of contracts created by the account. The balance may represent the digital assets owned by the account. The code hash value may be a hash value of the virtual machine code associated with the account. The storage root may store a root hash value associated with a storage tree. The storage tree may store contract data by encoding a hash value of the storage contents of the account.

[0054] The historical state tree may include a complete copy of the blockchain account state starting from the genesis block and may be updated based on transaction execution. For example, the root hash value stored in the previous block i-1 404 is the root hash value of the world state at the time block i-1 404 was completed. The world state is associated with all transactions stored in block i-1 404 and in the blocks before block i-1 404. Similarly, the root hash value stored in the current block i+1 408 is the root hash value of the world state associated with all transactions stored in the blocks before block i+1 408.

[0055] The current state tree may include state information that is updated or added due to transactions newly added to the current block i+1 408. Figure 3 As discussed in the description of , the history state tree can store state information as content-addressable<hash(node value),node value> In some embodiments, the current state tree can be location-addressed based on one or more location-related IDs. For example, the current state tree can store state information as represented by<node ID,node value> A KVP in which a node value can be addressed based on its corresponding node ID. As another example, a key in a KVP can be a combination of a node ID and a block ID corresponding to the node value. The node ID can be used as a prefix of the key and the block ID can be used as a suffix of the key for traversing the values ​​of an FDMT or MPT.

[0056] Figure 5 An example of a blockchain network 500 using shared storage according to an embodiment of the present invention is depicted. At a high level, the blockchain network 500 includes a plurality of consensus nodes 506, 508, 510, and 512, a shared storage node 502, and a cloud storage device 504 communicatively coupled to the shared storage node 502. The shared storage node 502 may be a node with a proof of authority (POA). In some cases, the POA may be provided based on the state of the shared storage node 502. For example, the shared storage node 502 may be a node managed by a deployer of the blockchain network 500. In this case, the shared storage node 502 may be part of the blockchain network 500 or outside the blockchain network 500. In some cases, the POA may be obtained by voting. For example, assuming that the blockchain network includes 3f+1 nodes (in Figure 5 In the example shown, f=1, when the shared storage node 502 participates in the consensus of the blockchain network 500), the maximum number of faulty consensus nodes or Byzantine nodes (nodes that fail or behave maliciously) that can be tolerated is f. Thus, if 2f+1 nodes vote (endorsed by their respective digital signatures) to elect the shared storage node 502, then 2f+1 votes can be used as a POA to trust the shared storage node 502.

[0057] As in Figure 4As described in the discussion of , under the FDMT data structure, the current state data can be separated from the historical state data. The current state data can be stored as a current state tree, which includes state information associated with the current block, such as state data updated or added according to transactions newly added to the current block. In an Ethereum-type system, the state information associated with the current block can be regarded as "hot" data that is frequently retrieved by the virtual machine to execute smart contracts. Historical state data can be stored as a historical state tree, which can include a complete copy of the account state of the blockchain starting from the genesis block. The state information associated with previous blocks stored in the historical state tree can be regarded as "cold" data, which is less frequently accessed to execute smart contracts.

[0058] The data in the content-addressed state tree (e.g., MPT or historical state tree) is incremental in nature. That is, changes in account status due to the addition of new blocks do not change the existing historical state tree, but are reflected by adding a new tree structure to the historical state tree. Therefore, the size of the historical state tree may become very large due to the generation of new blocks. Since most of the data in the historical state tree is "cold" data that is not frequently used, storing this data in each blockchain node may be inefficient in terms of storage resource usage.

[0059] In order to save storage resources without significantly reducing computing efficiency, the historical state tree can be stored in a historical database (such as Figure 4 ), or in a cloud storage device 504 communicatively coupled to the shared storage node 502. In some embodiments, the shared storage node 502 may share access to the historical state tree with consensus nodes 506, 508, 510, and 512. The cloud storage device 504 may be a storage device that provides storage services on the cloud, such as a network attached storage (NAS) or an object storage service (OSS).

[0060] In some embodiments, when a transaction is processed into the current block, the state data associated with the transaction may be sent by one or more of the consensus nodes 506, 508, 510, and 512 to the shared storage node 502 for storage. In some embodiments, one or more of the consensus nodes 506, 508, 510, and 512 may send the state data and the hash value of the state data as a KVP to the shared storage node 502. After receiving the state data or KVP, the shared storage node 502 may verify whether the received state data or KVP has been stored locally or in the cloud storage device 504. If so, the shared storage node 502 may reject or abandon the received state data. Otherwise, the shared storage node 502 may calculate the hash value of the state data or verify that the received hash value is the hash value of the state data, and store the hash value and the state data in the historical state tree.

[0061] In some embodiments, the shared storage node 502 can verify whether the state data is valid state data of the blockchain. The shared storage node 502 can calculate a hash value of the received state data. As previously described, the shared storage node 502 can store a historical state tree that is content-addressed and includes a complete copy of the state information of the blockchain. The calculated hash value can then be used to verify whether the state data is part of the blockchain based on the world state root hash value of the blockchain (e.g., using a Merkle proof). If the hash value is verified to be part of the blockchain, the state data can be determined as content-addressed data.

[0062] When any one of the consensus nodes 506, 508, 510, and 512 needs to retrieve state data from the shared storage node 502, the corresponding hash value can be sent to the shared storage node 502. Since the historical state tree stored in the shared storage node 502 is content-addressed, the hash value can be used as a key to address the corresponding state data that generates the hash value. After identifying the corresponding state data based on the hash value, the shared storage node 502 can send the identified state data back to the consensus node. The consensus node receiving the state data can hash the received state data to verify whether the state data is content-addressed. If so, the state data can be determined to be true. Otherwise, the state data is not true. If the state data is not true, the consensus node can choose to report the shared storage node 502 as a faulty node (or Byzantine node). If there are other nodes storing the historical state tree in the blockchain network 500, the consensus node can send the hash value to one or more other nodes to retrieve the corresponding state data.

[0063] Figure 6Another example of a blockchain network 600 using shared storage according to embodiments of the present invention is depicted. At a high level, the blockchain network 600 includes a plurality of consensus nodes 606, 608, 610, and 612, a plurality of shared storage nodes 602 and 604, and a cloud storage device 614 communicatively coupled to one or more of the plurality of shared storage nodes 602 and 604. In some cases, the shared storage nodes 602 and 604 may be nodes with POAs, such as nodes managed by a deployer of the blockchain network 600. In this case, the shared storage nodes 602 and 604 may be part of the blockchain network 600 or outside the blockchain network 600. In some cases, POAs may be obtained through voting. For example, assuming that the blockchain network includes 3f+1 nodes (in Figure 6 In the example shown, f=1 (when neither shared storage node 602 nor 604 participates in the consensus of blockchain network 600), 3f+2 nodes (when one of shared storage nodes 602 and 604 participates in the consensus of blockchain network 600), or 3f+3 nodes (when both shared storage nodes 602 and 604 participate in the consensus of the blockchain network), where f is the maximum number of Byzantine nodes. If 2f+1 nodes vote (endorsed by their respective digital signatures) to elect a consensus node as a shared storage node, then the 2f+1 votes can be used as a POA for trusting the shared storage node.

[0064] As described above, in order to save storage resources without significantly reducing computing efficiency, the historical state tree can be stored in a historical database (such as Figure 4 ), or in a cloud storage device 614 communicatively coupled to shared storage nodes 602 and 604. Shared storage nodes 602 and 604 can share access to the historical state tree with consensus nodes 606, 608, 610, and 612. Cloud storage device 614 can be a storage device that can provide storage services on the cloud, such as NAS or OSS.

[0065] When a transaction is processed into the current block, the state data associated with the transaction may be sent by one or more of the consensus nodes 606, 608, 610, and 612 to the shared storage nodes 602 and 604 for storage. In some embodiments, one or more of the consensus nodes 606, 608, 610, and 612 may send the state data and the hash value of the state data as a KVP to the shared storage nodes 602 and 604. After receiving the state data, the shared storage nodes 602 and 604 may verify whether the received state data or KVP has been stored locally or in the cloud storage device 614. If so, the shared storage nodes 602 and 604 may reject or abandon the received state data. Otherwise, the shared storage nodes 602 and 604 may calculate the hash value of the state data or verify that the received hash value is the hash value of the state data, and store the hash value and the state data in the historical state tree.

[0066] In some embodiments, shared storage nodes 602 and 604 can verify whether the state data is valid state data of the blockchain. As previously described, shared storage nodes 602 and 604 can store a historical state tree that is content-addressed and includes a complete copy of the state information of the blockchain. Shared storage nodes 602 and 604 can calculate a hash value for the received state data. The calculated hash value can then be used to verify whether the state data is part of the blockchain based on the world state root hash value of the blockchain (e.g., using a Merkle proof). If so, the state data can be determined to be content-addressed.

[0067] When any of the consensus nodes 606, 608, 610, and 612 needs to retrieve state data from the shared storage node 602 or 604, the corresponding hash value can be sent to the shared storage node in communication with the consensus node. Figure 6 In the example shown, consensus nodes 606 and 608 may send hash values ​​to shared storage node 602, and consensus nodes 610 and 612 may send hash values ​​to shared storage node 604. Consensus nodes may select a shared storage node from which to retrieve state data based on geographic location, network conditions, established communication protocols, security considerations, etc. It should be understood that any of consensus nodes 606, 608, 610, and 612 may choose to communicate with any of shared storage nodes 602 and 604 according to different embodiments herein.

[0068] Since the historical state trees stored in shared storage nodes 602 and 604 are content-addressed, the hash value can be used as a key for addressing the corresponding state data. After identifying the corresponding state data based on the hash value, the corresponding shared storage node 602 or 604 can send the identified state data back to the consensus node. The consensus node receiving the state data can hash the received state data to verify whether the state data is content-addressed. If so, the state data is determined to be true. Otherwise, the state data is untrue. If the state data is untrue, the consensus node can choose to report the shared storage node as a faulty node (or Byzantine node). If there are other nodes storing the historical state tree in the blockchain network 600, the consensus node can send the hash value to one or more other nodes to retrieve the corresponding state data.

[0069] Figure 7 Yet another example of a blockchain network 700 using shared storage according to embodiments of the present invention is depicted. At a high level, the blockchain network 700 includes a plurality of consensus nodes 706, 708, 710, and 712, a plurality of shared storage nodes 702 and 704, and a cloud storage device communicatively coupled to one or more of the plurality of shared storage nodes 702 and 704. The shared storage nodes 702 and 704 may be nodes with POAs, such as nodes managed by a deployer of the blockchain network 700. In this case, the shared storage nodes 702 and 704 may be part of the blockchain network 700 or outside the blockchain network 700. As previously described, POAs may also be obtained through voting. For example, assuming that the blockchain network includes 3f+1 nodes (in Figure 7 In the example shown, f=1 (when neither shared storage node 702 nor 704 participates in the consensus of blockchain network 700), 3f+2 nodes (when one of shared storage nodes 702 and 704 participates in the consensus of blockchain network 700), or 3f+3 nodes (when both shared storage nodes 702 and 704 participate in the consensus of the blockchain network), where f is the maximum number of Byzantine nodes. If 2f+1 nodes vote (endorsed by their respective digital signatures) to elect a consensus node as a shared storage node, the 2f+1 votes can be used as a POA for trusting the shared storage node.

[0070] In order to save storage resources without significantly reducing computing efficiency, the historical state tree can be stored in a history database (e.g., Figure 4 The shared storage nodes 702 and 704 may share access to the historical state tree with the consensus nodes 706, 708, 710, and 712.

[0071] In some embodiments, in addition to sharing historical state data from shared storage nodes 702 and 704, block data can also be shared. Similar to a full node of a blockchain network, shared storage nodes 702 and 704 can store a complete copy of the blockchain, including every transaction and block generated on the blockchain. In some embodiments, shared storage nodes 702 and 704 can store the block body of each block of the blockchain. Similar to a light node of a blockchain network, consensus nodes 706, 708, 710, and 712 can store the block header of each block of the blockchain based on methods such as simplified payment verification (SPV). SPV can allow a node to verify whether a transaction has been included in a block without downloading the entire blockchain. Since consensus nodes 706, 708, 710, and 712 also store the current state tree, the state data associated with the current block can be used to execute smart contracts. In this way, by sharing block data from shared storage nodes 702 and 704, the storage consumption of consensus nodes 706, 708, 710, and 712 can be further reduced while maintaining the ability to directly execute smart contracts.

[0072] Figure 8 is an example of a process 800 for communicating and sharing blockchain data. For convenience, process 800 will be described as being performed by a system of one or more computers located in one or more locations and appropriately programmed according to this document. For example, an appropriately programmed system such as Figure 1 A computing device in any of computing systems 106 and 108 may perform process 800 .

[0073] At 802, a consensus node in the blockchain network sends current state information associated with a current block of the blockchain to a trusted node with authorization proof outside the blockchain network, wherein the consensus node stores the current state information, and the trusted node stores historical state information associated with each block of the blockchain as a historical state tree, the historical state tree including a KVP whose value is an account state of an account associated with the blockchain network and whose key is a hash value corresponding to the account state.

[0074] At 804, the consensus node sends a hash value to the trusted node to retrieve the account state stored in the historical state tree.

[0075] At 806, the consensus node receives the account state in a response to sending the hash value.

[0076] At 808, the consensus node verifies that the account state is part of the blockchain based on the hash value.

[0077] In some cases, the current state tree includes a KVP whose value is the account state associated with the current block and whose key is the node ID corresponding to the node of the current state tree.

[0078] In some cases, each key included in the current state tree also includes a block ID corresponding to the current block.

[0079] In some cases, the current state information sent by the consensus node includes a digital signature generated based on a private key associated with the consensus node.

[0080] In some cases, sending the current state information further includes: sending the current state information and a hash value of the current state information as a KVP to a trusted node.

[0081] In some cases, verifying that the account state is part of the blockchain is based on hashing the account state to generate a hashed account state, and comparing the hashed account state to the hash value.

[0082] In some cases, trusted nodes store historical state information on local or cloud storage devices.

[0083] In some cases, the current state trie and the historical state trie are stored as fixed-depth Merkle trees.

[0084] Fig. 9 is a diagram of an example of modules of an apparatus 900 according to an embodiment of the present invention.

[0085] The device 900 may be an example of an embodiment of a consensus node configured to communicate and share blockchain data. The device 900 may correspond to the above embodiment, and the device 900 includes the following: a sending module 902, which sends current state information associated with a current block of the blockchain to a trusted node with authorization proof outside the blockchain network, wherein the consensus node stores the current state information, and the trusted node stores the historical state information associated with each block of the blockchain as a historical state tree, wherein the historical state tree includes a KVP whose value is the account state of an account associated with the blockchain network and whose key is a hash value corresponding to the account state; the sending module 902 sends the hash value to the trusted node to retrieve the account state stored in the historical state tree; a receiving module 904, which receives the account state in a response to sending the hash value; and a verification module 906, which verifies that the account state is part of the blockchain based on the hash value.

[0086] In an optional embodiment, the apparatus 900 further includes the following: the current state tree includes a KVP whose value is the account state associated with the current block and whose key is a node ID corresponding to a node of the current state tree.

[0087] In an optional embodiment, each key included in the current state tree also includes a block ID corresponding to the current block.

[0088] In an optional embodiment, the current state information sent by the consensus node includes a digital signature generated based on a private key associated with the consensus node.

[0089] In an optional embodiment, sending the current state information further includes: sending the current state information and a hash value of the current state information as a KVP to a trusted node.

[0090] In an optional embodiment, verifying that the account state is part of the blockchain is performed based on hashing the account state to generate a hashed account state, and comparing the hashed account state to the hash value.

[0091] In an optional embodiment, the trusted node stores historical state information on a local or cloud storage device.

[0092] In an alternative embodiment, the current state tree and the historical state tree are stored as fixed-depth Merkle trees.

[0093] The systems, devices, modules or units shown in the foregoing embodiments may be implemented by using a computer chip or entity, or may be implemented by using a product with a specific function. A typical implementation device is a computer, which may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or any combination of these devices.

[0094] For the implementation of the functions and effects of each module in the device, reference can be made to the implementation of the corresponding steps in the previous method. For the sake of simplicity, the details are omitted here.

[0095] Since the device implementation basically corresponds to the method implementation, for the relevant parts, reference can be made to the relevant description in the method embodiment. The device implementation previously described is only an example. The modules described as separate parts may or may not be physically separated, and the parts shown as modules may or may not be physical modules, may be located in one location, or may be distributed on multiple network modules. Some or all modules can be selected based on actual needs to achieve the goals solved in this article. Those of ordinary skill in the art can understand and implement the embodiments of the present application without paying creative work.

[0096] Reference again Fig. 9, which can be interpreted as showing the internal functional modules and structure of the consensus node. The execution subject can be essentially an electronic device, and the electronic device includes the following: one or more processors; and one or more computer-readable memories configured to store executable instructions of one or more processors. In some embodiments, one or more computer-readable memories are coupled to one or more processors and have programming instructions stored thereon, which can be executed by the one or more processors to perform the algorithms, methods, functions, processes, processes and programs described herein.

[0097] The technology described herein produces several technical effects. For example, embodiments of the subject matter can allow for saving storage resources of blockchain nodes without significantly reducing computing efficiency. Since most of the data in the historical state tree is "cold" data that is not frequently used, by only storing the "cold" data in the shared storage node, the storage space utilization rate across the blockchain network can be significantly improved. If the shared storage node is a POA node or is elected by voting based on the PBFT consensus, the historical state tree only needs to be stored in the shared storage node, and does not have to be stored on each blockchain node. If the shared storage node is a part of the blockchain consensus node without POA, then for a blockchain network with N consensus nodes, where N is equal to 3f+1, 3f+2, or 3f+3, where f is the maximum number of faulty consensus nodes, (Nf-1) / N blockchain consensus nodes only need to store "hot" data as the current state tree, without storing both "cold" and "hot" data as historical state trees.

[0098] In addition, for a blockchain network with N consensus nodes that uses f+1 nodes as shared storage nodes to store the historical state tree, a maximum of f faulty consensus nodes can be tolerated. In other words, saving storage space does not compromise data reliability. By tolerating f faulty consensus nodes and saving a copy of the entire blockchain only on f+1 nodes, consensus nodes in the blockchain network can be properly served. Since f+1 shared storage nodes ensure the reliability of the system, data security can be improved and is relatively independent of the security level of the underlying service platform.

[0099] Embodiments of the described subject matter may include one or more features alone or in combination.

[0100] For example, in a first embodiment, a computer-implemented method for communicating shared blockchain data includes: a consensus node in a blockchain network sends current state information associated with a current block of the blockchain to a trusted node with authorization proof outside the blockchain network. Wherein, the consensus node stores the current state information, the trusted node stores the historical state information associated with each block of the blockchain as a historical state tree, the historical state tree includes a KVP whose value is the account state of an account associated with the blockchain network and whose key is a hash value corresponding to the account state; if the trusted node verifies that the current state information is part of the blockchain, the consensus node verifies that the current state information is included in the historical state tree; the consensus node sends a hash value to the trusted node to retrieve the account state stored in the historical state tree; the consensus node receives the account state in a response to sending the hash value; and the consensus node verifies that the account state is part of the blockchain based on the hash value.

[0101] The foregoing and other described embodiments may each optionally include one or more of the following features:

[0102] The first feature, which can be combined with any one of the following features, specifies that the current state tree includes a KVP whose value is the account state associated with the current block and whose key is a node ID corresponding to a node of the current state tree.

[0103] The second feature, which can be combined with any of the previous or following features, specifies that each key included in the current state tree also includes a block ID corresponding to the current block.

[0104] The third feature, which can be combined with any of the previous or following features, specifies that the current state information sent by the consensus node includes a digital signature generated based on a private key associated with the consensus node.

[0105] The fourth feature, which can be combined with any one of the previous or subsequent features, specifies that sending the current state information also includes sending the current state information and a hash value of the current state information as a KVP to the trusted node.

[0106] A fifth feature, which can be combined with any of the previous or following features, specifies that verifying that the account state is part of the blockchain is performed based on hashing the account state to generate a hashed account state, and comparing the hashed account state to the hash value.

[0107] The sixth feature, which can be combined with any one of the previous or subsequent features, specifies that the trusted node stores historical status information on a local or cloud storage device.

[0108] The seventh feature, which can be combined with any one of the previous or following features, specifies that the current state tree and the historical state tree are stored as fixed-depth Merkle trees.

[0109] The implementation of the subject matter, actions and operations described herein can be implemented in digital electronic circuits, tangibly embodied computer software or firmware, computer hardware, including the structures disclosed herein and their structural equivalents, or a combination of one or more of them. The embodiments of the subject matter described herein can be implemented as one or more computer programs, for example, one or more computer program instruction modules encoded on a computer program carrier, for execution by a data processing device or for controlling the operation of a data processing device. For example, a computer program carrier may include one or more computer readable storage media on which instructions are encoded or stored. The carrier may be a tangible non-transitory computer readable medium, such as a magnetic disk, a magneto-optical disk or an optical disk, a solid-state drive, a random access memory (RAM), a read-only memory (ROM), or other types of media. Alternatively or additionally, the carrier may be an artificially generated propagation signal, for example, a machine-generated electrical signal, an optical signal, or an electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device for execution by a data processing device. A computer storage medium may be or may be part of a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them. A computer storage medium is not a propagation signal.

[0110] A computer program, which may also be referred to or described as a program, software, software application, app, module, software module, engine, script or code, may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; it may be configured in any form, including as a stand-alone program, or as a module, component, engine, subroutine or other unit suitable for execution in a computing environment, which may include one or more computers in one or more locations interconnected by a data communications network.

[0111] A computer program may, but need not, correspond to a file in a file system. A computer program may be stored in: a portion of a file that holds other programs or data, such as one or more scripts stored in a markup language document; a single file dedicated to the program in question; or multiple coordinated files, such as multiple files storing one or more modules, subroutines, or code portions.

[0112] Processors for executing computer programs include, for example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Typically, a processor will receive instructions for executing a computer program and data from a non-transitory computer readable medium coupled to the processor.

[0113] The term "data processing apparatus" includes all types of apparatus, devices and machines for processing data, including, for example, a programmable processor, a computer or multiple processors or computers. The data processing apparatus may include special-purpose logic circuits, such as an FPGA (field programmable gate array), an ASIC (application-specific integrated circuit) or a GPU (graphics processing unit). In addition to hardware, the apparatus may also include code that creates an execution environment for a computer program, for example, code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

[0114] The processes and logic flows described herein may be performed by one or more computers or processors executing one or more computer programs to perform operations by operating on input data and generating output. The processes and logic flows may also be performed by a special purpose logic circuit such as an FPGA, ASIC, or GPU, or a combination of a special purpose logic circuit and one or more programmed computers.

[0115] Computers suitable for executing computer programs may be based on general or special purpose microprocessors or both, or any other kind of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. Elements of a computer may include a central processing unit for executing instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory may be supplemented by or incorporated in special purpose logic circuits.

[0116] Typically, the computer will also include or be operably coupled to one or more storage devices to receive data from or send data to one or more storage devices. The storage device can be, for example, a disk, a magneto-optical disk or an optical disk, a solid-state drive, or any other type of non-transient computer-readable medium. However, such a device is not required for the computer. Therefore, the computer can be coupled to one or more local and / or remote storage devices such as one or more memories. For example, the computer can include one or more local memories as components of the computer, or the computer can be coupled to one or more remote memories in a cloud network. In addition, the computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, just to name a few.

[0117] Components may be "coupled" to one another by communicating with one another, such as by electrical or optical connections, directly or via one or more intermediaries. Components may also be "coupled" to one another if one of the components is integrated into another. For example, a storage component (e.g., an L2 cache component) integrated into a processor is "coupled to" the processor.

[0118] To provide interaction with a user, embodiments of the subject matter described herein may be implemented on or configured to communicate with a computer having: a display device, such as an LCD (liquid crystal display) monitor, for displaying information to a user; and an input device through which a user can provide input to the computer, such as a keyboard and a pointer device such as a mouse, trackball, or touchpad. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and any form of input from the user may be received, including sound, voice, or tactile input. In addition, a computer may interact with a user by sending documents to and receiving documents from a device used by a user; for example, by sending a web page to a web browser on a user's device in response to a request received from the web browser, or by interacting with an application (app) running on a user's device, such as a smartphone or electronic tablet. In addition, a computer may interact with a user by sending text messages or other forms of messages to a personal device (e.g., a smartphone running a messaging application) in turn and receiving a response message from the user.

[0119] The term "configured to" is used herein in relation to systems, devices, and computer program components. For a system of one or more computers configured to perform a particular operation or action, it means that the system has installed thereon software, firmware, hardware, or a combination thereof that causes the system to perform the operation or action in operation. For one or more computer programs configured to perform a particular operation or action, it means that the one or more programs include instructions that, when executed by a data processing device, cause the device to perform the operation or action. For a dedicated logic circuit configured to perform a particular operation or action, it means that the circuit has electronic logic that performs the operation or action.

[0120] Although many specific implementation details are included herein, these details should not be interpreted as limitations on the scope of the claims defined by the claims themselves, but rather as descriptions of the specific features of a particular embodiment. Multiple features described in the context of a single embodiment herein may also be implemented in combination in a single embodiment. On the contrary, the various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination. In addition, although the above features may be described as acting in certain combinations and even initially claimed as such, one or more features of the combination may be deleted from the claimed combination in some cases, and variants pointing to a sub-combination or a sub-combination may be claimed.

[0121] Similarly, although operations are depicted in the drawings and described in the claims in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in sequence in order to achieve the desired effect, or requiring that all of the operations shown be performed. In some cases, multitasking and parallel processing may be advantageous. In addition, the division of various system modules and components in the above-described embodiments should not be understood as requiring such division in all embodiments, but it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0122] Specific implementations of the subject matter have been described. Other implementations are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve the desired results. As an example, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequence shown to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous.

Claims

1. A computer-implemented method for communicating shared blockchain data, the method comprising: The consensus node in the blockchain network sends current state information associated with the current block of the blockchain to a trusted node with authorization proof outside the blockchain network, wherein the consensus node stores the current state information, and the trusted node stores historical state information associated with each block of the blockchain as a historical state tree, wherein the historical state tree includes a key-value pair KVP whose value is the account state of an account associated with the blockchain network and whose key is a hash value corresponding to the account state; The consensus node sends a hash value to the trusted node to retrieve the account status stored in the historical status tree; The consensus node receives the account state in a response to sending the hash value; and The consensus node verifies that the account state is part of the blockchain based on the hash value.

2. The method according to claim 1, wherein: The current state tree includes a KVP whose value is the account state associated with the current block and whose key is the node ID corresponding to the node of the current state tree.

3. A method according to any preceding claim, wherein: Each key included in the current state tree also includes a block ID corresponding to the current block.

4. The method according to claim 1 or 2, wherein: The current state information sent by the consensus node includes a digital signature generated based on a private key associated with the consensus node.

5. The method according to claim 1 or 2, wherein: Sending the current status information further includes: The current state information and the hash value of the current state information are sent to the trusted node as a KVP.

6. The method according to claim 1 or 2, wherein: Verifying that the account state is part of the blockchain is performed based on: hashing the account state to generate a hashed account state, and The hashed account state is compared to the hash value.

7. The method according to claim 1 or 2, wherein: The trusted node stores historical status information on a local or cloud storage device.

8. The method according to claim 1 or 2, wherein: The current state tree and the historical state tree are stored as fixed-depth Merkle trees.

9. A system for communicating shared blockchain data, comprising: one or more processors; as well as One or more computer readable memories coupled to the one or more processors and having instructions stored thereon, the instructions being executable by the one or more processors to perform the method of any one of claims 1 to 8.

10. A device for communicating shared blockchain data, the device comprising a plurality of modules for executing the method of any one of claims 1-8.