Technical Field
This disclosure relates generally to transaction processing using highly-scalable, decentralized peer-to-peer (P2P) networks, known as blockchains.
Background of the Related Art
Blockchain is a type of business transaction ledger. A blockchain network is a decentralized system for the exchange of assets. It uses a shared ledger (that is either public or private) for recording the history of electronic business transactions that take place in a peer-to-peer (P2P) business network. A blockchain network uses a decentralized consensus mechanism or protocol. In particular, all validating nodes in the network run the same (agreed-upon) consensus algorithm against the same transactions, and thus validate (or invalidate) each transaction. Valid transactions update the ledger. A blockchain peer-to-peer network is resilient given its decentralized topology. As member nodes join or leave the network dynamically, messages are exchanged between the network participants on a best-effort broadcast basis.
A blockchain is a permanent digitized chain of transactions, grouped into blocks, that ensures that participants cannot tamper with or deny past transactions. A permissioned blockchain is one in which the participants who invoke business transactions, as well as those who control and manage copies of the blockchain, are known. To this end, an identity service in a permissioned blockchain typically links information about business entities to the cryptographic keys used to digitally sign transactions. Typically, a ledger comprises a blockchain, and an associated world state. The world state typically is a view, but can be a superset, of the blockchain that comprises a set of referenceable variables that, while necessarily recorded in the blockchain, can be utilized by programs running on the network. In particular, to update the ledger with a proposed transaction, each node must process the transaction against the logic of one or more programs running directly on the replicated network. These programs, called chaincode, are replicated across each node in the network to guarantee uptime and functionality. Chaincode is stored on the blockchain and triggered by transaction requests.
Hyperledger is a cross-industry collaborative effort to support permissioned blockchain-based distributed ledgers. It is focused on ledgers designed to support global business transactions, including major technological, financial, and supply chain companies, with the goal of improving many aspects of performance and reliability. The project aims to bring together a number of independent efforts to develop open protocols and standards by providing a modular framework that supports different components for different uses. A Hyperledger is a peer-to-peer distributed network that uses cryptographic security, decentralized consensus, and a shared public ledger with properly-controlled and permissioned visibility.
To bring new validating peers into a blockchain network, such as a permissioned blockchain like Hyperledger, it is necessary to transmit the blockchain state from one or more of the network peers to the new peer. Long-lived blockchains will contain an extremely large number of blocks and world state. It is both inefficient, and impractical, to transmit tens or hundreds of gigabytes, if not terabytes, to the new peers in the network simply to enable these new peer nodes to participate in the network. To support the efficient and rapid addition of new validating (and non-validating) peer nodes in a blockchain network, there needs to be an efficient mechanism for identifying the current state of the blockchain so it can be efficiently communicated to the new peer nodes, and enable them to start participating in the network.
In addition, many types of businesses, including finance, have auditing requirements that are built on the premise that the audit will be conducted over an interval of time—from a start date to an end date. It is assumed that the state of the ledger (e.g., a financial ledger) is consistent and acceptable prior to the starting date and that the transactions from that date until the ending date are to be audited. Earlier data may be available for reference purposes, but it may not be required. As such, it be desirable to provide a way to record of the state of the system at the starting point of the audit interval and perhaps at the end of the interval as well.
Many kinds of blockchains applications are currently under discussion and their design are intended to be very long-lived (e.g., even up to 50 years or more). For long-lived blockchain ledgers, typically there are requirements for pruning the ledger for practical or regulatory reasons. In the absence of any application-specific audit checkpoint logic, to perform an audit using the current Hyperledger design, the auditor will need to start with the ledger's genesis (first) block and run all (relevant) transactions forward through time to reach the start of the audit period, and then continue running all of the relevant transactions for the current audit period. If the ledger contains substantial history (5 years, 10 years, or longer, with millions or billions of transactions), this process of processing the transactions to reach the start of the audit period can require a substantial amount of computational resources. Thus, it would be highly desirable to find a way to forestall this lengthy and resource-intensive process.
In financial and other business scenarios, old data prior to specific points in time are no longer relevant and can be discarded. Some businesses have record retention policies. Data older than a particular date is to be discarded. For privacy and legal reasons, old data is to be discarded. For Internet of Things (IoT)-based applications, many desired use cases have limited storage capacity, and thus pruning is essential. In such scenarios, bringing a new permissioned blockchain validating peer online requires transfer of the ledger (blockchain, world state) to the new peer, and efficiently enabling this operation may be critical.