Automated Merging of DLT Networks

JP7630621B2Active Publication Date: 2025-02-17INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023530216
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-12-01
Filing Date
2021-10-28
Publication Date
2025-02-17
Estimated Expiration
2041-10-28

Smart Images

  • Figure 0007630621000001
    Figure 0007630621000001
  • Figure 0007630621000002
    Figure 0007630621000002
  • Figure 0007630621000003
    Figure 0007630621000003
Patent Text Reader

Abstract

Exemplary operations may include one or more of: receiving a request to merge a first blockchain network and a second blockchain network, the request including a script specifying a network structure; synthesizing the script using configuration data of the first and second blockchain networks to generate a plurality of merge operations; and merging the first blockchain network with the second blockchain network based on the plurality of merge operations to create a merged blockchain network, wherein the merging includes merging chaincodes and channels from the first and second blockchain networks into a merged chaincode and a merged channel.
Need to check novelty before this filing date? Find Prior Art

Description

[Background technology]

[0001] A centralized platform stores and maintains data in a single location. This location is often a central computer, for example a cloud computing environment, a web server, a mainframe computer, etc. Information stored in a centralized platform is usually accessible from several different locations. Several users or client workstations can work simultaneously on the centralized platform, for example based on a client / server configuration. Because of the single location, a centralized platform is easier to manage, maintain, and control, especially for security purposes. Within a centralized platform, 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

[0002] An example embodiment provides an apparatus including a processor configured to perform one or more of: receiving a request to merge a first blockchain network and a second blockchain network, the request including a script specifying a network structure; synthesizing the script using configuration data of the first and second blockchain networks to generate a plurality of merge operations; and merging the first blockchain network with the second blockchain network based on the plurality of merge operations to create a merged blockchain network, wherein the processor merges chaincodes and channels from the first and second blockchain networks into a merged chaincode and merged channels.

[0003] Another example embodiment provides a method including one or more of: receiving a request to merge a first blockchain network and a second blockchain network, the request including a script specifying a network structure; synthesizing the script with configuration data of the first and second blockchain networks to generate a plurality of merge operations; and merging the first blockchain network with the second blockchain network based on the plurality of merge operations to create a merged blockchain network, where the merging includes merging chaincodes and channels from the first and second blockchain networks into a merged chaincode and a merged channel.

[0004] A further example embodiment provides a non-transitory computer-readable medium including instructions that, when read by a processor, cause the processor to perform one or more of: receiving a request to merge a first blockchain network and a second blockchain network, the request including a script specifying a network structure; synthesizing the script using configuration data of the first and second blockchain networks to generate a plurality of merging operations; and merging the first blockchain network with the second blockchain network based on the plurality of merging operations to create a merged blockchain network, wherein the merging includes merging chaincodes and channels from the first and second blockchain networks into a merged chaincode and a merged channel. [Brief description of the drawings]

[0005] [Figure 1A] FIG. 1 illustrates a process for merging multiple blockchain networks according to an example embodiment. [Figure 1B]FIG. 13 illustrates a process for inputting data for performing a merge operation according to an example embodiment. [Figure 1C] FIG. 1 illustrates a process for merging elements of multiple blockchain networks according to an example embodiment. [Figure 1D] FIG. 1 illustrates a process for converting a script into a merge operation 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. 1 illustrates a process for merging chaincodes according to an example embodiment. [Figure 4B] FIG. 1 illustrates a process for merging chaincodes according to an example embodiment. [Figure 4C] FIG. 1 illustrates a process for merging chaincodes according to an example embodiment. [Diagram 5] FIG. 1 illustrates a method for merging multiple blockchain networks 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 an example embodiment. [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

[0006] 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.

[0007] 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.

[0008] 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.

[0009] Example embodiments provide methods, systems, components, non-transitory computer-readable media, devices, and / or networks directed to automatically merging distributed ledger networks (e.g., blockchains) based on scripts.

[0010] According to various aspects, multiple blockchain networks may be merged together to form a combined network that includes a merged blockchain ledger, merged chaincodes, merged channels, etc. Organizations involved in each of the different blockchains may be provided with improved data access and transaction capabilities. For example, organizations that own blockchain peers in the merged blockchain network may have greater visibility than in their previous network, maintain the same access control they had in their previous network, include an expanded blockchain ledger with more transactions and access to transacting peers, etc. As a result, the blockchain peers that have been merged together may transact between new / different blockchain peers. Additionally, the merging process may be automated based on scripts and configuration data from each of the blockchain networks.

[0011] 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.

[0012] 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.

[0013] 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).

