Method and system for world state integrity verification
Through the world state checkpoint transaction and endorsement mechanism of the blockchain network, the single point of failure and insufficient data redundancy problems of the centralized database are solved, the reliability and security of the blockchain node are improved, and the world state is quickly verified. Integrity approach.
Patent Information
- Application Number
- CN202010415344.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-05-17
- Filing Date
- 2020-05-15
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-05-15
AI Technical Summary
Due to problems such as single points of failure, insufficient data redundancy, network dependency, and high traffic bottlenecks, centralized databases are difficult to ensure data reliability and efficient access.
Adopting a blockchain network, blockchain users create world state checkpoint transactions, endorser nodes endorse, ordering party nodes record transactions, and blockchain users verify the integrity of the world state, utilizing the distributed nature of the blockchain Storage and consensus mechanisms ensure data consistency and reliability.
Improves the reliability and security of blockchain nodes, allowing asynchronous nodes to create synchronized world state hashes without communication, quickly verify world state integrity, and reduce resource waste and performance impact.
Smart Images

Figure CN111951004B_ABST
Abstract
Description
Technical Field
[0001] The present application relates generally to improved world state verification, and more particularly to database world state integrity certification. 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 computer. Information stored in a centralized database can usually be accessed from multiple different points. For example, based on a client / server configuration, multiple users or client workstations can work on a centralized database at the same time. A centralized database is easy to manage, maintain, and control, especially for security purposes, because it is located in a single location. In a centralized database, data redundancy is minimized because the single storage location for all data also means that a given data set has only one master record.
[0003] However, centralized databases suffer from significant drawbacks. For example, centralized databases have only a single point of failure. In particular, if there is no consideration of fault tolerance 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. As a result, the slower the connection, the amount of time required for each database access will increase. Another drawback is that when the centralized database encounters high traffic due to a single location, a bottleneck will occur. In addition, since the database maintains only one copy of the data, the centralized database provides limited access to the data. As a result, multiple devices cannot access the same piece of data at the same time without causing serious problems or risking overwriting the stored data. In addition, since the database storage system has little or no data redundancy, it is difficult to recover accidentally lost data except by restoring from backup storage through manual operations. Therefore, a solution that overcomes these drawbacks and limitations is needed. Summary of the invention
[0004] An example embodiment provides a system comprising a blockchain network, the blockchain network comprising: a blockchain user configured to perform one or more of creating a world state checkpoint transaction requesting world state confirmation, and verifying the integrity of the world state; one or more endorsing nodes or peers configured to perform endorsing the world state checkpoint transaction and passing the endorsement to one or more of the blockchain users; an orderer node or peer configured to record the endorsed world state checkpoint transaction into a block.
[0005] Another example embodiment provides a method comprising one or more of the following: creating, by a blockchain user of a blockchain network, a world state checkpoint transaction requesting world state confirmation; endorsing the world state checkpoint transaction by one or more endorsing nodes or peers; delivering the endorsement to the blockchain user; recording the endorsed world state checkpoint transaction into a block by an orderer node or peer; confirming and committing all transactions in the block; computing a hash of the current world state and signing the hash of the current world state by all blockchain nodes or peers of the blockchain network; and verifying, by the blockchain user, world state integrity from the computed and signed hash of the current world state.
[0006] Another example 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: creating a world state checkpoint transaction requesting world state confirmation by a blockchain user of a blockchain network; endorsing the world state checkpoint transaction by one or more endorsing nodes or peers; delivering the endorsement to the blockchain user; recording the endorsed world state checkpoint transaction into a block by an orderer node or peer; confirming and committing all transactions in the block; computing a hash of the current world state and signing the hash of the current world state by all blockchain nodes or peers of the blockchain network; and verifying world state integrity from the computed and signed hash of the current world state by the blockchain user. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 A logical network diagram of a world state verification system for a database according to an example embodiment is shown.
[0008] Figure 2A An example blockchain architecture configuration is shown according to an example embodiment.
[0009] Figure 2B A blockchain transaction flow according to an example embodiment is shown.
[0010] Figure 3A A permission network according to an example embodiment is shown.
[0011] Figure 3B Another permission network according to an example embodiment is shown.
[0012] Figure 4 A system message diagram for performing world state integrity verification according to an example embodiment is shown.
[0013] Figure 5A A flow chart illustrating an example method of verifying the integrity of a world state in a blockchain according to an example embodiment.
[0014] Figure 5B A flow chart of an example method of authenticating a checkpoint for a blockchain is shown according to an example embodiment.
[0015] Fig. 6A An example system configured to perform one or more operations described herein is shown according to an example embodiment.
[0016] Figure 6B Another example system configured to perform one or more operations described herein is shown according to an example embodiment.
[0017] Figure 6C Another example system configured to utilize smart contracts according to an example embodiment is shown.
[0018] Fig.6D Yet another example system configured to utilize blockchain according to example embodiments is shown.
[0019] Fig. 7A A process for adding a new block to a distributed ledger is shown according to an example embodiment.
[0020] Figure 7B The content of a new data block according to an example embodiment is shown.
[0021] Figure 7C A blockchain for digital content according to an example embodiment is shown.
[0022] Fig.7D A block diagram illustrating a structure that may represent a block in a blockchain according to example embodiments.
[0023] Figure 8 An example system is shown that supports one or more example embodiments. DETAILED DESCRIPTION
[0024] It is readily understood that the present components as 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, apparatus, non-transitory computer-readable media, and systems, as illustrated 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, throughout the specification, the use of the phrases "example embodiments," "some embodiments," or other similar language 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, throughout the specification, the appearance of the phrases "example embodiments," "in some embodiments," "in other embodiments," or other similar language does not necessarily refer to the same set of embodiments, and in one or more embodiments, the described features, structures, or characteristics may be combined or removed in any suitable manner.
[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 depicted in exemplary embodiments, the application is not limited to specific types of connections, messages and signaling.
[0027] Example embodiments provide methods, systems, components, non-transitory computer-readable media, devices, and / or networks that provide database world state integrity certification.
[0028] In one embodiment, the application utilizes a decentralized database (such as a blockchain) as a distributed storage system, which includes multiple nodes that communicate with each other. The decentralized database includes an append-only immutable data structure, similar to a distributed ledger that can maintain records between mutually 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 no single peer can modify the database record without reaching a consensus between the distributed peers. For example, peers can execute a consensus protocol to confirm blockchain storage transactions, group storage transactions into blocks, and build hash chains on these blocks. In order to maintain consistency, as required, this process forms a ledger by sorting storage transactions. In various embodiments, licensed and / or non-licensed blockchains can be used. In a public or unlicensed blockchain, anyone can participate without a specific identity. Public blockchains typically involve native cryptocurrencies and use consensus based on various protocols such as proof of work (PoW). On the other hand, a licensed blockchain database provides secure interactions between a group of entities that share a common goal but do not fully trust each other, such as businesses that exchange funds, goods, information, etc.
[0029] The application may utilize blockchain, which operates arbitrary programmable logic, customized as a decentralized storage scheme, and is referred to as a "smart contract" or "chaincode". In some cases, there may be dedicated chaincodes for managing functions and parameters, referred to as system chaincodes. The application may further utilize smart contracts, which are trusted distributed applications that take advantage of the tamper-proof properties of the blockchain database and the underlying protocols between nodes, referred to as endorsements or endorsement policies. Blockchain transactions associated with the application may typically have to be "endorsed" before being submitted to the blockchain, and unendorsed transactions will be ignored. The endorsement policy allows the chaincode to specify the endorsers of the transaction in the form of a set of peer nodes required for endorsement. When a client sends a transaction to the peers specified in the endorsement policy, the transaction is executed to confirm the transaction. After confirmation, the transaction enters the sorting phase, in which a consensus protocol is used to produce an ordered sequence of endorsed transactions grouped into blocks.
[0030] The application can utilize nodes that are communication entities of the blockchain system. A "node" can perform a logical function in the sense that multiple nodes of different types can run on the same physical server. Nodes are grouped in trust domains and are associated with logical entities that control them in various ways. Nodes can include different types, such as client or submission client nodes, which submit transaction calls ("invocation") to endorsers (e.g., peers) and broadcast transaction proposals to ordering services (e.g., ordering nodes). Another type of node is a peer node, which can receive transactions submitted by clients, submit transactions, and maintain the state and copy of the blockchain transaction ledger. Although not required, peers can also play the role of endorsers. Ordering service nodes or orderers are nodes that run communication services for all nodes and implement delivery guarantees, such as broadcasting 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, which usually includes control and setup information.
[0031] The application can utilize a ledger, which is an ordered, tamper-proof record of all state transitions of a blockchain. State transitions may result from chaincode invocations (i.e., transactions) submitted by parties (e.g., client nodes, ordering nodes, endorsing nodes, peer nodes, etc.). Each party (e.g., peer node) may maintain a copy of the ledger. Transactions may result in a collection 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 immutable sequential records in blocks. The ledger also includes a state database, which maintains the current state of the blockchain.
[0032] The application can utilize a chain as a transaction log, which is constructed as hash-linked blocks, and each block contains a sequence of N transactions, where N is equal to or greater than one. The block header includes the hash of the block's transactions, as well as the hash of the previous block header. In this way, all transactions on the ledger can be ordered and cryptographically linked together. Therefore, it is impossible to tamper with the ledger data without breaking the hash link. The hash of the most recently added blockchain block represents every transaction that occurred previously on the chain, so that all peer nodes can be ensured to be in a consistent and trusted state. The chain can be stored on the peer node file system (i.e., local, attached storage device, 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 included in the chained transaction log. Because the current state represents the latest key values known to the channel, it is sometimes referred to as the world state. Chaincode invocations execute transactions against the current state data of the ledger. To make these chaincode interactions efficient, the latest values of the keys can be stored in a state database. The state database may be just an indexed view of the chain's transaction log, so it can be regenerated from the chain at any time. The state database can be automatically restored (or generated on demand) when a peer node starts and before accepting transactions.
[0034] This application describes a functional improvement over traditional methods. The disclosed method allows one or more blockchain users to quickly identify whether the world state of a node or peer has been corrupted, while not affecting the performance of the blockchain platform. Currently, there is no solution to determine the integrity of the world state of a node or peer. The only way to ensure that the world state of a node or peer is correctly integrated is to suspend the node or peer and then rerun all transactions in the shared ledger to rebuild the world state. This solution is time-consuming and resource-intensive, especially for large and long-running blockchains.
[0035] This application may not be implemented on a traditional database that is not a blockchain for a number of reasons. First, there are no blocks and world states in traditional databases. This application improves the reliability of the world state in a blockchain platform. Second, special transactions need to be recorded into the block so that peers can determine which world state snapshot to make. Traditional databases do not have the concept of blocks. Third, different peers in the blockchain network need to reach a consensus in order to determine what world state hash value can represent the current correct world state. This consensus is not used in traditional databases.
[0036] The present application provides a disclosure of using blockchain technology to create functional improvements to computer functions. The functional improvements are due to (1) improving the reliability of blockchain peer nodes, especially the world state on the peer nodes, and (2) enhancing the security of the blockchain platform by allowing blockchain users to identify which peer nodes have failed.
[0037] The new data is stored in the blocks of the blockchain. The new data to be stored in the block is the world state snapshot transaction, and it is stored in the data section of the block. This new data enables asynchronous blockchain peers to create a synchronized world state hash without communicating with each other. Blockchain users can use this hash to determine the integrity of the blockchain world state.
[0038] The world state is a key component of blockchain technology. It is a key-value store that contains the latest version of all shared ledger assets. Each peer has a copy of the world state to allow for efficient transaction generation, as read sets / write sets can be generated without accessing historical information in the shared ledger.
[0039] In a blockchain network, some nodes or peers may operate in a less secure and reliable environment; therefore, the blockchain world state of such nodes or peers may be vulnerable to corruption. For these nodes or peers, the corruption of their world state may be caused by a variety of reasons.
[0040] First, malicious users or malware can hack into a node or peer and corrupt the world state database. Second, some antivirus software can corrupt the world state by deleting its data due to anti-counterfeiting virus detection. Third, hardware / software errors can cause world state corruption. The integrity and correctness of the data in the world state can be critical for transaction generation and overall blockchain performance. A node or peer cannot generate transactions on a corrupted world state that may have been confirmed. Such unconfirmed transactions not only hurt the throughput of the blockchain platform, but also waste resources such as CPU cycles and space within the blocks used to generate and store these transactions.
[0041] Figure 1 FIG. 1 shows a logical network diagram of a world state verification system for a database according to an example embodiment. Figure 1 , the network 100 can be a private or permissioned blockchain network with a world state, including a hyperledger blockchain network. Assuming that there is only one organization in the blockchain network 100, each node or peer should have the same world state. The world state stores the execution results of all transactions in a block.
[0042] The network 100 includes a blockchain user 104, any number of blockchain nodes or peers 108, and an orderer node or peer 116. The blockchain nodes or peers 108 include one or more endorsing nodes or peers that endorse a world state checkpoint transaction 124. Three blockchain nodes or peers 108 are shown, identified as blockchain nodes or peers 108A and 108B through 108N. Each blockchain node or peer 108 includes a world state 112. Blockchain node or peer 108A includes world state 112A, blockchain node or peer 108B includes world state 112B, and blockchain node or peer 108N includes world state 112N. Each world state 112 on one blockchain node or peer 108 may be the same or different from other world states 112 on other blockchain nodes or peers 108.
[0043] The blockchain user 104 is a client application that connects to the blockchain network 100 and creates a world state checkpoint transaction 124. The world state checkpoint transaction 124 is a request to the blockchain node or peer for world state confirmation only, and does not introduce any additional vulnerability to the blockchain platform. In one embodiment, the blockchain user 104 can set a timeout value so that the world state checkpoint transaction 124 will be sent to the blockchain node or peer periodically. In another embodiment, if the blockchain user 104 doubts or wishes to verify the integrity of the world state on one or more specific nodes or peers, the blockchain user 104 can send a world state checkpoint transaction 124 to the blockchain nodes or peers that share the same world state.
[0044] The blockchain user 104 passes the world state checkpoint transaction 124 to one or more endorsing nodes or peers 108, which endorse these transactions and provide the endorsement back to the blockchain user 104. The blockchain user 104 collects all endorsements from the endorsing nodes or peers and provides the endorsed world state checkpoint transaction 128 to the orderer node or peer 116.
[0045] The orderer node or peer 116 includes the endorsed world state checkpoint transaction 128 in the block 120 and passes the new block 132 to the blockchain node or peer 108. In response to receiving the new block 132, the blockchain node or peer 108 confirms the new block 132 and calculates a hash of its copy of the world state 112 until the checkpoint. The hash is then signed, and each blockchain node or peer 108 then passes the hash and signature 136 to the blockchain user 104.
[0046] In response to receiving the hash and signature 136, the blockchain user 104 compares the hashes to determine a majority public hash value. The blockchain user 104 validates the hash values, compares them using a consensus algorithm, and then determines if there is any corrupted world state. Those blockchain nodes or peers 108 that have the same hash value as the majority of received hash values have the correct world state 112, and those blockchain nodes or peers 108 that have a different hash value than the majority of received hash values have an incorrect world state 112.
[0047] The solution can be part of a larger project that enables nodes / peers to efficiently create world state snapshots and reliably restore their world state from snapshots in the event of arbitrary world state corruption. It can also be part of a solution that allows blockchain users 104 to establish the state of the entire blockchain network 100 and allows nodes / peers to check the integrity of their state.
[0048] Figure 2A A blockchain architecture configuration 200 is shown according to an example embodiment. 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 shown by way of example only). These nodes participate in many activities, such as blockchain transaction addition and confirmation processes (consensus). One or more of the blockchain nodes 204-210 may endorse transactions based on endorsement policies and may provide sorting services for all blockchain nodes in the architecture 200. The blockchain node may initiate a blockchain authentication and attempt to write to the blockchain immutable ledger stored in the blockchain layer 216, a copy of which may also be stored on the underlying physical infrastructure 214. The blockchain configuration may include one or more applications 224, which 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 customized configuration sought by the participants, and may maintain its own state, control its own assets, and receive external information. It may be deployed as a transaction and installed on all blockchain nodes 204-210 via attachment to the distributed ledger.
[0049] The blockchain foundation or platform 212 may include various layers of blockchain data, services (e.g., cryptographic trust services, virtual execution environments, etc.), and an underlying physical computer infrastructure that may be used to receive and store new transactions and provide access to auditing parties seeking access to data entries. The blockchain layer 216 may expose an interface that provides access to the virtual execution environment necessary to process program code and use the physical infrastructure 214. Cryptographic trust services 218 may be used to verify transactions such as asset exchange transactions and keep information private.
[0050] Figure 2A The blockchain architecture configuration can process and execute program / application code 220 via one or more interfaces exposed by the blockchain platform 212 and the services provided. Code 220 can control blockchain assets. For example, code 220 can store and transmit data, and can be executed by nodes 204-210 in the form of smart contracts and related chain codes using 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 subject to changes, updates, etc. The smart contract itself can be used to identify rules associated with authorization and access requirements and the use of the ledger. For example, information 226 can include hashes and signatures from all blockchain nodes or peers, and can be processed by one or more processing entities (e.g., virtual machines) included in the blockchain layer 216. Result 228 can include a verified world state that reflects the same hash value of most blockchain nodes or peers. Physical infrastructure 214 can be used to retrieve any data or information described herein.
[0051] Smart contracts can be created via high-level applications and programming languages and then written into blocks in a blockchain. Smart contracts can include executable code that is registered, stored, and / or replicated through a blockchain (e.g., a distributed network of blockchain peers). A transaction is the execution of smart contract code that can be executed in response to a condition associated with a smart contract being satisfied. The execution of a smart contract can trigger trusted modification(s) to the state of a digital blockchain ledger. The modification(s) to the blockchain ledger caused by the execution of a smart contract can be automatically replicated throughout a distributed network of blockchain peers through one or more consensus protocols.
[0052] Smart contracts can write data to the blockchain in the format of key-value pairs. In addition, smart contract code can read values stored in the blockchain and use them in application operations. Smart contract code can write the output of various logical operations to the blockchain. The code can be used to create temporary data structures in a virtual machine or other computing platform. The data written to the blockchain can be public and / or can be encrypted and kept private. Temporary data used / generated by smart contracts is kept in memory by the provided execution environment and is deleted once the data required by the blockchain is identified.
[0053] Chaincode may include a code interpretation of a smart contract with additional features. As described herein, chaincode may be a program code deployed on a computing network where it is executed and validated together by a chain validator during a consensus process. The chaincode receives the hash and retrieves from the blockchain a hash associated with a data template created using a previously stored feature extractor. If the hash of the hashed identifier matches the hash created from the stored identifier template data, the chaincode sends the authorization key to the requesting service. The chaincode may write data associated with cryptographic details to the blockchain.
[0054] Figure 2B An example of a blockchain transaction flow 250 between nodes of a blockchain according to an example embodiment is shown. Figure 2B , a transaction flow may include a transaction proposal 291 sent by an application client node 260 to an endorsing peer node 281. The endorsing peer 281 may verify the client signature and execute the chaincode function to initiate the transaction. The output may include a chaincode result, a set of key / value versions read in the chaincode (read set), and a set of key / values written to the chaincode (write set). If approved, a 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 confirm the transaction before submitting it to the blockchain. For example, a peer may check the endorsement policy to ensure that the correct assignment of the specified peer has signed the result and authenticated the signature against the transaction payload 293.
[0055] Reference again Figure 2B, the client node 260 initiates a transaction 291 by constructing a request and sending it to the peer node 281 as the endorser. The client 260 may include an application utilizing a supported software development kit (SDK) that utilizes an available API to generate a transaction proposal. The proposal is a request to invoke a chaincode function so that data can be read and / or written to the ledger (i.e., write a new key-value pair for an asset). The SDK can act as a shim to package the transaction proposal into an appropriate architectural format (e.g., protocol buffers over remote procedure calls (RPCs)) and obtain the client's cryptographic credentials to produce a unique signature for the transaction proposal.
[0056] In response, the endorsing peer node 281 can verify that (a) the transaction proposal is correctly formed, (b) the transaction has not been submitted in the past (replay attack protection), (c) the signature is valid, and (d) the submitting party (client 260 in this example) has been properly authorized to perform the proposed operation on the channel. The endorsing peer node 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 collection, and a write collection. However, no updates have been made to the ledger at this time. In 292, the collection of values is passed back to the SDK of client 260 along with the signature of the endorsing peer node 281 as a proposal response 292, and the SDK of client 260 parses the payload for application consumption.
[0057] In response, the client 260 application checks / verifies the signature of the endorsing peer and compares the proposal response to determine if the proposal responses are the same. If the chaincode only queries the ledger, the application will check the query response and typically will not submit the transaction to the sorting node service 284. If the client application intends to submit the transaction to the sorting node service 284 to update the ledger, the application determines whether the specified endorsement policy has been implemented (i.e., whether all peer nodes required for the transaction endorse the transaction) before submitting. Here, the client may include only one of the multiple parties to the transaction. In this case, each client may have its own endorsing node, and each endorsing node is required to endorse the transaction. This architecture allows the endorsement policy to be enforced by the peers and maintained during the submission confirmation phase even if the application chooses not to check the response or otherwise forward unendorsed transactions.
[0058] After successful checks, in step 293, client 260 assembles the endorsements into a transaction and broadcasts the transaction proposal and response within the transaction message to ordering node 284. The transaction may contain read / write sets, signatures of endorsing peers, and channel IDs. Ordering node 284 does not need to examine the entire contents of a transaction in order to perform its operations, instead, ordering node 284 can simply receive transactions from all channels in the network, sort them chronologically by channel, and create a transaction block for each channel.
[0059] The block of transactions is delivered from the ordering node 284 to all peer nodes 281-283 on the channel. The transactions 294 within the block are confirmed to ensure that any endorsement policies are met and that the ledger state of the read set variables has not changed since the transaction execution generated the read set. The transactions in the block are marked as valid or invalid. In addition, in step 295, each peer node 281-283 appends the block to the channel's chain and, for each valid transaction, commits the write set to the current state database. Events are emitted to notify the client application that the transaction (call) has been immutably attached to the chain and whether the transaction is confirmed or unconfirmed.
[0060] Figure 3A An example of a permissioned blockchain network 300 is shown, featuring 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 application utilizing 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 registering blockchain users 302 as "clients." Auditors may be limited to querying the ledger, while clients may be authorized to deploy, call, and query certain types of chaincodes.
[0061] 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 certificate authority 316 that manages user roles and permissions. In some cases, blockchain users must have these digital certificates in order to conduct transactions on the permissioned blockchain network 304. At the same time, users who attempt to utilize chaincodes may be required to verify their credentials on traditional data sources 312. In order to confirm the user's authorization, the chaincode can use an out-of-band connection to the data through a traditional processing platform 320.
[0062] Figure 3B Another example of a permissioned blockchain network 320 is shown, featuring 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 application utilizing an SDK, directly through an API, etc. The network can provide access to regulators 326 such as auditors. The blockchain network operator 328 manages member permissions, such as registering regulators 326 as "auditors" and registering blockchain users 322 as "clients." Auditors may be limited to querying the ledger, while clients may be authorized to deploy, call, and query certain types of chaincodes.
[0063] Blockchain developers 330 write chaincodes and client-side applications. Blockchain developers 330 can deploy chaincodes directly to the network through an interface. In order to include credentials from traditional data sources 332 in the chaincode, developers 330 can use out-of-band connections to access the data. In this example, blockchain users 322 connect to the network through peer nodes 334. Before conducting any transactions, peer nodes 334 retrieve the user's registration and transaction certificates from certificate authorities 336. In some cases, blockchain users must have these digital certificates in order to conduct transactions on the permissioned blockchain 324. At the same time, users attempting to utilize chaincodes may be required to verify their credentials on traditional data sources 332. To confirm the user's authorization, the chaincode can use an out-of-band connection to the data through a traditional processing platform 338.
[0064] Figure 4 A system message diagram 400 for performing world state integrity verification according to an example embodiment is shown. Figure 4, the system message passing diagram 400 includes a blockchain user 410, one or more endorsing nodes or peers 420, and an orderer node or peer 430. The blockchain user 410 initiates the process by creating a world state checkpoint transaction 415, and passes a world state checkpoint transaction 416 to the endorsing node or peer 420.
[0065] In response to receiving the world state checkpoint transaction 416, the endorsing node or peer 420 endorses the transaction 425 and passes the endorsement 426 to the blockchain user 410. The blockchain user 410 packages the endorsement 435 from the endorsing node or peer 420 into an endorsed world state checkpoint transaction 436 and passes the endorsed world state checkpoint transaction 436 to the orderer node or peer 430.
[0066] The orderer node or peer 430 includes the endorsed world state checkpoint transaction in a new block 440 and passes the new block 441 to the blockchain nodes or peers including the endorsing node or peer 420. The blockchain nodes or peers including the endorsing node or peer 420 compute a hash 445 of their own copy of the world state up to the world state checkpoint 436 specified in the world state checkpoint transaction and sign the hash. The blockchain nodes or peers including the endorsing node or peer 420 pass the world state hash and signature 446 to the blockchain user 410.
[0067] The blockchain user 410 verifies the integrity of the world state 450 of each blockchain node or peer based on the received hash values 446. If the blockchain node or peer has the same hash value as the majority of the received hash values, then they have the correct world state, and if they have a hash value different from the majority of the received hash values, then they have an incorrect world state. The blockchain user 410 notifies the majority of blockchain nodes or peers that they have the correct world state 455, and notifies non-majority blockchain nodes or peers that they do not have the correct world state 460. Nodes or peers that fail to reach consensus (i.e., are not a majority) will remove their current world state and obtain the correct world state from other nodes or peers.
[0068] Figure 5A A flowchart 500 of an example method for verifying the integrity of a world state in a blockchain is shown according to an example embodiment. Figure 5A , method 500 may include one or more of the following steps.
[0069] At block 504, a blockchain user creates a world state checkpoint transaction.
[0070] At block 508, an endorsing node or peer of the blockchain network endorses the world state checkpoint transaction and returns the endorsement to the blockchain user. The blockchain user combines the endorsements into an endorsed world state checkpoint transaction and provides it to the orderer node or peer.
[0071] At box 512, the orderer node or peer creates a new block including the endorsed world state checkpoint transaction and sends the new block to all nodes or peers of the blockchain network.
[0072] At block 516, each of the blockchain nodes or peers confirms the new block, generates a new hash of the world state, and signs the hash with the node's or peer's private key. The hash and signature are then sent to the blockchain user.
[0073] At block 520, the blockchain user verifies the world state integrity by comparing the received hashes. The blockchain user verifies the integrity and signature of the hash using the public key of the node or peer. If the majority of blockchain nodes or peers sent the same hash, then the world state of those nodes or peers has been verified. Blockchain nodes or peers that provide different hash values have incorrect world states.
[0074] At block 524, the blockchain user notifies the blockchain node or peer of the integrity of its world state, whether correct or not. This mechanism provides an efficient and reliable solution to prove the integrity of the blockchain world state.
[0075] First, it eliminates the need to re-run a series of historical transactions in a shared ledger, which is both resource-wasting and time-consuming, especially for large and long-running blockchains.
[0076] Secondly, the CoW (Copy on Write) technique is used to minimize the negative blockchain performance impact of the world state confirmation process. When a node or peer encounters a world state checkpoint transaction when submitting a new block, it will start calculating the hash value of its current world state. The node or peer does not need to be suspended while calculating the world state hash, and it can continue to process other transactions. All world state updates resulting from new transactions are temporarily stored. After calculating the world state hash value, the stored updates are applied to the existing world state.
[0077] Transactions that arrive after the world state checkpoint will also have updates to the world state; therefore, in order not to affect the calculation of the world state checkpoint, the updates obtained by these transactions will be stored in a separate location. When a node or peer finishes calculating the world state checkpoint based on the world state checkpoint transaction, such updates can be reapplied to the world state.
[0078] Third, the scheme reliably determines the integrity of the blockchain world state based on the world state hash values collected from all nodes or peers of the same organization. The world state hash values from the nodes or peers are verified using their corresponding signatures. Likewise, the integrity of the blockchain world state is determined by the consensus algorithm running on the hash values collected from all these nodes or peers.
[0079] Figure 5B A flowchart 550 of an example method of authenticating a checkpoint for a blockchain is shown according to an example embodiment. Figure 5B , method 550 may include one or more of the following steps.
[0080] At block 554, the full checkpoint is set to an empty state. This reflects the initial state where no agreement has been reached.
[0081] At block 558, the world state of the blockchain network is stored. This step also saves a reference to the location of the checkpoint data in the location. The world state is recorded, for example, on a traditional medium (e.g., tape, disk, cloud, etc.), or in its own blockchain. The recorded world state is called a checkpoint.
[0082] At block 562, a checkpoint state hash is calculated.
[0083] At block 566, the consensus of the hash is checked. The routine checks whether an agreement (consensus) has been reached on the hash of this checkpoint. If not, the routine reaches an agreement with other nodes (submitters) on the hash of the checkpoint.
[0084] At block 570, the calculated hash is compared to the agreed hash. If the calculated hash is different than the agreed hash, then step 574 is completed. Otherwise, the hash of the checkpoint data is saved, and a reference to the location of the checkpoint data is saved. These values are saved so that they can be properly linked to the full checkpoint when an incremental checkpoint is taken. The routine will then create a transaction that will be the first transaction in the next block containing the hash of the checkpoint state and a reference to that location. This transaction can contain as much information as desired.
[0085] At block 574, a valid world state hash is retrieved from another submitter. This step occurs when the calculated hash is different from the agreed hash.
[0086] Fig. 6A An example system 600 is shown, including a physical infrastructure 610 configured to perform various operations, according to an example embodiment. Fig. 6A, the physical infrastructure 610 includes a module 612 and a module 614. The module 614 includes a blockchain 620 and a smart contract 630 (which may reside on the blockchain 620), which may perform any of the operation steps 608 included in any of the example embodiments (in the module 612). The step / operation 608 may include one or more of the described or depicted embodiments, and may represent output or written information written or read from one or more smart contracts 630 and / or blockchain 620. The physical infrastructure 610, the module 612, and the module 614 may include one or more computers, servers, processors, memories, and / or wireless communication devices. In addition, the module 612 and the module 614 may be the same module.
[0087] Figure 6B An example system 640 is shown that is configured to perform various operations according to an example embodiment. Figure 6B , system 640 includes module 612 and module 614. Module 614 includes blockchain 620 and smart contract 630 (which may reside on blockchain 620), which may perform any of the operation steps 608 included in any of the example embodiments (in module 612). Step / operation 608 may include one or more of the described or depicted embodiments, and may represent output or written information written or read from one or more smart contracts 630 and / or blockchain 620. Physical 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.
[0088] Figure 6C An example system is shown according to an example embodiment, the example system being configured to utilize a smart contract configuration between contracting parties and an intermediary server configured to enforce smart contract terms on a blockchain. Figure 6C , configuration 650 may represent a communication session, asset transfer session, or process or procedure 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 may be managed by a server 654. The contents of the smart contract 630 may require digital signatures by one or more of the entities 652 and 656 that are parties to the smart contract transaction. The results of the smart contract execution may be written to the blockchain 620 as a blockchain transaction. The smart contract 630 resides on the blockchain 620, which may reside on one or more computers, servers, processors, memories, and / or wireless communication devices.
[0089] Fig.6DA system 660 including a blockchain is shown according to an example embodiment. Fig.6D In the example of , 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 has a copy of the world state and the distributed ledger, 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.
[0090] The above embodiments may be implemented in hardware, in a computer program executed by a processor, in firmware, or in a combination thereof. The computer program may be embodied in a computer-readable medium such as a storage medium. For example, the computer program may reside in a random access memory ("RAM"), a flash memory, a read-only memory ("ROM"), an erasable programmable read-only memory ("EPROM"), an electrically erasable programmable read-only memory ("EEPROM"), a register, a hard disk, a removable disk, a compact disk read-only memory ("CD-ROM"), or any other form of storage medium known in the art.
[0091] An exemplary storage medium may be coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Alternatively, the storage medium may be integrated into 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.
[0092] Fig. 7A A process 700 of adding a new block to a distributed ledger 730 is shown according to an example embodiment, and Figure 7B The content of a new data block structure 750 of a blockchain according to an example embodiment is shown. Fig. 7A, a client (not shown) may submit a transaction to blockchain nodes 721, 722, and / or 723. A client may be an instruction received from any source for enacting an activity on blockchain 720. As an example, a client may be an application that acts on behalf of a requester such as a device, person, or entity to propose a transaction for a blockchain. Multiple blockchain peers (e.g., blockchain nodes 721, 722, and 723) may maintain the state of the blockchain network and a copy of the distributed ledger 720. Different types of blockchain nodes / peers may exist in the blockchain network, including: endorsement peers, which simulate and endorse transactions proposed by clients; and submission peers, which verify endorsements, confirm transactions, and submit transactions to the distributed ledger 720. In this example, blockchain nodes 721, 722, and 723 may perform the roles of endorser nodes, submitter nodes, or both.
[0093] The distributed ledger 720 includes: a blockchain, which stores immutable, ordered records in blocks; and a state database 724 (current world state), which maintains the current state of the blockchain 722. There may be one distributed ledger 720 per channel, and each peer maintains its own copy of the distributed ledger 730 for each channel of which they are a member. The blockchain 722 is a transaction log structured as hash-linked blocks, where each block contains a sequence of N transactions. Blocks may include such items as Figure 7B The various components shown. Block links ( Fig. 7A ) can be generated by adding the hash of the previous block header in the block header of the current block. In this way, all transactions on the blockchain 722 are ordered and cryptographically linked together to prevent tampering of the blockchain data without breaking the hash link. In addition, due to the linking, the latest block in the blockchain 722 represents every transaction that has been conducted before it. The blockchain 722 can be stored on a peer file system (local or attached storage) that supports append-only blockchain workloads.
[0094] The current state of the blockchain 722 and distributed ledger 722 may be stored in a state database 724. Here, the current state data represents the latest values of all keys ever 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 may include an indexed view into the transaction log of the blockchain 722 so it can be regenerated from the chain at any time. The state database 724 may be automatically restored (or generated if necessary) at peer initiation before a transaction is accepted.
[0095] The endorsing peer receives the transaction from the client and endorses the transaction based on the simulation results. The endorsing peer holds the smart contract that simulates the transaction proposal. When the endorsing peer endorses the 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 the 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 may have different endorsement policies. The client application forwards the endorsed transaction to the sorting service 710.
[0096] The ordering service 710 accepts endorsed transactions, orders them into blocks, and delivers these blocks to submitting peers. The ordering service 710 may initiate a new block, for example, when a threshold of transactions has been reached, a timer has expired, or other conditions have occurred. Fig. 7A In the example of , blockchain node 712 is a submitting peer that has received a new data block 730 for storage on blockchain 720. The first block in a blockchain may be referred to as a genesis block, which includes information about the blockchain, its members, the data stored therein, and the like.
[0097] The ordering service 710 may consist of a cluster of orderers. The ordering service 710 does not process transactions, smart contracts, or maintain a shared ledger. Instead, the ordering service 710 may accept endorsed transactions and specify the order in which those transactions are submitted to the distributed ledger 720. The architecture of the blockchain network may be designed so that a specific implementation of "ordering" (e.g., Solo, Kafka, BFT, etc.) becomes a pluggable component.
[0098] Transactions are written to the distributed ledger 720 in a consistent ordering. The ordering of transactions is established to ensure that updates to the state database 724 are valid when they are submitted to the network. Unlike cryptocurrency blockchain systems where ordering is performed by solving cryptographic puzzles, in this example, the parties to the distributed ledger 720 can choose the ordering mechanism that best suits the network.
[0099] When the ordering service 710 initializes a new data block 730, the new block 730 may be broadcast to the submitting peers (e.g., blockchain nodes 711, 712, and 713). In response, each submitting peer confirms the transaction 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 submitting 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 submitting 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 from the read write set. If the transaction fails, that is, if the submitting peer finds in the state database 724 that the read write set does not match the current world state, then the transaction that was 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.
[0100] Reference 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 understood that the various blocks and their contents depicted, such as Figure 7B The new data block 730 and its contents shown in FIG. 7 are merely examples and are not meant to limit the scope of the example embodiments. The new data block 730 may store transaction information for N transactions (e.g., 1, 10, 100, 500, 1000, 2000, 3000, etc.) within the block data 750. The new data block 730 may also include a link to a previous block (e.g., Fig. 7A Specifically, the block header 740 may include a hash of a previous block header. The block header 740 may also include a unique block number, a hash of the block data 750 of the new data block 730, and the like. The block number of the new data block 730 may be unique and assigned in various orderings such as incremental / sequential ordering starting from zero.
[0101] 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 (deploy tx), chaincode name, chaincode version, inputs (chaincode and function), client (creator) identity such as public key and certificate, client's signature, endorser identity, endorser signature, proposal hash, chaincode event, response status, namespace, read set (list of keys and versions read by the transaction, etc.), write set (list of keys and values, etc.), start key, end key, key list, Merkle tree query summary, etc. The transaction data may be stored for each of the N transactions.
[0102] In some embodiments, the block data 750 may also store new data 762 that adds additional information to the hash-linked blockchain in the blockchain 722. The additional information includes one or more of the steps, features, processes, and / or actions described or depicted herein. Thus, the new data 762 may be stored in an immutable log of blocks in the distributed ledger 720. Some benefits of storing such new data 762 are reflected in the various embodiments disclosed and depicted herein. Although in Figure 7B , the new data 762 is described in the block data 750 , but may also be located in the block header 740 or the block metadata 760 .
[0103] The block metadata 760 may store multiple fields of metadata (e.g., as a byte array, etc.). The metadata fields may include a signature at the time of block creation, a reference to the last configuration block, a transaction filter that identifies valid and invalid transactions within the block, the last offset duration of the sorting service that sorts the block, etc. The signature, the last configuration block, and the sorter metadata may be added by the sorting service 710. At the same time, the submitter of the block (e.g., the blockchain node 712) may add validity / invalidity information based on an endorsement policy, verification of a read / write set, etc. The transaction filter may include a byte array of size equal to the number of transactions in the block data 750 and a confirmation code that identifies the transaction as valid / invalid.
[0104] Figure 7CAn embodiment of a blockchain 770 for digital content according to embodiments described herein is shown. Digital content may include one or more files and associated information. Files may include media, images, video, audio, text, links, graphics, animations, web pages, documents, or other forms of digital content. The immutable, append-only aspect of the blockchain may serve as a safeguard to protect the integrity, validity, and authenticity of the digital content, making it suitable for use in legal proceedings where admissibility rules apply or in other settings where evidence may be included or considered or where the display and use of digital information may be of interest. In this context, the digital content may be referred to as digital evidence.
[0105] The blockchain can be formed in a variety of ways. In one embodiment, the digital content can be included in and accessed from the blockchain itself. For example, each block of the blockchain can store a hash value of reference information (e.g., title, value, etc.) along with the associated digital content. The hash value and the associated digital content can then be encrypted together. Therefore, 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 previous blocks. This can be illustrated as follows:
[0106]
[0107] In one embodiment, the digital content may not be included in the blockchain. For example, the blockchain may store a cryptographic hash of the content of each block without any of the 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 used to store 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 its value in the storage area stored corresponding to the actual digital content. This operation may, for example, execute a database keeper. It may be illustrated as follows:
[0108]
[0109] exist Figure 7C In the example embodiment of , blockchain 770 includes a plurality of blocks 7781, 7782, ... 778 that are cryptographically linked in an ordered sequence. N , where N ≥ 1. Used to link blocks 7781, 7782, ... 778 N The encryption can be any one of many cryptographic or non-cryptographic 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-type (SHA stands for Secure Hash Algorithm) algorithms, Merkle-Damgard algorithms, HAIFA algorithms, Merkle-tree algorithms, random number-based algorithms, and non-collision-resistant PRF algorithms. In another embodiment, blocks 7781, 7782, ... 778 may be cryptographically linked by a function different from a hash function. N For purposes of illustration, the following description refers to a hash function such as SHA-2.
[0110] Each block in the blockchain is 7781, 7782, ...778 N Includes a header, a file version, and a value. As a result of the hash in the blockchain, the header and value are different for each block. In one embodiment, the value may be included in the header. As described in more detail below, the version of the file may be the original file or a different version of the original file.
[0111] The first block 7781 in the blockchain is called the genesis block and includes a header 7721, an original file 7741, and an initial value 7761. The hashing scheme used in the genesis block and in fact in all subsequent blocks can vary. For example, all the information in the first block 7781 can be hashed together at once, or each or a portion of the information in the first block 7781 can be hashed separately, and then the hashing of the separately hashed portions is performed.
[0112] The header 7721 may include one or more initial parameters, which may include, for example, a version number, a timestamp, a random number, root information, a difficulty level, a consensus protocol, a duration, a media format, a source, descriptive keywords, and / or other information associated with the original file 7741 and / or the blockchain. The header 7721 may be generated automatically (e.g., by blockchain network management software), or may be 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.
[0113] The original file 7741 in the origin block can be, for example, data captured by a device, processed or not before it is included in the blockchain. The original file 7741 is received from a device, a media source, or a node through an interface of the system. The original file 7741 is associated with metadata, which can be generated manually or automatically by a user, a device, and / or a system processor. The metadata can be included in the first block 7781 in association with the original file 7741.
[0114] The value 7761 in the origin block is an initial value generated based on one or more unique attributes of the original file 7741. In one embodiment, the one or more unique attributes may include a hash value of the original file 7741, metadata of the original file 7741, and other information associated with the file. In one implementation, the initial value 7761 may be based on the following unique attributes:
[0115] 1) SHA-2 calculated hash value of the original file
[0116] 2) Originating device ID
[0117] 3) The start timestamp of the original file
[0118] 4) The original storage location of the original file
[0119] 5) The blockchain network member ID for the software that currently controls the original file and associated metadata
[0120] Other blocks in the blockchain: 7782 to 778 N It also has a header, a file, and a value. However, unlike the first block 7721, the headers 7722 to 772 N Each of the blocks includes the hash value of the immediately preceding block. The hash value of the immediately preceding block may be just the hash of the header of the preceding block, or may be the hash value of the entire preceding block. By including the hash value of the preceding block in each of the remaining blocks, tracking from the Nth block back to the origin block (and associated original file) may be performed on a block-by-block basis, as indicated by arrow 780, to establish an auditable and immutable chain of custody.
[0121] Headers 7722 to 772 in other blocks N Each of the may also include other information, such as a version number, a timestamp, a random number, root information, a difficulty level, a consensus protocol, and / or other parameters or information associated with the corresponding file and / or the general blockchain.
[0122] Files 7742 to 774 in other blocks N The original file may be equal to the original file, or it may be a modified version of the original file in the origin block, for example, depending on the type of processing performed. The type of processing performed may vary from block to block. The processing may involve, for example, any modification of the file in a previous block, such as redacting or otherwise changing the contents of the file, taking information away from the file, or adding or appending information to the file.
[0123] Additionally or alternatively, the processing may involve merely copying the file from a previous block, changing the storage location of the file, analyzing the file from one or more previous blocks, moving the file from one storage device or memory location to another storage device or memory location, or performing an action with respect to the blockchain file and / or its associated metadata. Processing involving analyzing the file may include, for example, appending, including, or otherwise associating various analytical, statistical, or other information associated with the file.
[0124] Each of the other blocks 7762 to 776 N The values in a block are unique values and are all 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. This 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 also allows tracking back to the original file through the blockchain. This tracking confirms the chain of supervision of the file throughout the blockchain.
[0125] Consider, for example, a situation where portions of a file in a previous block are edited, masked, or pixelated to protect the identity of the person shown in the file. In this case, the block that includes the edited file will include metadata associated with the edited file, such as how the edit was performed, who performed the edit, a timestamp when the edit(s) occurred, etc. The metadata can be hashed to form a value. Because the metadata for this block is different than the information that was hashed to form the value in the previous block, the values are distinct from each other and can be recovered upon decryption.
[0126] In one embodiment, when any one or more of the following occurs, 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 example embodiment, the new hash value can be calculated by hashing all or part of the information described below.
[0127] a) If the file has been manipulated in any way (e.g. if the file has been edited, copied, changed, accessed, or other actions have been taken), then a new SHA-2 calculated hash value
[0128] b) New storage location for the file
[0129] c) New metadata associated with the file
[0130] d) Transferring access to or control of a file from one blockchain participant to another
[0131] Fig.7D An embodiment of a block that can represent the structure of a block in blockchain 790 is shown according to one embodiment. iIncluding head 772 i 、File 774 i The sum is 776 i .
[0132] Head 772 i Including previous block 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 (such as header information, including references, characteristics, parameters, etc.). Of course, except for the origin block, all blocks reference the hash of the previous 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.
[0133] File 774 i The system includes a plurality of data, such as data 1, data 2, ..., data N. The data are marked with metadata metadata 1, metadata 2, ..., metadata N, which describe the content and / or characteristics associated with the data. For example, the metadata of each data may include a timestamp indicating the data, information about processing the data, keywords indicating a person or other content described in the data, and / or other features that help establish the overall validity and content of the file, especially its use of digital evidence, such as described in conjunction with the embodiments discussed below. In addition to the metadata, each data can use reference REF1, REF2, ..., REF N Mark to previous data to prevent tampering, gaps in the file, and sequential reference through the file.
[0134] Once metadata is assigned to data (e.g., by a smart contract), it cannot be changed without changing the hash, which can easily be marked as invalid. Metadata thus creates a data log of information that can be accessed for use by participants in the blockchain.
[0135] Value 776 i is a hash value or other value calculated based on any of the types of information discussed previously. For example, for any given block i , the value of the block can be updated to reflect the processing performed on 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 actions or information to be added. Although the value in each block is shown separate from the metadata for the file and header data, in another embodiment, the value can be based in part or in whole on the metadata.
[0136] Once the blockchain 770 is formed, at any point in time, an immutable chain of custody of the file can be obtained by querying the blockchain for the transaction history of values across blocks. The query or tracking process can start by decrypting the value of the currently included block (e.g., the last (Nth) block), and then continue to decrypt the values of other blocks until the origin block is reached and the original file is restored. Decryption can also involve decrypting the header and file and associated metadata at each block.
[0137] Decryption is performed based on the type of encryption that occurs in each block. This may involve the use of private keys, public keys, or public-private key pairs. For example, when asymmetric encryption is used, a blockchain participant or processor in the network can use a predetermined algorithm to generate a public and private key pair. The public and private keys are related to each other through some mathematical relationship. The public key can be distributed publicly to be used as an address to receive messages from other users, such as an IP address or home address. The private key is kept secret and is used to digitally sign messages sent to other blockchain participants. The signature is included in the message so that the recipient can verify it using the sender's public key. In this way, the recipient can be sure that only the sender can send this message.
[0138] Generating a key pair can be similar to creating an account on the blockchain, but without having to actually register it anywhere. In addition, the sender digitally signs each transaction performed on the blockchain using their private key. This signature ensures that only the account owner can track and process (if within the scope of permission determined by the smart contract) the blockchain file.
[0139] Figure 8 An example system 800 is shown that supports one or more example embodiments described and / or depicted herein. System 800 includes a computer system / server 802 that can operate with many other general or special computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations that may be suitable for use with computer system / server 802 include, but are not limited to, personal computer systems, server computer systems, thin clients, fat clients, handheld or portable 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, and the like.
[0140] Computer system / server 802 may be described in the general context of computer system executable instructions, such as program modules, executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. Computer system / server 802 may be practiced in a distributed cloud computing environment, where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media, including memory storage devices.
[0141] like Figure 8 As shown, a computer system / server 802 in a cloud computing node 800 is shown in the form of a general-purpose computing device. 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.
[0142] Bus refers to any one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0143] The computer system / server 802 typically includes various computer system readable media. Such media can be any available media accessible to the computer system / server 802, and it includes volatile and non-volatile media, removable and non-removable media. In one embodiment, the system memory 806 implements the flow charts of other figures. The system memory 806 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 810 and / or cache memory 812. The computer system / server 802 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 814 may be provided for reading and writing non-removable non-volatile magnetic media (not shown and generally referred to as a "hard drive"). Although not shown, a disk drive for reading from and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading from or writing to a removable non-volatile optical disk, such as a CD-ROM, DVD-ROM, or other optical medium, may be provided. In this case, each may be connected to the bus via one or more data medium interfaces. As will be further depicted and described below, memory 806 may include at least one program product having a set of (e.g., at least one) program modules that are configured to perform the functions of various embodiments of the present application.
[0144] A program / utility 816 having a collection of (at least one) program modules 818 may be stored in memory 806 along with an operating system, one or more application programs, other program modules, and program data, by way of example and not limitation. Each of the operating system, one or more application programs, other program modules, and program data, or some combination thereof, may include an implementation of a networking environment. Program modules 818 generally perform the functions and / or methods of various embodiments of the present application as described herein.
[0145] As will be appreciated by those skilled in the art, various aspects of the present application may be embodied as a system, method or computer program product. Therefore, various aspects of the present application may take the following forms: a complete hardware embodiment, a complete software embodiment (including firmware, resident software, microcode, etc.) or an embodiment combining software and hardware aspects, which may generally be referred to herein as a "circuit", "module" or "system". In addition, various aspects of the present application may take the form of a computer program product embodied in one or more computer-readable media, on which one or more computer-readable media are embodied computer-readable program codes.
[0146] 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, etc.; 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 occur via an I / O interface 824. However, the computer system / server 802 may still communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), and / or a public network (e.g., the Internet) 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 archive storage systems, etc.
[0147] Although illustrated in the drawings and described in the foregoing detailed description, at least one exemplary embodiment of the system, method and non-transient computer-readable medium, it should be understood that the present application is not limited to the disclosed embodiments, but can be rearranged, modified and replaced as described and defined in the appended claims. For example, the ability of the system of each figure can be performed by one or more of the modules or components described herein or in a distributed architecture, and can include a transmitter, a receiver or a pair of both. For example, all or part of the functions performed by a separate module can be performed by one or more of these modules. In addition, the functions described herein can be performed at various times and in relation to various events inside or outside the module or component. In addition, the information sent between various modules can be sent between various modules via at least one of the following: data network, Internet, voice network, Internet protocol network, wireless device, wired device and / or by multiple protocols. In addition, the message sent or received by any one of the modules can be sent or received directly and / or via one or more of the other modules.
[0148] Those skilled in the art will appreciate that a "system" may be embodied as a personal computer, server, console, personal digital assistant (PDA), mobile phone, tablet computing device, smart phone, or any other suitable computing device or combination of devices. Presenting the above functions as being performed by a "system" is not intended to limit the scope of the present application in any way, but is intended to provide an example of many embodiments. In fact, the methods, systems, and apparatus disclosed herein may be implemented in local and distributed forms consistent with computing technology.
[0149] It should be noted that some of the system features described in this specification have been presented as modules in order to more specifically emphasize their implementation independence. For example, a module can be implemented as a hardware circuit that includes a custom very large scale integrated circuit (VLSI) circuit or gate array, an off-the-shelf semiconductor such as a logic chip, a transistor, or other discrete components. A module 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.
[0150] Modules may also be implemented at least in part with software for being executed by various types of processors. The identified executable code unit may for example include one or more physical or logical blocks of computer instructions, which may for example be organized as objects, processes or functions. However, the executable file of the identified module does not need to be physically located together, but may include different instructions stored in different locations, which, when logically combined together, include modules and realize the purpose of the modules. In addition, modules may be stored on a computer-readable medium, which may for example be a hard drive, a flash memory device, a random access memory (RAM), a magnetic tape or any other such medium for storing data.
[0151] In practice, a module of executable code may be a single instruction or multiple instructions, and may even be distributed over multiple different code segments, between different programs, and across multiple storage devices. Similarly, operational data may be identified and shown herein within a module, and may be embodied in any suitable form and may be organized 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 storage devices, and may exist at least in part only as electronic signals on a system or network.
[0152] It will be easily understood 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 selected embodiments of the present application.
[0153] Those skilled in the art will readily appreciate that the above content can be practiced with steps in a different order and / or with hardware elements in a configuration different from the disclosed configuration. 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.
[0154] Although preferred embodiments of the present application have been described, it will be understood that the described embodiments are merely illustrative and that the scope of the present application will be limited solely by the appended claims when considering equivalents and modifications with a full range of ranges (e.g., protocols, hardware devices, software platforms, etc.).
Claims
1. A system for world state integrity verification, comprising: A blockchain network includes a blockchain user node, multiple endorsement nodes and sorting nodes, wherein the blockchain user node includes: a memory storing one or more instructions; and A processor, wherein when the processor executes the one or more instructions, the processor is configured to: Creating and sending a world state checkpoint transaction to the plurality of endorsing nodes, the world state checkpoint transaction comprising a request for world state verification for each of the plurality of endorsing nodes; receiving a plurality of endorsements of the world state checkpoint transaction from the plurality of endorsing nodes; sending a world state checkpoint transaction including the plurality of endorsements to the orderer node for inclusion in a block by the orderer node; Verify the integrity of a current world state of each of the plurality of endorsing nodes.
2. The system of claim 1, wherein the processor is further configured to: In response to each of the plurality of endorsing nodes receiving the block from the orderer node, receiving a signed hash value of a current world state from each of the plurality of endorsing nodes.
3. The system of claim 2, wherein verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: Verifying the integrity of the current world state of each of the plurality of endorsing nodes based on the signed hash value of the current world state received from each of the endorsing nodes in response to each of the plurality of endorsing nodes receiving the block from the orderer node.
4. The system of claim 3, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: identifying that the current world state of the endorsing node of the plurality of endorsing nodes is correct based on the signed hash value received from the endorsing node being the same as a majority of the signed hash values received from other endorsing nodes of the plurality of endorsing nodes; or Based on the signed hash value received from the endorser node being different than a majority of the signed hash values received from the other endorser nodes in the plurality of endorser nodes, identifying that a current world state of the endorser node in the plurality of endorser nodes is incorrect.
5. The system of claim 4, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: Based on the identification, informing a majority of the endorsing nodes among the plurality of endorsing nodes that their current world state is a correct world state; or Based on the identification, a minority of the plurality of endorsing nodes are notified that their current world state is not a correct world state.
6. The system of claim 5, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: The signed hash value of the current world state received from each of the endorsing nodes is compared with a majority of signed hash values received from the other endorsing nodes of the plurality of endorsing nodes via a consensus algorithm.
7. The system of claim 6, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: Notifying a minority of the plurality of endorsing nodes that their current world state is an incorrect world state, so that the minority of endorsing nodes suspend interaction until the minority of endorsing nodes achieve a correct world state.
8. A method for world state integrity verification, comprising: A blockchain user node of the blockchain network creates and sends a world state checkpoint transaction to a plurality of endorser nodes, wherein the world state checkpoint transaction includes a request for world state verification to each of the plurality of endorser nodes; receiving, by a blockchain user node of the blockchain network, a plurality of endorsements of the world state checkpoint transaction from the plurality of endorser nodes; sending, by a blockchain user node of a blockchain network, a world state checkpoint transaction including the plurality of endorsements to an orderer node of the blockchain network for inclusion in a block by the orderer node; The current world state integrity of each of the multiple endorser nodes is verified by a blockchain user node of the blockchain network.
9. The method according to claim 8, further comprising: In response to each of the plurality of endorsing nodes receiving the block from the orderer node, receiving, by a blockchain user node of the blockchain network, a signed hash value of a current world state from each of the plurality of endorsing nodes.
10. The method according to claim 9, wherein verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: Verifying the integrity of the current world state of each of the plurality of endorsing nodes based on the signed hash value of the current world state received from each of the endorsing nodes in response to each of the plurality of endorsing nodes receiving the block from the orderer node.
11. The method according to claim 10, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: identifying that the current world state of the endorsing node of the plurality of endorsing nodes is correct based on the signed hash value received from the endorsing node being the same as a majority of the signed hash values received from other endorsing nodes of the plurality of endorsing nodes; or Based on the signed hash value received from the endorser node being different than a majority of the signed hash values received from the other endorser nodes in the plurality of endorser nodes, identifying that a current world state of the endorser node in the plurality of endorser nodes is incorrect.
12. The method according to claim 11, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: Based on the identification, informing a majority of the endorsing nodes among the plurality of endorsing nodes that their current world state is a correct world state; or Based on the identification, a minority of the plurality of endorsing nodes are notified that their current world state is not a correct world state.
13. The method according to claim 12, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: The signed hash value of the current world state received from each of the endorsing nodes is compared with a majority of signed hash values received from the other endorsing nodes of the plurality of endorsing nodes via a consensus algorithm.
14. The method according to claim 13, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: Notifying a minority of the plurality of endorsing nodes that their current world state is an incorrect world state, so that the minority of endorsing nodes suspend interaction until the minority of endorsing nodes achieve a correct world state.
15. A non-transitory computer readable medium comprising instructions which, when read by a processor, cause the processor to execute: A blockchain user node of the blockchain network creates and sends a world state checkpoint transaction to a plurality of endorser nodes, wherein the world state checkpoint transaction includes a request for world state verification to each of the plurality of endorser nodes; receiving, by a blockchain user node of the blockchain network, a plurality of endorsements of the world state checkpoint transaction from the plurality of endorser nodes; sending, by a blockchain user node of a blockchain network, a world state checkpoint transaction including the plurality of endorsements to an orderer node of the blockchain network for inclusion in a block by the orderer node; The current world state integrity of each of the multiple endorser nodes is verified by a blockchain user node of the blockchain network.
16. The non-transitory computer readable medium of claim 15, wherein the instructions, when read by the processor, cause the processor to further execute: In response to each of the plurality of endorsing nodes receiving the block from the orderer node, receiving, by a blockchain user node of the blockchain network, a signed hash value of a current world state from each of the plurality of endorsing nodes.
17. The non-transitory computer-readable medium of claim 16, wherein verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: Verifying the integrity of the current world state of each of the plurality of endorsing nodes based on the signed hash value of the current world state received from each of the endorsing nodes in response to each of the plurality of endorsing nodes receiving the block from the orderer node.
18. The non-transitory computer-readable medium of claim 17, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: identifying that the current world state of the endorsing node of the plurality of endorsing nodes is correct based on the signed hash value received from the endorsing node being the same as a majority of the signed hash values received from other endorsing nodes of the plurality of endorsing nodes; or Based on the signed hash value received from the endorser node being different than a majority of the signed hash values received from the other endorser nodes in the plurality of endorser nodes, identifying that a current world state of the endorser node in the plurality of endorser nodes is incorrect.
19. The non-transitory computer-readable medium of claim 18, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: Based on the identification, informing a majority of the endorsing nodes among the plurality of endorsing nodes that their current world state is a correct world state; or Based on the identification, a minority of the plurality of endorsing nodes are notified that their current world state is not a correct world state.
20. The non-transitory computer-readable medium of claim 19, wherein the verifying the integrity of the current world state of each of the plurality of endorsing nodes further comprises: The signed hash value of the current world state received from each of the endorsing nodes is compared with a majority of signed hash values received from the other endorsing nodes of the plurality of endorsing nodes via a consensus algorithm.
21. A computer system comprising modules respectively configured to execute the steps of the method according to any one of claims 8 to 14.
22. A computer program product, comprising a computer-readable storage medium, wherein program instructions are stored in the computer-readable storage medium, wherein the program instructions are executable by a processor to cause the processor to perform the method according to any one of claims 8 to 14.
Citation Information
Patent Citations
Blockchain based CA (Certificate Authority) management method, device and system
CN106384236A
Dynamic reordering of blockchain transactions to optimize performance and scalability
US20180158034A1
Hardware Blockchain Acceleration
US20180219671A1
Method and System for Tuning Blockchain Scalability, Decentralization, and Security for Fast and Low-Cost Payment and Transaction Processing
US20190018888A1
