Runtime self-correction of blockchain ledgers

By running the ledger verification thread on the blockchain node to identify and replace damaged data blocks, network problems caused by damaged data blocks in the blockchain are solved, and the self-healing and stability improvement of the blockchain network is achieved.

CN111868689BActive Publication Date: 2024-10-01INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980019518.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-03-27
Filing Date
2019-03-08
Publication Date
2024-10-01
Estimated Expiration
2039-03-08

AI Technical Summary

Technical Problem

Data blocks in the blockchain may be damaged due to malicious attacks, system failures or software errors, causing problems in the blockchain network that are difficult to detect and repair in a timely manner with existing technology.

Method used

Self-correction of data blocks is achieved by running ledger verification threads on blockchain nodes, identifying corrupted data blocks, and retrieving replacement data blocks from other accessible blockchain peers, replacing them based on the validity of the verified blocks. .

Benefits of technology

It realizes the self-healing ability of the blockchain network, reduces the functional impact of damaged data blocks on the blockchain system, and improves the reliability and stability of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111868689B_ABST
    Figure CN111868689B_ABST
Patent Text Reader

Abstract

Example operations may include one or more of identifying, via a ledger validation thread, a corrupted data block within a blockchain stored on a distributed ledger, selecting a blockchain peer from a plurality of blockchain peers that have access to the distributed ledger and retrieving a replacement data block from the selected peer, determining whether the replacement data block is valid based on one or more of previously stored validation blocks associated with the blockchain, and in response to determining that the replacement data block is valid, replacing the corrupted data block on the distributed ledger with the replacement data block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates generally to error detection, and more particularly to a computing node that automatically detects corrupted data blocks on a distributed ledger (e.g., a blockchain) at runtime and self-corrects the corrupted data blocks based on data stored on another computing node that shares the same distributed ledger. Background Art

[0002] A ledger is generally defined as a book of accounts that records transactions. Meanwhile, a distributed ledger is a digital ledger that can be replicated in whole or in part among multiple computing nodes. A distributed ledger can be protected by cryptographic properties, also known as a cryptographic distributed ledger (CDL). A CDL can have at least some of the following characteristics: irreversibility (e.g., once a transaction is recorded, it cannot be undone), accessibility (e.g., any party can access the CDL in whole or in part), chronological order and timestamping (e.g., all parties know when transactions were added to the ledger and in what order), consensus-based transactions (transactions are added only if they are generally agreed upon by all parties on the network), verifiability (all transactions can be cryptographically verified), and / or the like. A non-limiting example of a cryptographic distributed ledger is a blockchain.

[0003] Distributed ledgers, such as blockchains, typically store a continuously growing list of records. Although commonly used for financial transactions, blockchains can store other data, such as information related to goods and services (i.e., product, packaging, status, etc.), digital currencies, stocks, equity, software models, proprietary data, and other information. A decentralized scheme provides authority and trust to a decentralized network and enables its nodes to continuously and sequentially record their transactions on public or private "blocks," thereby creating a unique "chain" called a blockchain. Cryptography, through hash codes, is used to ensure the authentication of the source of transactions and remove central intermediaries. Distributed ledgers are protected from tampering and modification due to their immutable nature. For example, each block can contain a timestamp and a link to the previous block. Blockchains can be used to save, track, transfer, and verify information. Blockchain peers within a blockchain network can trigger transactions to the blockchain ledger through endorsement and consensus agreements with one or more other blockchain nodes, ensuring that one entity cannot change the blockchain ledger on its own.

[0004] Traditionally, blockchain peer nodes only append new data blocks to the blockchain ledger. That is, blockchain nodes typically only add new data blocks, rather than modifying or otherwise tampering with previously stored and existing data blocks. One of the reasons for this is because the nature of distributed ledgers is immutable, and an endorsement and consensus process is required before new data is added to the distributed ledger. However, data blocks in the blockchain ledger may become corrupted over time due to various reasons, such as malicious attacks, system failures, software errors, etc. Therefore, a mechanism for repairing unwanted blocks in the blockchain ledger is needed.

[0005] Therefore, there is a need in the art to address the aforementioned problems. Summary of the invention

[0006] Viewed from a first aspect, the present invention provides a computing system for managing corrupted data blocks, the system comprising: a memory storing a distributed ledger; and a processor configured to identify, via a ledger validation thread, a corrupted data block within a blockchain stored on the distributed ledger, select a blockchain peer from a plurality of blockchain peers that can access the distributed ledger, retrieve a replacement data block from the selected peer, determine whether the replacement data block is valid based on one or more of previously stored validation blocks associated with the blockchain, and in response to determining that the replacement data block is valid, replace the corrupted data block on the distributed ledger with the replacement data block.

[0007] Viewed from a first aspect, the present invention provides a method for managing corrupted data blocks, the method comprising: identifying, via a ledger validation thread, a corrupted data block within a blockchain stored on a distributed ledger; selecting a blockchain peer from a plurality of blockchain peers that can access the distributed ledger and retrieving a replacement data block from the selected peer; determining whether the replacement data block is valid based on one or more of previously stored validation blocks associated with the blockchain; and replacing the corrupted data block on the distributed ledger with the replacement data block in response to determining that the replacement data block is valid.

[0008] Viewed from another aspect, the present invention provides a computer program product for managing damaged data blocks, the computer program product comprising a computer-readable storage medium which can be read by a processing circuit and stores instructions executed by the processing circuit to perform a method for performing the steps of the present invention.

[0009] Viewed from another aspect, the invention provides a computer program stored on a computer readable medium and loadable into the internal memory of a digital computer, the computer program comprising software code portions for performing the steps of the invention when said program is run on a computer.

[0010] An example embodiment may provide a method comprising at least one of: identifying, via a ledger validation thread, a corrupted data block within a blockchain stored on a distributed ledger, selecting a blockchain peer from a plurality of blockchain peers that have access to the distributed ledger and retrieving a replacement data block from the selected peer, determining whether the replacement data block is valid based on one or more of previously stored validation blocks associated with the blockchain, and in response to determining that the replacement data block is valid, replacing the corrupted data block on the distributed ledger with the replacement data block.