[0014] The 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.

[0015] 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.

[0016] 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.

[0017] An organization's business requirements may evolve. To address this, an organization may link the networks and applications it relies on with other organizations. Various techniques exist to perform this linking, including actuating a linking mechanism or relying on agents or members acting as conduits for the exchange of assets and data through process links. However, both of these techniques incur significant design overhead.

[0018] When two networks have a high degree of commonality (e.g., common business objectives, activities, users, etc.), merging the networks can provide more opportunities for the organizations involved without increasing overhead. In example embodiments, the host platform can merge multiple blockchain networks together, thereby opening up new opportunities for organizations that have blockchain peers in either network. For example, two blockchain networks that perform similar functions (e.g., financial services, exporters / importers, logistics, supply chain participants, etc.) may be combined into a single network, thereby increasing access to data and improving transaction capabilities.

[0019] As a non-limiting example, two disparate sets of banks on two separate blockchain networks may be merged together into one unified blockchain network. In this way, the two sets of banks can transact together via a single blockchain ledger. In this example, the previous blockchain ledgers may be merged together into one larger blockchain ledger. Similarly, chaincodes on different blockchains that are the same or related to each other may be merged together. Additionally, data manipulated by these chaincodes may be restructured / renamed to function using the new merged chaincode. The merging process may be automated. Thus, administrators and developers of the different blockchain networks do not need to spend time and risk errors by manually performing the merging operations.

[0020] In some embodiments, the different blockchain networks being merged may be built on the same blockchain framework, such as Hyperledger Fabric. Chaincodes (deployed smart contracts) may be merged horizontally or vertically. In a horizontal merge, two blockchain networks may each contain chaincodes that perform the same function using the same keys and values, or similar keys and values. Here, two chaincodes can be merged by keeping one of the chaincodes and deleting the other, while reconstructing the ledger data (e.g., key-value pairs) created by the deleted chaincode to function using the remaining chaincode. For example, the reconstructing may include renaming the keys and values ​​to prevent duplicate keys, mapping the keys and values, etc.

[0021] In a vertical merge, a host may link together a first chaincode on a first blockchain network which triggers the execution of a second chaincode on a second blockchain network. In this case, the code contained in the two chaincodes may be aggregated together to form one larger chaincode that includes the functionality of both the first chaincode and the second chaincode. Additionally, the ledger data (keys and values) of the first and second chaincodes may be combined and mapped together if they refer to the same data items.

[0022] FIG. 1A illustrates a process 100A for merging multiple blockchain networks 110 and 120 according to an example embodiment. With reference to FIG. 1A, a host platform 140, such as a cloud platform, a web server, a user device, etc., may be used to merge multiple blockchain networks together. In the example of FIG. 1A, two blockchain networks 110 and 120 are merged together to create a merged network 130. However, it should be understood that more than two blockchain networks may be merged together. It should also be understood that example embodiments are not limited to blockchains, and any type of distributed ledger network may be merged together.

[0023] In the example of FIG. 1A, the blockchain network 110 includes three blockchain peers that transact using chaincodes running on the blockchain peers based on block data from the blockchain of the blockchain network 110. Similarly, the blockchain network 120 includes five blockchain peers (with no commonality with the three peers of the blockchain network 110) that transact using chaincodes running on the blockchain peers based on block data from the blockchain of the blockchain network 120. As further described with respect to the examples of FIGS. 1B, 1C, and 1D, the host platform 140 may merge the two blockchain networks 110 and 120 to create a merged blockchain network 130. During the merge, the host platform 140 may merge the chaincodes, blockchains, peer membership, consensus protocols, etc.

