Faster view changes of the blockchain

By leveraging preparation messages in BFT consensus processes to include peer signatures, the method accelerates view changes in distributed storage systems, addressing inefficiencies in transitioning primary peers in blockchain networks.

JP7573645B2Active Publication Date: 2024-10-25INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2022557974
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-04-17
Filing Date
2021-04-13
Publication Date
2024-10-25
Estimated Expiration
2041-04-13

AI Technical Summary

Technical Problem

Existing distributed storage systems face inefficiencies in processing view changes during updates, particularly in blockchain networks, due to the need for waiting for multiple confirmations before transitioning primary peers, leading to significant time consumption.

Method used

Incorporating the use of preparation messages during Byzantine Fault Tolerance (BFT) consensus processes to include signatures from other peers, allowing view change messages to include in-flight changes, enabling faster view changes by verifying the majority's consensus with fewer confirmations.

Benefits of technology

This approach reduces the time required for view changes by verifying the state of the blockchain with fewer messages, enhancing the efficiency of distributed storage systems in blockchain networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007573645000001
    Figure 0007573645000001
  • Figure 0007573645000002
    Figure 0007573645000002
  • Figure 0007573645000003
    Figure 0007573645000003
Patent Text Reader

Abstract

Example operations include one or more of receiving a view change message requesting a view change from a previous primary peer of the blockchain to the primary peer; identifying, based on metadata in the received view change message, that changes to the state of the blockchain are in progress using the previous primary peer; verifying, based on the received view data message, that the changes to the state of the blockchain correspond to the most recent changes to the blockchain; and sending a new view message to the following peer that includes the in-progress changes to the state of the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the field of distributed storage systems, and in particular to the field of distributed storage systems for enabling faster view changes to occur when updates to the distributed storage system are in process. [Background technology]

[0002] A centralized database maintains data in one location, stored in a single database (e.g., a database server). This location is often a central computer, e.g., a desktop central processing unit (CPU), a server CPU, or a mainframe computer. Information stored in a centralized database is usually accessible from several different locations. Several users or client workstations can work simultaneously using the centralized database, e.g., based on a client / server configuration. Because of the single location, a centralized database is easier to manage, maintain, and control, especially for security purposes. Within a centralized database, data redundancy is minimized, since the single storage location of all data also means that a particular set of data only contains one primary record. Summary of the Invention

[0003] An example embodiment provides an apparatus that may include a network interface configured to perform one or more of receiving a view change message requesting a view change to the primary peer from a previous primary peer of the blockchain, and a processor configured to identify that changes to the blockchain state are in process using the previous primary peer based on metadata of the received view change message and to verify that the changes to the blockchain state correspond to most recent changes to the blockchain based on the received view data message, wherein the network interface is further configured to send a new view message to the following peer including the in-process changes to the blockchain state.

[0004] Another example embodiment provides an apparatus that may include a processor configured to perform one or more of: determining that a current primary peer of a blockchain has become a failed peer; identifying that changes to a state of the blockchain are in process using the current primary peer; and generating a view change message including a next view number and a hash of the in-process changes to the state of the blockchain; and a network interface configured to transmit the generated view change message to other peers.

[0005] Another example embodiment provides a method that may include one or more of: receiving a view change message requesting a view change from a previous primary peer of a blockchain to the primary peer; identifying based on metadata of the received view change message that changes to the blockchain state are in process using the previous primary peer; verifying based on the received view data message that the changes to the blockchain state correspond to the most recent changes to the blockchain; and sending a new view message to the following peer that includes the in-process changes to the blockchain state.

[0006] Another example embodiment provides an apparatus that may include one or more of: a network interface configured to receive a pre-preparation message from a primary peer including data proposed to be added to the blockchain; and a processor configured to perform one or more of: generating a prepare message including a hash of the data proposed to be added to the blockchain and a signature of a consensus peer; adding the consensus peer's hash puzzle to the prepare message; and sending the prepare message including the hash puzzle to a plurality of other consensus peers of the blockchain.

[0007] Further example embodiments provide an apparatus that may include one or more of: a network interface configured to receive a view change message including a next view value and a hash of an in-progress change to the blockchain state; and a processor configured to perform one or more of: generating a view data message including a signed prepare message from another following peer including a proof of the in-progress change to the blockchain state in response to receiving a predefined threshold number of view change messages; and sending the generated view data message including the signed prepare message to the primary peer.

[0008] Viewed from a first aspect, the present invention provides an apparatus comprising a network interface configured to receive a view change message requesting a view change from a previous primary peer of a blockchain to the primary peer; and a processor configured to identify based on metadata of the received view change message that changes to the blockchain state are in process using the previous primary peer and to verify based on the received view data message that the changes to the blockchain state correspond to the most recent changes to the blockchain, wherein the network interface is further configured to send a new view message to the following peer including the in-process changes to the blockchain state.

[0009] Preferably, the invention provides an apparatus, wherein the network interface is configured to transmit a new View message in response to receiving only one View Data message.

[0010] The invention preferably provides an apparatus whereby ongoing changes to the state of the blockchain include proposed data blocks.

[0011] Preferably, the present invention provides an apparatus, wherein the processor is further configured to verify that view change messages have been received from a predefined threshold number of following peers.

[0012] The present invention preferably provides an apparatus whereby for each view change message, the metadata includes the next view number and a hashed change to the blockchain.

[0013] The invention preferably provides an apparatus, wherein the View Data message comprises a plurality of Prepare messages, the Prepare messages being received by a following peer from other peers.

[0014] Preferably, the invention provides an apparatus, wherein the processor is configured to verify that ongoing changes to the state of the blockchain are contained in a predefined number of signed prepare messages stored within a view data message.

[0015] Viewed from another aspect, the present invention provides an apparatus comprising: a processor configured to determine that a current primary peer of a blockchain has become a failed peer; identify that changes to a state of the blockchain are in process using the current primary peer; and generate a view change message including a next view number and a hash of the in-process changes to the state of the blockchain; and a network interface configured to transmit the generated view change message to other peers.

[0016] Preferably, the invention provides an apparatus, wherein the processor is further configured to store within the view change message signatures of other following peers of the blockchain that agree with the pending changes to the state of the blockchain.

[0017] The present invention preferably provides an apparatus whereby ongoing changes and signatures to the blockchain state are collected during a preliminary stage of practical byzantine fault tolerant (pBFT) consensus.

[0018] Preferably, the invention provides an apparatus, wherein the processor is configured to identify pending changes to the state of the blockchain based on a pre-preparation message received from a current primary peer.

[0019] Viewed from another aspect, the present invention provides a method for a primary peer including receiving a view change message requesting a view change to the primary peer from a previous primary peer of a blockchain, identifying based on metadata of the received view change message that changes to the blockchain state are in process using the previous primary peer, verifying based on the received view data message that the changes to the blockchain state correspond to the most recent changes to the blockchain, and sending a new view message to the following peer that includes the in-process changes to the blockchain state.

[0020] Preferably, the present invention provides a method wherein transmitting includes transmitting a new view message in response to receiving only one view data message.

[0021] The present invention preferably provides a method whereby ongoing changes to the state of the blockchain include proposed data blocks.

[0022] Viewed from another aspect, the present invention provides an apparatus including a network interface configured to receive a pre-preparation message from a primary peer including data proposed to be added to a blockchain; and a processor configured to generate a prepare message including a hash of the data proposed to be added to the blockchain and a signature of a consensus peer, add the consensus peer's hash puzzle to the prepare message, and send the prepare message including the hash puzzle to a plurality of other consensus peers of the blockchain.

[0023] Preferably, the invention provides an apparatus, wherein the processor is further configured to determine, based on prepare messages received from the other agreement peers, that a predefined threshold number of the other agreement peers agree on the data proposed to be added to the blockchain.

[0024] Preferably, the invention provides an apparatus, wherein the processor is further configured to generate a commit message including a solution to the hash puzzle appended to the prepare message, and to transmit the commit message to a plurality of other consensus peers.

[0025] The present invention preferably provides an apparatus in which the commit message does not include a signature of the agreement peer.

[0026] Preferably, the invention provides an apparatus, wherein the processor is configured to generate a hash puzzle via a hash of a predefined secret value.

[0027] The invention preferably provides an apparatus, wherein the processor is further configured to receive a prepare message from the other agreement peers, the received prepare message including a hash puzzle added by each of the other agreement peers.

[0028] Viewed from another aspect, the present invention provides an apparatus comprising: a network interface configured to receive a view change message including a next view value and a hash of an in-progress change to a state of the blockchain; and a processor configured to, in response to receiving a predefined threshold number of view change messages, generate a view data message including a signed prepare message from another following peer including a proof of the in-progress change to the state of the blockchain, and send the generated view data message including the signed prepare message to a primary peer.

[0029] The invention preferably provides an apparatus, wherein signed preparation messages are collected during a preparation phase of a Byzantine Fault Tolerance (BFT) agreement.

[0030] The present invention preferably provides an apparatus in which the signed prepare message includes metadata including a hash of pending changes to the state of the blockchain and the view number of the new primary peer.

[0031] Preferably, the present invention provides an apparatus, wherein the signed prepare message further includes a hash puzzle added by other following peers.

[0032] Preferably, the present invention provides an apparatus, wherein the processor is further configured to receive ongoing changes to the state of the blockchain from a previous primary peer. [Brief description of the drawings]

[0033] [Figure 1A] FIG. 1 illustrates a blockchain network for performing view changes, according to an example embodiment. [Figure 1B] FIG. 1B illustrates a consensus process performed by the blockchain network of FIG. 1A, according to an example embodiment. [Figure 1C] FIG. 1B illustrates a view change process performed by the blockchain network of FIG. 1A, according to an example embodiment. [Figure 2A] FIG. 1 illustrates an exemplary blockchain architecture configuration, according to an example embodiment. [Figure 2B] FIG. 1 illustrates a diagram of blockchain transaction flow between nodes according to an example embodiment. [Figure 3A] FIG. 1 illustrates a permissioned network, according to an example embodiment. [Figure 3B] FIG. 2 illustrates another permissioned network, according to an example embodiment. [Figure 3C] FIG. 2 illustrates a permission-free network, according to an example embodiment. [Figure 4A] FIG. 13 illustrates a diagram of the format of prepare and commit messages for blockchain agreement, according to an example embodiment. [Figure 4B] FIG. 4 illustrates a view change message format, according to an example embodiment. [Figure 4C]FIG. 1 illustrates a faster view change process being performed in accordance with an example embodiment. [Figure 5A] FIG. 2 illustrates a method for performing a view change, according to an example embodiment. [Figure 5B] FIG. 2 illustrates a method for generating a view change message according to an example embodiment. [Figure 5C] 4 illustrates a method for generating a prepare message according to an example embodiment. [Figure 5D] 1 illustrates a method for generating a View Data message according to an example embodiment. [Figure 6A] FIG. 1 illustrates an example system configured to perform one or more operations described herein, in accordance with an example embodiment. [Figure 6B] FIG. 1 illustrates another exemplary system configured to perform one or more operations described herein, in accordance with example embodiments. [Figure 6C] FIG. 1 illustrates yet another exemplary system configured to utilize smart contracts in accordance with an example embodiment. [Figure 6D] FIG. 1 illustrates yet another exemplary system configured to utilize blockchain, according to an example embodiment. [Figure 7A] FIG. 1 illustrates a process for a new block being added to a distributed ledger according to an example embodiment. [Figure 7B] 11A-11C are diagrams illustrating the data contents of a new data block according to an example embodiment. [Figure 7C] FIG. 1 illustrates a block chain for digital content, according to an example embodiment. [Figure 7D] FIG. 2 illustrates a block diagram that may represent the structure of a block in a blockchain, according to an example embodiment. [Figure 8A] FIG. 1 illustrates an exemplary blockchain for storing machine learning (artificial intelligence) data, according to an example embodiment. [Figure 8B]FIG. 1 illustrates an exemplary quantum secure blockchain, according to an example embodiment. [Figure 9] FIG. 1 illustrates an exemplary system that supports one or more of the example embodiments. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0034] It will be readily understood that the components herein, as generally described and illustrated in the Figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of at least one embodiment of a method, apparatus, non-transitory computer-readable medium, and system, as depicted in the accompanying Figures, is not intended to limit the scope of the present application as claimed, but is merely representative of selected embodiments.