[0011] Another example embodiment may provide a system comprising at least one memory storing a distributed ledger, and a processor configured to identify, via a ledger validation thread, a corrupted data block within a blockchain stored on the distributed ledger, select a blockchain peer from a plurality of blockchain peers that have access to the distributed ledger, retrieve a replacement data block from the selected peer, determine whether the replacement data block is valid based on one or more of previously stored validation blocks associated with the blockchain, and replace the corrupted data block on the distributed ledger with the replacement data block in response to determining that the replacement data block is valid.

[0012] Another example embodiment may provide a non-transitory computer-readable medium comprising instructions that, when read by a processor, cause the processor to perform at least one of the following operations: identifying, via a ledger validation thread, a corrupted data block within a blockchain stored on the distributed ledger, selecting a blockchain peer from a plurality of blockchain peers that can access the distributed ledger, retrieving a replacement data block from the selected peer, determining whether the replacement data block is valid based on one or more of previously stored validation blocks associated with the blockchain, and in response to determining that the replacement data block is valid, replacing the corrupted data block on the distributed ledger with the replacement data block. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Embodiments of the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which:

[0014] Figure 1A is a diagram illustrating a blockchain network including a plurality of blockchain peers according to an example embodiment.

[0015] Figure 1B is a diagram illustrating a ledger validation thread interacting with a distributed ledger according to an example embodiment.

[0016] Figure 2A is a diagram illustrating a peer node blockchain architecture configuration according to an example embodiment.

[0017] Figure 2B is a diagram illustrating transaction flow between blockchain nodes for self-correcting corrupted blocks according to example embodiments.

[0018] Figure 3 is a diagram illustrating a permissioned blockchain network according to an example embodiment.

[0019] Figure 4 is a diagram illustrating multiple examples of a ledger correction process according to an example embodiment.

[0020] Figure 5 is a flow chart illustrating a method for self-correcting a corrupted data block of a distributed ledger according to an example embodiment.

[0021] Fig. 6A is a diagram illustrating a physical infrastructure configured to perform various operations on a blockchain according to one or more operations described herein, according to an example embodiment.

[0022] Figure 6B is a diagram illustrating a smart contract configuration between contracting parties and an intermediary server configured to enforce the terms of the smart contract on a blockchain, according to an example embodiment.

[0023] Figure 7 is a diagram illustrating a computer system configured to support one or more example embodiments. DETAILED DESCRIPTION

[0024] It will be readily appreciated that the instant components, as generally described and illustrated in the figures herein, may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of embodiments of at least one of the methods, devices, 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 representative of selected embodiments only.

[0025] The instant features, structures, or characteristics described throughout the specification may be combined 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. Thus, throughout the specification, the appearance of the phrases "example embodiments," "in some embodiments," "in other embodiments," or other similar language does not necessarily all refer to the same set of embodiments, and the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0026] In addition, although the term "message" may have been used in the description of the embodiments, the present application can be applied to many types of network data, such as packets, frames, datagrams, etc. The term "message" also includes packets, frames, datagrams, and any equivalent thereof. In addition, although certain types of messages and signaling may be depicted in exemplary embodiments, they are not limited to specific types of messages, and the present application is not limited to specific types of signaling.

[0027] Conventionally, when multiple nodes implementing a distributed ledger reach consensus on a new block, blockchain peers simply modify the distributed ledger by appending or otherwise submitting the new data block to the existing blockchain. However, blockchain peers cannot verify previously stored blocks of the distributed ledger. In other words, blockchain peers cannot ensure that the distributed ledger is accurate. As a result, corrupted data blocks may exist in local copies of the distributed ledger, causing problems for the entire blockchain network.

[0028] Example embodiments provide methods, devices, networks, and / or systems that provide solutions to these problems by implementing a ledger verification thread that can verify previously stored blocks on a distributed ledger. The ledger verification thread can use a variety of different verification methods to detect when a data block has been corrupted. In response to identifying a corrupted data block, the ledger verification thread retrieves a replacement data block from another blockchain peer on the same channel, verifies the replacement data block, and replaces the corrupted data block with the verified replacement data block. Therefore, when one or more blocks on the ledger are corrupted due to malicious activity, software errors, hardware failures, etc., the ledger verification thread can self-repair (i.e., self-correct) the distributed ledger. Various triggers can initiate the runtime verification process, such as periodic time intervals, changes to the ledger, requests from administrators, etc. Although the description and drawings herein are described in terms of blockchain, the present application is equally applicable to any type of distributed ledger.

[0029] The ledger (also known as digital ledger, distributed ledger, immutable ledger, etc.) is a key component in a blockchain system as it contains a record of all transactions performed and committed by the blockchain network. The ledger also has other metadata such as signatures of transactions and hash values ​​of data blocks. Therefore, the flawlessness and integrity of the ledger are essential for the correct and efficient operation of the blockchain. In a typical blockchain network, each blockchain peer node maintains a complete copy of the ledger and stores it as a series of files on a storage medium, which is vulnerable to corruption. Corruption can occur due to a variety of reasons, for example, a malicious user may hack into a peer node and intentionally modify the files storing the ledger, hardware failure may occur, software errors may corrupt the ledger files, etc.

[0030] In many blockchain systems such as Hyperledger Fabric, the way a peer node works is that it only appends new blocks to the end of the ledger and does not periodically validate the existing blocks in the ledger. As a result, corrupted blocks in the ledger cannot be detected in a timely manner, which can be detrimental to the blockchain system for many reasons. For example, at the time of peer startup, the peer may not be able to start due to a corrupted ledger. As another example, during peer runtime, when a blockchain analytics workload is running in a peer node and needs to access a transaction in a corrupted block, it will not be able to successfully access the transaction. Therefore, the analytics workload may fail due to the presence of a corrupted block.