[0024] FIG. 1B illustrates a process 100B for inputting data for performing a merge operation, according to an example embodiment. Referring to FIG. 1B, a host platform 140 includes a synthesizer 141, an organization merge module 142, a chaincode merge module 143, a ledger merge module 144, and an ordering node merge module 145 that may perform a merge consensus protocol. Here, the synthesizer 141 may receive a script 161 including user-defined instructions from merging two blockchain networks 110 and 120. The script may include declarative statements with instructions on how the two blockchain networks 110 and 120 should be merged. The script may be in a machine-readable format, such as Java(R) Script Object Notation (JSON), eXtensible Markup Language (XML), Yet Another Markup Language (YML), Datalogic, etc. In some embodiments, a user may develop the script through a development environment on a user device 150. As another example, the host platform 140 may output a user interface on the screen 152 of the user device 150, where the user interface may include predefined fields that receive input text from a user, where the input may be fed back to the host platform 140, where the input is converted into a script 161, such as using a predefined template.

[0025] The synthesizer 141 may receive configuration data files 162 and 163 that include configuration data for the blockchain networks 110 and 120, respectively. Examples of configuration data that may be included in the configuration data files 162 and 163 include channel information, peer IDs, certificate authority information, chaincode information, access policy information, consensus protocol information, ordering service information, blockchain ledger information, and the like. The configuration data files 162 and 163 may include connection profiles. As described further below with respect to the example of FIG. 1D , the synthesizer 141 may synthesize the instructions in the script 161 and the configuration data in the configuration files 162 and 163 to generate a set of operations that may be executed by a processing device to automatically merge the two blockchain networks 110 and 120 into a merged network 130.

[0026] FIG. 1C illustrates a process of merging elements of two blockchain networks 110 and 120, according to an example embodiment. With reference to FIGS. 1B and 1C, the organization merge module 142 may merge organization data from the two blockchain networks 110 and 120 together based on a series of merge operations (e.g., merge operation 170 shown in FIG. 1D) created by the host platform, to create merged organization data 131 for the merged network 130. Here, the merged organization data 131 may include peer membership information, access privileges of different peers, unique peer identifiers (e.g., URLs, etc.). The organization data 131 may include channel information for the new merged blockchain network 130. Here, the organization merge module 142 may perform the following: creating a channel, joining peers from the two blockchain networks 110 and 120 to the created channel, updating the configuration of the channel based on the network configuration, adding a membership service provider (MSP) to the organization, associating a certificate authority with a peer, etc.

[0027] The organization merge module 142 may select organizations and organizational peers for inclusion in the merged blockchain network 130 based on the merge operation 170. The certificate authorities may remain unchanged or the certificate authorities may be changed by the organization merge module 142. The organization merge module 142 may rename the base organization, merge organizations into the base organization, identify certificate authorities to add to the base organization, update channel information, combine peers, etc. based on the merge operation 170. In some embodiments, the organization merge module 142 may perform an optimization process to select peers from among peers and redistribute peers and certificate authorities according to an optimization algorithm.

[0028] The chaincode merge module 143 is configured to merge the chaincodes on the two blockchain networks 110 and 120 together based on the merge operation 170 to generate a merged chaincode 132. As further described in the example of FIGS. 4A-4C, the chaincode merge module 143 may perform horizontal merging (removing overlapping or similar chaincodes) and vertical merging (combining codes from two different linked chaincodes together). In some embodiments, the chaincode merge module 143 may parse the original chaincode, identify features in the original chaincode, modify any codes, merge the codes together, modify the underlying keys and values ​​generated by the chaincodes to function using the new / merged chaincode, etc. The merged chaincode 132, after merging, can execute transactions from the blockchain ledger data of both the first and second blockchain networks 110 and 120.

