Database composite endorsement
Through the database composite endorsement mechanism in the blockchain network, the problems of single failure points and insufficient data redundancy of centralized databases are solved, the transaction success rate and system efficiency are improved, and higher reliability and efficiency are achieved.
Patent Information
- Application Number
- CN202010297580.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-15
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-04-15
AI Technical Summary
Centralized databases have problems such as single point of failure, insufficient data redundancy, strong network dependence, access bottlenecks and difficulty in data retrieval, making it difficult to meet the needs of distributed and decentralized systems.
The database composite endorsement mechanism in the blockchain network is adopted, and the blockchain client, endorser node and submitter node work together to update and verify transactions using the composite endorsement mechanism to ensure the reliability and consistency of the transaction.
It improves the transaction success rate, reduces the number of invalid transactions, reduces the total transaction cost, and enhances the reliability and efficiency of the blockchain system.
Smart Images

Figure CN111831739B_ABST
Abstract
Description
Technical Field
[0001] The present application relates generally to improved transaction approval for blockchain networks, and more particularly to database composite endorsement. Background Art
[0002] A centralized database stores and maintains data in a single database in one location, such as a database server. This location is usually a central computer, such as a desktop central processing unit (CPU), a server CPU, or a mainframe. Information stored in a centralized database can usually be accessed from multiple different points. For example, multiple users or client workstations can work simultaneously on a centralized database based on a client / server configuration. Centralized databases are easy to manage, maintain, and control due to their single location, and are particularly suitable for security needs. In a centralized database, data redundancy is minimized because the single storage location for all data also means that there is only one master record for a given data set.
[0003] However, centralized databases have significant drawbacks. For example, centralized databases have a single point of failure. In particular, if fault tolerance is not considered and a hardware failure (e.g., hardware, firmware, and / or software failure) occurs, all data in the database will be lost and the work of all users will be interrupted. In addition, centralized databases are highly dependent on network connections. Therefore, the slower the connection, the longer each database access takes. Another disadvantage is that bottlenecks occur when centralized databases experience high traffic due to a single location. In addition, centralized databases provide limited access to data because the database maintains only one copy of the data. Therefore, multiple devices cannot access the same data block at the same time without causing serious problems or risking overwriting the stored data. In addition, because database storage systems have minimal or even no data redundancy, accidentally lost data is difficult to retrieve unless retrieved from backup storage through manual operations. Therefore, a solution that overcomes these shortcomings and limitations is needed. Summary of the invention
[0004] An exemplary embodiment provides a system including a blockchain network, comprising a blockchain client, one or more endorser nodes or peers, and a committer node or peer. The blockchain client is configured to perform one or more of the following: submit a transaction proposal to the blockchain network, receive one or more composite endorsements, and submit an endorsed transaction based on the one or more composite endorsements. The one or more endorser nodes or peers are each configured to perform one or more of the following: receive the transaction proposal, endorse the transaction proposal, including updating an in-process world state list, provide a composite endorsement including a base result and a predicted result, and remove the submitted transaction from the in-process world state list. The committer node or peer is configured to perform one or more of the following: receive the endorsed transaction, verify the endorsed transaction, and submit the endorsed transaction to the blockchain network.
[0005] Another embodiment provides a method, the method comprising one or more of the following: submitting a transaction proposal to a blockchain network by a blockchain client; endorsing the transaction proposal by one or more endorser nodes or peers, the endorsement comprising updating a list of in-progress world states; providing one or more composite endorsements, each composite endorsement comprising a base result and a predicted result corresponding to the transaction proposal; submitting an endorsed transaction in response to the one or more composite endorsements; verifying the endorsed transaction by a submitter node or peer; submitting the endorsed transaction to the blockchain network; and removing the submitted transaction from the list of in-progress world states.
[0006] Another exemplary embodiment provides a non-transitory computer-readable medium comprising instructions that, when read by a processor, cause the processor to perform one or more of the following: submitting a transaction proposal to a blockchain network by a blockchain client; endorsing the transaction proposal by one or more endorser nodes or peers, the endorsement comprising updating a list of in-progress world states; providing one or more composite endorsements, each composite endorsement comprising a base outcome and a predicted outcome corresponding to the transaction proposal; submitting an endorsed transaction in response to the one or more composite endorsements; validating the endorsed transaction by a submitter node or peer; submitting the endorsed transaction to the blockchain network; and removing the submitted transaction from the list of in-progress world states. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 A network diagram showing a system including a database according to an embodiment;
[0008] Figure 2A An example of a blockchain architecture configuration according to an embodiment is shown;
[0009] Figure 2B shows a blockchain transaction flow according to an embodiment;
[0010] Figure 3A shows a permission network according to an embodiment;
[0011] Figure 3B Another permission network according to an embodiment is shown;
[0012] Figure 4 A system message passing diagram for managing composite endorsements according to an embodiment is shown;
[0013] Figure 5A A flow chart showing a transaction processing using composite endorsement according to an embodiment;
[0014] Figure 5B An example method of performing resource transfer according to an embodiment is shown;
[0015] Fig. 6A An example system configured to perform one or more operations described herein is shown in accordance with an embodiment;
[0016] Figure 6B Another example system configured to perform one or more operations described herein is shown in accordance with an embodiment;
[0017] Figure 6C Another example system configured to use smart contracts according to an embodiment is shown;
[0018] Fig.6D Another example system configured to use blockchain according to an exemplary embodiment is shown;
[0019] Fig. 7A illustrates a process for adding a new block to a distributed ledger according to an embodiment;
[0020] Figure 7B shows the contents of a new data block according to an embodiment;
[0021] Figure 7C A blockchain for digital content according to an embodiment is shown;
[0022] Fig.7D A block is shown that can represent the structure of a block in a blockchain according to an embodiment;
[0023] Figure 8 An example system is shown that supports one or more exemplary embodiments. DETAILED DESCRIPTION
[0024] It is readily understood that the components generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of embodiments of at least one of the methods, devices, non-transitory computer-readable media, and systems as shown in the figures is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments.
[0025] The features, structures, or characteristics described throughout the specification may be combined or removed in any suitable manner in one or more embodiments. For example, the use of the phrases "exemplary embodiments," "some embodiments," or other similar language throughout this specification refers to the fact that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment. Therefore, the phrases "exemplary embodiments," "in some embodiments," "in other embodiments," or other similar language appearing throughout this specification do not necessarily all refer to the same set of embodiments, and the described features, structures, and characteristics may be combined or removed in any suitable manner in one or more embodiments.
[0026] In addition, although the term "message" may have been used in the description of the embodiment, the application can be applied to many types of networks and data. In addition, although certain types of connections, messages and signaling can be described in exemplary embodiments, the application is not limited to certain types of connections, messages and signaling.
[0027] Exemplary embodiments provide methods, systems, components, non-transitory computer-readable media, devices, and / or networks for database composite endorsement.
[0028] In one embodiment of the present application, a decentralized database (such as blockchain) is used, which is a distributed storage system including multiple nodes that communicate with each other. The decentralized database includes a data structure that can only be appended but not changed, similar to a distributed ledger that can maintain records between untrusted parties. Untrusted parties are referred to as peers or peer nodes in this article. Each peer maintains a copy of the database record, and a single peer cannot modify the database record without reaching a consensus between the distributed peers. For example, peers can execute a consensus protocol to verify blockchain storage transactions, group storage transactions into blocks, and build a hash chain on the blocks. The process forms a ledger by sorting storage transactions as needed to maintain consistency. In various embodiments, a licensed and / or unlicensed blockchain can be used. In a public or unlicensed blockchain, anyone can participate without a specific identity. Public blockchains generally involve local cryptocurrencies, using consensus based on various protocols such as proof of work (PoW). On the other hand, permissioned blockchain databases provide secure interactions between a group of entities that have a common goal but do not fully trust each other - such as businesses exchanging funds, goods, information, etc.
[0029] The present application can utilize a blockchain that operates arbitrary programmable logic called "smart contracts" or "chaincodes" customized for decentralized storage solutions. In some cases, there may be dedicated chaincodes for managing functions and parameters, called system chaincodes. The present application can further utilize such smart contracts: they are trusted distributed applications that utilize the tamper-proof properties of the blockchain database and the underlying protocol between nodes called endorsements or endorsement policies. Blockchain transactions associated with the present application can be "endorsed" before being submitted to the blockchain, while unendorsed transactions are not considered. The endorsement policy allows the chaincode to specify endorsers in the form of a set of peer nodes required for endorsement for the transaction. When the client sends the transaction to the peer specified in the endorsement policy, the transaction is executed to verify the transaction. After verification, the transaction enters the sorting phase, in which a consensus protocol is used to generate a series of endorsed transactions arranged in order, and these endorsed transactions are grouped into blocks.
[0030] The present application may utilize nodes that are communication entities of a blockchain system. A "node" may perform a logical function, i.e., multiple nodes of different types may 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 may include different types, such as client or submitting-client nodes, which submit transaction invocations to endorsers (e.g., peers) and broadcast transaction proposals to ordering services (e.g., ordering nodes). Another type of node is a peer node that can receive transactions submitted by clients, submit transactions, and maintain the state and copy of the blockchain transaction ledger. Peers may also play the role of endorsers, although this is not required. An ordering service node or orderer is a node that runs a communication service for all nodes, which implements delivery guarantees, such as broadcasts to each 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 that typically includes control and setup information.
[0031] The present application may utilize a ledger that 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 parties (e.g., client nodes, ordering nodes, endorser nodes, peer nodes, etc.). Each party (e.g., peer node) may maintain a copy of the ledger. A transaction may result in a set of asset key-value pairs being submitted to the ledger as one or more operands, such as create, update, delete, etc. The ledger includes a blockchain (also referred to as a chain) for storing an unchangeable ordered record in blocks. The ledger also includes a state database that maintains the current state of the blockchain.
[0032] The present application may use a chain of transaction logs, which is structured as hash-linked blocks, each block containing a series of N transactions, where N is equal to or greater than 1. The block header includes the hash of the transactions of the block, as well as the hash of the header of the previous block. In this way, all transactions on the ledger can be arranged in sequence and linked together in a cryptographic manner. Therefore, it is impossible to tamper with the ledger data without destroying the hash links. The hash of the most recently added blockchain block represents every transaction on the chain that has arrived before it, which makes it possible to ensure that all peer nodes are in a consistent and trusted state. The chain can be stored on a peer node file system (i.e., local, attached storage, cloud, etc.), efficiently supporting the append-only nature of blockchain workloads.
[0033] The current state of the immutable ledger represents the latest values of all keys contained in the chain transaction log. The current state represents the latest key values known to a channel, and is therefore sometimes called the world state. Chaincode invocations execute transactions against the current state data of the ledger. In order to make these chaincode interactions efficient, the latest values of keys can be stored in a state database. The state database can be just an indexed view of the chain transaction log, so it can be regenerated from the chain at any time. The state database can be automatically restored (or generated on demand) when a peer node starts and before accepting transactions.
[0034] Benefits of the solution described and represented herein include: improving the success rate of transactions with a large number of endorsements submitted by many clients with the same chaincode (especially for transactions that share the same basic results), improving the quality of the transaction process (e.g., by reducing the number of invalid transactions in the shared ledger), and reducing the overall transaction cost (e.g., reducing the resubmission and re-endorsement process and network traffic).
[0035] The embodiments disclosed in this application cannot be implemented in traditional database structures. Traditional database structures do not include multiple peer consensus protocols or shared ledgers, nor do they support the basic and predictive transaction recommendation results disclosed herein.
[0036] This invention describes a technical improvement of the blockchain technology itself, rather than a functional improvement of computer functions using blockchain. This technical improvement provides a new method for improving the success rate of transactions in blockchain technology.
[0037] Although the present application does not store new information in an immutable ledger, the disclosed new method uses a new in-process world state at each endorser node or peer to track all pending blockchain transactions to improve the success rate of blockchain system process transactions.
[0038] In the Hyperledger blockchain system, the transaction flow goes through two phases: endorsement phase and commitment phase. Transactions proposed in the endorsement phase may become invalid during the confirmation process in the commitment phase because the world state may have changed compared to the endorsement phase. The reason for this problem is that many clients may submit different transactions to a set of related endorsers, and the time interval between endorsement and submission. This may lead to two problems: there may be a large number of invalid transactions on each peer ledger, and the blockchain network may suffer from frequent transaction failures - which usually leads to poor customer satisfaction.
[0039] Figure 1 A network diagram of a system including a database according to an embodiment is illustrated. Figure 1, the network 100 may be a public or permissioned blockchain network and includes a blockchain client 104 that creates a transaction proposal 124 for the blockchain network 100. One or more endorser nodes or peers 108 receive the transaction proposal 124, such as Figure 4 , and returns the composite endorsement 128 to the blockchain client 104. Figure 1 A blockchain network 100 is illustrated as including N endorser nodes or peers 108, identified as endorser node or peer 108A, endorser node or peer 108B, ... endorser node or peer 108N. There may be any number of endorser nodes or peers 108 in the blockchain network 100. Each endorser node or peer 108 includes a data structure that is central to the present application.
[0040] The data structures are in-progress world state lists 112, as shown as in-progress world state list 112A associated with endorser node or peer 108A, in-progress world state list 112B associated with endorser node or peer 108B, and in-progress world state list 112N associated with endorser node or peer 108N. Pending transaction results are added to in-progress world state list 112 and removed from list 112 when a transaction is committed 136.
[0041] The blockchain client 104 receives the composite endorsements 128 from all endorser nodes or peers 108 and creates an endorsed transaction 132, which is provided to a committer node or peer 116 of the blockchain network 100. The committer node or peer 116 includes a shared ledger 120 that stores the committed transaction in a block that is added to the blockchain of the blockchain network 100. The committer node or peer 116 also provides the committed transaction 136 to each endorser node or peer 108.
[0042] Each of the endorser nodes or peers 108 removes the corresponding transaction from the in-progress world state list 112, since the transaction no longer needs to be tracked once it has been submitted.
[0043] Figure 2A The blockchain architecture configuration 200 according to an embodiment is illustrated. Figure 2A, the blockchain architecture 200 may include certain blockchain elements, such as a set of blockchain nodes 202. The blockchain nodes 202 may include one or more nodes 204-210 (these four nodes are merely illustrative). These nodes participate in many activities, such as blockchain transaction addition and verification processes (consensus). One or more blockchain nodes 204-210 may endorse transactions according to endorsement policies and may provide ordering services for all blockchain nodes in the architecture 200. The blockchain node may initiate blockchain verification and seek to write to the blockchain immutable ledger stored in the blockchain layer 216, a copy of which may also be stored on the basic physical facility 214. The blockchain configuration may include one or more applications 224 that are linked to an application programming interface (API) 222 to access and execute stored program / application code 220 (e.g., chain code, smart contracts, etc.), which may be created according to the custom configuration sought by the participants and may maintain their own state, control their own assets, and receive external information. This may be deployed as a transaction and installed on all blockchain nodes 204-210 by attaching to the distributed ledger.
[0044] The blockchain foundation or platform 212 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 auditors seeking access to data entries. The blockchain layer 216 may expose an interface to provide the required access to the virtual execution environment for processing program code and participating in the underlying physical infrastructure 214. Cryptographic trust services 218 may be used to verify transactions such as asset exchange transactions and keep the information confidential.
[0045] Figure 2AThe blockchain architecture configuration can process and execute program / application code 220 and the services provided through one or more interfaces opened by the blockchain platform 212. The code 220 can control blockchain assets. For example, the code 220 can store and transmit data and can be executed by the nodes 204-210 in the form of smart contracts, and associate chain codes with conditions or other code elements subject to their execution. As a non-limiting example, smart contracts can be created to perform reminders, updates, and / or other notifications (depending on changes, updates, etc.). The smart contracts themselves can be used to identify rules related to authorization, access requirements, and ledger usage. For example, the information 226 can include a transaction proposal 226, which can be processed by one or more processing entities (e.g., virtual machines) included in the blockchain layer 216. The results 228 can include composite endorsements 228. The basic physical infrastructure 214 can be used to retrieve any data or information described herein.
[0046] 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 to a blockchain (e.g., a distributed network of blockchain peers). Transactions are the execution of smart contract code, which can be performed in response to the satisfaction of conditions associated with the 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 resulting from the execution of a smart contract can be automatically replicated across a distributed network of blockchain peers through one or more consensus protocols.
[0047] Smart contracts can write data to the blockchain in the form 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 encrypted and maintained as private data. Temporary data used / generated by smart contracts is kept in memory by the provided execution environment and is deleted once the data required by the blockchain is identified.
[0048] Chaincode may include a code interpretation of a smart contract, with additional functionality. As described herein, chaincode may be a program code deployed on a computing network, executed and validated together by chain validators during a consensus process. The chaincode receives a hash and retrieves from the blockchain a hash associated with a data template created using a previously stored functionality extractor. If the hash of the hashed identifier matches the hash created from the stored identifier template data, the chaincode sends an authorization key to the requested service. The chaincode may write data associated with cryptographic details to the blockchain.
[0049] Figure 2B An example of a blockchain transaction flow 250 between blockchain nodes according to an embodiment is illustrated. Figure 2B , the transaction flow may include a transaction proposal 291 sent by the application client node 260 to the endorsing peer node 281. The endorsing peer node 281 may verify the client signature and execute a chaincode function to initiate the transaction. The output may include the 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, the proposal response 292 is sent back to the client 260 along with the endorsement signature. The client 260 assembles the endorsement into a transaction payload 293 and broadcasts it to the sorting service node 284. The sorting service node 284 then delivers the sorted transaction as a block to all peers 281-283 on the channel. Each peer 281-283 may validate the transaction before submitting it to the blockchain. For example, the peer may check the endorsement policy to ensure the correct distribution of the signed result to the specified peer and verify the signature against the transaction payload 293.
[0050] Reference again Figure 2B , the client node 260 initiates a transaction 291 by constructing and sending a request to a peer node 281 (endorser). The client 260 may include an application that utilizes a supported software development kit (SDK) that utilizes an available API to generate a transaction proposal. A transaction proposal is a request to invoke a chaincode function so that data can be read and / or written to the ledger (i.e., a new key-value pair of an asset is written). The SDK may act as a shim to package the transaction proposal into a format that is appropriately architected (e.g., protocol buffers over remote procedure calls (RPCs)) and obtain the client's cryptographic credentials to generate a unique signature for the transaction proposal.
[0051] In response, the endorsing peer 281 can verify that: (a) the transaction proposal is well-formed, (b) the transaction has not been submitted in the past (replay attack protection), (c) the signature is valid, and (d) the submitter (client 260 in this example) is properly authorized to perform the proposed operation on the channel. The endorsing peer 281 can 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 are made to the ledger at this time. In 292, this set of values is passed back to the SDK of the client 260 along with the signature of the endorsing peer 281 as a proposal response 292, which parses the payload for use by the application.
[0052] In response, the client 260 application checks / validates the endorsed peer signatures and compares the proposed responses to determine if the proposed responses are the same. If the chaincode only queried the ledger, the application will check the query response and typically will not submit the transaction to the ordering service node 284. If the client application intends to submit the transaction to the ordering service node 284 to update the ledger, the application determines whether the specified endorsement policy has been satisfied (i.e., all peer nodes required for the transaction support the transaction) before submission. Here, the client can include only one of the multiple parties to the transaction. In this case, each client can have its own endorsement node, and each endorsement node is required to endorse the transaction. The architecture is such that even if an application chooses not to check the response or otherwise forward an unendorsed transaction, the endorsement policy will still be implemented by the peers and supported during the commit validation phase.
[0053] After successful checks, in step 293, client 260 assembles the endorsement into a transaction and broadcasts the transaction proposal and response within a transaction message to ordering node 284. The transaction may contain read / write sets, endorsing peer signatures, and channel IDs. Ordering service node 284 does not need to examine the entire contents of a transaction in order to perform its operations, but can simply receive transactions from all channels in the network, sort them by channel in time, and create blocks of transactions by channel.
[0054] Deliver the block of transactions from the ordering service node 284 to all peer nodes 281-283 on the channel. Validate the transactions 294 within the block to ensure that any endorsement policies are satisfied and that the ledger state of the read set variables has not changed since the read set was generated by the transaction execution. Mark the transactions in the block 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. Emit an event to notify the client application that the transaction (call) has been immutably appended to the chain and that the transaction verification is valid or invalid.
[0055] Figure 3AAn example of a permissioned blockchain network 300 is illustrated, which has a distributed, decentralized peer-to-peer architecture. In this example, a blockchain user 302 can initiate a transaction to a permissioned blockchain 304. In this example, the transaction can be a deployment, call, or query, and can be issued through a client-side application using an SDK, directly through an API, etc. The network can provide access to regulators 306 such as auditors. The blockchain network operator 308 manages member permissions, such as registering regulators 306 as "auditors" and blockchain users 302 as "clients." Auditors can be restricted to querying the ledger, while clients can be authorized to deploy, call, and query certain types of chaincodes.
[0056] Blockchain developers 310 can write chaincodes and client applications. Blockchain developers 310 can deploy chaincodes directly to the network through an interface. In order to include credentials from traditional data sources 312 in the chaincode, developers 310 can use out-of-band connections to access the data. In this example, blockchain users 302 connect to the permissioned blockchain 304 through peer nodes 314. Before conducting any transactions, peer nodes 314 retrieve the user's registration and transaction certificates from the certification authority 316 that manages user roles and permissions. In some cases, blockchain users must have these digital certificates to conduct transactions on the permissioned blockchain 304. At the same time, users trying to use chaincodes may need to verify their credentials on traditional data sources 312. To confirm the user's authorization, the chaincode can use an out-of-band connection to the data through a traditional processing platform 318.
[0057] Figure 3B Another example of a permissioned blockchain network 320 is shown, which has a distributed, decentralized peer-to-peer architecture. In this example, a blockchain user 322 can submit a transaction to a permissioned blockchain 324. In this example, the transaction can be a deployment, call, or query, and can be issued through a client-side application using an SDK, directly through an API, etc. The blockchain network operator 328 manages member permissions, such as registering regulators 326 as "auditors" and blockchain users 322 as "clients." Auditors can be restricted to querying the ledger, while clients can be authorized to deploy, call, and query certain types of chaincodes. .
[0058] Blockchain developers 330 write chaincodes and client applications. Blockchain developers 330 can deploy chaincodes directly onto the network through an interface. To include credentials from traditional data sources 332 in chaincodes, developers 330 can use out-of-band connections to access the data. In this example, blockchain user 322 connects to the network through peer node 334. Before proceeding with any transactions, peer node 334 retrieves the user's registration and transaction certificates from certification authority 336. In some cases, blockchain users must have these digital certificates to conduct transactions on the permissioned blockchain 324. At the same time, users attempting to use chaincodes may need to verify their credentials on traditional data sources 332. To confirm the user's authorization, chaincodes can use out-of-band connections to that data through traditional processing platform 338.
[0059] Figure 4 A system message passing diagram illustrating management of composite endorsements according to an embodiment. Figure 4 , the system message diagram 400 includes a blockchain client 410, an endorser node or peer 420, and a submitter node or peer 430. The blockchain client 410 generates a transaction proposal (415) and transmits the transaction proposal 416 to the endorser node or peer 420.
[0060] The endorser node or peer 420 receives the transaction proposal 416 and simulates the transaction proposal 425 by calculating the basic result and the predicted result 435. The in-progress world state list 440 is updated by storing the transaction and the accompanying basic result and predicted result. The in-progress world state list stores all pending transactions and simulation results. The endorser node or peer 420 creates a composite endorsement 441 including the basic and predicted simulation results, and transmits the composite endorsement 441 to the blockchain client 410.
[0061] The blockchain client 410 receives the composite endorsements 441 from all endorser nodes or peers 420 and assembles 445 the composite endorsements into an endorsed transaction 446. The blockchain client 410 then transmits the endorsed transaction 446 to the submitter node or peer 430.
[0062] The submitter node or peer 430 verifies the endorsed transaction 450 and submits the endorsed transaction to the blockchain network's shared ledger 455. The submitter node or peer 430 determines that the prediction result is valid by comparing the prediction result with the value in the world state database.
[0063] The submitted transaction 456 is also transmitted to each endorser node or peer 420, which in response removes the submitted transaction from the in-progress world state list 460. By removing all submitted transactions, the storage space required for the in-progress world list is advantageously minimized.
[0064] Figure 5A A flowchart 500 for processing transactions using composite endorsements in a blockchain according to an exemplary embodiment is illustrated. The present application provides an effective method for improving the effective transaction rate by providing a new endorsement method with an in-progress transaction list, a new transaction verification method using composite endorsement results, and a new mechanism for cleaning up the in-progress world state list during the submission phase. The present application returns the composite endorsement results including the basic results and the predicted results to the blockchain client.
[0065] For example, three transactions T1, T2, and T3 can have the same business logic in the same chaincode. Each transaction reads and writes key1 (key_1). In a traditional embodiment without the disclosed method, after endorsement, Txn->read(key1, version), write(key1, value). If T1, T2, and T3 need to be submitted in the order of TD>T2>T3, only T1 is valid. Because T1 changes the value of key1, T2 and T3 still use the original value (not the updated value), so T2 and T3 are invalid.
[0066] In an embodiment using the disclosed method, after endorsement, Txn->read(key1, base_version, predicted_version), write(key1, base_value, predicted_value). If T1, T2, T3 are endorsed transactions and submitted in this order, then T1 is valid because base_version is the same as the world state; T2 is valid because predicted_version is the same as the world state - because the world state has been updated with T1; T3 is valid because predicted_version is the same as the world state - because the world state has been updated with T1 and T2. T1, T2, and T3 transactions are all valid transactions and are submitted to the blockchain, and there are no invalid transactions.
[0067] The predicted_value is determined by the previous transaction. For example, suppose that in a given world state, the value of key1 is "1" and its version is "0". The previous transaction T1 changes the value of key1 from "1" to "100", and after T1 is committed, the key1 version will be updated to "1". Since the previous transaction was not committed when the current transaction (T2) was in the pre-execution state, "100" is the predicted_value and "1" is the predicted_version. Reference Figure 5A , method 500 may include one or more of the following steps.
[0068] At box 504, one or more endorser nodes or peers receive a transaction proposal. Each endorser node or peer includes an in-process world state list. The in-process world state list records the endorsed uncommitted transaction history with predicted values. The endorsed transaction is simulated based on the predicted values and a new entry is provided in the in-process world state list. The in-process world state list maintains the flexibility to either commit or roll back the transaction at a future commit stage. Each endorser node or peer checks if there are any read / write keys (R / W keys) in the in-process world state list.
[0069] At box 508, if there are any R / W keys in the in-progress world state list, the one or more endorser nodes or peers simulate the transaction using the in-progress world state list. Each transaction (endorsed but not committed) creates a new entry in the in-progress world state list, but does not update any keys in the world state database of the blockchain network. The new entry includes a write set key using the predicted result. If there are no R / W keys in the in-progress world state list, each endorser node or peer adds an entry to the in-progress world state list using the basic result. The entries in the in-progress world state list are created in chronological order. When a key in the world state database of the blockchain network is to be modified by a transaction (although not yet committed), the key will be added to the in-progress world state list. When the value of the key is committed to the world state database, it will be removed from the in-progress world state list. The in-progress world state list includes the value and version of the key. Each endorser node or peer generates a composite endorsement for the blockchain client.
[0070] At box 512, the blockchain client creates an endorsed transaction based on the received composite endorsement and transmits the endorsed transaction to the submitter node or peer. The blockchain client combines the endorsed basic result and predicted result into a valid endorsement and provides the basic_result and predicted_result to the submitter node or peer in a transaction submission request message. The basic result is simulated with the world state database of the blockchain network, and the predicted result is simulated with the in-progress world state list. The world state database value is the submitted transaction value. The endorsed result will not be submitted to the world state database.
[0071] At block 516, the submitting node or peer verifies the endorsed transaction. The submitting node or peer node compares the endorsement result with the world state database value. The endorsement result includes a basic result and a predicted result. If the basic result or the predicted result is the same as the world state database value, the transaction is valid; otherwise, the transaction is invalid.
[0072] At block 520, the submitter node or peer submits the endorsed transaction to a new block of a blockchain of the blockchain network.
[0073] At block 524, the submitter node or peer transmits the submitted transaction to each endorser node or peer, which updates the in-progress world state list by removing the submitted transaction from the list. If the transaction is valid and the predicted result is the same as the world state database value, the transaction entry in the in-progress world state list is moved to the beginning of the list. The remaining entries remain unchanged. If the transaction is invalid, the transaction entry and other subsequent entries that are still pending are deleted from the in-progress world state list.
[0074] Figure 5B An example method of performing resource transfer according to an embodiment is illustrated. Figure 5B , method 550 illustrates a process for performing real-time resource transfer using a distributed shared ledger, and may include one or more of the following steps.
[0075] At box 554, the system receives a resource transfer request from a user. Typically, a user sends a resource transfer request from a user device by logging into the system using a unique identifier associated with the user. The unique identifier may be, for example, an alphanumeric user ID, a PIN, a cryptographic hash, etc. The resource transfer request may, for example, be a request to transfer funds from a user account held by a first entity to a recipient account. In some embodiments, the recipient account may also be held by the first entity. In other embodiments, the recipient's account may be held by a second entity. The resource transfer request may further include information about the transfer, such as the amount of funds to be transferred, the time when the transfer occurs (usually real-time or near real-time), etc. In some embodiments, the resource transfer request may also include additional data, which may include data such as electronic documents, images, video / audio media files, etc. The resource transfer request may also include a unique identifier associated with the recipient of the resource transfer. In this way, the system can use a unique identifier to control the flow of resources without the user providing or receiving sensitive personal information.
[0076] At block 558, the system generates a pending data record on the blockchain. The system may extract data from the resource transfer request to generate the pending data record, where the so-called pending data record may be a data record that has not yet been verified to become a permanent part of the blockchain. Typically, the pending data record contains information provided by the user in the resource transfer request. For example, if the resource transfer request is a request to transfer funds, the pending data record may contain information such as the amount of funds to be transferred, a unique identifier associated with the user and the recipient, and any related attachments. In some embodiments, the system may determine the account from which the funds are to be extracted based on the unique identifier associated with the user. The system may encrypt the user's unique identifier and / or account information before including the information in the blockchain, such as by using a cryptographic hash. In this way, if the pending data record becomes a permanent data record on the blockchain, subsequent third-party viewers of the data record will not be able to access the user's unique identifier and / or account information. At this stage, the pending data record has not yet been written to the blockchain. In some embodiments, the system may require a threshold number of nodes to verify the pending data record using a consensus mechanism. For example, if funds are transferred between accounts of the same entity, the pending data record may only need to be verified by nodes within the first entity. However, in an embodiment where a funds transfer occurs between two different entity accounts, the pending data record may need to be verified by multiple nodes within the first entity and multiple nodes within the second entity. In other words, the first entity and the second entity must first verify and confirm that the transaction is valid before allowing the pending data record to be written to the blockchain as a permanent data record.
[0077] At box 562, the system verifies the pending data record of the first entity. Typically, a certain threshold number of nodes in the first entity must verify the pending data record. To do this, the system can verify whether the user's unique identifier is associated with an account held by the first entity. The system can further verify whether the account associated with the user has sufficient funds to pay the transfer, as disclosed in the pending data record. In some embodiments, the system may require a threshold number of first entity nodes to verify the pending data record before adding it to the blockchain. The more first entity nodes required to verify the pending data record, the more the system can ensure that the pending data record contains the correct information required for a valid, authorized transaction. On the other hand, the fewer the number of first entity nodes required to verify the pending data record, the less computing resources are required on the first entity node to verify the pending data record. Therefore, the system can adjust the threshold up or down to achieve the best balance between security and efficiency.
[0078] At box 566, the system detects that the pending data record has been verified by the second entity. The system can be configured so that the pending data record must be further verified by a threshold number of nodes of the second entity. For example, if a transfer occurs between accounts held by different entities (e.g., the sender's account is held by the first entity and the recipient's account is held by the second entity), both entities must confirm the validity of the transaction to verify the pending data record. Therefore, the second entity node can verify whether the unique identifier associated with the recipient is associated with an existing account of the second entity. As with the case of the first entity node, the system may require a threshold number of second entity nodes to verify the transaction.
[0079] At block 570, the system converts the pending data record to a permanent data record. Once the system verifies that a threshold number of first entity nodes and a threshold number of second entity nodes have verified the transaction, the pending data record can be converted to a permanent data record. At this point, the system has recognized that the pending data record reflects information about a valid transaction and that the information in the pending data record has been verified with a sufficient degree of confidence. The permanent data record can then be immutably incorporated into the blockchain.
[0080] At box 574, the system attaches the permanent data record to the blockchain. Once the permanent data record is attached to the blockchain, it becomes an immutable part of the blockchain. The permanent data record may contain a reference to the previous blockchain, which may be a cryptographic hash. At this point, the funds have been transferred to the recipient's account, and the permanent data record is subject to the logic of any smart contracts in the blockchain application. For example, if there is a smart contract that reports all transactions above a certain threshold to a third party, the permanent data record will be set to be accessible to the third party if it involves transactions that meet or exceed the threshold. The process described herein is typically performed in real time or near real time to provide an on-demand resource transfer process that integrates various platforms and technologies. In other words, users of the system do not need to know the compatibility between accounts in the system, so the system provides a secure and efficient method for resource transfer between users.
[0081] Fig. 6A An example system 600 is illustrated that includes an infrastructure 610 configured to perform various operations according to example embodiments. Fig. 6A, the basic physical facility 610 includes a module 612 and a module 614. Module 614 includes a blockchain 620 and a smart contract 630 (which may be located on the blockchain 620), which can perform any operation step 608 (in module 612) included in any exemplary embodiment. Step / operation 608 may include one or more embodiments illustrated or described, and may represent output or written information written or read from one or more smart contracts 630 and / or blockchain 620. The basic physical facility 610, module 612, and module 614 may include one or more computers, servers, processors, memories, and / or wireless communication devices. In addition, module 612 and module 614 may be the same module.
[0082] Figure 6B Another example system 640 is illustrated, which is configured to perform various operations according to the exemplary embodiments. Figure 6B , system 640 includes module 612 and module 614. Module 614 includes blockchain 620 and smart contract 630 (which can be located on blockchain 620), which can perform any operation step 608 (in module 612) included in any exemplary embodiment. Step / operation 608 may include one or more embodiments illustrated or described, and may represent output or written information written or read from one or more smart contracts 630 and / or blockchain 620. Infrastructure 610, module 612, and module 614 may include one or more computers, servers, processors, memories, and / or wireless communication devices. In addition, module 612 and module 614 may be the same module.
[0083] Figure 6C An example system configured to utilize a smart contract configuration between contracting parties and an intermediary server configured to implement smart contract terms on a blockchain is illustrated in accordance with an exemplary embodiment. Figure 6C , configuration 650 can represent a communication session, asset transfer session, or process driven by a smart contract 630 that explicitly identifies one or more user devices 652 and / or 656. The execution, operation, and results of the smart contract execution can be managed by a server 654. The content of the smart contract 630 can require digital signatures by one or more entities 652 and 656 that are parties to the smart contract transaction. The results of the smart contract execution can be written to the blockchain 620 as a blockchain transaction. The smart contract 630 resides on the blockchain 620, which can reside on one or more computers, servers, processors, memories, and / or wireless communication devices.
[0084] Fig.6DA system 660 including a blockchain according to an exemplary embodiment is illustrated. Referring to the example of FIG. 6 , an application programming interface (API) gateway 662 provides a public interface for accessing blockchain logic (e.g., smart contracts 630 or other chaincodes) and data (e.g., distributed ledgers, etc.). In this example, the API gateway 662 is a public interface for executing 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 server 654 is a blockchain network peer component that maintains a copy of the world state and a distributed ledger, thereby allowing clients 652 and 656 to query data about the world state and submit transactions to the blockchain network, where, depending on the smart contract 630 and the endorsement policy, the endorsement peer will run the smart contract 630.
[0085] The above embodiments may be implemented in the form of hardware, a computer program executed by a processor, firmware, or 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.
[0086] An exemplary storage medium may be coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. In an alternative, the storage medium may be an integral part of 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.
[0087] Fig. 7A Illustrating a process 700 of adding a new block to a distributed ledger 720 according to an exemplary embodiment, Figure 7B The content of a new data block structure 730 for a blockchain according to an exemplary embodiment is illustrated. Fig. 7A, a client (not shown) can submit transactions to blockchain nodes 711, 712, and / or 713. A client can be an instruction received from any source to perform activities on blockchain 720. As an example, a client can be an application that acts on behalf of a requester, such as a device, person, or entity, to propose transactions for a blockchain. Multiple blockchain peers (e.g., blockchain nodes 711, 12, and 713) can maintain the state of the blockchain network and a copy of the distributed ledger 720. Different types of blockchain nodes / peers can exist in the blockchain network, including endorsement peers that simulate and endorse transactions submitted by clients, and submission peers that verify endorsements, verify transactions, and submit transactions to the distributed ledger 720. In this example, blockchain nodes 711, 712, and 713 can perform the roles of endorser nodes, submitter nodes, or both.
[0088] The distributed ledger 720 includes a blockchain that stores immutable sequential records in blocks, and a state database 724 (current world state) that maintains the current state of the blockchain 722. There can be one distributed ledger 720 for each channel, and each peer maintains its own copy of the distributed ledger 720 for each channel it belongs to. The blockchain 722 is a transaction log structured as hash-linked blocks, where each block contains a series of N transactions. Blocks may include transactions such as Figure 7B The various components shown in . A link to a block can be generated by adding the hash of the previous block's header to the current block's header (by Fig. 7A ). In this way, all transactions on blockchain 722 are ordered and cryptographically linked together, thereby preventing tampering with blockchain data without breaking the hash link. In addition, due to the link, the latest block in blockchain 722 represents every transaction before it. Blockchain 722 can be stored on a peer-to-peer file system (local or attached storage), which supports append-only blockchain workloads.
[0089] The current state of the blockchain 722 and distributed ledger 722 can be stored in the state database 724. Here, the current state data represents the latest values of all keys contained in the chain transaction log of the blockchain 722. Chaincode invocations execute transactions against the current state in the state database 724. In order to make these chaincode interactions very efficient, the latest values of all keys are stored in the state database 724. The state database 724 can contain an indexed view of the transaction log of the blockchain 722, so the indexed view can be regenerated from the blockchain at any time. Before accepting a transaction, the state database 724 can be automatically restored (or generated as needed) at peer startup.
[0090] An endorsing peer receives transactions from a client and endorses the transaction based on the simulation results. An endorsing peer holds the smart contract proposed by the simulated transaction. When an endorsing peer endorses a transaction, the endorsing peer creates a transaction endorsement, which is a signed response from the endorsing peer to the client application indicating the endorsement of the simulated transaction. The method of endorsing a transaction depends on the endorsement policy that can be specified in the chaincode. An example of an endorsement policy is "a majority of endorsing peers must endorse the transaction". Different channels can have different endorsement policies. Endorsed transactions are forwarded by the client application to the sorting service 710.
[0091] The ordering service 710 receives endorsed transactions, orders them into a block, and delivers the blocks to committing peers. For example, when a transaction threshold is reached, a timer times out, or other conditions, the ordering service 710 can start a new block. Fig. 7A In the example of , blockchain node 712 is a commit peer that has received a new data block 730 for storage on blockchain 720. The first block in a blockchain can be called a genesis block, which includes information about the blockchain and its members, data stored therein, etc.
[0092] The sorting service 710 may consist of a group of sorters. The sorting service 710 does not process transactions, smart contracts, or maintain a shared ledger. Instead, the sorting service 710 may accept endorsed transactions and specify the order in which these transactions are submitted to the distributed ledger 720. The architecture of the blockchain network may be designed so that the specific implementation of "sorting" (such as Solo, Kafka, BFT, etc.) becomes a pluggable component.
[0093] Transactions are written to the distributed ledger 720 in a consensus order. The order of transactions is established to ensure that updates to the state database 724 are valid when submitted to the network. Unlike cryptocurrency blockchain systems (such as Bitcoin, etc.) where ordering is performed by solving cryptographic puzzles or mining, in this case, the parties to the distributed ledger 720 can choose the ordering mechanism that best suits the network.
[0094] When the ordering service 710 initializes a new data block 730, the new data block 730 may be broadcast to the committing peers (e.g., blockchain nodes 711, 712, and 713). In response, each committing peer verifies the transactions in the new data block 730 by checking to ensure that the read set and the write set still match the current world state in the state database 724. Specifically, the committing peer may determine whether the read data that existed when the endorser simulated the transaction is the same as the current world state in the state database 724. When the committing peer confirms the transaction, the transaction is written to the blockchain 722 on the distributed ledger 720, and the state database 724 is updated with the write data in the read-write set. If the transaction fails, that is, if the committing peer finds that the read-write set does not match the current world state in the state database 724, the transaction ordered into the block will still be included in the block, but it will be marked as invalid, and the state database 724 will not be updated.
[0095] refer to Figure 7B , a new data block 730 (also referred to as a data block) stored on the blockchain 722 of the distributed ledger 720 may include multiple data segments, such as a block header 740, block data 750, and block metadata 760. It should be appreciated that Figure 7B The various described blocks and their contents shown in the block header 740, such as the new data block 730 and its contents, are merely examples and are not intended to limit the scope of the exemplary embodiments. The new data block 730 may store transaction information for N (e.g., 1, 10, 100, 500, 1000, 2000, 3000, etc.) transactions in the block data 750. The new data block 730 may also include a pointer to (e.g., Figure 7B In particular, the block header 740 may include a hash of the header of the previous block. The block header 740 may also include a unique block number, a hash of the block data 750 of the new data block 730, etc. The block number of the new data block 730 may be unique and assigned in various orders, such as in an increasing / sequential order starting from zero.
[0096] The block data 750 may store transaction information for each transaction recorded in the new data block 730. For example, the transaction data may include one or more of the following: transaction type, version, timestamp, channel ID of the distributed ledger 720, transaction ID, epoch, payload visibility, chaincode path (deployment transaction), chaincode name, chaincode version, input (chaincode and function), client (creator) identity - such as public key and certificate, client signature, endorser identity, endorser signature, proposal hash, chaincode event, response status, namespace, read set (a list of keys and versions read by the transaction, etc.), write set (a list of keys and values, etc.), start key, end key, a list of keys, Merkel tree query summary, etc. Transaction data may be stored for each of the N transactions.
[0097] In some embodiments, block data 750 may also store new data 762 that adds additional information to the chain of hash links of blocks in blockchain 722. The additional information includes one or more of the steps, features, processes, and / or operations illustrated or described herein. Thus, new data 762 may be stored in an immutable block log on distributed ledger 720. Some of the benefits of storing such new data 762 are reflected in the various embodiments disclosed and described herein. Although in Figure 7B The new data 762 is shown as being in the block data 750 , but may also be located in the block header 740 or the block metadata 760 .
[0098] Block metadata 760 can store multiple metadata fields (e.g., in the form of a byte array, etc.). The metadata fields may include a signature when the block was created, a reference to the last configuration block, a transaction filter that identifies valid and invalid transactions within the block, the last offset of the sorting service that sorted the block, etc. The sorting service 710 can add a signature, the last configuration block, and the sorter metadata. At the same time, the submitter of the block (such as the blockchain node 712) can add validity / invalidity information based on the endorsement policy, verification of the read / write set, etc. The transaction filter may include a byte array of a size equal to the number of transactions in the block data 750 and a verification code that identifies whether the transaction is valid or invalid.
[0099] FIG. 7 illustrates an embodiment of a blockchain 770 for digital content according to embodiments described herein. Digital content may include one or more files and related information. These files may include media, images, videos, audio, text, links, graphics, animations, web pages, documents, or other forms of digital content. The immutable, append-only nature of the blockchain plays a role in protecting the integrity, validity, and authenticity of digital content, making it suitable for legal proceedings in which admissibility rules apply, or for other scenarios in which it is important to take into account evidence or submit and use digital information. In this case, the digital content may be referred to as digital evidence.
[0100] There are many different ways to form a blockchain. In one embodiment, digital content can be incorporated into the blockchain and accessed from the blockchain itself. For example, each block of the blockchain can store a hash value of reference information (e.g., block header, value, etc.) along with the associated digital content. The hash value and the associated digital content can then be encrypted together. Thus, the digital content of each block can be accessed by decrypting each block in the blockchain, and the hash value of each block can be used as a basis for referencing the previous block. This can be illustrated as follows:
[0101]
[0102] In one embodiment, the digital content may not be contained in the blockchain. For example, the blockchain may store a cryptographic hash of the content of each block without storing any digital content. The digital content may be stored in another 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 as the one storing the blockchain, or it may be a different storage area, or even 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 of interest, and then looking up the hash value stored in the storage area corresponding to the actual digital content. This operation may be performed by, for example, a database gateway manager. This may be illustrated as follows:
[0103]
[0104] exist Figure 7C In an exemplary embodiment of the present invention, the blockchain 770 includes a plurality of blocks 7781, 7782, ... 778 linked in sequence. N , where N ≥ 1. Used to link blocks 7781, 7782, ... 778 N The encryption can be any one of a plurality of keyed or non-keyed hash functions. In one embodiment, blocks 7781, 7782, ... 778 NSubject to a hash function that produces an n-bit alphanumeric output (where n is 256 or another number) from an input based on the information in the block. Examples of such hash functions include, but are not limited to, SHA (Secure Hash Algorithm) type algorithms, Merkle-Damagard algorithms, HAIFA algorithms, Merkle-tree algorithms, random number based algorithms, and non-collision resistant PRF algorithms. In another embodiment, blocks 7781, 7782, ... 778 N The cryptographic linking may be performed by a function other than a hash function. For ease of explanation, the following description refers to a hash function, such as SHA-2.
[0105] Each block in the blockchain is 7781, 7782, ..., 778 N Each block contains a header, a file version, and a value. Due to the hashing in the blockchain, the header and value are different for each block. In one embodiment, the value can be included in the header. As described in more detail below, the file version can be the original file, or a different version of the original file.
[0106] The first block 7781 in the blockchain is called the starting block, and includes a header 7721, an original file 7741, and an initial value 7761. The hashing scheme used for the starting block, and the hashing schemes for all subsequent blocks, may be different. For example, all of the information in the first block 7781 may be hashed together at once, or each or a portion of the information in the first block 7781 may be hashed separately, and then the separately hashed portions may be hashed again.
[0107] The header 7721 may include one or more initial parameters, such as a version number, timestamp, random number, root information, difficulty level, consensus protocol, duration, media format, source, descriptive keywords, and / or other information related to the original file 7741 and / or the blockchain. The header 7721 may be automatically generated (e.g., by blockchain network management software) or manually generated by a blockchain participant. N Unlike the header in , header 7721 in the genesis block does not reference a previous block, simply because there is no previous block.
[0108] For example, the original file 7741 in the starting block can be, for example, data captured by the device, processed or unprocessed before being included in the blockchain. The original file 7741 is received from the device, media source, or node through the system interface. The original file 7741 is associated with metadata that can be manually or automatically generated by a user, device, and / or system processor. The metadata can be included in the first block 7781 together with the original file 7741.
[0109] The value 7761 in the start 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 related to the file. In one implementation, the initial value 7761 may be based on the following unique attributes:
[0110] 1) SHA-2 calculated hash value of the original file
[0111] 2) Initiating device ID
[0112] 3) The start timestamp of the original file
[0113] 4) The original storage location of the original file
[0114] 5) Blockchain network member ID for the software that currently controls the original file and associated metadata
[0115] Other blocks in the blockchain: 7782 to 778 N It also has a header, file, and value. However, unlike the header 7721 of the first block, the headers 7722 to 772 in the other blocks are N Each contains the hash value of the previous block. The hash value of the previous block may be just the hash of the header of the previous block, or it may be the hash value of the entire previous block. By including the hash value of the previous block in each of the remaining blocks, it is possible to trace back from the Nth block to the starting block (and the associated original file) block by block, as shown by arrow 780, to establish an auditable and immutable chain of custody.
[0116] Each header 7722 to 772 in other blocks N Other information may also be included, such as version numbers, timestamps, random numbers, root information, difficulty levels, consensus protocols, and / or other parameters or information related to the corresponding file and / or blockchain.
[0117] Files 7742 to 774 in other blocks N Can be equal to the original file or a modified version of the original file in the starting block, depending on the type of processing performed. The type of processing performed may vary from block to block. For example, the processing may involve any modification of the file in the previous block, such as revising information or otherwise changing the contents of the file, removing information from the file, or adding or appending information to the file.
[0118] Additionally, or alternatively, processing may simply involve copying a file from a previous block, changing a storage location of a file, analyzing one or more files in a previous block, moving a file from one storage or memory location to another storage or memory location, or performing operations relative to the blockchain file and / or its associated metadata. Processing involving analyzing a file may include, for example, appending, including, or otherwise associating various analytical, statistical, or other information associated with the file.
[0119] Other blocks 7762 to 776 N The value of each other block in the blockchain is unique and different due to the processing performed. For example, the value in any one block corresponds to an updated version of the value in the previous block. The update is reflected in the hash of the block to which the value is assigned. Therefore, the value of the block provides an indication of what processing was performed in the block and allows tracking back to the original file through the blockchain. This tracking confirms the chain of custody of the file throughout the blockchain.
[0120] For example, consider a situation where a portion of a file in a previous block is redacted, chunked, or pixelated in order to protect the identity of the person shown in the file. In this case, the block that includes the redacted file will include metadata associated with the redacted file, such as how the redaction was performed, who performed the redaction, a timestamp of when the redaction occurred, etc. The metadata can be hashed to form a value. Because the metadata for the block is different from the information in the previous block that was hashed to form a value, the values are different from each other and can be recovered when decrypted.
[0121] In one embodiment, when any one or more of the following situations occur, the value of the previous block can be updated (e.g., a new hash value is calculated) to form the value of the current block. In this embodiment, the new hash value can be calculated by hashing all or part of the information described below.
[0122] a) The new SHA-2 calculated hash value if the file has been manipulated in any way (for example, if the file has been revised, copied, changed, accessed, or some other action has been taken)
[0123] b) New storage location for the file
[0124] c) Identify new metadata associated with the file
[0125] d) Transferring access to or control of a file from one blockchain participant to another
[0126] Fig.7D An example of a block that can represent the structure of a block in a blockchain 790 according to one embodiment. i Including header 772 i、File 774 i The sum is 776 i .
[0127] Head 772 i Including the previous block i-1 The hash value of the previous block and additional reference information, which can be any type of information discussed in this article (e.g., header information including references, features, parameters, etc.). All blocks reference the hash value of the previous block, of course, except for the start block. The hash value of the previous block can be just the hash of the header in the previous block, or it can be the hash of all or part of the information in the previous block - including files and metadata.
[0128] File 774 i Includes multiple data, such as Data 1, Data 2, ..., Data N in sequence. These data are marked with metadata Metadata 1, Metadata 2, ..., Metadata N that describe the content and / or characteristics related to the data. For example, the metadata of each data may include information indicating the timestamp of the data, processing data, keywords indicating the person or other content described in the data, and / or other features that help determine the validity and content of the file as a whole - especially its use as digital evidence, such as described in the embodiments discussed below. In addition to the metadata, each data can also be marked with a reference REF 1, REF 2, ..., REF N to the previous data to prevent tampering, gaps in the file, and sequential references through the file.
[0129] Once metadata is assigned to data (e.g., by a smart contract), it cannot be changed without changing the hash, which can be easily identified as invalid. Metadata thus creates a data log of information that can be accessed for use by blockchain participants.
[0130] Value 776 i A hash or other value calculated based on any of the types of information discussed above. For example, for any given block i , the value of the block can be updated to reflect the processing performed for the block, such as a new hash value, a new storage location, new metadata for the associated file, a transfer of control or access, an identifier, or other operations or information to be added. Although the value in each block is shown as being separate from the metadata and header of the file's data, in another embodiment the value can be based in part or in whole on the metadata.
[0131] Once the blockchain 770 is formed, at any point in time, the immutable chain of custody of the file can be obtained by querying the blockchain for the transaction history of values across blocks. This query or tracking process can begin by decrypting the value of the most recently included block (e.g., the last (Nth) block), and then continue to decrypt the values of other blocks until the starting block is reached, and then the original file is restored. Decryption may also involve decrypting the header and file on each block and related metadata.
[0132] Decryption is performed based on the type of encryption that occurred in each block. This may involve the use of a private key, a public key, or a public-private key pair. For example, when asymmetric encryption is used, a blockchain participant or processor in the network can generate a public and private key pair using a predetermined algorithm. The public and private keys are related to each other through some mathematical relationship. The public key can be publicly distributed to be used as an address (such as an IP address or home address) to receive 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. This way, the recipient can be sure that only the sender could have sent the message.
[0133] Generating a key pair can be similar to creating an account on the blockchain without actually registering anywhere. In addition, each transaction performed on the blockchain is digitally signed by the sender using their private key. This signature ensures that only the account owner can track and process the blockchain's files (if within the scope of permissions determined by the smart contract).
[0134] Figure 8 An example system 800 is illustrated to support one or more embodiments described herein. The system 800 includes a computer system / server 802 that operates with many other general or special computing system environments or configurations. Examples of computing systems, environments, and / or configurations suitable for the computer system / server 802 include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or notebook devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems or devices.
[0135] Computer system / server 802 may be described in the general context of computer system executable instructions (e.g., program modules) executed by a computer system. In general, 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 802 may be used in a distributed cloud computing environment, where tasks are performed by remote processing devices connected through a communication network. In a distributed cloud computing environment, program modules may be located in local and remote computer system storage media, including memory storage devices.
[0136] like Figure 8 As shown in FIG. 8 , the computer system / server 802 in the cloud computing node 800 is shown in the form of a general-purpose computing device. The components of the computer system / server 802 may include, but are not limited to, one or more processors or processing units 804, a system memory 806, and a bus that couples various system components including the system memory 806 to the processor 804.
[0137] The bus represents 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.
[0138] Computer system / server 802 typically includes various computer system readable media. Such media can be any available media accessible to computer system / server 802, including volatile and non-volatile media, removable and non-removable media. In one embodiment, system memory 806 implements the flowcharts in other figures. System memory 806 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 810 and / or cache memory 812. Computer system / server 802 can also include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 814 can be provided for reading and writing data to non-removable non-volatile magnetic media (not shown, usually referred to as "hard drive"). Although not shown, a disk drive for reading and writing removable non-volatile disks (e.g., "floppy disks") can be provided, as well as an optical disk drive for reading or writing removable non-volatile optical devices, such as CD-ROMs, DVD-ROMs, or other optical media disks. In this case, each can be connected to the bus via one or more data media interfaces. As will be further depicted and described below, the memory 806 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.
[0139] A program / utility 816 having a set (at least one) of program modules 818 may be stored in memory 806 by way of example and not limitation, as may an operating system, one or more application programs, other program modules, and program data. Each or some combination of the operating system, one or more application programs, other program modules, and program data may include an implementation of a network environment. Program modules 818 generally perform the functions and / or methods of various embodiments of the present application as described herein.
[0140] It should be understood by those skilled in the art that 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 form of a complete hardware embodiment, a complete software embodiment (including firmware, resident software, microcode, etc.), or a combination of software and hardware embodiments, which may generally be referred to herein as a "circuit", "module" or "system". Various aspects of the present application may take the form of a computer program product embodied in one or more computer-readable media having a computer-readable program code contained thereon.
[0141] The computer system / server 802 may also communicate with one or more external devices 820, such as a keyboard, a pointing device, a display 822; one or more devices that enable a user to interact with the computer system / server 802; and / or any device that enables the computer system / server 802 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through an I / O interface 824. In addition, the computer system / server 802 may also 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) via a network adapter 826. As shown, the network adapter 826 communicates with other components of the computer system / server 802 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 802. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems.
[0142] 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 is capable of many rearrangements, modifications, and substitutions as set forth and defined in the claims described below. For example, the functions of the systems of the accompanying drawings may be performed by one or more modules or components described herein or in a distributed architecture, and may include a transmitter, a receiver, or a transmitter-receiver pair. For example, all or part of the functions performed by each module may be performed by one or more of these modules. In addition, the functions described herein may be performed at different times and in association with various events inside or outside the module or component. In addition, information sent between modules may be sent between modules via multiple protocols and / or 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 may be sent or received directly and / or via one or more other modules.
[0143] Those skilled in the art will appreciate that a "system" may be embodied as a personal computer, server, console, personal digital assistant (PDA), cellular 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 examples of many embodiments. In fact, the methods, systems, and apparatus disclosed herein may be implemented in localized and distributed forms consistent with computing technology.
[0144] It should be noted that some of the system features described in this specification are presented as modules in order to more specifically emphasize their implementation independence. For example, a module can be implemented as a hardware circuit including a custom very large scale integration (VLSI) circuit or gate array, an off-the-shelf semiconductor such as a logic chip, a transistor or other discrete component. A module can 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.
[0145] Module can also be implemented at least in part with software, to be performed by various types of processors. The executable code unit identified can for example include one or more physical or logical blocks of computer instructions, which can for example be organized as objects, processes or functions. However, the executable file of the module identified does not need to be physically located together, but can include different instructions stored in different locations, which, when logically connected together, include modules and realize the described purpose of modules. In addition, module can be stored on a computer-readable medium, which can be for example a hard disk drive, a storage device, a random access memory (RAM), a magnetic tape or any other such medium for storing data.
[0146] In practice, a module of executable code may be a single instruction or multiple instructions, and may even be distributed over several different code segments, different programs, and several memory devices. Similarly, operational data may be identified and shown herein within a module, and may be embodied in any suitable form and organized in any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations including different memory devices, and may exist at least in part only as electronic signals on a system or network.
[0147] It is easy to understand that the components of the present application can be arranged and designed in a variety of different configurations as generally described and illustrated in the drawings herein. Therefore, the detailed description of the embodiments is not intended to limit the scope of the claimed application, but only represents the selected embodiments of the present application.
[0148] Those skilled in the art will readily appreciate that the above may be implemented in different orders of steps and / or using hardware elements in 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 certain modifications, variations, and alternative configurations will be apparent.
[0149] Although preferred embodiments of the present application have been described, it should be understood that the described embodiments are merely illustrative and the scope of the present application is limited solely by the appended claims taking into account the full range of equivalents and modifications (e.g., protocols, hardware devices, software platforms, etc.).
Claims
1. A blockchain network system, include: Blockchain network, including: The blockchain client is configured as follows: Submitting a transaction proposal to the blockchain network; receiving one or more composite endorsements; and submitting a transaction endorsed in accordance with the one or more composite endorsements; One or more endorser nodes or peers, each configured to: receiving the transaction proposal; Endorsing the proposed transaction, including updating the list of world states in progress; Providing a composite endorsement containing both the underlying results and the forecasted results; and Remove the submitted transaction from the list of in-progress world states; The submitter node, or peer, is configured to: receiving said endorsed transaction; Verifying the endorsed transaction; Submitting the endorsed transaction to the blockchain network.
2. The system according to claim 1, in, The one or more endorser nodes or peers endorsing the transaction proposal includes the one or more endorser nodes or peers being further configured to: Simulate the transaction proposal; and The in-progress world state list is updated with simulation results including the basic results and the predicted results, wherein the basic results are simulated with world state values and the predicted results are simulated with the in-progress world state list.
3. The system according to claim 2, in, The one or more endorser nodes or peers add entries to the in-progress world state list in chronological order for each transaction proposal that modifies a key in the world state, but do not update any keys in the world state when adding an entry to the in-progress world state list.
4. The system according to claim 2, in, One or more endorser nodes or peers cannot endorse the transaction proposal, and in response, the one or more endorser nodes or peers that cannot endorse the transaction proposal are configured to remove a current world state and obtain a correct world state from another endorser node or peer.
5. The system according to claim 2, in, Each of the one or more endorser nodes or peers includes the in-progress world state list, wherein the in-progress world state list includes endorsed uncommitted transactions and a predicted value of each endorsed uncommitted transaction.
6. The system according to claim 5, in, The predicted value is determined by a previous transaction that modifies the same world state key as the transaction proposal, wherein the predicted value includes a predicted value and a predicted version.
7. The system according to claim 5, in, The submitter node or peer verifying the endorsed transaction includes the submitter node or peer being further configured to: verifying said endorsement; Verifying that a read set corresponding to the endorsed transaction includes that the submitter node or peer is further configured to: comparing the base results and the predicted results with the world state; determining that either the base result or the predicted result matches the world state, and in response: Applying the write-set of the endorsed transaction to the world state; and Providing a notification to the one or more endorser nodes or peers to remove the endorsed uncommitted transaction and the predicted value of the endorsed uncommitted transaction from the in-progress world state list.
8. A method for providing a composite endorsement, include: The blockchain client submits transaction proposals to the blockchain network; One or more endorser nodes or peers endorse the transaction proposal, the endorsement including an update to a list of in-progress world states; providing one or more composite endorsements, each composite endorsement including a base outcome and a predicted outcome corresponding to the transaction proposal; submitting the endorsed transaction in response to the one or more composite endorsements; Verification of the endorsed transaction by the submitting node or peer; Submitting the endorsed transaction to the blockchain network; and The submitted transaction is removed from the in-progress world state list.
9. The method according to claim 8, in, The one or more endorser nodes or peers endorse the transaction proposal including: emulating the transaction proposal by the one or more endorser nodes or peers; and The in-progress world state list is updated with simulation results including the basic results and the predicted results, wherein the basic results are simulated with world state values and the predicted results are simulated with the in-progress world state list.
10. The method according to claim 9, in, The one or more endorser nodes or peers add entries to the in-progress world state list in chronological order for each transaction proposal that modifies a key in the world state, but do not update any keys in the world state when adding an entry to the in-progress world state list.
11. The method according to claim 9, in, One or more endorser nodes or peers cannot endorse the transaction proposal, and in response, the one or more endorser nodes or peers that cannot endorse the transaction proposal are configured to remove a current world state and obtain a correct world state from another endorser node or peer.
12. The method according to claim 9, in, Each of the one or more endorser nodes or peers includes the in-progress world state list, wherein the in-progress world state list includes endorsed uncommitted transactions and a predicted value for each endorsed uncommitted transaction.
13. The method according to claim 12, in, The predicted value is determined by a previous transaction that modifies the same world state key as the transaction proposal, wherein the predicted value includes a predicted value and a predicted version.
14. The method according to claim 12, in, The submitter node or peer verifying the endorsed transaction includes the submitter node or peer being further configured to: verifying said endorsement; Verify the read set corresponding to the endorsed transaction, including: comparing the base results and the predicted results with the world state; determining that either the base result or the predicted result matches the world state, and in response: applying the endorsed transaction's write-set to the world state; and Providing a notification to the one or more endorser nodes or peers to remove the endorsed uncommitted transaction and the predicted value of the endorsed uncommitted transaction from the in-progress world state list.
15. A non-transitory computer-readable medium comprising instructions that, when read by a processor, cause the processor to perform: The blockchain client submits transaction proposals to the blockchain network; One or more endorser nodes or peers endorse the transaction proposal, the endorsement including updating a list of in-progress world states; providing one or more composite endorsements, each composite endorsement including a base outcome and a predicted outcome corresponding to the transaction proposal; submitting the endorsed transaction in response to the one or more composite endorsements; Verification of the endorsed transaction by the submitting node or peer; Submitting the endorsed transaction to the blockchain network; and The submitted transaction is removed from the in-progress world state list.
16. The non-transitory computer readable medium of claim 15, in, The one or more endorser nodes or peers add entries to the in-progress world state list in chronological order for each transaction proposal that modifies a key in the world state, but do not update any keys in the world state when adding entries to the in-progress world state list, wherein one or more endorser nodes or peers cannot approve the transaction proposal, and in response, the one or more endorser nodes or peers that cannot approve the transaction proposal are configured to remove a current world state and obtain a correct world state from another endorser node or peer.
17. The non-transitory computer readable medium of claim 15, in, The one or more endorser nodes or peers approving the transaction proposal includes: emulating the transaction proposal by the one or more endorser nodes or peers; and The in-progress world state list is updated with simulation results including the basic results and the predicted results, wherein the basic results are simulated with world state values and the predicted results are simulated with the in-progress world state list.
18. The non-transitory computer-readable medium of claim 16, wherein each of the one or more endorser nodes or peers comprises the in-progress world state list, in, The in-progress world state list includes endorsed uncommitted transactions and a predicted value for each endorsed uncommitted transaction.
19. The non-transitory computer readable medium of claim 18, wherein the predicted value is determined by a previous transaction that modifies the same world state key as the transaction proposal, wherein the predicted value comprises a predicted value and a predicted version.
20. The non-transitory computer-readable medium of claim 15, wherein the submitter node or peer verifying the endorsed transaction comprises the submitter node or peer being further configured to: verifying said endorsement; Verify the read set corresponding to the endorsed transaction, including: comparing the base results and the predicted results with the world state; determining that either the base result or the predicted result matches the world state, and in response: applying the endorsed transaction's write-set to the world state; and Providing a notification to the one or more endorser nodes or peers to remove the endorsed uncommitted transaction and the predicted value of the endorsed uncommitted transaction from the in-progress world state list.
Citation Information
Patent Citations
Block-chain-based financial product transaction consensus method, node and system
CN108256859A
Endorsement strategy determination method and device, electronic equipment and storage medium
CN108376368A
Method and equipment for implementing blockchain operating smart contract
CN108769173A
Block generation method, apparatus and system
CN109146490A
Data accounting method, device and storage medium
CN109493203A