[0035] Features, structures, or characteristics described throughout this specification may be combined or eliminated in any suitable manner in one or more embodiments. For example, the use of the phrase "example embodiment," "some embodiments," or other similar language throughout this specification refers to the fact that certain features, structures, or characteristics described in connection with an embodiment may be included in at least one embodiment. Thus, the appearances of the phrase "example embodiment," "some embodiments," "other embodiments," or other similar language throughout this specification do not necessarily all refer to the same group of embodiments, and the described features, structures, or characteristics may be combined or eliminated in any suitable manner in one or more embodiments. Additionally, in each figure, any connection between elements may permit one-way or two-way communication, or both, even if the connection shown is a one-way or two-way arrow. Also, any devices shown in the figures may be different devices. For example, where a mobile device is shown transmitting information, a wired device may also be used to transmit the information.

[0036] In addition, although the term "message" may be used in describing the embodiments, the application may apply to many types of networks and data. Further, although particular types of connections, messages, and signaling may be shown in the example embodiments, the application is not limited to the particular types of connections, messages, and signaling.

[0037] Example embodiments provide methods, systems, components, non-transitory computer readable media, devices, and / or networks that implement a faster view change process for a permissioned blockchain.

[0038] In one embodiment, the present application utilizes a distributed database (such as a blockchain), which is a distributed storage system that includes multiple nodes that communicate with each other. A distributed database includes an append-only immutable data structure, similar to a distributed ledger, in which records can be maintained among mutually untrusted parties. The untrusted parties are referred to herein as peers or peer nodes. Each peer maintains a copy of the database record, and no single peer can modify the database record without reaching consensus among the distributed peers. For example, peers may run a consensus protocol to verify the validity of blockchain stored transactions, group those stored transactions into blocks, and build a hash chain on the blocks. This process forms a ledger by ordering the stored transactions, as necessary, for consistency. In various embodiments, permissioned or permissionless blockchains or both may be used. Public or permissionless blockchains allow anyone to participate without specific identification. Public blockchains include native cryptocurrencies and can use consensus based on various protocols, such as Proof of Work (PoW). Permissioned blockchain databases, on the other hand, provide secure interactions within a group of entities that share a common goal but do not fully trust each other, such as businesses exchanging funds, goods, or information.

[0039] The present application may utilize a blockchain that operates on arbitrary programmable logic, called a "smart contract" or "chaincode," that is tailored to the distributed storage method. In some cases, there may be a specialized chaincode for managing functions and parameters, called a system chaincode. Applications may further utilize smart contracts, which are trusted distributed applications that leverage the tamper-proof properties of the blockchain database and the underlying agreement between nodes, called a signature or signature policy. Blockchain transactions associated with this application may be "signed" before being committed to the blockchain, while transactions that are not signed are ignored. The signature policy allows the chaincode to specify the signers of the transaction in the form of a set of peer nodes required for signing. When a client sends a transaction to a peer specified in the signature policy, a transaction is executed to verify the validity of the transaction. After validation, the transaction moves to an ordering phase, where a consensus protocol is used to generate an ordered sequence of signed transactions grouped into blocks.

[0040] The present application may utilize nodes, which are the communicating entities of a blockchain system. A "node" may perform a logical function in the sense that multiple nodes of different types may run on the same physical server. Nodes are grouped in trusted domains and associated with logical entities that control them in various ways. Nodes may include various types, such as client or submit client nodes, which submit transaction calls to signers (e.g., peers) and broadcast transaction proposals to an ordering service (e.g., ordering node). Another type of node is a peer node, which can receive client submitted transactions, commit transactions, and maintain the ledger state and copy of blockchain transactions. Peers can also have the role of signers, but this is not a requirement. An ordering service node or ordering node is a node that performs communication services for all nodes and enforces delivery guarantees, such as broadcasting to each of the peer nodes in the system when committing transactions and when modifying the blockchain world state (another name for the initial blockchain transaction, which usually contains control and configuration information).

[0041] The present application may utilize a ledger, which is an ordered, tamper-proof record of all state transitions of a blockchain. State transitions may result from chaincode invocations (i.e., transactions) submitted by participating parties (e.g., client nodes, ordering nodes, signer nodes, peer nodes, etc.). Each participating party (e.g., peer node) may maintain a copy of the ledger. A transaction may result in a set of key-value pairs of assets being committed to the ledger as one or more operands (e.g., create, update, delete, etc.). The ledger includes a blockchain (also called a chain) that is used to store immutable, ordered records in blocks. The ledger also includes a state database that maintains the current state of the blockchain.

[0042] The application may utilize a chain, which is a transaction log structured as hash-linked blocks, where each block contains a sequence of N transactions, where N is greater than or equal to 1. The block header contains a hash of the block's transactions, and a hash of the previous block's header. In this way, all transactions in the ledger may be ordered and cryptographically linked together. Thus, the ledger data cannot be tampered with without breaking the hash links. The hash of the most recently added block of the blockchain represents all transactions on the chain that occurred before it, allowing all peer nodes to be assured that they are in a consistent and trustworthy state. The chain may be stored in the file systems of the peer nodes (i.e., locally, attached storage, cloud, etc.), which efficiently supports the append-only nature of blockchain workloads.

[0043] Blockchain systems, on the other hand, store data in an immutable ledger, provide distributed and decentralized access to the immutable ledger through non-trusting participants, establish consensus requirements for agreement between non-trusting participants so that no entity can modify the immutable ledger without agreement from the other entities, and invoke smart contracts. A blockchain is formed by a network of participants who agree to add blocks (where data is stored) to the immutable ledger. Before a block is added, it is linked to the previous block on the immutable ledger, thereby forming a chain. This immutable and incorruptible nature of blockchain protects it from forged information and hacking. The decentralized nature also gives blockchain an inherent property of trustlessness in that parties do not need to establish trust before they can transact securely.

[0044] The current state of the immutable ledger represents the latest values ​​of all keys contained in the chain's transaction log. The current state is sometimes called the world state, as it represents the most recent key values ​​known to the channel. Chaincode invocations execute transactions against data in the current state of the ledger. To make those chaincode interactions efficient, the most recent key values ​​may be stored in a state database. The state database may simply be an indexed view into the chain's transaction log, and therefore may be regenerated from the chain at any time. The state database may be automatically restored (and generated, if necessary) at peer node startup and before any transactions are received.

[0045] A blockchain network may include many blockchain peers, each of which maintains a copy / replica of the blockchain ledger. A consensus protocol is used by the blockchain network to ensure that the state of the blockchain ledger is consistent across all of the blockchain peers. One algorithm commonly used for consensus is Practical Byzantine Fault Tolerance (pBFT). In pBFT consensus, one or more primary peers act as leaders to the remaining peers (referred to herein as following peers or consensus peers). Each primary peer (leader), as well as following peers, maintains an internal state of the blockchain ledger.

[0046] When a request to store data in the blockchain is received from a client, the primary peer creates a proposal and multicasts this proposal to the following peers that are grouped with the primary peer. The following peers then share this proposal with each other to ensure that there is a consensus on the blockchain proposal. If a consensus is reached, the following peers (and the primary peer) commit the blockchain proposal to their internal ledgers and forward the response to the client.

[0047] A "view" is the period during which a particular blockchain peer serves as a primary peer. A view change is the process of switching from one primary peer to another. For example, the next primary peer may be a following peer selected, such as in a round-robin fashion, according to the order of the blockchain peers in the on-chain file. Both the primary and following peers may keep track of the next primary peer by storing a view number that identifies the next primary peer in the on-chain file. In addition to moving through a series of views, a peer also moves through a series of sequence numbers, where the sequence number represents the block number of the next block to be stored in the blockchain.

[0048] A blockchain peer (following peer) may request a view change to perform a view change when it detects that a primary peer enters a timeout state, experiences faulty activity, etc. If more blockchain peers detect faulty activity, they will also send a view change message. Now, blockchain peers in a group broadcast view change messages to each other. If enough view change messages are received, the new primary peer will initiate a new view.

[0049] A view change message may be a lightweight message that contains an indication that a change of primary peer is requested without providing any content / state of the blockchain. When a predefined threshold number of view change messages are received between blockchain peers, the blockchain peer sends a view data message containing the current checkpoint of the blockchain to the new primary peer, so that the new primary peer can take over if the failed primary peer goes down.

[0050] To ensure that the current checkpoint of the blockchain in the view data message has been agreed upon by the consensus of the blockchain peers, the new primary peer must collect 2f+1 view data messages containing the same checkpoint of the blockchain, where "f" is the total number of potentially failed nodes in the blockchain network that contains a total of "n" nodes, where n=3f+1. After receiving 2f+1 view data messages containing the blockchain checkpoint, the new primary peer may broadcast a new view message to all blockchain peers, containing the view data message, instructing the following peers to move to the new primary peer.

[0051] Just like in the case of view change messages, the new primary peer must wait to receive 2f+1 view data messages before a new view message can be sent. The reason for this is that the view data message contains the current state of the blockchain and the signature of the blockchain peer that sent the view data message. In order for the new primary peer to be sure that enough blockchain peers have agreed on the current state of the blockchain, the primary peer must wait until at least a predefined threshold number (e.g., 2f+1) of view data messages containing the latest state of the blockchain have been received. 2f+1 means that even if there are “f” failed nodes, there are at least f+1 correct / fault-free data messages (i.e., at least one more than f). Thus, the primary peer can use 2f+1 view data messages to be sure that a majority / constant number of non-faulty peers agree on the ledger state. The drawback of the view change process is that the new primary peer must wait for 2f+1 view change messages, as well as 2f+1 view data messages (which contain the ledger checkpoint), resulting in a significant amount of time being wasted during the view change process.

[0052] Example embodiments overcome these shortcomings and allow faster view changes to occur when updates to the blockchain are in process (i.e., in-flight). In particular, example embodiments leverage the contents of a prepare message used during in-process updates to the blockchain ledger to include signatures collected from other blockchain peers. These signatures can be added to a view change message. The view change message can also be updated to include proposed changes to the blockchain that are in-flight. Thus, a view change message initially sent by a blockchain peer to initiate a view change process may include proof that a majority of blockchain peers are in process of the same update to the blockchain.

[0053] In this case, if the new primary peer collects 2f+1 view change messages, the new primary peer can verify that at least f+1 view change messages come from non-failed nodes. Furthermore, the new primary peer may only need to wait for one view data message (instead of 2f+1 view data messages) containing the checkpoint / current state of the blockchain before sending a new view message. In this case, by waiting for one view data message, the new primary peer can verify that the in-flight changes to the blockchain state identified in the view change message match the current state / checkpoint of the blockchain in the view data message. Thus, a significant amount of time can be saved during the in-flight blockchain process where a view change occurs. Furthermore, only one checkpoint message needs to be processed instead of 2f+1.