[0029] The ledger merge module 144 may be configured to merge the two disjoint blockchains of the two blockchain networks 110 and 120 together based on the merge operation 170 to create a merged blockchain ledger 133 that may include a merged chain and a merged state database (world state). For example, the ledger merge module 144 may create a merge block that includes a hash of the last block on the first blockchain and a hash of the last block on the second blockchain to link the new blockchain to both the first blockchain and the second blockchain. The merge block merges the history of the two blockchains and allows previous transactions on both blockchains to be verified (i.e., verified by previous hashes). The ledger merge module 144 may be configured to install and instantiate the chaincode (including the merged chaincode) on the merged blockchain peers.

[0030] The merged block may be the first block of the merged blockchain on the merged blockchain ledger 133. The ledger merging module 144 may gossip the previous block of the blockchain before merging to peers in each of the other networks. In this way, blockchain peers in blockchain network 110 may receive the previous block of blockchain peers in blockchain network 120, and vice versa. Newly added transactions on the merged blockchain network 130 may be added to the merged blockchain.

[0031] The ordering node merge module 145 is configured to merge the ordering services (ordering nodes) of the two blockchain networks 110 and 120 together based on the merge operation 170 to generate a merged ordering 134. The ordering node merge module 145 may create an ordering cluster of nodes from the ordering nodes of both networks 110 and 120 to implement a desired consensus protocol. In some cases, the two blockchain networks 110 and 120 may include two different consensus protocols (e.g., quorum requirements, peer roles, signer peers, etc.). The ordering node merge module 145 may merge the different consensus protocols and generate a single consensus protocol between the two blockchain networks 110 and 120.

[0032] 1D illustrates a process 100D for converting a script into merge operations 170 according to an example embodiment. Referring to FIG. 1D, a synthesizer 141 of a host platform 140 may receive a script 161 including instructions defined by a user and configuration files 162 and 163 representing network information for blockchain networks 110 and 120, and generate a set of merge operations 170. The set of merge operations 170 may be executed by a processing device to automatically perform a merge of blockchain networks 110 and 120 to create a merged network 130.

[0033] The script 161 may capture at a high level the user's intent of the desired end state of the merged network. Here, the user's script may identify the initial state of the two blockchain networks to be merged, and the end state of the merged blockchain network containing the two blockchain networks. The script 161 may specify the purpose of the merged network, including the subject matter (organizations, channels, chaincodes, etc.). The script 161 may identify the imports, data, peers, channels, and chaincodes to be renamed, the subject matter to be merged, the policies to be followed (e.g., signatures, agreements, etc.), etc. The script 161 may be written in a predefined language, such as JSON, YAML, XML, Datalog, etc. The script 161 may be generated, for example, via a wizard or via a user interface. The configuration files 162 and 163 may be any desired files, for example, JSON, XML, etc.

[0034] The sequence of operations 170 may include commands (e.g., import, generate, execute, loop, etc.) executed by a processing device and may include computer readable instructions. For example, the commands may include import commands to input data from configuration files 162 and 163, generate commands to generate peer identifiers, new configuration files, updated channel information, etc., "for" loops to process instructions for each peer in the network, such as adding a peer, renaming a peer, associating a certificate authority with a peer, etc. The result of execution of the sequence of operations 170 is a combined network 130, as shown in FIG. 1A.

[0035] 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.

[0036] 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.

[0037] 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 in the context of complex services may be processed by one or more processing entities (e.g., virtual machines) included in the blockchain layer 216 to generate results 228 including alerts, liability determinations, and the like. The physical infrastructure 214 may be utilized to retrieve any of the data or information described herein.

[0038] 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 on the blockchain (e.g., a distributed network of blockchain peers). A transaction is the execution of smart contract logic 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.

[0039] 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.

[0040] 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.

[0041] 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.

[0042] 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.

[0043] 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.

[0044] 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.

[0045] 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.

[0046] 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.