[0031] In order to reduce the impact of damaged blocks on the functionality of a blockchain system, example embodiments are directed to a runtime self-correction mechanism for a digital ledger (e.g., a blockchain ledger). According to various aspects, an independent thread (i.e., a ledger verification thread) is periodically run on a peer node and verifies blocks in the peer ledger. If a damaged block is detected, the ledger verification thread can select another peer (i.e., peer P2) that may have a correct version of the damaged block and request a replacement block from the other peer. After receiving the request, P2 can verify the requesting peer and send the corresponding block if the requesting peer is legitimate. Then, after receiving the replacement block, P1 verifies the block and replaces the damaged block if the received block is valid. Otherwise, when the block received from P2 is invalid, P1 may ask a different peer (i.e., P3) for the same block. The system is provided in a manner that allows a user (e.g., an administrator, etc.) to configure the ledger verification thread in many ways, such as how often the thread runs and which part of the ledger needs to be verified.

[0032] Unlike the ledger, which is a set of files on a storage medium, the ledger verification thread is a program that runs in the memory of a blockchain peer or is otherwise connected to a blockchain peer. The compiled code of the program can be stored separately from the ledger. The specific details may depend on the implementation. For example, if the ledger verification thread is implemented as part of the peer, the ledger verification thread program can be protected in the same way as the peer program (i.e., stored in an isolated location in a secure container). As another example, if the ledger verification thread is implemented as an independent program, the ledger verification thread can have a security configuration that is independent of the peer program, allowing administrators to configure higher security settings. In either case, the ledger verification thread program may be completely separated from the ledger, and the cause of damage or misbehavior will not be able to access the program. Similarly, the ledger verification thread may be completely hidden from users who conduct transactions on the blockchain. That is, blockchain users cannot interact with the thread, but blockchain administrators can configure the mechanism and start and stop it.

[0033] If the ledger validation thread is implemented as part of the peer, the ledger validation thread program can be installed (added) as part of the peer code and started and stopped with the peer. As another example, if the ledger validation thread is implemented as a standalone program, an administrator can use the thread as a standalone software to connect to the ledger and run algorithms on demand. In addition, if the ledger validation thread is implemented as part of the peer, the validation can be a background process / thread and can be triggered in a variety of possible ways, including but not limited to: (1) the thread periodically validates the ledger, so that the thread will be triggered after a specific period of time after the last scan is completed, (2) the thread may be triggered when the peer node's resource (i.e., CPU, memory, etc.) utilization falls below a threshold, and (3) the thread can be explicitly triggered by an administrator. If the ledger validation thread is implemented as a standalone program, the administrator can run the ledger validation thread on demand.

[0034] Figure 1A A blockchain network 100 including a plurality of blockchain peers is shown according to an example embodiment. Figure 1A In the example of , the network 100 includes blockchain nodes 110, 112, 114, 116, and 118, and 120, which are connected via a network 130 such as the Internet, a private network, etc. In this example, any node (110-120) can play one or more roles, such as a peer, an endorser, a subscriber, etc. According to various aspects, any of the nodes 110-120 can have a ledger validation thread installed and running therein to verify / validate data blocks of the distributed ledger stored by the corresponding node.

[0035] For example, the blockchain node 110 may cause a ledger verification thread therein to execute to verify a copy of a distributed ledger stored by the blockchain node 110. When the ledger verification thread determines that there is a damaged block, the ledger verification thread may cause the blockchain node 110 to send a request for a replacement block to any of the other nodes 112, 114, 116, 118, and 120. In response, a replacement block may be obtained, and the blockchain node 110 may verify the replacement block. When the verification is successful, the blockchain node 110 may replace the damaged block with the replacement block. However, if the verification is unsuccessful, the blockchain node 110 may request a replacement block from another node.

[0036] Figure 1BA ledger validation thread 160 is shown interacting with a distributed ledger 180 according to an example embodiment. In this example, both the ledger validation thread 160 (i.e., program code and compiled code) and the files of the distributed ledger 180 are stored in the memory 150, so that the ledger validation thread 160 and the distributed ledger 180 are isolated from each other. According to various embodiments, the ledger validation thread 160 may include a program running on a blockchain peer node that checks the integrity of the distributed ledger 180 on the peer node. The ledger validation thread 160 may include: a corruption detector module 162 for detecting one or more corrupted data blocks on the ledger; an affected block module 164 for detecting which blocks on the ledger are affected; a requester module 166 for retrieving a correct block for the corrupted block from one or more neighboring peer nodes, and a replacer module 168 for replacing at least the corrupted data block (and possibly other trailing data blocks) with a replacement data block.

[0037] The corrupt block detector module 162 can implement various corruption detection processes. A peer can contain many ledgers, and each ledger is logically organized in a linked list. Each item in the linked list represents a block, and different blocks in the same ledger are connected by hash pointers. Each block includes a header part and a data part. The block header contains the hash value of the previous block. Basically, if the following condition is met: hash(B) == nextBlock.Header.prevBlockHash, then block B is considered valid. Otherwise, block B is considered a corrupted block.

[0038] According to various embodiments, one or more of a variety of methods may be used to detect corrupted blocks in the ledger. For example, at 171, corruption detection may include sequentially scanning the ledger and verifying each block by comparing hash values, which may be CPU intensive.

[0039] As another example, corruption detection may include performing a bit-by-bit comparison of the ledger and its backup, which has been previously stored in memory 150, in step 172. This method can compare the ledger and its backup in a streaming manner, which is faster than computing hash values. However, the ledger backup may not always be available and is vulnerable to attack.

[0040] As another example, at 173, corruption detection can be based on pre-fetching data blocks from the access pattern of the analyzed workload based on the current request block, etc. In this example, some blocks can be pre-fetched and verified. The pre-fetch operation can be based on heuristic information that tells the relationship between blocks. Based on this heuristic method, when a block is accessed, related blocks are pre-fetched and verified. For example, the heuristic can be based on the locality principle of block access, which observes that when a block is accessed, there is a high probability that nearby blocks will be accessed in the near future.