[0054] To implement improvements to the view change process during ongoing updates to the blockchain state, example embodiments introduce both modifications to the prepare message used during the pBFT agreement process and modifications to the view change message used during the view change process.

[0055] FIG. 1A illustrates a blockchain network 100 for performing view changes, according to an example embodiment. With reference to FIG. 1A, the blockchain network 100 includes multiple blockchain peers 112, 114, 116, and 118 that share management of a blockchain 110, which may include both a hash-linked chain of blocks and a state database, such as shown in the example of FIG. 7A. The blockchain network 100 may be a permissioned blockchain that requires authorization to access the blockchain 110. Access permissions to the blockchain 110 are granted by the blockchain peers 112-118. The blockchain network 100 does not include a centralized administration, but instead is cooperatively managed in a distributed manner by a group of blockchain peers 112-118. The blockchain 110 is replicated across each of the blockchain peers 112-118. Furthermore, consensus is used to ensure consistency between the states of the replicas stored across the blockchain peers 112-118.

[0056] In this example, the blockchain peers 112-118 operate based on a practical Byzantine Fault Tolerance (pBFT) consensus protocol. In this situation, the blockchain peers 112-118 identify a primary peer among the blockchain peers 112-118 that acts as a leader when data is added to the blockchain 110. The primary peer 112 may receive a request from the client 120 to store a new transaction in the blockchain 110. Meanwhile, the remaining blockchain peers may be called "followers" that participate with the leader peer. The pBFT consensus can function correctly even in the presence of failed nodes. In the example herein, it is assumed that there can be at most f failed nodes in a blockchain network containing n nodes, where n is 3f+1 or greater. Therefore, at least 2f+1 nodes must reach consensus to ensure consensus between blockchain peers. That is, if f nodes are failed, 2f ensures that at least half of the nodes are not failed. Furthermore, by adding 1, we ensure that there are always more non-failed nodes than failed nodes.

[0057] FIG. 1B illustrates a consensus process 100B performed by the blockchain network of FIG. 1A according to an example embodiment. In this example, a new block is added to the blockchain 110 shown in FIG. 1A based on the consensus reached among the blockchain peers 112-118. In this example, the blockchain peer 112 is the current primary blockchain peer of the blockchain peers 112-118. However, the primary blockchain may change over time. For example, each peer 112-118 may spend time as a primary peer based on a round robin approach or the like. Also, while this example illustrates four blockchain peers, including one primary peer, for illustrative purposes, it should be understood that a blockchain network may include many blockchain peers, including multiple primary peers simultaneously, each serving a different subset of follower peers.

[0058] Referring to FIG. 1B, the primary peer 112 may receive a request from the client 120 to store a new transaction in the blockchain 110. This step is omitted in the drawing. In a pre-preparation step 131, the primary peer 112 may order the transactions into a block and broadcast the ordered list of transactions to the other blockchain peers 114, 116, and 118. In a preparation step 132, the blockchain peers 114, 116, and 118 may receive the ordered list of transactions. Each blockchain peer (114, 116, and 118) may calculate a hash code for the newly created block that contains the hash of the transaction and the final state of the world to be added to the state database, and broadcast a prepare message containing the resulting hash to the other blockchain peers (114, 116, and 118) in the network. In this way, the blockchain peer may receive prepare messages from other blockchain peers.

[0059] If a blockchain peer receives a predefined threshold number (e.g., 2f+1) of prepare messages, the blockchain peer may generate and send a commit message to other blockchain peers in a commit phase 133. If a blockchain peer receives a predefined threshold number of commit messages, the blockchain peer may commit the block to its local copy of the blockchain 110, including updates to the chain of blocks and state database.

[0060] According to various embodiments, the primary peer may be changed every view period (e.g., the period of the pBFT agreement). For example, if a predefined amount of time has passed without the primary peer broadcasting a request to following peers, the primary peer may be replaced using a view change protocol. If necessary, a majority of authentic nodes may cooperate to vote on the legitimacy of the current leading node and replace the current leading node with the next leading node.

[0061] FIG. 1C illustrates a view change process 100C performed by the blockchain network of FIG. 1A according to an example embodiment. In this example, it is detected that the primary peer 112 has failed. For example, the client 120 submits a request to the primary peer 112, which then fails to respond within a predefined period, times out, etc. If the following blockchain peers 114, 116, and 118 suspect that the primary peer 112 has failed, the blockchain peers 114, 116, and 118 may send a view change message 141. In a related technique, the view change message may be a heavyweight view change message that includes a latest checkpoint of the blockchain ledger. For example, the latest checkpoint may include the current state of the blockchain. As another example, the view change message may be a lightweight view change message that includes only the sequence number of the next view (i.e., the identifier of the next primary peer).

[0062] If the blockchain peers 114, 116, and 118 receive enough (e.g., 2f+1) view change messages, the blockchain peers may submit a view data message 142. The view data message 142 may be used only if the view change message 141 is a lightweight message. The view data message 142 may be signed and serve as a proof of the next stage. The view data message 142 includes the latest checkpoint of the blockchain and the next proposal (in progress), if any. However, the view data message 142 is only sent to the primary peer of the new view, in this example, the blockchain peer 114. After the new primary peer 114 receives enough view change messages 142 to meet a predefined threshold number (e.g., 2f+1), it broadcasts a new view message 143 that includes the predefined threshold number of view data messages 142 from other blockchain peers, thereby serving as a proof of the validity of the new view.

[0063] FIG. 2A illustrates a blockchain architecture configuration 200 according to an example embodiment. With reference to FIG. 2A, the blockchain architecture 200 may include certain blockchain elements (e.g., a group of blockchain nodes 202). The blockchain nodes 202 may include one or more nodes 204-210 (four of these nodes are shown merely by way of example). These nodes participate in a number of activities, such as adding and validating blockchain transactions (agreements). One or more of the blockchain nodes 204-210 may sign transactions based on a signature policy and provide an ordering service for all blockchain nodes in the architecture 200. A blockchain node may initiate a blockchain authentication and attempt to write to the blockchain's immutable ledger stored in the blockchain layer 216, and a copy of this write may also be stored in the underlying physical infrastructure 214. A blockchain configuration may include one or more applications 224 linked to application programming interfaces (APIs) 222 to access and execute stored program / application code 220 (e.g., chaincode, smart contracts, etc.), which can be created according to customized configurations required by participants, maintain their own state, control their own assets, and receive external information. A blockchain configuration can be installed on all blockchain nodes 204-210 by deploying it as a transaction and adding it to the distributed ledger.

[0064] The blockchain base or platform 212 may include various layers of blockchain data, services (e.g., cryptographic trust services, virtual execution environments, etc.), and an underlying physical computer infrastructure that may be used to receive and store new transactions and provide access to auditors seeking access to data entries. The blockchain layer 216 may expose interfaces that provide access to the virtual execution environments necessary to process and enlist program code into the physical infrastructure 214. The cryptographic trust services 218 may be used to verify transactions, such as asset exchange transactions, and keep information private.

[0065] The blockchain architecture of FIG. 2A may process and execute program / application code 220 through one or more interfaces and services exposed by the blockchain platform 212. The code 220 may control assets of the blockchain. For example, the code 220 may store and transfer data and may be executed by the nodes 204-210 in the form of associated chaincode including smart contracts and conditions or other code elements subject to execution. As a non-limiting example, smart contracts may be created to perform reminders, updates, or modifications, other notifications subject to updates, or combinations thereof. The smart contract itself may be used to identify authorization and access requirements and rules associated with the use of the ledger. For example, the smart contract (or chaincode executing the logic of the smart contract) may read blockchain data 226, which may be processed by one or more processing entities (e.g., virtual machines) included in the blockchain layer 216 to generate results 228 including data to be written to the blockchain. The physical infrastructure 214 may be utilized to retrieve any of the data or information described herein.

[0066] Using high-level application and programming languages, smart contracts may be created and then written into blocks in the blockchain. Smart contracts may include executable code that is registered, stored, and / or replicated in the blockchain (e.g., a distributed network of blockchain peers). A transaction is the execution of smart contract code that may be executed in response to a condition associated with the smart contract being satisfied. Execution of a smart contract may trigger trusted changes to the state of the digital blockchain ledger. Changes to the blockchain ledger caused by the execution of a smart contract may be automatically replicated across the distributed network of blockchain peers via one or more consensus protocols.

[0067] A smart contract may write data to the blockchain in the form of key-value pairs. Additionally, the smart contract code may read values ​​stored in the blockchain and use them in the operation of the application. The smart contract code may write the output of various logical operations to one or more blocks in the blockchain. This code may be used to create temporary data structures in a virtual machine or other computing platform. Data written to the blockchain may become public and / or be kept private and encrypted. The temporary data used / generated by the smart contract is kept in memory by the provided execution environment and deleted after the data required for the blockchain has been identified.

[0068] The chaincode may include a code interpretation (e.g., logic) of a smart contract. For example, the chaincode may include a packaged, deployable version of the logic in a smart contract. As described herein, the chaincode may be program code that is deployed on a computing network and executed together and validated by chain validators during a consensus process. The chaincode may receive the hash and retrieve the hash from the blockchain associated with the data template created by use of a previously stored feature extractor. If the hash of the hash identifier and the hash created from the stored identifier template data match, the chaincode sends an authorization key to the requested service. The chaincode may write data associated with the cryptographic details to the blockchain.

[0069] FIG. 2B illustrates an example of a blockchain transaction flow 250 between nodes of a blockchain, according to an example embodiment. With reference to FIG. 2B, the transaction flow may include a client node 260 sending a transaction proposal 291 to a signing peer node 281. The signing peer 281 may verify the client's signature and execute a chaincode function to initiate the transaction. The output may include the chaincode result, a set of versions of the keys / values ​​that were read into the chaincode (the read set), and a set of keys / values ​​that were written into the chaincode (the write set). The signing peer 281 may then decide whether to sign the transaction proposal. A proposal response 292 is sent back to the client 260, along with the signature if approved. The client 260 packages the signature into a transaction payload 293 and broadcasts it to the ordering service node 284. The ordering service node 284 then distributes the ordered transaction as a block on the channel to all peers 281-283. Before committing it to the blockchain, each peer 281-283 may verify the validity of the transaction. For example, a peer may check the signature policy to ensure that the correct allocation of the designated peer has signed the result and authenticated the signature on the transaction's payload 293.

[0070] Referring again to FIG. 2B, a client node initiates a transaction 291 by constructing and sending a request to a peer node 281 (signer). The client 260 may include an application that utilizes a supported software development kit (SDK) to generate a transaction proposal utilizing available APIs. The proposal is a request to invoke a chaincode function so that data can be read from and / or written to the ledger (i.e., writing a new key-value pair for an asset). The SDK may act as a shim to package the transaction proposal into a suitably designed format (e.g., protocol buffers over a remote procedure call (RPC)), receive the client's cryptographic credentials, and generate a unique signature for the transaction proposal.

[0071] In response, the signing peer node 281 may verify that (a) the transaction proposal is properly formed, (b) the transaction has not already been submitted in the past (replay attack protection), (c) the signature is valid, and (d) the submitter (in the example, client 260) has been given the proper permissions to perform the proposed operation on that channel. The signing peer node 281 may take the transaction proposal input as an argument to a chaincode function that is called. The chaincode is then executed against the current state database to generate a transaction result that includes a response value, a read set, and a write set; however, no updates are made to the ledger at this point. At 292, the set of values, along with the signing peer node's 281 signature, is returned as a proposal response 292 to the client 260's SDK, which parses the payload for use by the application.