[0047] 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.

[0048] 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.

[0049] 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.

[0050] 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.

[0051] 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.

[0052] 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.

[0053] 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.

[0054] 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.

[0055] 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.

[0056] 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.

[0057] Figures 4A-4C illustrate a process for merging chaincodes according to example embodiments. For example, Figure 4A illustrates a process for horizontal merging 410 with identical codes, Figure 4B illustrates a process for horizontal merging 420 with codes of the same function, and Figure 4C illustrates a process for vertical merging 430 linking two different chaincodes together (e.g., a first chaincode triggers a second chaincode).

[0058] Referring to FIG. 4A, a chaincode 411 of a first blockchain network and a chaincode 412 of a second blockchain network are merged to create a merged chaincode 413. In this example, the chaincode 411 and the chaincode 412 contain identical program code (e.g., possibly including residual whitespace differences). Here, the host platform may remove one of the chaincodes 411 and 412 and select the remaining chaincode for the merged chaincode 413. Thus, the merged chaincode 413 is a selection of one of the identical chaincodes 411 and 412. The business logic performed by the merged chaincode 413 is the same as that of the chaincode 411 and the chaincode 412. This merging may be performed based on a predefined template, which specifies which code to use, which code to discard / remove, how to merge the underlying data (e.g., stored in state databases 414 and 415) used by the chaincodes 411 and 412, etc.

[0059] For example, a template may reference the transformation of certain code features into different code features according to a particular mapping function. A parser may parse the original source code, and whenever any portion matches a code feature present in the template, the mapping function may be applied to generate different source code.

[0060] In addition to merging the chaincodes 411 and 412, the host platform may also merge data sets 414 and 415 of the chaincodes 411 and 412, respectively. Here, the data set 414 includes key-value pairs, such as key-value pairs created by the chaincode 411, updated key-value pairs, stored key-value pairs, and the like, and the data set 415 includes key-value pairs, such as key-value pairs created by the chaincode 412, updated key-value pairs, stored key-value pairs, and the like. During the merge, the data sets 414 and 415 may both be transferred to a generated data set 416 of keys and values ​​stored in the merged blockchain network. Here, the host platform may import one of the data sets 414 and 415 into the generated data set 416 and modify the other remaining data set based on a predefined function to prevent duplicate key names. For example, the host platform may import data set 414 into data set 416 and modify data set 415 such that each key includes an additional identifier (e.g., a network ID of a second blockchain network) to distinguish values ​​that overlap with data set 414.

[0061] In some embodiments, keys in data set 415 may be modified, e.g., by a pattern generator, based on instructions in the template to prevent conflicts with key names already present in data set 414 (or another data set already imported into data set 416). As an example, key "abc123" may be stored in both data sets 414 and 415. In this example, key "abc123" in data set 415 may be modified with the network identifier of the second blockchain network, "Network2," stored in the template, to generate a modified / renamed key identifier, "Network2.abc123." This ensures that merging does not overwrite data.

[0062] Referring to FIG. 4B, a chaincode 421 of a first blockchain network and a chaincode 422 of a second blockchain network are merged to create a merged chaincode 423. In this example, the chaincode 421 and the chaincode 422 contain program code that performs the same function, but the key identifiers used are different. Here, the host platform may remove one of the chaincodes 421 and 422 and select the remaining chaincode for the merged chaincode 423. Thus, the merged chaincode 423 is a selection of one of the identical chaincodes 421 and 422. The business logic executed by the merged chaincode 423 is the same as the logic of each of the chaincodes 421 and 422.

[0063] Similar to the example of FIG. 4A, the host platform may merge the key-value pair data set 424 created by chaincode 421 with the key-value pair data set 425 generated by chaincode 422 to generate a merged data set 426 that is stored in the state database of the merged blockchain network. In this example, the merge may rename the keys in one of the data sets using a network identifier and a user-provided function. A user-provided function may be used to map key names between data set 424 and data set 425, thereby linking together the data values ​​in the merged ledger.