[0041] As another example, at 174, the corruption detector may implement a checksum algorithm (e.g., a cyclic redundancy check (CRC), etc.) to verify the block. The method may create a checksum for each block and use the checksum to verify the block. A fast checksum generation algorithm (e.g., CRC) is faster than calculating a hash value of the block. But the checksum data is also vulnerable to attacks. The CRC may work differently from a hash-based method. In this case, the CRC algorithm may be used to create a parallel list of block sums. These sums will be checked instead of hashes. The benefit of this is that the speed of this method is higher. Since the data is kept in the memory of the checking algorithm and the processing program, this data is not vulnerable to attacks that the ledger is vulnerable to.

[0042] As another example, corruption detection can randomly select some blocks, but not all, for validation in 175. This approach consumes less CPU than validating the entire ledger, but it is a probabilistic approach that cannot guarantee the correctness of every block in the ledger.

[0043] When receiving a replacement block, the peer may determine the validity of the block in different ways, including using a hash of the block stored in a subsequent block, which may be the default blockchain action. As another example, the peer may use a hash of the block stored in the peer's memory. In this example, the peer may obtain this hash when it traverses and verifies the peer at startup.

[0044] It should also be understood that peers can be selected in different ways. For example, when a block is detected as a corrupted block, the peer (i.e., peer 1) needs to contact another peer to obtain the correct block. In order to obtain better performance of the ledger correction process, the peer can select another peer with a better network connection. Peers can span different locations, and the quality of the network between different peers can sometimes vary. A better network connection speeds up block transfers, which can improve the performance of the ledger correction process. For example, the quality of the network connection can be measured by the latency of "ping". As another example, a peer can select another peer that is not so busy. The workloads running on different peer nodes are different. For example, in Hyperledger Fabric, some peer nodes only submit blocks, while some other peer nodes also need to simulate transactions. Therefore, it is better to select a peer node that runs a less intensive workload so that the peer node can respond to requests faster, which can also improve the performance of the ledger correction process.

[0045] As described herein, a blockchain is a distributed system that includes multiple nodes that communicate with each other. The blockchain runs programs called chaincodes (e.g., smart contracts, etc.), saves state and ledger data, and executes transactions. Some transactions are operations invoked on chaincodes. Typically, blockchain transactions must be "approved" by certain blockchain members, and only approved transactions can be submitted to the blockchain and affect the state of the blockchain. Other unapproved transactions will be ignored. There may be one or more special chaincodes for managing functions and parameters, collectively referred to as system chaincodes.

[0046] A node is a communication entity of a blockchain system. A "node" can perform a logical function in the sense that multiple nodes of different types can run on the same physical server. Nodes are grouped in trust domains and are associated with logical entities that control them in various ways. Nodes can include different types, such as client or submitting client nodes, which submit transaction calls 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 a copy of the state and 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 every peer node in the system when submitting transactions and modifying the world state of the blockchain, which is another name for the initial blockchain transaction, which usually contains control and setup information.

[0047] As described herein, a ledger is an ordered, tamper-proof record of all state transitions of a blockchain. State transitions can be caused by chaincode invocations (i.e., transactions) submitted by participating parties (e.g., client nodes, ordering nodes, endorser nodes, peer nodes, etc.). A transaction may result in a set of asset key-value pairs being submitted to the ledger as one or more operands (e.g., create, update, delete, etc.). The ledger includes a blockchain (also called a chain) that is used to store immutable sequential records in blocks. The ledger also includes a state database that is used to maintain the current state of the blockchain. There is typically one ledger per channel. Each peer node maintains a copy of the ledger for each channel it belongs to.

[0048] A chain is a transaction log that is structured as hash-linked blocks, and each block contains a sequence of N transactions, where N is equal to or greater than 1. The block header includes the hash of the block's transactions, as well as the hash of the previous block's 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 links. The hash of the most recently added block of the blockchain represents every transaction that occurred before that block on the chain, ensuring that all peer nodes are in a consistent and trusted state. The chain can be stored on the peer node file system (i.e. local, attached storage, cloud, etc.), effectively supporting the append-only nature of blockchain workloads.

[0049] The current state of the immutable ledger represents the latest values ​​of all keys included in the chain's transaction log. Because the current state represents the latest key values ​​known to the channel, it is sometimes referred to as the world state. Chaincode invocations execute transactions against the current state data of the ledger. In order for these chaincode interactions to be 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.

[0050] 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. (Four nodes are described by way of example only). These nodes participate in many activities, such as blockchain transaction addition and verification processes (consensus). One or more of the blockchain nodes 204-210 may endorse transactions and may provide ordering 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 that are linked to an application programming interface (API) 222 to access and execute stored program / application code 220 (e.g., chain code, smart contracts, etc.), which may be created based on the custom 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 by attaching it to the distributed ledger.

[0051] The blockchain foundation or platform 212 may include various layers of blockchain data, services (e.g., cryptographic trust services, virtual execution environments, etc.), and may be used to receive and store new transactions and provide access to auditors who are 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 physical infrastructure 214. Cryptographic trust services 218 may be used to verify transactions such as asset exchange transactions and keep information private.

[0052] Figure 2A The blockchain architecture configuration can process and execute program / application code 220 through 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 with conditions or other code elements for their execution. As a non-limiting example, smart contracts can be created to perform reminders, updates, and / or other notifications about changes, updates, etc. The smart contract itself can be used to identify rules related to authorization, access requirements, and use of the ledger. For example, information 226 can be processed by one or more processing entities (e.g., virtual machines) included in the blockchain layer 216. Result 228 can include data blocks added to the ledger. Physical infrastructure 214 can be used to retrieve any data or information described herein.