[0072] In response, the client 260 application checks / verifies the signing peer's signature and compares the proposal response to determine if the proposal response is the same. If the chaincode simply queried the ledger, the application checks the query response and typically does not submit the transaction to the ordering node service 284. If the client application is going to submit a transaction to the ordering node service 284 to update the ledger, the application determines if the specified signature policy is satisfied (i.e., if all required peer nodes for the transaction have signed the transaction) before submitting. Here, the client may include only one of multiple parties of the transaction. In this case, each client may include its own signing node, and each signing node must sign the transaction. The architecture ensures that the signature policy is still enforced by the peers and maintained in the commit validation phase, even if the application chooses not to check the response or otherwise forwards an unsigned transaction.

[0073] After successful validation, in step 293, the client 260 assembles the signatures into a transaction proposal and broadcasts the transaction proposal and transaction response in a transaction message to the ordering node 284. The transaction may include the read / write set, the signing peer signatures, and the channel ID. The ordering node 284 does not need to validate the entire contents of the transaction to perform its operation; instead, the ordering node 284 may simply receive transactions from all channels in the network, order them chronologically by channel, and create a block of transactions for each channel.

[0074] The block is distributed from the ordering node 284 to all peer nodes 281-283 on the channel. The data section in the block may be validated to ensure that the signature policy is met and to ensure that there have been no changes to the ledger state with respect to the variables in the read set since the read set was generated by the execution of the transaction. Furthermore, in step 295, each peer node 281-283 adds the block to the channel's chain and, for each valid transaction, the write set is committed to the current state database. Events may be emitted to notify the client application that the transaction (invocation) has been immutably added to the chain and to notify whether the transaction has been validated or invalidated.

[0075] FIG. 3A illustrates an example of a permissioned blockchain network 300, which features a distributed, decentralized, peer-to-peer architecture. In this example, a blockchain user 302 may initiate a transaction to a permissioned blockchain 304. In this example, the transaction may be a deploy, invoke, or query, and may be issued via a client-side application utilizing an SDK, directly via an API, etc. The network may provide access to regulators 306, such as auditors. A blockchain network operator 308 manages member permissions, such as registering regulators 306 as “auditors” and blockchain users 302 as “clients.” Auditors may be limited to only querying the ledger, while clients may be given permission to deploy, invoke, and query certain types of chaincode.

[0076] A blockchain developer 310 can write chaincode and client-side applications. Through an interface, the blockchain developer 310 can deploy the chaincode directly to the network. To include authentication information from traditional data sources 312 in the chaincode, the developer 310 can use an out-of-band connection to access the data. In this example, a blockchain user 302 connects to the permissioned blockchain 304 through a peer node 314. Before initiating any transactions, the peer node 314 obtains a certificate of the user's registration and transaction from a certificate authority 316 that manages the user's roles and permissions. In some cases, blockchain users must possess their digital certificates to execute transactions on the permissioned blockchain 304. On the other hand, users seeking to utilize chaincode may need to verify their user's authentication information on traditional data sources 312. To verify the user's authorization, the chaincode can use an out-of-band connection to this data through a traditional processing platform 318.

[0077] FIG. 3B illustrates another example of a permissioned blockchain network 320, which features a distributed, decentralized, peer-to-peer architecture. In this example, a blockchain user 322 may submit a transaction to the permissioned blockchain 324. In this example, the transaction may be a deploy, invoke, or query, and may be issued via a client-side application utilizing an SDK, directly via an API, etc. The network may provide access to regulators 326, such as auditors. A blockchain network operator 328 manages member permissions, such as registering regulators 326 as “auditors” and blockchain users 322 as “clients.” Auditors may be limited to only querying the ledger, while clients may be given permission to deploy, invoke, and query certain types of chaincode.

[0078] A blockchain developer 330 writes the chaincode and client-side applications. Through an interface, the blockchain developer 330 can deploy the chaincode directly to the network. To include authentication information from traditional data sources 332 in the chaincode, the developer 330 can use an out-of-band connection to access the data. In this example, a blockchain user 322 connects to the network through a peer node 334. The peer node 334 obtains a certificate of the user's registration and transaction from a certificate authority 336 before initiating any transactions. In some cases, blockchain users must possess their digital certificates to execute transactions on the permissioned blockchain 324. On the other hand, users seeking to utilize the chaincode may need to verify their user's authentication information on traditional data sources 332. To verify the user's authorization, the chaincode can use an out-of-band connection to this data through a traditional processing platform 338.

[0079] In some embodiments, the blockchain herein may be a permissionless blockchain. In contrast to a permissioned blockchain, which requires permission to participate, anyone can participate in a permissionless blockchain. For example, to participate in a permissionless blockchain, a user may create a personal address and begin interacting with the network by submitting transactions, thus adding entries to the ledger. Additionally, any participant may choose to run a node on the system and adopt a mining protocol to help validate transactions.

[0080] FIG. 3C illustrates a process 350 of a transaction being processed by a permissionless blockchain 352 that includes multiple nodes 354. A sender 356 wishes to transmit a payment or other form of value (e.g., a deed, medical record, contract, goods, services, or any other asset that can be encapsulated in a digital record) to a receiver 358 via the permissionless blockchain 352. In one embodiment, the sender device 356 and the receiver device 358 may each have a digital wallet (associated with the blockchain 352) that provides user interface controls and display of transaction parameters. In response, the transaction is broadcast to the nodes 354 throughout the blockchain 352. Depending on the network parameters of the blockchain 352, the nodes validate (360) the transaction based on rules (which may be predefined or dynamically assigned) established by the creator of the permissionless blockchain 352. For example, this validation may include verifying the identities of the parties involved, etc. The transaction may be validated immediately, or the transaction may be placed in a queue with other transactions and node 354 determines whether the transaction is valid based on a set of network rules.

[0081] Within the structure 362, valid transactions are formed into blocks and sealed using a lock (hash). This process may be performed between nodes 354 by mining nodes. Mining nodes may utilize additional software to, among other things, mine and create blocks of the permissionless blockchain 352. Each block may be identified by a hash (e.g., a 256-bit number) created using an algorithm agreed upon by the network. Each block may contain a header, a pointer or reference to the hash of the header of the previous block in the chain, and a group of valid transactions. The reference to the hash of the previous block is associated with the creation of a secure, independent chain of blocks.

[0082] Before a block can be added to the blockchain, it must be validated. Validation of a permissionless blockchain 352 may involve Proof of Work (PoW), which is the solution to a puzzle derived from the block's header. Another process for validating a block, not shown in the example of FIG. 3C, is Proof of Stake. Unlike Proof of Work, where an algorithm rewards miners for solving a mathematical problem, in Proof of Stake, the creators of new blocks are selected in a deterministic way depending on their wealth (also defined as "stake"). Similar proofs are then performed by the selected nodes.

[0083] In mining 364, nodes attempt to solve a block by making incremental changes to one variable until the solution meets a network-wide target. This creates a proof of work, thereby guaranteeing a correct answer. In other words, a possible solution must prove that computational resources were expended in solving the problem. In some types of permissionless blockchains, miners may be rewarded with value (e.g., coins) for successfully mining a block.

[0084] Here, the PoW process makes it extremely difficult to modify the blockchain with block changes, since an attacker must modify all subsequent blocks to accept a change to one block. Furthermore, as new blocks are mined, the difficulty of modifying a block increases, and the number of subsequent blocks increases. At distribution 366, the successfully validated block is distributed throughout the permissionless blockchain 352, and all nodes 354 add the block to the majority chain, which is an auditable ledger of the permissionless blockchain 352. Furthermore, the value in the transaction submitted by the sender 356 is deposited or otherwise transferred to the digital wallet of the receiving device 358.

[0085] FIG. 4A illustrates the format of a prepare message 410 and a commit message 420 for blockchain consensus, according to an example embodiment. For example, the prepare message 410 and the commit message 420 may be used to replace the conventional prepare message and commit message in the pBFT consensus process 100B illustrated in FIG. 1B. Referring to FIG. 4A, the prepare message 410 may include a view number 412 representing the next primary peer (e.g., from a predefined list) and a sequence number 413 representing the block number of the next block in the blockchain to be added. For example, if the previously stored block on the blockchain is block number 15, then the sequence number 413 stores a value of 16, representing that block number 16 is the next block to be added.

[0086] According to various embodiments, the prepare message 410 may include a hash of the latest proposal 411 to be added to the blockchain. The prepare message of the related art does not include a hash of the latest proposal, where the latest proposal 411 may represent the contents / data block of a transaction that is in the process of being agreed upon between blockchain peers to be added to the blockchain. For example, the transaction proposal 411 may include key-value pairs that are to be updated (read / written) as a result of the blockchain transaction being added to the blockchain ledger. By hashing the latest proposal 411, the size of the prepare message 410 remains small while still providing evidence of the current state of the blockchain ledger that is in the process of being updated (in flight).

[0087] The prepare message 410 also includes a signature 414 of the blockchain peer that created the prepare message 410. The signature 414 is a hash of the latest proposal 411, the view number 412, and the sequence number 413. Thus, the signature 414 verifies that the blockchain peer is in compliance with the blockchain. As described further below, the prepare message 410 also includes a hash puzzle 415.

[0088] After sufficient prepare messages 410 have been received, the blockchain peer may create and send a commit message 420. The commit message includes a digest of the blockchain proposal 421 to be added to the blockchain ledger, a view number 422 representing the next primary peer (e.g., from a predefined list), and a sequence number 423 representing the block number of the next block in the blockchain to be added, where the view number 422 and the sequence number 423 correspond to the view number 412 and the sequence number 413 in the prepare message 410. The commit message 420 also includes a solution 424 to the hash puzzle 415 provided in the prepare message 410.

[0089] A blockchain peer may update the blockchain when sufficient commit messages 420 are collected by the blockchain peer. For example, a blockchain update is performed when commit messages 420 are received from a quorum of blockchain peers in a group (e.g., identified by digest 421). In this example, the proof of the update to the blockchain used by the blockchain peer is based on the collected commit messages and the corresponding prepare messages that contain the blockchain peer's signatures attesting to the changes to the blockchain's state.

[0090] In an example embodiment, a hash puzzle 415 may be used to replace the signature on the commit message 420. Each sending blockchain peer that sends a prepare message 410 also adds a signature 414. In a blockchain consensus, the system needs a way to verify that a blockchain peer also sent the commit message 420. Typically, this verification is performed by signing the commit message. However, the sending blockchain peer has already added the signature 414 to the prepare message. Therefore, signing the commit message 420 is not secure because it would expose the signature again. Instead, the sending blockchain peer may sign the prepare message 410 with the signature 414 and add a hash puzzle 415, such as y=Hash(x), where "x" is a random secret value.

[0091] The sending blockchain peer may then publish the solution 424 to the hash puzzle 415 (the solution is x) in the commit message 420. To verify the hash puzzle 415, the receiving blockchain peer hashes the solution 424 in the commit message 420 provided by the sending blockchain peer to determine whether it arrives at the same value of the hash puzzle 415 in the prepare message 410. If the hashed version of the solution 424 is the same as the hash puzzle 415, the receiving blockchain peer knows that the same sending blockchain peer sent both the commit message 420 and the prepare message 410.