[0064] Referring to FIG. 4C, a chaincode 431 of a first blockchain network and a chaincode 432 of a second blockchain network are merged to create a merged chaincode 433. In this example, the chaincode 431 and the chaincode 432 include different program codes with linked execution. For example, an output from a function in the chaincode 431 may be an input to a function in the chaincode 432. Here, the host platform may extract program codes from each of the chaincodes 431 and 432 and combine the extracted program codes in the merged chaincode 433. Thus, both program codes may be added together to create a larger program code that encompasses the functions of both the chaincodes 431 and 432. That is, the business logic executed by the merged chaincode 433 is the same as each logic of the chaincode 431 combined with each logic of the chaincode 432.

[0065] Merging two different contract programs is similar to linking two different graphs by adding arrows from nodes (representing states) in one graph to nodes in the other graph, thereby producing a single graph that represents a single program. In terms of code, the final contract code in the merged chaincode 433 includes code from both chaincodes 431 and 432, with function calls between the two chaincodes inserted in the correct places in the merged chaincode 433.

[0066] An example of such a merged chaincode 433 may be depicted in a situation where a logistics partner is merged with a trade finance partner. In this example, the logistics network may perform the following steps: (a1) a purchase order is submitted by an importer to purchase a specific commodity from an exporter, (a2) an invoice is submitted by the exporter, (a3) ​​the shipment is sent to an ocean carrier, (a4) the ocean carrier creates a bill of lading, and (a5) the ocean carrier delivers the shipment to the importer. Meanwhile, the trade finance partner may need the invoice to trigger the payment process, which includes the following steps: (b1) an invoice is submitted by the exporter, (b2) the invoice and other shipment details are verified by a bank, and (b3) payment is initiated from the importer to the exporter.

[0067] These two processes (a) and (b) may be merged by automatically invoking step (b1) in the second network after step (a2) is completed in the first network. This kind of linking may be specified in the script 161 described in the example of Figures 1B and 1D. Using this information of how the two processes are linked, the host platform may add a call to invoke (b1) upon completion of (a2).

[0068] In addition to merging the linked chaincodes 431 and 432, the host platform may merge the key-value pair data set 434 created by the chaincode 431 with the key-value pair data set 435 generated by the chaincode 432 to generate a merged data set 436 that is stored in the merged blockchain network's state database. In this example, the merging may identify keys in both data sets 434 and 435 that reference the same asset and retain only one copy of this key-value in the final data set 436.

[0069] FIG. 5 illustrates a method 500 of merging multiple blockchain networks according to an example embodiment. As a non-limiting example, the method 500 may be performed by a host platform of the blockchain networks, such as a cloud platform, a web server, a database, etc. Referring to FIG. 5, at 510, the method may include receiving a request to merge a first blockchain network and a second blockchain network, the request including a script that specifies the network structure. As an example, the script may be a document or file created by a developer using a predefined format (e.g., JSON, XML, YAML, Datalog, etc.). In some embodiments, the system may provide a user interface that includes fields for input by a user. In this example, the system may receive inputs and convert those inputs into a script based on a predefined template. The script may include declarative statements that express the user's intent regarding how the different blockchain networks should be combined.

[0070] At 520, the method may include synthesizing the script with configuration data of the first and second blockchain networks to generate a plurality of merging operations, where the configuration data may include network topology, smart contract (chaincode) information, peer membership information, blockchain ledger information, organizational information, etc. The configuration data may be merged with the script to generate a plurality of operations (or commands) that may be executed by the processor to automatically merge the first and second blockchain networks together. In some embodiments, the synthesizing may include parsing the script to generate an initial state of the first and second blockchain networks before the merge, and a final state of the merged blockchain network after the merge, and determining a sequence of operations to execute to transform the initial states to the final states.