[0053] Within chaincode, smart contracts can be created by high-level applications and programming languages ​​and then written into blocks in the blockchain. Smart contracts can include executable code that is registered, stored, and / or replicated to a blockchain (e.g., a distributed network of blockchain peers). A transaction is the execution of smart contract code that can be executed in response to the satisfaction of a condition associated with a smart contract. The execution of a smart contract can trigger trusted modifications to the state of a digital blockchain ledger. Modifications to the blockchain ledger caused by the execution of a smart contract can be automatically replicated throughout the distributed network of blockchain peers through one or more consensus protocols.

[0054] 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 maintained as private. Temporary data used / generated by smart contracts is kept in memory by the provided execution environment and deleted once the data is identified as required by the blockchain.

[0055] A chaincode may include a code interpretation of a smart contract with additional features. As described herein, a chaincode may be a program code deployed on a computing network where chaincode validators execute and validate together in 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 value of the hashed identifier matches the hash value 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.

[0056] Figure 2B 250 is shown, according to an example embodiment, a transaction flow between blockchain nodes for self-correcting corrupted blocks. In this example, the blockchain node 204 automatically detects and self-repairs corrupted data blocks on a distributed ledger managed by the blockchain node 204. Here, the corrupted ledger may be a local copy stored by the blockchain node 204. In 231, the ledger verification thread running on the blockchain node 204 uses the above Figure 1B171-175 of 171-175 to perform the ledger verification process. In 232, the ledger verification thread on the blockchain node 204 detects a damaged block. In 233, the blockchain node 204 identifies and selects the blockchain node 206 from which to receive the replacement block, and sends a request for the replacement block, which may include the ID of the damaged block and may also include the ID of one or more trailing blocks. When the request arrives at the blockchain node 206, it may not be processed by the ledger verification thread of the blockchain node 206, but may be processed by a built-in routine / function that exists in Hyperledger Fabric and listens for such requests and returns the corresponding block.

[0057] In 234, the selected blockchain node 206 uses one or more cryptographic keys, block data, etc. to verify the blockchain node 204 from which the request was received, and sends the replacement block to the blockchain node 204. Here. The blockchain node 204 verifies the damaged block in 235, and if the block is valid, the blockchain node 204 can replace the damaged block with the replacement block received from the blockchain node 206. However, in this example, in 236, the ledger verification thread of the blockchain node 204 determines that the replacement block is invalid. Therefore, in 236, the ledger verification thread selects the next blockchain node 208, and in 237, causes the blockchain node 204 to send a request for a replacement block to the next blockchain node 208. In 238, the blockchain node 208 verifies the blockchain node 204 and sends a copy of the replacement block requested by the blockchain node 204. In 239, the ledger verification thread executed on the blockchain node 204 confirms the validity of the replacement block and replaces the damaged block in 240.

[0058] Figure 3 An example of a permissioned blockchain network 300 is shown, featuring a distributed, decentralized peer architecture and a certificate authority 318 that manages user roles and permissions. In this example, a blockchain user 302 can submit a transaction to a permissioned blockchain network 310. In this example, the transaction can be a deployment, call, or query, and can be issued directly through a REST API or the like by a client application utilizing an SDK. The trusted business network can provide access to a regulator system 314 such as an auditor (e.g., the Securities Commission in the U.S. stock market). At the same time, the blockchain network operator system of node 312 manages member permissions, such as registering the regulator system 310 as an "auditor" and registering the blockchain user 302 as a "client." Auditors may be limited to querying the ledger, while clients may be authorized to deploy, call, and query certain types of chaincodes.

[0059] The blockchain developer system 316 writes chaincodes and client applications. The blockchain developer system 316 can deploy chaincodes directly to the network through a REST interface. In order to include credentials from a traditional data source 330 in the chaincode, the developer system 316 can use an out-of-band connection to access the data. In this example, the blockchain user 302 connects to the network through a peer node 312. Before conducting any transactions, the peer node 312 retrieves the user's registration and transaction certificates from the certificate authority 318. In some cases, blockchain users must have these digital certificates in order to conduct transactions on the permissioned blockchain network 310. At the same time, users trying to drive chaincodes may need to verify their credentials on the traditional data source 330. In order to confirm the user's authorization, the chaincode can use an out-of-band connection to the data through the traditional processing platform 320.

[0060] Figure 4 Multiple examples of a ledger correction process according to an example embodiment are shown. In this example, blockchain ledger 400 consists of multiple files including three files (i.e., files 1, 2, and 3). In this example, the ledger verification thread detects a corrupted data block (block A) stored in the second file (file 410). In a blockchain system such as Hyperledger Fabric, the ledger is physically organized into multiple fixed-size files, and the blocks are stored in these files in a continuous manner. Figure 4 As shown in the example of , block A in the second file 410 is detected as a corrupted block. Meanwhile, block A' is a correct block that has been retrieved from another peer and verified. If the size of block A is not equal to the size of block A', simply replacing block A with block A' may overwrite block B or leave a gap between blocks A and B (and cause problems for any trailing blocks other than block B). Therefore, the ledger correction process can first determine / check whether the size of the second file 410 has changed.

[0061] like Figure 4 As shown in the example of , the ledger correction process performed by the ledger verification thread can replace all blocks after block A in the second file 410. For example, in process 411, the ledger correction process replaces blocks A, B, and C because the size of data block A is smaller than it should be. At the same time, in the example of process 412, the ledger correction process replaces blocks A, B, and C because the size of data block A is larger than it should be. Otherwise, when the size of data block A does not change (and does not change the overall size of the file), only block A can be overwritten.

[0062] As will be appreciated, blocks are stored in files in a file system. Typically, a file contains a series of consecutive blocks. Therefore, if a malicious user opens a file containing block A and adds some random bytes from that file to where block A is located, block A will become larger, as is the case in process 412. Similarly, if a malicious user deletes some of the bytes in the file, the size of block A will become smaller as is the case in process 411. When replacing data block A with data block A', block A and block A' need to start at the same offset in the file, however, the size of block A' is larger than the size of block A, and block A and block B are adjacent in the original ledger file. Therefore, if only block A' is used to replace block A, a portion of block B will be overwritten by block A', which is unacceptable.