[0092] By modifying the prepare message 410 to include the latest proposal sequence 411 identifying the in-flight changes to the blockchain state, and also including the signature 414 of the sending blockchain peer, a new view change message 430 can be constructed as illustrated in the example of FIG. 4B. Referring to FIG. 4B, the view change message 430 includes a hash proposal 431 of the in-flight changes to the blockchain state. The hash proposal 431 is used to conserve the amount of data required to represent the state of the changes to the blockchain. Here, the hash proposal 431 may include a hash of the block / transaction whose contents are in the process of being added to the blockchain ledger before a timeout / failure occurs at the current primary peer. The view change message 430 also includes metadata 432 that includes information about the state of the blockchain, including the view number (next primary peer), sequence number (next block in the chain), etc.

[0093] Additionally, the view change message 430 also includes signatures 433, 434, and 435 of the blockchain peers collected from the prepare message 410 during the prepare phase. Signatures 433, 434, and 435 correspond to signature 414 in the prepare message 410. Thus, the view change message 430 can provide proof of in-flight changes to the blockchain via hash proposal 431, can provide the current state of the blockchain via metadata 432, and can provide the number of blockchain peers that agree with the hash proposal 431 and state 432 via signatures 433, 434, and 435. The view change message 430 can be constructed by each of the blockchain peers in the group shown in FIG. 4C (e.g., any of blockchain peers 444, 446, and 448) in response to detecting that the current primary peer 442 has failed. For example, the failed primary peer 442 can be detected in response to a timeout on a request from client 450 to add data to the blockchain ledger. In this case, a timeout may occur at some point in the process when new data is generated but before it is added to the blockchain.

[0094] As further shown in process 400C of FIG. 4C, a new primary peer is selected based on the metadata 432 along with the view change message 430. Here, the new primary peer is identified as a blockchain peer 444. Thus, the following peers 446 and 448 generate and send view change messages 430 to the new primary peer 444, requesting changes to their views of the blockchain. When the new primary peer 444 receives view change messages 430 from a predefined threshold number (e.g., 2f+1) of blockchain peers, the new primary peer 444 can verify the in-flight changes to the blockchain ledger based on the hashed proposals 431 included in the view change messages. Thus, the new primary peer 444 only needs one view data message 449 to verify the latest state of the blockchain.

[0095] In this example, the view data message 449 includes a checkpoint of the blockchain. If the checkpoint in the view data message 449 matches the hashed proposal 431 in the constant view change message, the new primary peer 444 can be sure that the blockchain peers are not "behind" and are on the current / latest state of the changes to the blockchain. Thus, the new primary peer 444 can send a new view message to the remaining blockchain peers 442, 446, and 448 informing them that their view has changed to the new primary peer 444. Thus, instead of waiting for 2f+1 view data messages, the new primary peer 444 only needs to wait for one view data message 449 to verify the state of the blockchain.

[0096] In essence, after 2f+1 view change messages 430 are collected, the new primary peer 444 knows that the latest proposal sequence comes from the hash proposal 431 and metadata 432. Some peers may be lagging behind and may be the first peers to send a view data message to the new primary peer. The new primary peer 444 must wait for the view data messages from the updated following peers and then it can proceed.

[0097] In the example herein, if enough following peers have received 2f+1 prepare messages from other following peers, the new primary peer needs to wait for only one view data message. That is, if 2f+1 following peers have received 2f+1 prepare messages containing the latest proposed hash and the following peer's signature, a view change message containing sufficient proof of change can be constructed. However, if the number of following peers that have received prepare messages is insufficient (i.e., less than 2f+1), there is not sufficient proof of the latest hash proposal in process. Thus, the new primary peer must wait for 2f+1 view data messages as in process 100C shown in FIG. 1C.

[0098] 5A illustrates a method 500 for performing a view change based on a view change message according to an example embodiment. As a non-limiting example, the method 500 may be performed, such as by a program running, such as on a blockchain peer. With reference to FIG. 5A, at 502, the method may include receiving a view change message requesting a view change from a previous primary peer of the blockchain to the primary peer. For example, the view change message may be received from a following peer in the blockchain network.

[0099] At 504, the method may include identifying, based on metadata of the received view change message, that a change to the blockchain state is in process using the previous primary peer. For example, the change to the blockchain state may include a blockchain transaction stored in a data block to be added to the blockchain. The transaction may include a key-value pair that updates, deletes, adds, etc., a value to the blockchain, and the key-value pair is stored in a state database of the blockchain ledger.

[0100] At 506, the method may include verifying that the changes to the blockchain state correspond to the most recent changes to the blockchain based on the received view data message. For example, the changes to the blockchain state may be identified from a view data message received from a following peer that includes the blockchain state, including the pending changes to the blockchain. At 508, the method may include sending a new view message to the other following peer that includes the pending changes to the blockchain state. For example, sending may include sending the new view message in response to receiving only one view data message.

[0101] In some embodiments, the pending changes to the blockchain state may include a proposed data block to be committed. In some embodiments, identifying may further include verifying that the view change message has been received from a predefined threshold number of following peers. In some embodiments, for each view change message, the metadata may include the next view number and hashed changes to the blockchain. In some embodiments, the view data message may include multiple prepare messages broadcast by the leading peer and received by the following peers. In some embodiments, verifying may include verifying that the pending changes to the blockchain state are included in a predefined number of prepare messages stored in the view data message.

[0102] In some embodiments, the pending change may be a change to the state of the blockchain that has not yet been committed with respect to the peer receiving the view change and view data messages. In some cases, however, the change may already be committed. By collecting messages that identify the pending change, a peer can ensure that a different change is not committed to the blockchain in the event that a blockchain peer that has already committed the pending change is unavailable.

[0103] 5B illustrates a method 510 for generating a view change message according to an example embodiment. For example, the method 510 may be performed by a program running on a blockchain peer, etc. With reference to FIG. 5B, at 512, the method may include determining that a current primary peer of the blockchain has become a failed peer. For example, the blockchain peer may detect that the current primary peer has timed out, etc., during a consensus process running among multiple blockchain peers of the blockchain network.

[0104] At 514, the method may include identifying that changes to the blockchain state are in progress with the current primary peer. For example, the peer may have received a pre-preparation message from the current primary peer that includes the in-progress changes to the blockchain state. At 516, the method may include generating a view change message that includes a next view number and a hash of the in-progress changes to the blockchain state. Additionally, at 518, the method may include sending the view change message to the new primary peer.

[0105] In some embodiments, the method may further include storing in the view change message signatures of other following peers of the blockchain that agree on the pending changes to the blockchain's state. In some embodiments, during a preparation phase for Byzantine Fault Tolerance (BFT) agreement, the pending changes to the blockchain's state and the signatures are collected. For example, the pending changes to the blockchain's state include a new block to be added to the blockchain.

[0106] FIG. 5C illustrates a method 520 of generating a prepare message according to an example embodiment. With reference to FIG. 5C, at 522, the method may include receiving a pre-prepare message from a primary peer including data proposed to be added to the blockchain. At 524, the method may include generating a prepare message including a hash of the data proposed to be added to the blockchain and a signature of the consensus peer. At 526, the method may include adding the consensus peer's hash puzzle to the prepare message. At 528, the method may include sending the prepare message including the hash puzzle to a plurality of other consensus peers of the blockchain.

[0107] In some embodiments, the method may further include determining, based on the prepare messages received from the other agreement peers, that a predefined threshold number of the other agreement peers agree on the data proposed to be added to the blockchain. In some embodiments, the method may further include generating a commit message including a solution to the hash puzzle added to the prepare message and sending the commit message to the multiple other agreement peers. In some embodiments, the commit message does not include signatures of the agreement peers. In some embodiments, the method may include generating the hash puzzle via a hash of a predefined secret value. In some embodiments, the method may further include receiving prepare messages from the other agreement peers, the received prepare message including the hash puzzle added by each of the other agreement peers.

[0108] FIG 5D illustrates a method 530 for generating a view data message according to an example embodiment. Referring to FIG 5D, at 532, the method may include receiving a view change message including a next view value and a hash of an in-progress change to the state of the blockchain. In response to receiving a predefined threshold number of view change messages, at 534, the method may include generating a view data message including a signed prepare message from another following peer including a proof of the in-progress change to the state of the blockchain. At 536, the method may include sending the generated view data message including the signed prepare message to the primary peer.

[0109] In some embodiments, the method may further include collecting a signed prepare message during a prepare phase of the Byzantine Fault Tolerance (BFT) agreement. In some embodiments, the signed prepare message may include metadata including a hash of in-progress changes to the blockchain state and a view number of the new primary peer. In some embodiments, the signed prepare message further includes a hash puzzle added by other following peers. In some embodiments, the method further includes receiving in-progress changes to the blockchain state from the primary peer before the primary peer fails.

[0110] FIG. 6A illustrates an example system 600 including a physical infrastructure 610 configured to perform various operations according to example embodiments. With reference to FIG. 6A, the physical infrastructure 610 includes a module 612 and a module 614. The module 614 includes a blockchain 620 and a smart contract 630 (which may be present in the blockchain 620) that may perform any of the operational steps 608 (within the module 612) included in any of the example embodiments. The steps / operations 608 may include one or more of the embodiments described or illustrated in the figures and may represent information written or read, outputted, or written from one or more smart contracts 630 and / or the blockchain 620. The physical infrastructure 610, the module 612, and the module 614 may include one or more computers, servers, processors, memories, or wireless communication devices, or combinations thereof. Additionally, the module 612 and the module 614 may be the same module.

[0111] FIG. 6B illustrates another exemplary system 640 configured to perform various operations according to example embodiments. Referring to FIG. 6B, the system 640 includes modules 612 and 614. Module 614 includes a blockchain 620 and a smart contract 630 (which may reside in the blockchain 620) that may perform any of the operational steps 608 (in module 612) included in any of the example embodiments. The steps / operations 608 may include one or more of the embodiments described or illustrated in the figures and may represent information written or read, outputted, or written from one or more smart contracts 630 and / or blockchain 620. Modules 612 and 614 may include one or more computers, servers, processors, memories, or wireless communication devices, or combinations thereof. Additionally, modules 612 and 614 may be the same module.

[0112] FIG. 6C illustrates an exemplary system configured to utilize an intermediary server configured to configure smart contracts between contracting parties and enforce the terms of the smart contracts on a blockchain, according to an example embodiment. With reference to FIG. 6C, configuration 650 may represent a communication session, an asset transfer session, or a process or procedure operated by a smart contract 630 that explicitly identifies one or more user devices 652 and / or 656. The execution, operation, and results of the execution of the smart contract may be managed by a server 654. The contents of the smart contract 630 may require digital signatures by one or more of the entities 652 and 656 that are participants in the smart contract transaction. The results of the execution of the smart contract may be written to the blockchain 620 as a blockchain transaction. The smart contract 630 resides on the blockchain 620, which may reside on one or more computers, servers, processors, memories, and / or wireless communication devices.

[0113] FIG. 6D illustrates a system 660 including a blockchain, according to an example embodiment. Referring to the example of FIG. 6D, an application programming interface (API) gateway 662 provides a common interface for accessing the logic (e.g., smart contracts 630 or other chaincode) and data (e.g., distributed ledger, etc.) of the blockchain. In this example, the API gateway 662 is a common interface for performing transactions (calls, queries, etc.) on the blockchain by connecting one or more entities 652 and 656 to blockchain peers (i.e., servers 654). Here, the servers 654 are peer components of the blockchain network that hold copies of the world state and the distributed ledger, which allow clients 652 and 656 to query data about the world state and submit transactions to the blockchain network, which executes the smart contracts 630 according to the smart contracts 630 and signing policies.

[0114] The foregoing embodiments may be implemented in hardware, in a computer program executed by a processor, in firmware, or in a combination thereof. The computer program may be embodied in a computer-readable medium, such as a storage medium. For example, the computer program may be present in a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a removable disk, a compact disk read-only memory (CD-ROM), or any other form of storage medium known in the art.