[0071] At 530, the method may include merging the first blockchain network with the second blockchain network based on the multiple merging operations to create a merged blockchain network, where the merging includes merging chaincodes and channels from the first and second blockchain networks into a merged chaincode and a merged channel. In some embodiments, the merging may include merging a first chaincode from the first blockchain network with a second chaincode of the second blockchain network and combining key-value pairs of the first chaincode and the second chaincode into a state database of the merged chaincode.

[0072] In some embodiments, the merging may include detecting a first chaincode of the first blockchain network that includes code identical to a second chaincode of the second blockchain network, deleting the second chaincode, and configuring the first chaincode to operate on key-value pairs created by the second chaincode. In some embodiments, the merging may include detecting that an output of the first chaincode of the first blockchain network is linked to an input of a second chaincode of the second blockchain network, adding the first chaincode to the second chaincode to generate a merged chaincode, and configuring the merged chaincode to operate on key-value pairs created by the first and second chaincodes. In some embodiments, the merging may include merging blockchain peers from the first blockchain network and the second blockchain network into a common channel in the merged blockchain network. In some embodiments, the merging may include merging a first blockchain of the first blockchain network with a second blockchain of the second blockchain network via a merge block on a merged channel of the merged blockchain network.

[0073] In some embodiments, the merging may include merging at least three blockchain networks, including the first and second blockchain networks and at least one additional blockchain network, to generate one larger combined blockchain network, where the system may merge the three or more blockchain networks simultaneously or may merge the three or more blockchain networks sequentially (e.g., one at a time) to generate the larger combined blockchain network.

[0074] 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.

[0075] 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. The physical infrastructure 610, module 612, and module 614 may include one or more computers, servers, processors, memories, or wireless communication devices, or combinations thereof. Additionally, module 612 and module 614 may be the same module.

[0076] 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.

[0077] 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.

[0078] 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.

[0079] 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.

[0080] 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.

[0081] 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.

[0082] 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.

[0083] 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.

[0084] 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.

[0085] 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.

[0086] 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.

[0087] 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.

[0088] 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.

[0089] 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 previous block's header 741. According to various embodiments, if the new data block 730 is a merge block for merging multiple blockchains together, the block header 740 may include a hash of the header of the second previous block 742 (or more hashes depending on the number of blockchains being merged together). The block header 740 may include a unique block number of the new data block 730, a hash of the block data 750, etc. The block numbers of the new data block 730 are unique and may be assigned in various orders, such as a progressive / sequential order starting from 0.

[0090] 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.

[0091] 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.

[0092] 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

[0093] 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

[0094] 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).

[0095] 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.

[0096] 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.

[0097] 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.

[0098] 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.

[0099] 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

[0100] 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.

[0101] 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).

[0102] 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.

[0103] 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.

[0104] 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.

[0105] 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.

[0106] 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

[0107] 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:

[0108] 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.

[0109] 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.

[0110] 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.

[0111] 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.

[0112] 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.

[0113] 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.

[0114] 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).

[0115] 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.

[0116] 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.

[0117] 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.

[0118] 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.).

[0119] 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.

[0120] 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.

[0121] 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.

[0122] 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 unrealistic 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.

[0123] 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.

[0124] 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.

[0125] 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.

[0126] 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.

[0127] 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.

[0128] 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.

[0129] 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.

[0130] 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.

[0131] 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.

[0132] 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.

[0133] 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.

[0134] 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.

[0135] 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.

[0136] 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.

[0137] 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.

[0138] 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.

[0139] 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.

[0140] 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.

[0141] 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.

[0142] 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. An apparatus comprising a processor, the processor comprising: receiving a request to merge a first blockchain network and a second blockchain network, the request including a script that specifies a network structure; synthesizing the script using configuration data of the first and second blockchain networks to generate a plurality of merge operations; and merging the first blockchain network with the second blockchain network based on the plurality of merging operations to create a merged blockchain network, wherein the processor merges chaincodes and channels from the first and second blockchain networks into a merged chaincode and merged channel.

2. The apparatus of claim 1 , wherein the processor is further configured to construct the script based on user input received via a user interface.

