Self-monitoring blockchain endorsement based on secure consensus
By monitoring and allocating performance indicators of blockchain peers and dynamically adjusting the load and role of peers, the problem of unbalanced peers in the blockchain network is solved, and network performance and efficiency are improved.
Patent Information
- Application Number
- CN201980029253.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-06-13
- Filing Date
- 2019-06-05
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2039-06-05
AI Technical Summary
The resource imbalance and undynamic scalability of peers in the blockchain network lead to load imbalance, resulting in performance bottlenecks in the endorsement and submission stages, and the inefficient peers cannot be automatically identified and adjusted, affecting network performance.
By monitoring peer performance indicators, identifying and assigning endorsement requests, dynamic load balancing and role adjustment of peers can be achieved, ensuring load balancing in the endorsement and submission stages.
The trustworthy evaluation and dynamic adjustment of peer performance is realized, the overall performance and efficiency of the blockchain network are improved, and resource waste and performance degradation are avoided.
Smart Images

Figure CN112154468B_ABST
Abstract
Description
Technical Field
[0001] The present application generally relates to consensus and peer management processes on blockchains, and more specifically to monitoring peers on a blockchain for optimal peer management through blockchain task delegation including endorsement and commitment of transactions in a self-monitoring blockchain. Background Art
[0002] Blockchain can be used as a public distributed ledger to store information. Although primarily used for financial transactions, blockchain can store a wide range of information related to goods and services (i.e. products, packaging, status, etc.). The decentralized scheme provides authority and trust to the decentralized network and enables its nodes to continuously and sequentially record their transactions on a public "block", creating a unique "chain" called a blockchain. Cryptography is used through hash codes to ensure the authentication of the source of transactions and remove central intermediaries. Blockchain is a distributed database that maintains a growing list of records in the blockchain's blocks, which can prevent tampering and revision of records due to its immutable properties. Each block contains a timestamp and a link to the previous block. Blockchain can be used to save, track, transfer and verify information. Since blockchain is a distributed system, all peers need to reach a consensus state before a transaction is added to the blockchain distributed ledger.
[0003] Traditionally, peers operating in a blockchain network may have varying resources and constraints, resulting in different endorsement and commit speeds when processing blockchain transactions. Peers may have limited resources, such as central processing unit (CPU) speed, available memory, and disk speed / capacity. Peers may also be overloaded by processing too many requests at any given time. Peers may also be dishonest or overestimate their broadcasted processing capacity to handle such transactions. As a result, peers may become bottlenecks in both the endorsement and commit phases of blockchain operations.
[0004] For optimal performance, blockchain networks should balance the load of the endorsement and submission phases evenly among peers or proportionally among peer capabilities. The increase or decrease in usage of certain peers depends on the transaction load requirements assigned to those peers at any given time. In general, the proposed load balancing or scaling strategies can provide a reliable way to identify over-utilization, under-utilization, or bottlenecks in the blockchain network. The latest permissioned networks do not have self-assessment and self-correction capabilities. There is generally no operation to identify inefficient peers at a particular runtime. The blockchain network cannot scale automatically, and the load is not evenly distributed among the pre-configured peers. In addition, peer nodes cannot be added dynamically to support higher runtime loads. In addition, peer nodes are not reconfigured to take on additional roles, for example, endorsers become committers or orderers as needed. It is possible to manually assess the network, scale it up, or rebalance it, but this approach is risky because each organization must perform such modifications independently without a trusted monitoring entity. Over-provisioning wastes resources, while under-provisioning leads to performance degradation. Wrong decisions by one organization in managing load can adversely affect the performance of other organizations on the same blockchain network. Summary of the invention
[0005] One aspect of the present invention provides a method, the method comprising at least one of the following:
[0006] Identify endorsement requests to perform blockchain transaction endorsement, transmit the endorsement requests to ordering nodes, monitor performance metrics of endorsing blockchain peers, distribute endorsement requests to endorsing blockchain peers based on the performance metrics, and receive endorsed blockchain transactions.
[0007] Another aspect provides an apparatus comprising: a processor configured to identify one or more endorsement requests to perform an endorsement of a blockchain transaction; a transmitter configured to transmit the one or more endorsement requests to an ordering node; the processor is further configured to monitor performance metrics of the endorsing blockchain peers and to distribute the one or more endorsement requests to the endorsing blockchain peers based on the performance metrics, and a receiver configured to receive the endorsed blockchain transaction.
[0008] Another aspect provides a computer-readable storage medium configured to store instructions that, when executed, cause a processor to perform the following steps:
[0009] Identify one or more endorsement requests to perform blockchain transaction endorsement, transmit the one or more endorsement requests to an ordering node, monitor performance metrics of the endorsing blockchain peers, assign the one or more endorsement requests to the endorsing blockchain peers based on the performance metrics, and receive the endorsed blockchain transaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1A A logical network diagram of a peer monitoring and selection process for handling blockchain transaction load is shown according to an example embodiment.
[0011] Figure 1B A system configuration diagram illustrating a set of operations performed during a peer management and load handling process according to an example embodiment.
[0012] Figure 1C An example peer process management diagram is shown that identifies peer load capabilities and ranks peers according to their respective performance according to an example embodiment.
[0013] Figure 2A An example peer-to-peer blockchain architecture configuration for an asset sharing scenario according to an example embodiment is shown.
[0014] Figure 2B An example peer blockchain configuration is shown according to an example embodiment.
[0015] Figure 3 A diagram of a permissioned blockchain network is shown according to an example embodiment.
[0016] Figure 4 A system message diagram for performing peer management and transaction management configuration according to an example embodiment is shown.
[0017] Figure 5A A flow chart illustrating an example method of peer management and transaction management in a blockchain according to an example embodiment is shown.
[0018] Figure 5B A flow chart illustrating another example method of peer management and transaction management in a blockchain according to example embodiments.
[0019] Fig. 6A An example physical infrastructure configured to perform various operations on a blockchain according to one or more example operating methods of example embodiments is shown.
[0020] Figure 6B An example smart contract configuration between contracting parties and an intermediary server configured to enforce smart contract terms on a blockchain is shown according to an example embodiment.
[0021] Figure 7 An example computer system configured to support one or more example embodiments is shown. DETAILED DESCRIPTION
[0022] It will be readily appreciated that the instant components as generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Therefore, the detailed description of the embodiments of the methods, devices, non-transitory computer-readable media, and systems as represented in the associated figures and specification is not intended to limit the scope of the present application, but is representative of selected embodiments only.
[0023] The instant features, structures, or characteristics described throughout the specification may be combined in any suitable manner in one or more embodiments. For example, use of the phrases "example embodiments," "some embodiments," or other similar language throughout the specification refers to the fact that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment. Thus, the appearance of the phrases "example embodiments," "in some embodiments," "in other embodiments," or other similar language throughout the specification does not necessarily refer to the same set of embodiments, and the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0024] In addition, although the term "message" may have been used in the description of the embodiments, the present application may be applied to various types of messages or network data, such as packets, frames, datagrams, etc. Certain types of messages, signaling, and protocols may be depicted in the exemplary embodiments, which are not limited to specific types of messages, signaling, or protocols.
[0025] Example embodiments provide methods, devices, networks, and / or systems that support a blockchain distributed system with a selective peer management program. A blockchain is a distributed system that includes multiple nodes that communicate with each other. Blockchain operations are programs called chaincodes (e.g., smart contracts, etc.) that save state and distributed ledger data and perform transactions. Some transactions are operations called on chaincodes. In general, blockchain transactions must usually be "endorsed" by certain blockchain members, and only endorsed transactions can be submitted to the blockchain and affect the state of the blockchain. Other unendorsed transactions will be ignored. There may be one or more special chaincodes for management functions and parameters, collectively referred to as system chaincodes.
[0026] A node is a communication entity of a blockchain system. A "node" can perform a logical function in the sense that multiple nodes of different types can run on the same physical server. Nodes are grouped in trust domains and are associated with logical entities that control them in various ways. Nodes can include different types, such as client or submitting client nodes, submitting transactions-calls to endorsing parties (e.g., peers), and broadcasting transaction-proposals to ordering services (e.g., ordering nodes). Another type of node is a peer node, which can receive transactions submitted by clients, submit transactions, and maintain a copy of the state and blockchain transaction distributed ledger. Although not required, peers can also play the role of endorsers. Ordering service nodes or ordering parties are nodes that run communication services for all nodes and implement delivery guarantees, such as broadcasting to every peer node in the system when submitting transactions and modifying the world state of the blockchain, which is another name for the initial blockchain transaction, which usually contains control and setup information.
[0027] The distributed ledger is an ordered, tamper-proof record of all state transitions of the blockchain. State transitions can be caused by chaincode invocations (i.e., transactions) submitted by participating parties (e.g., client nodes, ordering nodes, endorsing nodes, peer nodes, etc.). A transaction may result in a set of asset key-value pairs being submitted to the distributed ledger as one or more operands (e.g., create, update, delete, etc.). The distributed ledger includes a blockchain (also called a chain) that stores immutable, sequential records in blocks. The distributed ledger also includes a state database that maintains the current state of the blockchain. There is typically one distributed ledger per channel. Each peer node maintains a copy of the distributed ledger for each channel it belongs to.
[0028] The chain is structured as a transaction log as hash-linked blocks, and each block contains a sequence of N transactions, where N is equal to or greater than 1. The block header includes the hash of the block transaction, as well as the hash of the previous block header. In this way, all transactions on the ledger can be ordered and cryptographically linked together. Therefore, it is impossible to tamper with the ledger data without breaking the hash link. The hash of the most recently added blockchain block represents every transaction that occurred previously on the chain, thereby ensuring that all peer nodes are in a consistent and trusted state. The chain can be stored on the peer node file system (i.e. local, attached storage, cloud, etc.), effectively supporting the append-only nature of blockchain workloads.
[0029] The current state of the immutable ledger represents the latest values for all keys included in the chain's transaction log. Because the current state represents the latest key values known to the channel, it is sometimes referred to as the world state. Chaincode invocations execute transactions against the current state data of the ledger. To make these chaincode interactions efficient, the latest values of the keys can be stored in a state database. The state database may be just an indexed view of the chain's transaction log, so it can be regenerated from the chain at any time. The state database can be automatically restored (or generated on demand) at peer startup and before accepting transactions.
[0030] Example embodiments provide continuous assessment of the performance of runtime peers and identify slow or bottleneck peers in a trustworthy and non-repudiable manner. Resource assessments may provide the ability to rebalance network load and / or add / remove / change peer roles and loads for optimal efficiency. In a blockchain network, nodes are typically mutually untrusting. Entities are owned and managed by different organizations. One organization's monitoring service may not trust another organization's monitoring service. Clients have significant freedom of action in managing the execution of blockchain transactions because they can determine which peers send endorsement requests and which responses from those peers to choose to send transaction envelopes to ordering nodes.
[0031] Example embodiments provide for making the endorsement process a blockchain transaction. Endorsement requests and responses are non-repudiable when they are generated in order, collected in blocks, and submitted to a shared ledger. The identification and processing of known differences between peers can be inferred by examining the blockchain during the network self-assessment process. In operation, the client node sends an endorsement request to the ordering node instead of one or more endorsing peers. The endorsement request and response are stored in a block, and the peer performs the endorsement when it receives the block from the ordering node, rather than directing the request from the client and then sending the response to the ordering / ordering node. Each client can perform monitoring and rebalancing by monitoring the relative processing speed of the peers, including comparing the block height of the endorsement request and response for each transaction. As a result, the selection of peers can be performed by sending endorsement requests to those identified peers in descending order of the processing speed identified for those peers.
[0032] Figure 1A A logical network diagram of a peer monitoring and selection process for handling blockchain transaction load according to an example embodiment is shown. Figure 1A, configuration 100A includes a client node 114 that receives an endorser selection 111 from an analysis module 110, which can be part of a computer processing system of any node, configured to monitor and determine peer statistics 113 for node allocation. The peer information can be used to provision peers and balance the load 112 of blockchain transactions that need to be allocated to peers. The client 114 can submit an endorser request 115 that can be queued and may require endorsement 115 to an orderer node 116, which can be part of an orderer node pool 116 set up to perform consensus on endorsements and blockchain transactions 120. A transaction envelope 117 is also sent to the orderer node 116. Once a peer allocation decision has been made, the output of the sorter 116 can include an endorsement confirmation 119, and also include a block 121 to be allocated to the peer.
[0033] The load balancing module 112 may reconfigure 131 the network of peers based on the monitored and updated activity of the peer 130. Block 121 enables the peer to perform the endorsements and / or commits required to achieve the target of the activity load. The committing peer 140 may only perform the commit of the transaction to record the transaction 123 endorsed by the VSCC 142. In this example, another peer 138 endorses and commits the transaction with the commit system chaincode (ESCC) 134, the verify system chaincode (VSCC) 136, and the chaincode (CC) 132. The endorsed transaction 125 and the recorded endorsed transaction 127 are then committed to the ledger.
[0034] The above elements are the basic components that govern the endorsement process. System chaincode is a privileged chaincode that runs in the same process that executes the endorser. System chaincode has access to all the resources of the endorser. On the other hand, chaincode is a piece of code that interacts with a well-defined interface. To endorse a proposal, the endorser first executes the CC referenced by the proposal, and then passes the output of the chaincode to the ESCC, which produces a signature. The signature indicates approval of the proposal. The endorsement is placed in a transaction, which is sent to the ordering service that orders the transactions in a block and propagates the block. Once the submitting peer receives the block, each transaction in the block is passed to the VSCC to verify whether the endorsement policy is met (that is, there are enough endorsements).
[0035] Figure 1B A system configuration diagram illustrating a set of operations performed during a peer management and load handling process according to an example embodiment. Figure 1B, the system configuration 100B includes a client node 152, a first peer 154 that performs endorsement and submission, a second peer 156 that performs transaction submission, and an ordering node 158 that manages the distribution of blockchain load to peers. The client 152 can send an endorsement request and a transaction proposal with an endorser list 162 to the ordering node 158, which manages the distribution of load. The ordering node 158 will construct a block 164 for the submitting peer. The block 166 is sent to the identified peer 154 / 156. The peer 156 can process the transaction envelope 168, and other peers 154 can do the same, and can also process the endorsement request and response 172. The peer can then submit the submitted event 174 to the client 152, and the client 152 submits the endorsement response 176 to the ordering node 158. In response, block 178 is sent to the peer, and the endorsing peer submits an endorsement confirmation 182 to the client 152, which processes the endorsement confirmation and creates a transaction envelope 184, which is sent 186 to the ordering party 158. "E" stands for endorsement and "C" stands for committer. The processed transaction envelope is committed to the ledger. During the processing of the endorsement confirmation, the peer processing time is identified and compared to the block height. Updates to known statistics of any peer are performed and they are reordered according to the perceived processing power of the peer. Transactions are the result of certain events, such as the corresponding endorsements appearing on the ledger. Here, the appearance indicates that the endorsement proposal will be included in a certain block of the blockchain (i.e., the ledger). The block height is the distance from the genesis block of the blockchain. The endorsement response (i.e., one or more replies, depending on the endorsement policy) appears on the ledger. Each endorsement response will appear on the ledger in a specific block. Therefore, a certain distance (i.e., block height) from the genesis block can be determined. At this point, the distance or height of the endorsement proposal and the response can be compared to measure the responsiveness of the peer.
[0036] Figure 1C An example peer process management diagram is shown for identifying peer load capabilities and ranking peers according to corresponding performance according to an example embodiment. Figure 1C, a process for identifying fast peers, slow peers, and medium-speed peers is shown in a peer processing capacity model 100C, where peers P1, P2, P3, and P4 are monitored for the time required to complete a blockchain processing cycle. For example, a ledger transaction 190 is processed by P1 in approximately two time units and P2 and P3 in approximately three time units. P4 requires 19 time units and is therefore much slower than the other peers. Peers can be ranked based on their processing time. The peers' processes are identified as transaction proposals 191 for all peers, transaction responses from peer P1 192, transaction responses 193 from peers P2 and P3, and transaction responses 194 from peer P4. Once all responses are received, consensus is performed 195. Clearly, the fourth peer P4 does not provide the best processing platform compared to the other peers, so P4 should be moved to the bottom of the peer ranking list. As a result, P4 will receive fewer endorsement requests, will be switched to a pure commit role and added to the ordering party network. The height of a block is the height that continues to increase from the genesis block "t0" (block 0), and "ti" is the block with height "i".
[0037] According to an example embodiment, using the processing of message and block content, message types may include endorsement requests sent from a client to a subscriber, endorsement responses sent from a peer to a subscriber, and endorsement response confirmations sent from a subscriber to a peer, as well as blocking submission events sent from a peer to a client. It can be seen that the subscriber is committed to managing most of the message transmission and distribution work. In a block, a block may include an endorsement request, an endorsement response, an endorsement response confirmation, and a transaction envelope or "transaction" created by a client. In one example, a monitoring process may identify a client that attempts to obtain endorsements beyond strict requirements based on the credentials of the client. The client cannot arbitrarily reject the response of the peer and / or deny that the monitoring process does not detect that a response has been received from the peer. In addition, the client cannot submit an incomplete or incorrect transaction envelope without being identified, and the peer cannot pretend to process endorsements and submissions faster than actually provided. This configuration provides greater and more efficient transaction throughput and lower transaction latency.
[0038] Figure 2A FIG. 2 shows a blockchain system architecture configuration 200A according to an example embodiment. Figure 2A, the blockchain architecture 200A may include certain blockchain units, such as a set 280 of blockchain nodes 281-284 that participate in the blockchain transaction addition and verification process (consensus). One or more of the blockchain nodes 281-284 may endorse transactions and one or more of the blockchain nodes 281-284 may provide ordering services for all blockchain nodes in the architecture 200A. The blockchain node may initiate blockchain authentication and attempt to write to the blockchain immutable ledger stored in the blockchain layer 220, a copy of which may also be stored on the underlying physical infrastructure 210. The blockchain configuration may include one or more applications 270, linked to an application programming interface (API) 260 to access and execute stored program / application code 250 (e.g., chain code, smart contracts, etc.) that can be created according to the customized configuration sought by the participants and can maintain its own state, control its own assets, and receive external information.
[0039] The blockchain foundation or platform 205 may include various layers of blockchain data, services (e.g., cryptographic trust services, virtual execution environments, etc.), and underlying physical computer infrastructure that may be used to receive and store new transactions and provide access to auditing parties seeking access to data entries. The blockchain layer 220 may expose interfaces that provide access to the virtual execution environment necessary to process program code and use the physical infrastructure 210. Cryptographic trust services 230 may be used to verify transactions such as asset exchange transactions and keep information private.
[0040] Figure 2A The blockchain architecture configuration can process and execute program / application code 250 via one or more interfaces exposed by the blockchain platform 205 and the services provided. Code 250 can control blockchain assets. For example, code 250 can store and transmit data and can be executed by nodes 281-284 in the form of smart contracts and related chain codes with their execution conditions or other code units. As a non-limiting example, smart contracts can be created to perform reminders, updates, and / or notifications of other changes, updates, etc. The smart contract itself can be used to identify rules related to authorization and access requirements and ledger usage. In one example, peer performance data 222 can be identified and processed by one or more processing entities (e.g., virtual machines) included in the blockchain layer 220. The results can include identifying the best computing platform 224 associated with the peer entity to which the block should be assigned for processing blockchain tasks / events.
[0041] Using chaincode, smart contracts can be created through high-level applications and programming languages and then written to blocks in the blockchain. Smart contracts can include executable code that is registered, stored and / or replicated by a blockchain (e.g., a distributed network of blockchain peers). A transaction is the execution of smart contract code that can be executed in response to the satisfaction of a condition associated with a smart contract. The execution of a smart contract can trigger trusted modifications to the state of a digital blockchain ledger. Modifications to the blockchain ledger caused by the execution of a smart contract can be automatically replicated throughout the distributed network of blockchain peers through one or more consensus protocols.
[0042] Smart contracts can write data to the blockchain in the format of key-value pairs. In addition, smart contract code can read values stored in the blockchain and use them in application operations. Smart contract code can write the output of various logical operations to the blockchain. The code can be used to create temporary data structures in a virtual machine or other computing platform. The data written to the blockchain can be public and / or can be encrypted and kept private. Temporary data used / generated by smart contracts is kept in memory by the provided execution environment and deleted once the data is identified as needed for the blockchain.
[0043] A chaincode may include a code interpretation of a smart contract with additional features. As described herein, a chaincode may be a program code deployed on a computing network that is executed on-chain and validated by a chain validator during a consensus process. In operation, a chaincode receives a hash and retrieves from a blockchain a hash associated with a data template created using a previously stored feature extractor. If the hash value of the hashed identifier matches the hash value created from the stored identifier template data, the chaincode sends an authorization key to the requesting service. The chaincode may write data associated with cryptographic details to the blockchain. In Figure 2A In the example above, when tasks are delegated to peers, peer performance metrics can be written into blockchain transaction blocks and other information sources for reference.
[0044] Figure 2B An example of a blockchain transaction flow 200B between nodes of a blockchain according to an example embodiment is shown. Figure 2B, a transaction flow may include a transaction proposal 291 sent by an application client node 201 to an endorsing peer node 281. The endorsing peer node 281 may verify the client signature and execute the chaincode function to initiate the transaction. The output may include a chaincode result, a set of key / value versions read in the chaincode (read set), and a set of key / values written in the chaincode (write set). If approved, a proposal response 292 is sent back to the client 201 along with the endorsement signature. The client 201 assembles the endorsement into a transaction payload 293 and broadcasts it to the ordering service node 284. The ordering service node 284 then delivers the ordered transaction as a block to all peers 281-283 on the channel. Each peer 281-283 may validate the transaction before committing to the blockchain. For example, a peer may check the endorsement policy to ensure that the correct assignment of the specified peer has signed the result and verified the signature against the transaction payload 293.
[0045] Reference again Figure 2B , the client node 201 initiates a transaction 291 by constructing a request and sending it to the peer node 281 as the endorser. The client 201 may include an application that utilizes a supported software development kit (SDK), such as NODE, Java, PYTHON, etc., to generate a transaction proposal using the available API. A proposal is a request to invoke a chaincode function so that data can be read and / or written to the ledger (i.e., write a new key-value pair for an asset). The SDK may act as a shim, packaging the transaction proposal into an appropriate schema format (e.g., protocol buffers over remote procedure calls (RPCs)) and generating a unique signature for the transaction proposal using the client's cryptographic credentials. In response, the endorsing peer node 281 may verify that (a) the transaction proposal is formatted correctly, (b) no transaction has been submitted in the past (replay attack protection), (c) the signature is valid, and (d) the submitter (in this example, the client 201) is properly authorized to perform the proposed operation on the channel. The endorsing peer node 281 may input the transaction proposal as a parameter to the invoked chaincode function. The chaincode is then executed against the current state database to produce a transaction result including a response value, a read set, and a write set. However, no updates have been made to the ledger at this point. In 292, the set of values is passed back to the SDK of client 201 as a proposal response 292 along with the signature of the endorsing peer node 281, and the SDK of client 201 parses the payload for application consumption.
[0046] In response, the client 201 application checks / verifies the signature of the endorsing peer and compares the proposal response to determine if the proposal responses are identical. If the chaincode only queries the ledger, the application will check the query response and typically will not submit the transaction to the ordering node service 284. If the client application intends to submit the transaction to the ordering node service 284 to update the ledger, the application determines whether the specified endorsement policy has been implemented (i.e., whether all peer nodes required for the transaction endorse the transaction) before submission. Here, the client may include only one of the multiple parties to the transaction. In this case, each client may have its own endorsing node, and each endorsing node is required to endorse the transaction. The architecture is such that even if the application chooses not to check the response or otherwise forward unendorsed transactions, the endorsement policy will still be enforced by the peers and maintained during the submission verification phase.
[0047] After successful checks, in step 293, client 201 assembles the endorsements into a transaction and broadcasts the transaction proposal and response to ordering node 284 within a transaction message. A transaction may contain a read / write set, signatures of the endorsing peers, and a channel ID. Ordering node 284 does not need to check the entire contents of a transaction in order to perform its operations, but rather ordering node 284 can simply receive transactions from all channels in the network, sort them chronologically by channel, and create a block of transactions for each channel. The block of transactions is passed from ordering node 284 to all peer nodes 281-283 on the channel. Transactions 294 within the block are validated to ensure that any endorsement policies are met and that the ledger state of the read set variables has not changed since the transaction execution generated the read set. Transactions in the block are marked as valid or invalid. In addition, in step 295, each peer node 281-283 appends the block to the channel's chain and, for each valid transaction, commits the write set to the current state database. Emits an event to notify the client application that the transaction (call) has been immutably attached to the chain and whether the transaction was validated or invalidated.
[0048] Figure 3An example of a permissioned blockchain network 300 is shown, featuring a distributed, decentralized peer-to-peer architecture and a certificate authority 318 that manages user roles and permissions. In this example, a blockchain user 302 can submit transactions to a permissioned blockchain 310. In this example, a transaction can be a deployment, call, or query, and can be issued directly by a client application utilizing an SDK, such as directly through a REST API, etc. A trusted business network can provide access to regulator systems 314 such as auditors (e.g., the Securities and Exchange Commission in the U.S. stock market). At the same time, a blockchain network operator 308 manages the node system including managing member permissions, such as registering regulators 310 as "auditors" and registering blockchain users 302 as "clients." Auditors may be limited to querying the ledger, while clients may be authorized to deploy, call, and query certain types of chaincodes.
[0049] The blockchain developer system 316 can write chaincodes and client applications. The blockchain developer system 316 can deploy chaincodes directly to the network through a REST interface. In order to include credentials from a traditional data source 330 in the chaincode, the developer system 316 can use an out-of-band connection to access the data. In this example, the blockchain user 302 connects to the network through a peer node 312. Before conducting any transactions, the peer node 312 retrieves the user's registration and transaction certificates from the certificate authority 318. In some cases, blockchain users must have these digital certificates in order to conduct transactions on a permissioned blockchain network 310. At the same time, users who attempt to use the chaincode may be required to verify their credentials on the traditional data source 330. In order to confirm the user's authorization, the chaincode can use an out-of-band connection to this data through a traditional processing platform 320.
[0050] Figure 4 A system message diagram for performing peer management and transaction management configuration according to an example embodiment is shown. Figure 4 , configuration 400 provides another scenario where an ordering party 410 manages operations with peers 420 and a blockchain 430. In operation, the ordering party identifies various endorsement requests 412 that require allocation and processing by peers 420. Peer analysis / performance information 414 is monitored and analyzed, and peers may be ranked 416 and sorted in an order corresponding to their relative processing capabilities. Peers may receive blocks that are created 418 to include various task-related information. Allocation of blocks is performed to allocate endorsement requests in a manner consistent with peer performance indicator rankings 422. For example, peers with the highest capability ratings are granted endorsement requests before any other peers to optimize performance of blockchain load processing. Once a transaction is endorsed and completed, the transaction is forwarded 424 to the blockchain 430 for commit.
[0051] Figure 5A Flowchart 500A shows an example method of peer management and transaction management in a blockchain according to an example embodiment. Figure 5A , the method may include identifying one or more endorsement requests to perform blockchain transaction endorsement 512, sending one or more endorsement requests to an ordering node 514, monitoring performance metrics of the endorsing blockchain peers 516, assigning endorsement requests to the endorsing blockchain peers based on the performance metrics 518; and receiving an endorsed blockchain transaction 522. The method may also include storing the endorsement requests in a block before sending the block to the peers for inspection and processing. The method may also include transmitting the block to the one or more endorsing blockchain peers. The performance metrics may include peer processing speeds of the endorsing blockchain peers based on the block height of the one or more endorsement requests. The method may also include ranking the endorsing blockchain peers according to their respective peer processing speeds. The endorsing blockchain peer with the shortest processing time is ranked last in the ranking list of the endorsing blockchain peers. The block includes one or more endorsement requests, one or more endorsement responses, one or more endorsement response confirmations, and a transaction record. When assigning endorsement requests to endorsing blockchain peers based on the performance metric, the process also includes assigning the endorsement requests to certain endorsing blockchain peers that have a faster processing speed than other blockchain peers.
[0052] Figure 5B A flowchart of another example method of peer management and transaction management in a blockchain according to an example embodiment is shown. Figure 5B , method 500B includes identifying one or more endorsement requests to perform blockchain transaction endorsement 552, monitoring performance metrics of endorsing blockchain peers 554, creating a group of trusted endorsing blockchain peers with optimal performance metrics 556, assigning one or more endorsement requests to the group 558, and receiving an endorsed blockchain transaction 562.
[0053] In addition to performance analysis of peers, peers with the best performance can be part of a group formed for the purpose of managing blockchain transactions and endorsement requests. This way, the need to identify specific peers can be eliminated by relying on a group of trusted peers. Once the top blockchain peers are identified, they can be placed in a group of top peers based on performance, and secondary peers can also be placed in another group with tertiary peers. When making assignments for endorsements, transaction submissions, etc., tasks can be sent to the group and selected or processed by a randomly selected node in the group, rather than being specifically identified for processing task events.
[0054] Fig. 6AAn example physical infrastructure configured to perform various operations on a blockchain according to one or more example operating methods of example embodiments is shown. Fig. 6A , the example configuration 600A includes a physical infrastructure 610 with a blockchain 620 and a smart contract 640, and any operation steps 612 included in any example embodiment can be performed. Steps / operations 612 may include one or more steps described or depicted in one or more flow charts and / or logic diagrams. These steps may represent output or written information written or read from one or more smart contracts 640 and / or blockchains 620 residing on the physical infrastructure 610 of the computer system configuration. Data can be output from the executed smart contracts 640 and / or blockchains 620. The physical infrastructure 610 may include one or more computers, servers, processors, memories, and / or wireless communication devices.
[0055] Figure 6B An example smart contract configuration between contracting parties and an intermediary server configured to enforce smart contract terms on a blockchain is shown according to an example embodiment. Figure 6B , configuration 600B may represent a communication session, asset transfer session, or process driven by a smart contract 640 that explicitly identifies one or more user devices 652 and / or 656. The execution, operations, and results of the smart contract execution may be managed by a server 654. The contents of the smart contract 640 may need to be digitally signed by one or more entities 652 and 656 that are parties to the smart contract transaction. The results of the smart contract execution may be written to the blockchain as a blockchain transaction.
[0056] The above 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 reside 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.
[0057] An exemplary storage medium may be coupled to a processor such that the processor can read information from the storage medium and write information to the storage medium. Alternatively, the storage medium may be integrated with the processor. The processor and the storage medium may reside in an application specific integrated circuit ("ASIC"). In an alternative, the processor and the storage medium may reside as discrete components. For example, Figure 7 An example computer system architecture 700 is shown, which may represent or be integrated in any of the above-described components, among others.
[0058] Figure 7 It is not intended to imply any limitation on the scope of use or functionality of embodiments of the applications described herein. Regardless, computing node 700 is capable of being implemented and / or performing any of the functionality set forth above.
[0059] In computing node 700, there is a computer system / server 702 that can operate with many other general or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations that may be suitable for use with computer system / server 702 include, but are not limited to, personal computer systems, server computer systems, thin clients, fat clients, manual 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 the above systems or devices, etc.
[0060] Computer system / server 702 may be described in the general context of computer system executable instructions (e.g., program modules) executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform specific tasks or implement specific abstract data types. Computer system / server 702 may be practiced 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 local and remote computer system storage media including memory storage devices.
[0061] like Figure 7 As shown, a computer system / server 702 in a cloud computing node 700 is shown in the form of a general-purpose computing device. Components of the computer system / server 702 may include, but are not limited to, one or more processors or processing units 704, a system memory 706, and a bus that couples various system components including the system memory 706 to the processor 704.
[0062] Bus refers to any one or more of several 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. By way of example and not limitation, such architectures include an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0063] Computer system / server 702 generally includes various computer system readable media. Such media can be any available media accessible to computer system / server 702, and include volatile and non-volatile media, removable and non-removable media. In one embodiment, system memory 706 implements the flow charts of other figures. System memory 706 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 710 and / or cache memory 712. Computer system / server 702 can further include other removable / non-removable, volatile / non-volatile computer system storage media. As an example only, a storage system 714 can be provided for reading and writing non-removable non-volatile magnetic media (not shown and generally referred to as "hard drive"). Although not shown, a disk drive for reading and writing a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading or writing a removable non-volatile optical disk can provide a disk such as a CD-ROM, DVD-ROM or other optical media. In this case, each can be connected to the bus through one or more data media interfaces. As will be further depicted and described below, memory 706 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present application.
[0064] A program / utility 716 having a set (at least one) of program modules 718 and an operating system, one or more application programs, other program modules, and program data may be stored in the memory 706 by way of example and not limitation. Each of the operating system, one or more application programs, other program modules, and program data, or some combination thereof, may include an implementation of a networking environment. The program modules 718 generally perform the functions and / or methods of various embodiments of the present application as described herein.
[0065] As will be appreciated by those skilled in the art, various aspects of the present application may be embodied as a system, method or computer program product. Therefore, various aspects of the present application may take the following forms: a complete hardware embodiment, a complete software embodiment (including firmware, resident software, microcode, etc.) or an embodiment combining all software and hardware aspects that can be generally mentioned. Referred to herein as "circuit", "module" or "system". In addition, various aspects of the present application may take the form of a computer program product embodied in one or more computer-readable media on which a computer-readable program code is embodied.
[0066] The computer system / server 702 may also communicate with one or more external devices 720, such as a keyboard, a pointing device, a display 722, etc., one or more devices that enable a user to interact with the computer system / server 702, and / or any device that enables the computer system / server 702 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may occur via an I / O interface 724. However, the computer system / server 702 may still communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), and / or a public network (e.g., the Internet) through a network adapter 726. As shown, the network adapter 726 communicates with other components of the computer system / server 702 via a bus. It should be understood that, although not shown, other hardware and / or software components may be used in conjunction with the computer system / server 702. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drives, arrays, RAID systems, tape drives, and data archive storage systems.
[0067] Although exemplary embodiments of at least one of the systems, methods, and non-transitory computer-readable media are shown in the accompanying drawings and described in the foregoing detailed description, it should be understood that the present application is not limited to the disclosed embodiments, but can be rearranged, modified, and replaced as described and defined in the appended claims. For example, the capabilities of the systems of the various drawings can be performed by one or more of the modules or components described herein or in a distributed architecture, and can include a transmitter, a receiver, or both. For example, all or part of the functions performed by each module can be performed by one or more of these modules. In addition, the functions described herein can be performed at various times inside or outside a module or a module or component and in relation to various events. Moreover, the information sent between various modules can be sent between various modules and / or by multiple protocols via at least one of the following: data network, Internet, voice network, Internet protocol network, wireless device, wired device. Moreover, messages sent or received by any module can be sent or received directly and / or via one or more other modules.
[0068] Those skilled in the art will appreciate that a "system" may be embodied as a personal computer, server, console, personal digital assistant (PDA), cell phone, tablet computing device, smart phone, or any other suitable computing device or combination of devices. Presenting the above functions as being performed by a "system" is not intended to limit the scope of the present application in any way, but is intended to provide an example of many embodiments. In fact, the methods, systems, and apparatus disclosed herein may be implemented in local and distributed forms consistent with computing technology.
[0069] It should be noted that some of the system features described in this specification have been presented as modules in order to more specifically emphasize their implementation independence. For example, a module may be implemented as a hardware circuit, including a custom very large scale integrated circuit (VLSI) circuit or gate array, an off-the-shelf semiconductor such as a logic chip, a transistor, or other discrete components. A module may also be implemented in a programmable hardware device such as a field programmable gate array, a programmable array logic, a programmable logic device, a graphics processing unit, etc.
[0070] Modules may also be implemented at least in part in software to be executed by various types of processors. The identified executable code unit may, for example, include one or more physical or logical blocks of computer instructions, which may, for example, be organized as objects, processes, or functions. However, the executable files of the identified modules do not need to be physically located together, but may include different instructions stored in different locations, which, when logically combined together, include the modules and achieve the described purpose of the modules. In addition, modules may be stored on a computer-readable medium, which may be, for example, a hard drive, a flash memory device, a random access memory (RAM), a magnetic tape, or any other such medium for storing data.
[0071] In practice, a module of executable code may be a single or multiple instructions, and may even be distributed across multiple different code segments, between different programs, and across multiple storage devices. Similarly, operational data may be identified and shown herein within a module, and may be embodied in any suitable form and may be organized within any suitable type of data structure. The 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, only as electronic signals on a system or network.
[0072] It will be easily understood that, as generally described and shown in the drawings herein, the components of the present application can be arranged and designed in a variety of different configurations. Therefore, the detailed description of the embodiment is not intended to limit the scope of the claimed application, but only represents the selected embodiment of the present application. It will be easily understood by those skilled in the art that the above content can be practiced with steps in different orders and / or with hardware elements of configurations different from the disclosed configurations. Therefore, although the present application has been described based on these preferred embodiments, it will be apparent to those skilled in the art that some modifications, variations and alternative configurations will be apparent.
[0073] Although preferred embodiments of the present application have been described, it should be understood that the described embodiments are merely exemplary and that the scope of the present application is limited solely by the appended claims when considering the scope of all equivalents and modifications (e.g., protocols, hardware devices, software platforms, etc.).
Claims
1. A computer-implemented method comprising: identifying one or more endorsement requests for performing endorsement of a blockchain transaction; Transmitting one or more endorsement requests to an ordering node; sending, via the ordering node and for each of the one or more endorsement requests, to an endorsing blockchain peer a block containing an endorsement proposal; receiving, via the ordering node, an endorsement response from the endorsing blockchain peer; identifying, via the ordering node, a block height of the block based on a distance of the endorsement response from a genesis block; as well as The one or more endorsement requests are assigned to the endorsing blockchain peers according to a performance metric based on the block height of the one or more endorsement requests.
2. The method according to claim 1, further comprising: Store one or more endorsement requests in a block; as well as Transmit the block to one or more endorsing blockchain peers.
3. The method of claim 1 , wherein the performance metric comprises a peer processing speed of an endorsing blockchain peer based on the block height of one or more endorsement requests.
4. The method according to claim 3, further comprising Endorsing blockchain peers are ranked according to their respective peer processing speed.
5. The method of claim 4, wherein the endorsing blockchain peer with the shortest processing time is ranked last in the hierarchical list of endorsing blockchain peers.
6. The method of claim 2, wherein a block includes one or more endorsement requests, one or more endorsement responses, one or more endorsement response confirmations, and a transaction record.
7. The method of claim 1 , wherein assigning endorsement requests to endorsing blockchain peers based on performance metrics comprises: Distribute the endorsement request to one or more endorsing blockchain peers that have a faster processing speed than other endorsing blockchain peers.
8. A device for processing an endorsement request, comprising: a processor configured to identify one or more endorsement requests for performing an endorsement of a blockchain transaction; a sender configured to transmit one or more endorsement requests to an ordering node; The processor is also configured as: sending, via the ordering node and for each of the one or more endorsement requests, to an endorsing blockchain peer a block containing an endorsement proposal; receiving, via the ordering node, an endorsement response from the endorsing blockchain peer; identifying, via the ordering node, a block height of the block based on a distance of the endorsement response from a genesis block; as well as The one or more endorsement requests are assigned to the endorsing blockchain peers according to a performance metric based on the block height of the one or more endorsement requests.
9. The apparatus of claim 8, wherein the processor is further configured to: storing one or more endorsement requests in a block; and The sender is also configured to transmit the block to one or more endorsing blockchain peers.
10. The apparatus of claim 8, wherein the performance metric comprises a peer processing speed of an endorsing blockchain peer based on the block height of one or more endorsement requests.
11. The apparatus of claim 10, wherein the processor is further configured to sort the endorsing blockchain peers according to their respective peer processing speeds.
12. The apparatus of claim 11, wherein the endorsing blockchain peer with the shortest processing time is ranked last in the hierarchical list of endorsing blockchain peers.
13. The apparatus of claim 9, wherein a block includes one or more endorsement requests, one or more endorsement responses, one or more endorsement response confirmations, and a transaction record.
14. The apparatus of claim 8, wherein the processor assigning endorsement requests to endorsing blockchain peers based on the performance metric comprises: Distribute the endorsement request to one or more endorsing blockchain peers that have a faster processing speed than other endorsing blockchain peers.
15. A computer-readable storage medium comprising instructions which, when executed, cause a processor to: identifying one or more endorsement requests for performing endorsement of a blockchain transaction; Transmitting one or more endorsement requests to an ordering node; sending, via the ordering node and for each of the one or more endorsement requests, to an endorsing blockchain peer a block containing an endorsement proposal; receiving, via the ordering node, an endorsement response from the endorsing blockchain peer; identifying, via the ordering node, a block height of the block based on a distance of the endorsement response from a genesis block; as well as The one or more endorsement requests are assigned to the endorsing blockchain peers according to a performance metric based on the block height of the one or more endorsement requests.
16. The computer-readable storage medium of claim 15, wherein the processor is further configured to perform: storing one or more endorsement requests in a block; and Transmit the block to one or more endorsing blockchain peers.
17. The computer-readable storage medium of claim 15, wherein the performance metric comprises a peer processing speed of an endorsing blockchain peer based on the block height of one or more endorsement requests.
18. The computer-readable storage medium of claim 17, wherein the processor is further configured to perform: Endorsing blockchain peers are ranked according to their respective peer processing speed.
19. The computer-readable storage medium of claim 18, wherein the endorsing blockchain peer with the shortest processing time is ranked last in the hierarchical list of endorsing blockchain peers.
20. The computer-readable storage medium of claim 16, wherein a block includes one or more endorsement requests, one or more endorsement responses, one or more endorsement response confirmations, and a transaction record, and assigning the endorsement requests to the endorsing blockchain peers based on the performance metric comprises: Distribute the endorsement request to one or more endorsing blockchain peers that have a faster processing speed than other endorsing blockchain peers.
Citation Information
Patent Citations
Method and system for processing factoring information based on blockchain
CN108122159A
Block chain consensus method and system
CN108122165A
System and method to dynamically setup a private sub-blockchain based on agility of transaction processing
US20180121909A1