[0115] An exemplary storage medium may be coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (ASIC). In the alternative, the processor and the storage medium may reside as discrete components.

[0116] FIG. 7A illustrates a process 700 of a new block being added to the distributed ledger 720 according to an example embodiment, and FIG. 7B illustrates the contents of a new data block structure 730 of the blockchain according to an example embodiment. With reference to FIG. 7A, a client (not shown) may submit a transaction to blockchain nodes 711, 712, or 713, or a combination thereof. A client may be an instruction received from any source to specify an action on the blockchain 720. As an example, a client may be an application acting on behalf of a requester, such as a device, person, or entity, proposing a blockchain transaction. Multiple blockchain peers (e.g., blockchain nodes 711, 712, and 713) may maintain a copy of the blockchain network state and the distributed ledger 720. Various types of blockchain nodes / peers may exist in a blockchain network, including signing peers that simulate and sign transactions proposed by clients, and commit peers that verify the signatures, validate the transactions, and commit the transactions to the distributed ledger 720. In this example, blockchain nodes 711, 712, and 713 may perform the role of signer nodes, committer nodes, or both.

[0117] The distributed ledger 720 includes a blockchain that stores immutable ordered records in blocks, and a state database 724 (current world state) that maintains the current state of the blockchain 722. There may be one distributed ledger 720 per channel, with each peer maintaining its own copy of the distributed ledger 720 for each channel in which it is a member. The blockchain 722 is a transaction log structured as hash-linked blocks, with each block containing a sequence of N transactions. A block may include various components, such as those shown in FIG. 7B. Block links (illustrated by arrows in FIG. 7A) may be generated by adding a hash of the previous block's header into the block header of the current block. In this way, all transactions on the blockchain 722 are ordered and cryptographically linked together, preventing tampering with the blockchain data without breaking the hash links. Furthermore, because of these links, the most recent block in the blockchain 722 represents all transactions that came before it. The blockchain 722 may be stored in the file system (local or attached storage) of a peer that supports additional dedicated blockchain workloads.

[0118] The current state of the blockchain 722 and the distributed ledger 722 may be stored in a state database 724, where the current state data represents the latest values ​​of all keys ever included in the on-chain transaction log of the blockchain 722. Chaincode invocations execute transactions against the current state in the state database 724. To make those chaincode interactions highly efficient, the latest values ​​of all keys are stored in the state database 724. The state database 724 may contain an indexed view into the blockchain 722 transaction log and therefore may be regenerated off-chain at any time. The state database 724 may be automatically restored (or generated if necessary) at peer startup and before transactions are received.

[0119] A signing node receives transactions from clients and signs the transactions based on the simulation results. The signing node holds a smart contract that simulates the transaction proposal. When the signing node signs a transaction, it generates a signature for the transaction, which is a signed response from the signing node to the client application indicating the signature of the simulated transaction. The way in which the transaction is signed depends on a signature policy that may be specified in the chaincode. An example of a signature policy is "a majority of the signing peers must sign the transaction." Different channels may have different signature policies. The signed transaction is forwarded by the client application to the ordering service 710.

[0120] The ordering service 710 receives signed transactions, orders them into blocks, and distributes the blocks to committing peers. For example, the ordering service 710 may start a new block when a transaction threshold is reached, a timer times out, or another condition. In the example of FIG. 7A, blockchain node 712 is a committing peer that receives a new data block 730 of new data for storage in the blockchain 720. The first block in a blockchain may be called a genesis block, which contains information about the blockchain, the members of the blockchain, the stored data, etc.

[0121] The ordering service 710 may consist of a cluster of ordering nodes. The ordering service 710 does not process transactions, smart contracts, or maintain a shared ledger. Rather, the ordering service 710 may receive signed transactions and specify the order in which those transactions are committed to the distributed ledger 720. The architecture of the blockchain network may be designed such that a particular implementation of "ordering" (e.g., Solo, Kafka, BFT, etc.) is a pluggable component.

[0122] Transactions are written to the distributed ledger 720 in a consistent order. The order of transactions is established to ensure that updates to the state database 724 are valid when transactions are committed to the network. Unlike cryptocurrency blockchain systems (e.g., Bitcoin) where ordering occurs through solving cryptographic puzzles or through mining, in this example, the participants in the distributed ledger 720 may choose the ordering mechanism that best suits their network.

[0123] The ordering service 710 may initialize a new data block 730, which may be broadcast to the committing peers (e.g., blockchain nodes 711, 712, and 713). In response, each committing peer may verify the validity of the transaction in the new data block 730 by checking to ensure that the read set and write set still match the current world state in the state database 724. In particular, the committing peer may determine whether the read data that existed when the signer simulated the transaction is identical to the current world state in the state database 724. If the committing peer verifies the validity of the transaction, the transaction is written to the blockchain 722 of the distributed ledger 720, and the state database 724 is updated with the write data from the read / write set. If a transaction fails, i.e., a commit peer detects that its read / write set does not match the current world state in state database 724, the transactions ordered in the block are still included in the block but are marked as invalid and state database 724 is not updated.

[0124] 7B, a new data block 730 (also referred to as a data block) stored in the blockchain 722 of the distributed ledger 720 may include multiple data segments, such as a block header 740, block data 750 (block data section), and block metadata 760. It should be understood that the various illustrated blocks and their contents, such as the new data block 730 and its contents illustrated in FIG. 7B, are examples only and are not intended to limit the scope of the example embodiments. In a conventional block, a data section may store transaction information for N (e.g., 1, 10, 100, 500, 1000, 2000, 3000, etc.) transactions in the data block 750.

[0125] The new data block 730 may include a link to the previous block (e.g., on the blockchain 722 of FIG. 7A) in the block header 740. In particular, the block header 740 may include a hash of the header of the previous block. The block header 740 may include a unique block number for the new data block 730, a hash of the block data 750, etc. The block numbers for the new data block 730 are unique and may be assigned in various orders, such as a progressive / sequential order starting from 0.

[0126] The block metadata 760 may store multiple fields of metadata (e.g., as a byte array, etc.). The metadata fields may include a signature at the time of block creation, a reference to the last constituent block, a transaction filter that identifies valid and invalid transactions in the block, the last persistent offset of the ordering service that ordered the block, etc. The signature, the last constituent block, and the ordering node metadata may be added by the ordering service 710. Meanwhile, the committer of the block (e.g., blockchain node 712) may add valid / invalid information based on signature policy, validation of read / write sets, etc. The transaction filter may include a byte array of size equal to the number of transactions included in the block data 750, and a validation code that identifies whether the transaction was valid / invalid.

[0127] FIG. 7C illustrates an embodiment of a blockchain 770 for digital content, according to embodiments described herein. Digital content may include one or more files and associated information. These files may include media, images, video, audio, text, links, graphics, animations, web pages, documents, or other forms of digital content. The immutable, append-only characteristics of blockchain serve as a safeguard to protect the integrity, validity, and authenticity of digital content, making blockchain appropriate for use in legal proceedings where admissibility rules apply, or in other settings where evidence is considered or the presentation and use of digital information is otherwise subject. In this case, the digital content may be referred to as digital evidence.

[0128] A blockchain may be formed in a variety of ways. In one embodiment, digital content may be contained in and accessed from the blockchain itself. For example, each block of the blockchain may store a hash value of the reference information (e.g., header, value, etc.) along with the associated digital content. The hash value and the associated digital content may then be encrypted together. Thus, the digital content of each block may be accessed by decrypting each block in the blockchain, and the hash value of each block may be used as a basis to reference the previous block. This may be shown as follows: Block 1 Block 2 ····Block N Hash value 1 Hash value 2 Hash value N Digital Content 1 Digital Content 2 Digital Content N

[0129] In one embodiment, the digital content may not be included in the blockchain. For example, the blockchain may store an encrypted hash of the contents of each block that does not contain digital content. The digital content may be stored in a separate storage area or memory address in association with the hash value of the original file. The other storage area may be the same storage device used to store the blockchain, or may be a different storage area or a separate relational database. The digital content of each block may be referenced or accessed by obtaining or querying the hash value of the block in question and then searching the storage area for the hash value stored that corresponds to the actual digital content. This operation may be performed, for example, by a database gatekeeper. This may be shown as follows: Blockchain Storage Area Hash value of block 1 Hash value of block 1...Contents · · · · · · Hash value of block N Hash value of block N... contents

[0130] In the example embodiment of FIG. 7C , a blockchain 770 comprises multiple blocks 7781, 7782, ... 778 that are cryptographically linked in an ordered sequence. N , where N >= 1. Blocks 7781, 7782, ... 778 N The encryption used to link the ciphers may be either multiple keyed or unkeyed hash functions. In one embodiment, blocks 7781, 7782, ... 778 Nare subjected to a hash function (where n is 256 or another number) that generates an n-bit alphanumeric output from the input based on the information in the block. Examples of such hash functions include, but are not limited to, SHA-type (SHA stands for Secured Hash Algorithm) algorithms, the Merkle-Dangard algorithm, the HAIFA algorithm, the Merkle Tree algorithm, nonce-based algorithms, and non-collision resistant PRF algorithms. In another embodiment, blocks 7781, 7782, ...778 N may be cryptographically linked by a function different from the hash function. For illustrative purposes, the following description is given with reference to a hash function (eg, SHA-2).

[0131] Blocks 7781, 7782, ... 778 in the blockchain N Each of the files includes a header, a version of the file, and a value. The header and value vary from block to block as a result of hashing in the blockchain. In one embodiment, the value may be included in the header. As described in more detail below, the version of the file may be the original file or a different version of the original file.

[0132] The first block 7781 in a blockchain is called the genesis block and contains a header 7721, an original file 7741, and an initial value 7761. The hashing scheme used for the genesis block (and in fact for all subsequent blocks) may vary. For example, all of the information in the first block 7781 may be hashed together at the same time, or each or part of the information in the first block 7781 may be hashed separately, and then a hash of the separately hashed parts may be performed.

[0133] The header 7721 may include one or more initial parameters, which may include, for example, a version number, a timestamp, a nonce, route information, difficulty, consensus protocol, duration, media format, source, descriptive keywords, or other information associated with the original file 7741 or the blockchain or both, or a combination thereof. The header 7721 may be generated automatically (e.g., by blockchain network management software) or manually by a participant of the blockchain. Other blocks 7782-778 in the blockchain N Unlike headers in the 7721 block, the header in the genesis block does not reference a previous block, because there is simply no previous block.

[0134] The original file 7741 in the genesis block may be, for example, data captured by a device, with or without processing prior to inclusion in the blockchain. The original file 7741 may be received from a device, media source, or node through an interface of the system. The original file 7741 may be associated with metadata, which may be generated, for example, by a user, device, or system processor, either manually or automatically. The metadata may be included in the first block 7781 in association with the original file 7741.

[0135] The value 7761 in the genesis block is an initial value generated based on one or more unique attributes of the original file 7741. In one embodiment, the one or more unique attributes may include a hash value of the original file 7741, metadata of the original file 7741, and other information associated with the file. In one implementation, the initial value 7761 may be based on the following unique attributes: 1) The hash value calculated for the original file using SHA-2 2) Calling device ID 3) The start timestamp of the original file 4) The initial storage location of the original file 5) The blockchain network member ID of the software that currently controls the original file and associated metadata