[0063] As another example, if block A is corrupted and becomes larger, replacing only block A with block A` will leave a file hole between block A` and block B, which also destroys the integrity of the ledger. In addition, when block A is corrupted and becomes larger or smaller, this will offset all subsequent blocks in the file. Therefore, in this case, although only block A is corrupted, all subsequent blocks in that particular file (i.e., block B and block C in this example) should still be replaced to ensure the integrity of the entire ledger. Therefore, even if blocks B and C are not corrupted, in order to correct the entire file, these blocks need to be rewritten in their entirety in the correct order to ensure the continuity of the file.

[0064] Meanwhile, in the third case of process 413, block A is damaged, but its size remains unchanged. In other words, the size of block A' is equal to the size of block A, and the offsets of all subsequent blocks in this file remain unchanged. Therefore, the damaged block A can be repaired by simply replacing block A with block A'. Meanwhile, block B is not overwritten, and there is no file hole between block A' and block B.

[0065] Figure 5 A method 500 for self-correcting a corrupted data block of a distributed ledger according to an example embodiment is shown. For example, the method 500 may be performed by a computing node such as a blockchain peer node that may be implemented by a cloud platform, a server, a desktop computer, a user device, etc. Figure 5 In 510, the method may include identifying, via a ledger validation thread, a corrupted data block within a blockchain stored on a distributed ledger. For example, the ledger validation thread may include a program running in memory having compiled code stored separately from files comprising the distributed ledger. The distributed ledger files may be isolated or hidden from users / nodes interacting with the distributed ledger.

[0066] According to various aspects, one or more corrupted data blocks may be detected by any of a variety of methods. For example, identifying the corrupted data blocks via the ledger verification thread may include sequentially scanning the data blocks of the distributed ledger, and verifying the sequentially scanned data blocks based on respective hash values ​​of the sequentially scanned data blocks generated at runtime to identify the corrupted data blocks. As another example, identifying the corrupted data blocks via the ledger verification thread may include: comparing the distributed ledger with a backup copy of the distributed ledger bit by bit to identify the corrupted data blocks based on the bit by bit. As another example, identifying the corrupted data blocks via the ledger verification thread may include: pre-fetching data blocks from the distributed ledger based on a block access pattern associated with a data block currently selected from the distributed leger; and pre-fetching data blocks based on respective hash values ​​of the pre-fetched data blocks to identify the corrupted data blocks from the pre-fetched data blocks. As another example, identifying the corrupted data blocks via the ledger verification thread may include: sequentially verifying the data blocks of the distributed ledger based on previously generated checksum values ​​of the respective data blocks to identify the corrupted data blocks based on the checksum values. As another example, identifying the corrupted data blocks via the ledger verification thread may include: randomly selecting data blocks from the distributed ledger; and verifying the randomly selected data blocks based on respective hashes of the randomly selected data blocks to identify the corrupted data blocks from the randomly selected data blocks.

[0067] At 520, the method may include selecting a blockchain peer from a plurality of blockchain peers that have access to the distributed ledger, and retrieving a replacement data block from the selected peer. The peer may be selected randomly, or the peer may be selected based on one or more attributes, such as current throughput, location, current workload, type of blockchain peer (e.g., endorsement node, organization node, peer node, etc.), etc. At 530, the method may include determining whether the replacement data block is valid based on one or more of previously stored validation blocks associated with the blockchain, and at 540, the method may include, in response to determining that the replacement data block is valid, replacing the damaged data block with the replacement data block on the distributed ledger. In some embodiments, the previously stored validation block may be a block that has been previously stored in a backup copy of the ledger of a blockchain node executing a ledger validation thread. As another example, the replacement data block may be validated based on a hash value of a block obtained from a subsequent data block in the blockchain.

[0068] In some embodiments, the corrupted block may change the size of the original block, thereby creating a change to the size of the ledger. Therefore, simply replacing the corrupted block may leave a hole in the ledger (i.e., when the corrupted block is small) or overwrite a portion of an adjacent block (i.e., when the corrupted block is large). Therefore, in some embodiments, the method may further include: when it is determined that the corrupted data block has changed the block size of its original data block, retrieving a replacement data block for one or more subsequent data blocks in the blockchain on the distributed ledger.

[0069] Fig. 6A An example physical infrastructure configured to perform various operations on a blockchain according to one or more example operating methods of example embodiments is shown. Fig. 6A , the exemplary configuration 600A includes a physical infrastructure 610 with a blockchain 620 and a smart contract 640, which can perform any operation steps 612 included in any exemplary embodiment. Steps / operations 612 may include one or more steps described or depicted in one or more flow charts and / or logic diagrams. These steps may represent output or written information written or read from one or more smart contracts 640 and / or blockchains 620 residing on the physical infrastructure 610 of the computer system configuration. Data may be output from the executed smart contracts 640 and / or blockchains 620. The physical infrastructure 610 may include one or more computers, servers, processors, memories, and / or wireless communication devices.

[0070] Figure 6B An example smart contract configuration between a contracting party and an intermediary server, configured to enforce smart contract terms on a blockchain, is shown according to an example embodiment. Figure 6B , configuration 650B may represent a communication session, an asset transfer session, or a process or procedure driven by a smart contract 640 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 640 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 as a blockchain transaction.

[0071] 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 embedded 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.

[0072] An exemplary storage medium may be coupled to a processor such that the processor can read information from the storage medium and write information to the storage medium. Alternatively, the storage medium may be integrated with the processor. The processor and the storage medium may reside in an application specific integrated circuit ("ASIC"). In an alternative, the processor and the storage medium may reside as discrete components. For example, Figure 7 An example computer system architecture 700 is shown, which may represent or be integrated in any of the above components, and the like.

[0073] Figure 7 No limitation on the scope of use or functionality of embodiments of the application described herein is intended to be implied. Regardless, computing node 700 is capable of being implemented and / or performing any of the functionality set forth above.