3. 2. The apparatus of claim 1, wherein the processor is configured to parse the script to generate an initial state of the first and second blockchain networks before the merging and a final state of the merged blockchain network after the merging, and to determine a sequence of operations to perform to transform the initial states to the final states.

4. 2. The apparatus of claim 1, wherein the processor is configured to: merge a first chaincode from the first blockchain network with a second chaincode of the second blockchain network; and combine key-value pairs of the first chaincode and the second chaincode into a state database of the merged chaincode.

5. 2. The apparatus of claim 1, wherein the processor is configured to: detect that a first chaincode of the first blockchain network includes code that is identical to a second chaincode of the second blockchain network; delete the second chaincode; and configure the first chaincode to operate on key-value pairs created by the second chaincode.

6. 2. The apparatus of claim 1, wherein the processor is configured to: detect that an output of a first chaincode of the first blockchain network is linked to an input of a second chaincode of the second blockchain network; append the first chaincode to the second chaincode to generate a merged chaincode; and configure the merged chaincode to operate on key-value pairs created by the first and second chaincodes.

7. 2. The apparatus of claim 1, wherein the processor is configured to merge blockchain peers from the first blockchain network and the second blockchain network into a common channel in the merged blockchain network.

8. 2. The apparatus of claim 1, wherein the processor is configured to merge a first blockchain of the first blockchain network with a second blockchain of the second blockchain network via a merge block on a merged channel of the merged blockchain network.

9. 2. The apparatus of claim 1, wherein the processor is configured to merge three or more blockchain networks, including the first and second blockchain networks, to generate a single combined blockchain network.

10. receiving a request to merge a first blockchain network and a second blockchain network, the request including a script that specifies a network structure; synthesizing the script using configuration data of the first and second blockchain networks to generate a plurality of merge operations; and merging the first blockchain network with the second blockchain network based on the plurality of merging operations to create a merged blockchain network, wherein the merging includes merging chaincodes and channels from the first and second blockchain networks into a merged chaincode and a merged channel.

11. The method of claim 10 , further comprising constructing the script based on user input received via a user interface.

12. 11. The method of claim 10, wherein the combining comprises parsing the script to generate initial states of the first and second blockchain networks before the merging and a final state of the merged blockchain network after the merging, and determining a sequence of operations to perform to transform the initial states to the final states.

13. 11. The method of claim 10, wherein the merging of chaincodes comprises merging a first chaincode from the first blockchain network with a second chaincode of the second blockchain network, and combining key-value pairs of the first chaincode and the second chaincode into a state database of the merged chaincode.

14. The merging comprises:

11. The method of claim 10, comprising: detecting a first chaincode of the first blockchain network that includes code identical to a second chaincode of the second blockchain network; deleting the second chaincode; and configuring the first chaincode to operate on key-value pairs created by the second chaincode.

15. The merging comprises:

11. The method of claim 10, comprising: detecting that an output of a first chaincode of the first blockchain network is linked to an input of a second chaincode of the second blockchain network; appending the first chaincode to the second chaincode to generate a merged chaincode; and configuring the merged chaincode to operate on key-value pairs created by the first and second chaincodes.

16. 11. The method of claim 10, wherein the merging comprises merging blockchain peers from the first blockchain network and the second blockchain network into a common channel in the merged blockchain network.

17. 11. The method of claim 10, wherein the merging comprises merging a first blockchain of the first blockchain network with a second blockchain of the second blockchain network via a merge block on a merged channel of the merged blockchain network.

18. 11. The method of claim 10, wherein the merging comprises merging three or more blockchain networks, including the first and second blockchain networks, to generate a single combined blockchain network.

19. A computer program product causing a computer to carry out a method according to any one of claims 10 to 18.

20. 20. A non-transitory computer readable medium having recorded thereon the computer program of claim 19.

Citation Information

Patent Citations

  • Method and device for merge processing of block chain, block chain node and storage medium

    CN108932348A

  • Database mergeable ledgers

    US20200349123A1