[0136] Other blocks in the blockchain: 7782 to 778 N Each block also contains a header, a file, and a value. However, unlike the first block 7721, the headers 7722 to 7723 in the other blocks N Each of the remaining blocks contains the hash value of the immediately preceding block, which may simply be a hash of the previous block's header, or may be a hash value of the entire previous block. By including the hash value of the preceding block in each of the remaining blocks, a block-by-block trace can be performed back from the Nth block to the genesis block (and associated original file), as indicated by arrow 780, establishing an auditable and immutable evidential chain of custody.

[0137] Headers 7722 to 772 in other blocks N Each of the may generally include other information (e.g., a version number, a timestamp, a nonce, root information, difficulty, consensus protocol, or other parameters or information associated with the corresponding file or blockchain or both, or a combination thereof).

[0138] Files 7742 to 774 in other blocks N may be the same as the original file in the genesis block or may be a modified version of the original file, depending, for example, on the type of processing performed. The type of processing performed may vary from block to block. Processing may include any modification of the file in the preceding block, such as, for example, editing information or otherwise changing the content of information, removing information from the file, or adding information to the file.

[0139] Additionally or alternatively, processing may include simply copying a file from a previous block, changing the storage location of the file, analyzing a file from one or more previous blocks, moving a file from one storage or memory location to another storage or memory location, or performing operations on the file and / or associated metadata on the blockchain. Processing including analyzing a file may include, for example, adding, including, or otherwise associating various analyses, statistics, or other information associated with the file.

[0140] Other blocks in other blocks 7762~776 N The value contained in each of the blocks is unique and different as a result of the operations that were performed. For example, the value in any one block corresponds to an updated version of the value in the previous block. This update is reflected in the hash of the block to which the value was assigned. The value of a block thus provides an indication of what operations were performed in the block, and also makes it possible to trace the blockchain back to the original file. This tracing confirms the evidential integrity of the file throughout the blockchain.

[0141] For example, consider the case where a portion of a file in a previous block is edited, blocked, or pixelated to protect the identity of a person indicated in the file. In this case, the block containing the edited file will include metadata associated with the edited file, such as how the edit was performed, who performed the edit, a timestamp when the edit occurred, etc. This metadata may be hashed to form a value. Because the metadata of the block is different from the information hashed to form the value in the previous block, the values ​​are different from each other and may be recovered when decrypted.

[0142] In one embodiment, the value of the previous block may be updated (e.g., a new hash value may be calculated) to form the value of the current block if any one or more of the following occurs: The new hash value, in this example embodiment, may be calculated by hashing all or part of the information set forth below: a) A new SHA-2 computed hash value whenever the file is processed in any way (e.g., when the file is edited, copied, modified, accessed, or any other action is performed on it). b) The new storage location of the file c) Identified new metadata associated with the file. d) Transfer of access or control of a file from one blockchain participant to another blockchain participant

[0143] FIG. 7D illustrates an embodiment of a block that may represent the structure of a block in a blockchain 790, according to one example embodiment. i ) is header 772 i , File 774 i , and the value 776 i Contains:

[0144] Header 772 i is the previous block (block i-1 ) and additional reference information, which may be any type of information (e.g., header information containing references, properties, parameters, etc.). Every block references the hash of the previous block, except of course for the genesis block. The hash of the previous block may simply be a hash of the header in the previous block, or it may be a hash of all or part of the information in the previous block, including files and metadata.

[0145] File 774 icontains multiple data, such as Data 1, Data 2, ..., Data N, in turn. The data are tagged with Metadata 1, Metadata 2, ..., Metadata N, describing content and / or characteristics associated with the data. For example, the metadata for each data may include information to indicate a timestamp of the data, keywords indicative of the process of the data, people or other content depicted in the data, or other characteristics, or combinations thereof, that establish the validity and content of the file as a whole and that can be particularly useful for using digital evidence, e.g., as described in connection with the embodiments described below. In addition to the metadata, each data may include a reference to the previous data (Reference 1, Reference 2, ..., Reference 3) to prevent tampering, gaps in the file, and successive references throughout the file. N ) may be tagged.

[0146] After metadata is assigned to data (e.g., via a smart contract), it cannot be changed without changing the hash, which can be easily identified as invalid. Thus, the metadata creates a data log of information that may be accessed for use by participants in the blockchain.

[0147] Value 776 i is a hash value or other value calculated based on any of the types of information previously described. For example, i ), the value of that block may be updated to reflect the operation performed on that block (e.g., a new hash value, a new storage location, new metadata for the associated file, control or access transfer, an identifier, or other operation or added information). Although the values ​​in each block are shown as being separate from the metadata of the file and header data, in alternative embodiments the values ​​may be based in part or in whole on this metadata.

[0148] At any point after the blockchain 770 is formed, an immutable evidence-based copy of the file may be obtained by querying the blockchain for the transaction history of values ​​across blocks. This query or trace procedure may begin by decrypting the value of the last included block (e.g., the last (Nth) block), and then continue to decrypt the values ​​of other blocks until the genesis block is reached and the original file is recovered. Decryption may further include decrypting the header and file and associated metadata at each block.

[0149] Decryption is performed based on the type of encryption performed on each block. This decryption may involve the use of a private key, a public key, or a public and private key pair. For example, if asymmetric encryption is used, a blockchain participant or a processor in the network may generate a public and private key pair using a predefined algorithm. The public and private keys are related to each other by some mathematical relationship. The public key may be distributed publicly to serve as an address (e.g., an IP address or a home address) for receiving messages from other users. The private key is kept secret and is used to digitally sign messages sent to other blockchain participants. The signature is included in the message so that the recipient can verify it using the sender's public key. In this way, the recipient can be sure that only the sender could have sent this message.

[0150] Generating a key pair is similar to creating an account on the blockchain, but in reality, there is no need to register anywhere. Also, every transaction performed on the blockchain is digitally signed by the sender using a private key. This signature ensures that only the account owner can track and process files on the blockchain (if within the scope of their permissions, as determined by the smart contract).

[0151] 8A and 8B illustrate additional use cases for blockchain that may be incorporated and used herein. In particular, FIG. 8A illustrates an example 800 of a blockchain 810 storing machine learning (artificial intelligence) data. Machine learning relies on large amounts of historical data (or training data) to build predictive models for accurate predictions on new data. Machine learning software (e.g., neural networks, etc.) can sift through millions of records to discover often non-intuitive patterns.

[0152] In the example of FIG. 8A, a host platform 820 builds and deploys machine learning models for predictive monitoring of assets 830, where the host platform 820 may be a cloud platform, an industrial server, a web server, a personal computer, a user device, etc. The assets 830 may be any type of asset (e.g., machinery or equipment, etc.), such as an aircraft, a locomotive, a turbine, a medical device, an oil and gas device, a boat, a ship, a vehicle, etc. As another example, the assets 830 may be intangible assets, such as stocks, currencies, digital coins, insurance, etc.

[0153] The blockchain 810 may be used to significantly improve both the machine learning model training process 802 and the prediction process 804 based on the trained machine learning model. For example, in 802, historical data may be stored on the blockchain 810 by the asset 830 itself (or through an intermediary not shown) rather than requiring a data scientist / technologist or other user to collect the data. This can significantly reduce the collection time required by the host platform 820 when performing training of the predictive model. For example, smart contracts can be used to transfer data directly and reliably from its original location straight to the blockchain 810. The smart contracts can send data directly from the asset to the individual who uses the data to build the machine learning model by using the blockchain 810 to ensure the security and ownership of the collected data. This allows for the sharing of data between the assets 830.

[0154] The collected data may be stored in the blockchain 810 based on a consensus mechanism. The consensus mechanism controls (authorized nodes) to ensure that the data being recorded is verified and accurate. The recorded data is time-stamped, cryptographically signed, and immutable. Thus, the recorded data is auditable, transparent, and secure. By adding IoT devices that write directly to the blockchain, it is possible to increase the frequency and accuracy with which data is recorded in certain cases (i.e., in the case of supply chain, healthcare, logistics, etc.).

[0155] Additionally, training the machine learning model on the collected data may require a series of refinements and tests by the host platform 820. Each refinement and test may be based on additional data or data not previously considered to help expand the knowledge of the machine learning model. At 802, the different training and testing steps (and associated data) may be stored in the blockchain 810 by the host platform 820. Each refinement of the machine learning model (e.g., changes in variables, weights, etc.) may be stored in the blockchain 810. This provides verifiable proof of how the model was trained and what data was used to train the model. Additionally, when the host platform 820 achieves a final trained model, the resulting model may be stored in the blockchain 810.

[0156] After the model is trained, it may be deployed into a live environment and predictions / decisions may be made based on the execution of the final trained machine learning model. For example, at 804, the machine learning model may be used for condition-based maintenance (CBM) for assets such as aircraft, wind turbines, medical machines, etc. In this example, data fed back from the asset 830 may be input into the machine learning model and used to make event predictions such as failure events, error codes, etc. Decisions made by the execution of the machine learning model on the host platform 820 may be stored on the blockchain 810 to provide auditable / verifiable proof. As one non-limiting example, the machine learning model may predict a future outage / failure on a part of the asset 830 and create an alert or notification to replace the part. The data behind this decision may be stored on the blockchain 810 by the host platform 820. In one embodiment, the features and / or operations described and / or illustrated herein may occur on or with respect to the blockchain 810.

[0157] New transactions in the blockchain can be collected together in a new block and added to an existing hash value. This hash value is then encrypted to produce a new hash for the new block. This new hash is added to the next list of transactions as they are encrypted, and so on. The result is a chain of blocks, each containing the hash values ​​of all the blocks that preceded it. The computers that store these blocks periodically compare the hash values ​​of the blocks to make sure they are all in agreement. Any computers that are not in agreement discard the offending record. This method is good at guaranteeing that the blockchain is tamper-proof, but it is not perfect.

[0158] One way to rig the system is for a malicious user to modify the list of transactions in a way that does not change the hash. This can be done by a brute force attack, in other words by modifying the record, encrypting the result, and checking if the hash value is the same. If the hash value is not the same, it tries again and again until it finds a matching hash. The security of the blockchain is based on the idea that a normal computer can only perform this kind of brute force attack over totally impractical timescales, such as the age of the universe. Quantum computers, by contrast, are very fast (thousands of times faster) and therefore pose a very large threat.

[0159] FIG. 8B shows an example 850 of a quantum secure blockchain 852 that implements quantum key distribution (QKD) to protect against quantum computing attacks. In this example, blockchain users can verify each other's identities using QKD, which uses quantum particles such as photons to transmit information that cannot be copied by an eavesdropper without being corrupted. In this way, senders and receivers can verify each other's identities via the blockchain.

[0160] In the example of FIG. 8B, there are four users (854, 856, 858, and 860). Each pair of users can share a secret key 862 (i.e., QKD) between themselves. Since there are four nodes in this example, there are six pairs of nodes, and therefore, QKD AB , QKD AC , QKD AD , QKD BC , QKD BD , and QKD CDSix different private keys 862 are used, including 100 and 150. Each pair can create QKD by using quantum particles such as photons to transmit information that cannot be copied by an eavesdropper without being corrupted. In this way, pairs of users can verify each other's identities.

[0161] The operation of the blockchain 852 is based on two steps: (i) the creation of a transaction, and (ii) the construction of a block that collects new transactions. New transactions may be created in the same way as in a traditional blockchain network. Each transaction may contain information about the sender, the recipient, the time of creation, the amount (or value) to be transferred, a list of reference transactions that justify the sender having funds for the operation, etc. This transaction record is then sent to all other nodes and entered into the pool of unconfirmed transactions. Now, two parties (i.e., a pair of users among 854-860) authenticate the transaction by providing a shared secret key 862 (QKD). This quantum signature is attached to every transaction, making it extremely difficult to tamper with. Each node checks the transaction entry with respect to its local copy of the blockchain 852 and verifies that each transaction has sufficient funds. However, the transaction is not yet confirmed.