[0074] In computing node 700, there is a computer system / server 702, which can operate with many other general or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations that may be suitable for use with computer system / server 702 include, but are not limited to, personal computer systems, server computer systems, thin clients, fat clients, 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 that include any of the above systems or devices, etc.

[0075] Computer system / server 702 may be described in the general context of computer system executable instructions (e.g., program modules) executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform specific tasks or implement specific abstract data types. Computer system / server 702 may be practiced in a distributed cloud computing environment where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in local and remote computer system storage media including memory storage devices.

[0076] like Figure 7 As shown, the computer system / server 702 in the cloud computing node 700 is shown in the form of a general-purpose computing device. The components of the computer system / server 702 may include, but are not limited to, one or more processors or processing units 704, a system memory 706, and a bus that couples various system components including the system memory 706 to the processor 704.

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

[0078] Computer system / server 702 generally includes various computer system readable media. Such media can be any available media accessible to computer system / server 702, and it includes volatile and non-volatile media, removable and non-removable media. In one embodiment, system memory 706 implements the flow charts of other figures. System memory 706 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 710 and / or cache memory 712. Computer system / server 702 can further include other removable / non-removable, volatile / non-volatile computer system storage media. As an example only, a storage system 714 can be provided for reading and writing non-removable non-volatile magnetic media (not shown and generally referred to as "hard drive"). Although not shown, a disk drive for reading and writing from a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive (such as a CD-ROM, DVD-ROM or other optical media) for reading or writing from a removable non-volatile optical disk can be provided. In this case, each can be connected to the bus through one or more data media interfaces. As will be further depicted and described below, the memory 706 may include at least one program product having a set of program modules (eg, at least one) configured to perform the functions of various embodiments of the present application.

[0079] A program / utility 716 having a set (at least one) of program modules 718, as well as an operating system, one or more application programs, other program modules, and program data may be stored in the memory 706 by way of example and not limitation. Each or some combination of the operating system, one or more application programs, other program modules, and program data may include an implementation of a networking environment. The program modules 718 generally perform the functions and / or methods of the various embodiments of the present application described herein. For example, one or more program modules 718 may implement the ledger verification thread described herein to verify and self-correct the distributed ledger when corrupted data is detected.

[0080] As will be appreciated by those skilled in the art, aspects of the present application may be embodied as systems, methods, or computer program products. Therefore, 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 (generally all of which may be referred to herein as "circuits," "modules," or "systems"). In addition, aspects of the present application may take the form of a computer program product contained in one or more computer-readable media, on which a computer-readable program code is contained.

[0081] The computer system / server 702 may also communicate with one or more external devices 720 (e.g., keyboards, pointing devices, displays 722, etc.), one or more devices that enable a user to interact with the computer system / server 702, and / or any device that enables the computer system / server 702 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may occur via an I / O interface 724. However, the computer system / server 702 may still communicate with one or more networks (e.g., a local area network (LAN), a general wide area network (WAN), and / or a public network (e.g., the Internet)) via a network adapter 726. As shown, the network adapter 726 communicates with other components of the computer system / server 702 via a bus. It should be understood that, although not shown, other hardware and / or software components may be used in conjunction with the computer system / server 702. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archive storage systems.

[0082] According to various embodiments, the memory 706 may store a local copy of a distributed ledger that is stored and replicated between multiple nodes in a blockchain network such as a blockchain peer. At the same time, the processor 704 may be configured to identify a corrupted data block within a blockchain stored on the distributed ledger via a ledger validation thread, select a blockchain peer from a plurality of blockchain peers having access to the distributed ledger, retrieve a replacement data block from the selected peer, determine whether the replacement data block is valid based on one or more of the previously stored validation blocks associated with the blockchain, and replace the corrupted data block with the replacement data block on the distributed ledger in response to determining that the replacement data block is valid. For example, the processor 704 may execute a ledger validation thread that controls a processor, an operating system, hardware (network interface 726, etc.) to perform a corrupted data detection and replacement process.

[0083] Although illustrated in the drawings, and described in the foregoing detailed description, exemplary embodiments of at least one of the systems, methods, and non-transitory computer-readable media, it should be understood that the present application is not limited to the disclosed embodiments, but can be rearranged, modified, and replaced as set forth and defined by the following claims. For example, the capabilities of the systems of the various drawings can be performed by one or more of the modules or components described herein or in a distributed architecture, and can include a transmitter, a receiver, or a pair of both. For example, all or part of the functions performed by each module can be performed by one or more of these modules. In addition, the functions described herein can be performed at various times inside or outside the module or component and in relation to various events. Moreover, the information sent between various modules can be sent between each module via at least one of the following: a data network, the Internet, a voice network, an Internet protocol network, a wireless device, a wired device, and / or through a variety of protocols. Moreover, messages sent or received by any module can be sent or received directly and / or via one or more other modules.

[0084] Those skilled in the art will appreciate that a "system" may be embodied as a personal computer, server, console, personal digital assistant (PDA), cell phone, tablet computing device, smart phone, or any other suitable computing device or combination of devices. Presenting the above functions as being performed by a "system" is not intended to limit the scope of the present application in any way, but is intended to provide an example of many embodiments. In fact, the methods, systems, and apparatus disclosed herein may be implemented in local and distributed forms consistent with computing technology.

[0085] It should be noted that some of the system features described in this specification have been presented as modules in order to more particularly emphasize their implementation independence. For example, a module may be implemented as a hardware circuit comprising a custom very large scale integrated circuit (VLSI) circuit or gate array, an off-the-shelf semiconductor such as a logic chip, a transistor, or other discrete components. A module may also be implemented in a programmable hardware device such as a field programmable gate array, a programmable array logic, a programmable logic device, a graphics processing unit, etc.

[0086] Modules may also be implemented, at least in part, with software executed by various types of processors. The identified executable code unit may, for example, include one or more physical or logical blocks of computer instructions, which may, for example, be organized as objects, processes, or functions. However, the executable files of the identified modules do not need to be physically located together, but may include different instructions stored in different locations, which, when logically combined together, include the modules and achieve the purpose of the modules. In addition, modules may be stored on a computer-readable medium, which may be, for example, a hard drive, a flash memory device, a random access memory (RAM), a magnetic tape, or any other such medium for storing data.