[0162] Rather than performing a traditional mining process on a block, a broadcast protocol may be used to create blocks in a distributed manner. At a predefined time period (e.g., seconds, minutes, hours, etc.), the network may apply the broadcast protocol to any unconfirmed transactions, thereby achieving Byzantine consensus (agreement) on the correct version of the transaction. For example, each node may possess a private value (that particular node's transaction data). At the first time, the nodes send the private value to each other. Then, the nodes communicate the information they received from other nodes last time. Now, the authentic node can create a complete set of transactions in a new block. This new block can be added to the blockchain 852. In one embodiment, the features and / or operations described and / or illustrated herein may occur in or with respect to the blockchain 852.

[0163] 9 illustrates an exemplary system 900 supporting one or more of the example embodiments described and / or illustrated herein. The system 900 includes a computer system / server 902 that can operate in numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, or configurations that may be suitable for use with the computer system / server 902 include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of these systems or devices.

[0164] The computer system / server 902 may be described in the general context of computer system executable instructions, such as program modules being executed by the computer system. Typically, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system / server 902 may be executed in a distributed cloud computing environment where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media, including memory storage devices.

[0165] 9, a computer system / server 902 in a cloud computing node 900 is shown in the form of a general purpose computing device. Components of the computer system / server 902 may include, but are not limited to, one or more processors or processing units 904, a system memory 906, and a bus coupling various system components including the system memory 906 to the processor 904.

[0166] A bus may represent one or more of any of a number of types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures, including, by way of example only, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnects (PCI) bus.

[0167] The computer system / server 902 typically includes a variety of computer system readable media. Such media may be any available media accessible by the computer system / server 902, including volatile and non-volatile media, removable and non-removable media. The system memory 906, in one embodiment, implements the flow diagrams of the other figures. The system memory 906 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 910 and / or cache memory 912. The computer system / server 902 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 914 may be provided for reading from and writing to a non-removable, non-volatile magnetic medium (not shown, typically referred to as a "hard drive"). Although not shown, a magnetic disk drive for reading from and writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from and writing to a removable, non-volatile optical disk, such as a CD-ROM, DVD-ROM, or other optical media, may be provided. In such an example, each may be connected to the bus by one or more data media interfaces. As shown and described in more detail below, memory 906 may include at least one program product comprising a set of (e.g., at least one) program modules configured to perform the functions of various embodiments of the present application.

[0168] For example, programs / utilities 916 including a set of (at least one) program modules 918 may be stored in memory 906, including, but not limited to, an operating system, one or more application programs, other program modules, and program data. Each of the operating system, one or more application programs, other program modules, and program data or a combination thereof may include an implementation of a network environment. The program modules 918 typically perform the functions and / or methods of the various embodiments of the present application described herein.

[0169] As will be appreciated by one of ordinary skill in the art, aspects of the present application may be embodied as a system, method, or computer program product. Accordingly, aspects of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, microcode, etc.), or an embodiment combining software and hardware aspects, all of which may be referred to generally herein as a "circuit," "module," or "system." Additionally, aspects of the present application may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied therein.

[0170] The computer system / server 902 may also communicate with one or more external devices 920, such as a keyboard, pointing device, display 922, one or more devices that allow a user to interact with the computer system / server 902, or any device that allows the computer system / server 902 to communicate with one or more other computing devices (e.g., network cards, modems, etc.), or combinations thereof. Such communication may occur through an I / O interface 924. Additionally, the computer system / server 902 may communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), or a public network (e.g., the Internet), or combinations thereof, through a network adapter 926. As shown, the network adapter 926 communicates with other components of the computer system / server 902 through a bus. It should be understood that other hardware and / or software components, not shown, may be used with the computer system / server 902. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archive storage systems.

[0171] Although at least one example embodiment of the system, method, and non-transitory computer-readable medium has been illustrated in the accompanying drawings and described in the foregoing detailed description, it will be understood that the present application is not limited to the disclosed embodiments, but may be subject to numerous rearrangements, modifications, and substitutions, as illustrated and defined by the following claims. For example, the functions of the various illustrated systems may be performed by one or more of the modules or components described herein, or in a distributed architecture, and may include pairs of transmitters, receivers, or both. For example, all or a portion of the functions performed by individual modules may be performed by one or more of those modules. Furthermore, the functions described herein may be performed at various times, with respect to various events, within or outside the modules or components. Also, information transmitted between the various modules may be transmitted between the modules via at least one of a data network, the Internet, a voice network, an Internet Protocol network, a wireless device, a wired device, or via multiple protocols, or a combination thereof. Additionally, a message sent or received by any of the modules may be sent or received directly, via one or more of the other modules, or both.

[0172] Those skilled in the art will appreciate that the "system" may be embodied as a personal computer, a server, a console, a personal digital assistant (PDA), a mobile phone, a tablet computing device, a smartphone, or any other suitable computing device or combination of devices. Presenting the foregoing functions performed by the "system" is in no way intended to limit the scope of this application, but rather to provide one example of many embodiments. Indeed, the methods, systems, and apparatus disclosed herein may be implemented in a local or distributed fashion consistent with computing technology.

[0173] It should be noted that some of the features of the systems described herein have been presented as modules to more particularly emphasize their implementation independence. For example, a module may be implemented as a hardware circuit comprising custom very large-scale integration (VLSI) circuits or gate arrays, off-the-shelf semiconductors such as logic chips, transistors, or other discrete components. A module may also be implemented in programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, graphics processing units, etc.

[0174] The modules may be implemented at least partially in software for execution by various types of processors. For example, an identified unit of executable code may comprise one or more physical or logical blocks of computer instructions, which may be organized as, for example, an object, a procedure, or a function. Nevertheless, the executableness of the identified modules need not be physically located together, but may include heterogeneous instructions stored in different locations, which, when logically combined together, comprise a module and achieve the stated purpose of the module. Furthermore, the modules may be stored on a computer-readable medium, which may be, for example, a hard disk drive, a flash device, a random access memory (RAM), a tape, or any other medium used to store data.

[0175] In practice, a module of executable code can be a single instruction, or many instructions, and may be distributed across several different code segments, among different programs, and across multiple memory devices. Similarly, operational data may be identified and depicted herein within modules, and may be embodied in any suitable form and organized within any suitable type of data structure. Operational data may be collected as a single data set or may be distributed across different locations, including different storage devices, and may exist, at least in part, as merely electronic signals over a system or network.

[0176] It will be readily understood that the components of the present application, as generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations, and thus, the detailed description of the embodiments is not intended to limit the scope of the present application as claimed, but merely represents selected embodiments of the present application.

[0177] Those skilled in the art will readily appreciate that it is possible to practice the foregoing using steps in an order other than that disclosed, or using hardware elements other than those in the disclosed configurations, or both. Thus, while the application has been described based on these preferred embodiments, it will be apparent to those skilled in the art that certain modifications, variations, and alternative constructions will be apparent.

[0178] While preferred embodiments of the present application have been described, it should be understood that the described embodiments are merely examples, and that the scope of this application, when considered along with the full scope of equivalents and modifications thereto (e.g., protocols, hardware devices, software platforms, etc.), is to be defined solely by the appended claims.

Claims

1. a network interface configured to receive a view change message from a previous primary peer of a blockchain requesting a view change to the primary peer; and a processor configured to identify, based on metadata of the received view change message, that a change to a state of the blockchain is in process using the previous primary peer, and to verify, based on a received view data message, that the change to the state of the blockchain corresponds to a most recent change to the blockchain, The apparatus, wherein the network interface is further configured to send a new view message to following peers including the pending changes to the state of the blockchain.

2. The apparatus of claim 1 , wherein the network interface is configured to transmit the new view message in response to receiving only one view data message.

3. The apparatus of claim 1 , wherein the in-progress changes to the state of the blockchain include proposed data blocks.

4. The apparatus of claim 1 , wherein the processor is further configured to verify that the view change message has been received from a predefined threshold number of the following peers.

5. The apparatus of claim 1 , wherein for each view change message, the metadata includes a next view number and a hashed change to the blockchain.

6. The apparatus of claim 1 , wherein the view data message comprises a plurality of prepare messages, the prepare messages being received by the following peer from other peers.

7. 7. The apparatus of claim 6, wherein the processor is configured to verify that the in-flight changes to the state of the blockchain are included in a predefined number of the signed prepare messages stored in the view data message.

8. 2. The apparatus of claim 1, further comprising: identifying that a change to the state of the blockchain is in progress using the current primary peer; and generating a view change message including a next view number and a hash of the in-progress change to the state of the blockchain.

9. 10. The apparatus of claim 8, wherein the processor is further configured to store in the view change message signatures of other following peers of the blockchain that agree to the in-progress changes to the state of the blockchain.

10. 10. The apparatus of claim 8, wherein the in-flight changes and the signatures to the state of the blockchain are collected during a preparation phase of practical Byzantine Fault Tolerance (pBFT) agreement.

11. 10. The apparatus of claim 8, wherein the processor is configured to identify the in-progress changes to the state of the blockchain based on a pre-preparation message received from the current primary peer.

12. the network interface further configured to receive a pre-preparation message from the primary peer containing data proposed to be added to a blockchain; 2. The apparatus of claim 1, further comprising: the processor further configured to: generate a prepare message including a hash of the proposed data to be added to the blockchain and a signature of the agreement peer; add the agreement peer's hash puzzle to the prepare message; and send the prepare message including the hash puzzle to a plurality of other agreement peers of the blockchain.

13. 13. The apparatus of claim 12, wherein the processor is further configured to determine, based on prepare messages received from the other agreement peers, that a predefined threshold number of the other agreement peers agree on the proposed data to be added to the blockchain.

14. 13. The apparatus of claim 12, wherein the processor is further configured to generate a commit message including the solution to the hash puzzle appended to the prepare message and send the commit message to the plurality of other agreement peers.

15. The apparatus of claim 12 , wherein the commit message does not include a signature of the agreement peer.

16. 13. The apparatus of claim 12, wherein the processor is configured to generate the hash puzzle via a hash of a pre-defined secret value.

17. 13. The apparatus of claim 12, wherein the processor is further configured to receive a prepare message from the other agreement peers, the received prepare message including a hash puzzle added by each of the other agreement peers.

18. 1. A method of a primary peer, comprising: receiving a view change message from a previous primary peer of a blockchain requesting a view change to the primary peer; Identifying that a change to the state of the blockchain is in process using the previous primary peer based on metadata of the received view change message; verifying that the changes to the state of the blockchain correspond to the most recent changes to the blockchain based on the received view data messages; and sending a new view message to following peers including the ongoing changes to the state of the blockchain.

19. 20. The method of claim 18, wherein said sending comprises sending the new view message in response to receiving only one view data message.

20. 20. The method of claim 18, wherein the in-progress changes to the state of the blockchain include proposed data blocks.

21. A computer program product for causing a computer to carry out the steps of the method according to any one of claims 18 to 20.

Citation Information

Patent Citations

  • Method and system for replicating data tolerant to byzantine failures - Patent Application 20070122997

    JP2019536108A

  • Achieving consensus among network nodes in a distributed system

    JP2020511807A

  • System and method for terminating a view change protocol

    JP2020522778A

  • Linear View-Change BFT with Optimistic Responsiveness

    US20190377645A1

  • Consensus system downtime recovery

    WO2019101245A2