[0087] In fact, the module of executable code can be a single instruction or multiple instructions, and can even be distributed among multiple different code segments, different programs, and across multiple storage devices. Similarly, operational data can be identified and shown in the module herein, and can be embodied in any suitable form and can be organized in any suitable data structure type. Operational data can be collected as a single data set, or can be distributed in different locations including different storage devices, and can exist at least partially only as electronic signals on a system or network.

[0088] It will be readily understood that the components of the present application may 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 merely represents selected embodiments of the present application.

[0089] Those skilled in the art will readily appreciate that the above content may be practiced with steps in a different order and / or with hardware elements in a configuration different from that disclosed. 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 constructions will be apparent.

[0090] Although preferred embodiments of the present application have been described, it should be understood that the described embodiments are merely exemplary and that the scope of the present application is limited solely by the appended claims when considering all equivalents and modifications thereof (e.g., protocols, hardware devices, software platforms, etc.).

Claims

1. A computing system for managing corrupted data blocks, the system comprising: Storage for storing distributed ledgers; as well as a processor configured to identify, via a ledger validation thread, a corrupted data block within a blockchain stored on the distributed ledger, selecting a blockchain peer from a plurality of blockchain peers that have access to the distributed ledger, Retrieve the replacement data block from the selected peer, determining whether the replacement data block is valid based on a hash value stored in a subsequent data block of the damaged data block in the blockchain, In response to determining that the replacement data block is valid, the damaged data block is replaced on the distributed ledger using the replacement data block.

2. The computing system of claim 1, wherein: The ledger validation thread includes a program running in the memory and having compiled code stored separately from files constituting the distributed ledger.

3. The computing system of claim 1 or 2, wherein: The processor is further configured to retrieve a replacement data block for a subsequent data block in the blockchain when it is determined that the corrupted data block has changed a block size of its original data block.

4. The computing system of claim 1 or 2, wherein: The processor is configured to sequentially scan data blocks of the distributed ledger and verify the sequentially scanned data blocks to identify the corrupted data blocks based on respective hash values ​​of the sequentially scanned data blocks generated at runtime.

5. The computing system of claim 1 or 2, wherein: The processor is configured to compare the distributed ledger bit by bit with a backup copy of the distributed ledger to identify the corrupted data block based on the bit by bit comparison.

6. The computing system of claim 1 or 2, wherein: The processor is configured to pre-fetch data blocks from the distributed ledger based on a block access pattern associated with a data block currently selected from the distributed ledger, and to verify the pre-fetched data blocks according to respective hash values ​​of the pre-fetched data blocks to identify the corrupted data block from the pre-fetched data blocks.

7. The computing system of claim 1 or 2, wherein: The processor is configured to sequentially verify data blocks of the distributed ledger based on previously generated checksum values ​​of respective data blocks to identify the corrupted data blocks based on the checksum values.

8. The computing system of claim 1 or 2, wherein: The processor is configured to randomly select data blocks from the distributed ledger and verify the randomly selected data blocks based on respective hash values ​​of the randomly selected data blocks to identify the corrupted data blocks from the randomly selected data blocks.

9. A method for managing damaged data blocks, the method comprising: identifying, via a ledger validation thread, corrupted blocks of data within a blockchain stored on a distributed ledger; selecting a blockchain peer from a plurality of blockchain peers that have access to the distributed ledger and retrieving the replacement data block from the selected peer; determining whether the replacement data block is valid based on a hash value stored in a subsequent data block of the damaged data block in the blockchain; as well as In response to determining that the replacement data block is valid, the damaged data block is replaced on the distributed ledger using the replacement data block.

10. The method of claim 9, wherein: The ledger validation thread includes a program running in memory and having compiled code stored separately from files constituting the distributed ledger.

11. The method according to claim 9 or 10, wherein: The retrieving further includes: when it is determined that the damaged data block has changed the block size of its original data, retrieving a replacement data block for a subsequent data block in the blockchain.

12. The method according to claim 9 or 10, wherein: The identifying, via the ledger verification thread, a corrupted data block within a blockchain stored on a distributed ledger comprises: sequentially scanning data blocks of the distributed ledger; and verifying the sequentially scanned data blocks based on respective hash values ​​of the sequentially scanned data blocks generated at runtime to identify the corrupted data block.

13. The method according to claim 9 or 10, wherein: The identifying, via the ledger validation thread, a corrupted data block within a blockchain stored on a distributed ledger includes comparing the distributed ledger bit-by-bit with a backup copy of the distributed ledger to identify the corrupted data block based on the bit-by-bit comparison.

14. The method according to claim 9 or 10, wherein: The identifying, via the ledger validation thread, a corrupted data block within a blockchain stored on a distributed ledger includes pre-fetching data blocks from the distributed ledger based on a block access pattern associated with a data block currently selected from the distributed ledger, and validating the pre-fetched data blocks according to respective hash values ​​of the pre-fetched data blocks to identify the corrupted data block from the pre-fetched data blocks.

15. The method according to claim 9 or 10, wherein: The identifying, via the ledger validation thread, a corrupted data block within a blockchain stored on a distributed ledger includes sequentially validating data blocks of the distributed ledger based on previously generated checksum values ​​of respective data blocks to identify the corrupted data block based on the checksum values.

16. The method according to claim 9 or 10, wherein: Identifying, via a ledger verification thread, a corrupted data block within a blockchain stored on a distributed ledger includes randomly selecting a data block from the distributed ledger and verifying the randomly selected data block based on respective hash values ​​of the randomly selected data block to identify the corrupted data block from the randomly selected data blocks.

17. A computer-readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit to perform the method of any one of claims 9 to 16.

18. A computer program product comprising instructions for executing the method according to any one of claims 9 to 16 when the instructions are run on a computer.