Abstract#
This article introduces some principled use cases of blockchain and summarizes its basic requirements and high-level architecture. Blockchain technology is continuously evolving, and the design of Hyperledger is leveraging this technology framework.
In the competitive cooperation among enterprises on the same network, Hyperledger serves as a business-to-business (B2B) and business-to-consumer (B2C) transaction protocol that complies with regulations while supporting the realization of various requirements. The core elements of its design (which will be detailed below) include smart contracts (also known as on-chain code), digital assets, record storage repositories, centralized consensus networks, and cryptographic security. Additionally, the main products of blockchain also involve industry performance requirements, identity verification, private confidential transactions, and portable consensus models. For more information on the terminology related to Hyperledger, please refer to the glossary.
Background#
Blockchain is an emerging technology that has the potential to fundamentally change financing, supply chains, and other transaction networks, bringing new opportunities for innovation and development while reducing operational costs and risks. Since the rapid rise of Bitcoin in the transaction field in 2009, many enterprises and industries have invested substantial resources to study its underlying technology, thereby spreading this popular yet controversial cryptocurrency. Blockchain is a peer-to-peer distributed ledger technology that is the first to gain traction in the financial sector because it can effectively and securely issue, trade, manage, and service assets. Within the scope of the system of record (SoR), every member of the ecosystem needs to maintain its own ledger system and audit transaction progress with other members, a process that is both inefficient and costly, lacking standardized internal operational flows. Distributed ledgers, on the other hand, significantly reduce costs, facilitate the establishment of business networks, and eliminate the need for centralized control.
As the concept of shared ledgers gains increasing attention in the business sector, blockchain smart contracts have also attracted interest. Smart contracts are a collection of various business rules that run on the blockchain and are shared and verified by a group of stakeholders. They are highly effective in the process of business automation and are trustworthy, allowing stakeholders to collectively handle and verify contract terms. Hyperledger executes smart contracts using on-chain code (chaincode). The development of Bitcoin and other cryptocurrencies was intended to combat any form of censorship—anyone can participate without needing to establish identity, as long as they contribute some time to complete computation cycles.
In the Bitcoin blockchain model, there is no central authority to issue permissions, as these networks are unauthorized. They require countless proof-of-work computations, which are very costly. Hyperledger innovates upon the traditional blockchain model by managing participant access permissions. In other words, Hyperledger is a permissioned shared ledger. Hyperledger provides a secure and healthy model for identity verification, auditing, and privacy, thereby shortening computation cycles, achieving effective scalability, and addressing various operational requirements in the industry.
As we entered 2016, the understanding of blockchain grew, and the urgency to develop a suitable and scalable solution became increasingly pressing.
Why a New Framework#
As a newly developed technology, blockchain cannot yet meet the complex requirements of commercial transactions. Its scalability remains an issue, and it cannot support private confidential transactions, making it difficult to operate smoothly in many business-oriented applications.
To address various market demands, Hyperledger's design focuses on industrial applications, resolving existing shortcomings and expanding the functionalities of industry pioneers.
Our Vision#
We envision the innovations and changes that blockchain technology will bring to modern commercial transactions, analyzing industry use cases and key requirements, and designing and establishing a system to promote the widespread application of blockchain technology.
Note: It is recommended that you review the glossary before continuing to read the following material.
A World of Multiple Networks#
We hope to see numerous blockchain networks emerge, allowing each network ledger to execute different businesses. Based on this expectation, we developed Hyperledger. While a single universal network may have emerged, there are still no instances where the core functions of network ledgers rely on other networks to operate. Hyperledger not only enables independent operation of such networks but also has an addressing system that can discover and utilize legitimate transactions and smart contracts (chaincode) from another ledger through a transaction of one ledger.
Increasing Demand for Network Permissions#
Permissioned networks operate by known whitelisted organizations to validate and non-validate nodes, with the network issuing authorities granting traders an identifying identity. The issuing authority determines appropriate access permissions based on the network's purpose, and this permission requires identity verification before transactions can occur on the network. This network can operate publicly and can easily integrate into mobile applications. It can also operate entirely privately, where invited participants can only learn about the situation through verification.
Because the design of the Hyperledger framework meets various purposes, it allows mutual access between networks, and its protocols can satisfy various usage requirements while also having different levels of permissions.
The Importance of Privacy and Confidentiality#
We believe that any blockchain framework has a fundamental requirement: the identity and behavior patterns of any party on the network should not be allowed to be probed by unauthorized individuals through the ledger. We also hope to ensure the confidentiality of blockchain users' business logic and other transaction parameters, so that no one can access this data except for the stakeholders involved in the contract or the assets in the transaction.
Industry Use Cases#
We have drafted a set of preliminary blockchain requirements that are crucial for the use cases introduced next. (Note: The following use cases can drive the guiding architecture and test-driven development. Although these cases are still in development, all participants should agree on their content and the priority of technical levels. If you find any shortcomings, you can suggest changes. Please do not exceed four abstract use cases; three is preferable.)
Business Contracts#
Business contracts can be encoded to automatically execute contract terms for both parties or more participants while ensuring integrity. Although the information on the blockchain is inherently public, B2B contracts require privacy protection mechanisms to safeguard sensitive business information and prevent leaks to external parties who also have access to the ledger. While confidentiality agreements are crucial for business cases, there are also many situations where contracts should be made public to ensure that all personnel on the ledger can easily access the information, such as for determining bids for competitive tenders. Such contracts need to be standardized so that bidders can quickly obtain information.
Asset Custody#
Assets such as financial securities must achieve decentralization on the blockchain network, allowing all stakeholders of the same type of asset to directly access each asset, initiate transactions, and obtain relevant information without needing to go through layers of intermediaries. Transactions essentially achieve real-time settlement, and it must also be ensured that all stakeholders can grasp the asset situation in real-time. For any type of asset, stakeholders should have the right to add business rules, which can also reduce operational costs through automated logic applications. The creators of the assets must ensure the confidentiality or public nature of the assets and related transaction rules as guaranteed by the use case.
Supply Chain#
The blockchain framework must ensure that every participant in the supply chain network can: input and track the source of raw materials; record telemetry data of component production; trace the origin of shipped goods; and ensure that all records, including those related to the production, storage, sale, and subsequent matters of finished products, are immutable. Besides the previously described business contracts and asset custody models, the supply chain use case emphasizes its depth of search, ensuring that necessary records can be traced back through layers of past transactions. Its core is to create an origin for every product manufactured from other components.
If you want to understand how these use cases are embedded in the blockchain system or want to learn more about the requirements of these use cases, please click here.
Feature Requirements#
The feature requirements mentioned below are based on sound industry use cases that drive the development of the Hyperledger framework. These requirements include identity verification and auditability, private transactions, confidential contracts, modular consensus, performance efficiency, scalability, on-chain code (chaincode), and smart contracts.
Identity Verification and Auditability#
While the privacy of transactions is important, the commercial use of blockchain must also comply with certain regulations, allowing regulators to access and investigate transaction records. After the fact (sometimes years later), one party to the transaction must provide identity verification and asset ownership, determining the identity of the parties involved and their activities on the ledger without mechanisms in place.
Thus, the Hyperledger protocol emerges, registering a cryptographic certificate with the registration authority, thereby locking users' confidential data. The registration authority can issue and revoke identity verification for network participants. For each identity, the protocol generates a key for members to transact on the network without revealing the identities of the transacting parties, ensuring network privacy. For further questions regarding identity verification and auditability, please refer to the identity management section of the Q&A.
Private Transactions and Confidential Contracts#
If transaction patterns can be publicly observed and analyzed, shared ledgers will leak details of business relationships that should not be disclosed to competitors. The circles of suppliers or buyers are already small, and the systems supporting trade between both parties should not disclose any transaction details of either party. Therefore, blockchains used for commercial activities must provide a mechanism to ensure that unauthorized third parties cannot learn about identity, transaction patterns, and terms of confidential contracts.
Hyperledger can ensure the confidentiality of its content through encrypted transactions, which only stakeholders can decrypt and execute. Additionally, business logic (implemented through smart contracts) is also encrypted to ensure security (if stakeholders require confidentiality), and can only be loaded and decrypted during execution. This will be elaborated in detail in the architecture section later. For other questions regarding confidentiality, please refer to the confidentiality section of the Q&A.
Modular Consensus#
Since different industries and fields have their own networks to operate, different networks must also configure different consensus algorithms to meet various usage requirements. The consensus under the Hyperledger protocol must utilize pluggable algorithms, allowing users to choose their consensus algorithms in the configuration. The initial release of the Hyperledger protocol will provide a Byzantine Fault Tolerance (BFT) algorithm, which employs the Practical Byzantine Fault Tolerance (PBFT) protocol. We look forward to more community members sharing other consensus algorithm models in the future. For more questions regarding consensus and Hyperledger's pre-packaged consensus measures, please refer to the latency section of the Q&A.
Logic = On-chain Code = Smart Contracts#
Blockchain logic, or what we commonly refer to as "smart contracts," is a protocol automatically executed between parties, where all relevant terms are encoded in code, allowing for automatic settlement, which will be executed in the future through signatures or other triggering events. In the Hyperledger project, we refer to it as "on-chain code" (chaincode), which establishes and distinguishes blockchain logic from its written contracts. (This term is still under review and may change.) The concept of on-chain code (chaincode) is broader than that of smart contracts; the concept of smart contracts was proposed by Nick Szabo. On-chain code can be written in any mainstream programming language and executed within the context of Hyperledger. On-chain code can define smart contract module languages (similar to Velocity or Jade), limit the execution of environmental functions, and its computational flexibility to meet the requirements of legal contracts. For more related questions, please refer to the on-chain code section of the Q&A.
Performance Efficiency and Scalability#
When considering the network applications of blockchain frameworks from an economic perspective, long-term performance must be taken into account during the design process. A ledger or a set of ledgers must be able to operate continuously for over 100 years, allowing customers to use its issuance, search, identity verification, and other functions within a timely manner.
However, as time progresses, the number of nodes in the designated network and the number of transaction participants will also increase, so its framework must address these issues while ensuring performance. For more related questions, please refer to the usage section of the Q&A.
Architecture#
The following Figure 2 will show you the architecture referenced by Hyperledger, which includes three main categories: membership services, blockchain, and on-chain code. These are logical structures, not physical descriptions of independent steps, address spaces, or partitioned components in (virtual) machines.
Figure 2: Hyperledger Reference Architecture#
Membership services are responsible for managing identity verification, privacy, and confidentiality on the network. Participants obtain identities through registration, and then attribute authorization agencies can issue keys for transactions. Reputation managers allow auditors to browse the transaction history of a participant if the auditor has obtained the appropriate access permissions granted by the participant.
Blockchain services are responsible for managing the distributed ledger, operating through a peer-to-peer protocol established over Hypertext Transfer Protocol 2.0. The data structure is optimized to effectively maintain the overall state of multiple participants. Different consensus algorithms may be embedded in each configuration to ensure high consistency (handling errors through Byzantine Fault Tolerance, managing delays and interruptions through crash tolerance, or using proof-of-work schemes to combat censorship).
On-chain code (chaincode) services provide a secure and lightweight sandbox loading path for executing on-chain code verification nodes. The entire environment is a locked and secure container, containing a signed image library, including a secure operating system and on-chain code language, as well as software development kits and execution environments for Golang (in preparation), Java (in planning), Node.js (in planning), and other programming languages if needed.
The distributed ledger uses RocksDB to permanently store datasets, and to meet its three main attributes, it has established an internal data structure to reflect the state. Large files (documents, etc.) are stored in repositories outside the blockchain ledger, while their hash values can be stored on-chain as part of the transaction to ensure the integrity of the files.
Hyperledger can support two types of transactions: code deployment transactions and code invocation transactions. Code deployment transactions can execute commands such as submitting, updating, or terminating an on-chain code, and its verification nodes must protect the authenticity and integrity of the code and its execution environment. In contrast, code invocation transactions are applications used to execute functions of on-chain code, similar to invoking small service programs using Uniform Resource Identifiers (URIs) in JEE. Notably, each on-chain code is responsible for maintaining its own state, and function calls are a common way to change the state of on-chain code.
The consensus manager is an abstract concept that defines the interface between the consensus algorithm and other Hyperledger components. The consensus manager receives transactions and determines how and when to organize and execute these transactions based on the algorithm. Once transactions are successfully executed, changes will be reflected on the ledger. Hyperledger implements the Byzantine protocol, which has strong advantages in fault tolerance and scalability. The Event Hub is a decentralized network with complex attributes, as the same event may occur multiple times, covering each peer node each time. Callback functions can terminate multiple calls of the same event, allowing peer nodes (preferably non-validating native nodes) to manage application-related publish or subscribe events.
As long as conditions are met, peer nodes trigger events in no particular order. These events do not exist indefinitely, so applications must capture them in a timely manner if needed.
On-chain code transactions are time-limited and are configured in a specific form during the on-chain code deployment process, similar to database calls or web service calls. If the transaction time limit is exceeded, it will be treated as an error, and no changes will be made to the ledger state. If the invoked function has the same confidentiality restrictions, one on-chain code function can call another on-chain code function—meaning that if two confidential on-chain codes share the same set of validators, they can call each other.
When new blocks are transacted, the overall state delta of the last block on the blockchain is maintained. If the current block reaches consensus, the variable will be submitted to the database, and the total number of state blocks will increase by one. If nodes do not reach consensus, the delta will not be counted, and the database will not be modified.
Application Programming Interface#
Hyperledger includes REST, JSON RPC application programming interfaces, events, and application software development kits for connecting networks. A typical requirement is that applications must verify the legitimacy of an individual through some form of authentication when interacting with a peer node, where the client's information is signed with its identity verification and must be verified by the node.
Hyperledger has a command-line interface (CLI) to manage the running network. This command-line interface can also be used during the testing process of on-chain code. The REST application programming interface and software development kits (SDKs) are built on the JSON-RPC application programming interface, which is currently the most complete application programming interface layer. The software development kits can be applied in languages such as Golang, JavaScript, Java, and if needed, other programming languages can also be added.
This application programming interface can be divided into the following categories:
- Identity verification - obtaining or revoking authentication through registration
- Addressing - locating and tracking the source of transactions
- Transactions - execution units on the ledger
- On-chain code - programs running on the blockchain
- Blockchain - content of the ledger
- Network - information about the blockchain network
- Repository - external storage of files or documents
- Events - subscription or issuance events on the blockchain
Application Model#
Network Technology#
There are three potential configuration models:
- A single network hosted on cloud servers
- Multiple networks hosted on cloud servers
- An intranet hosted by participants
A single network hosted on cloud servers is the simplest and most efficient topology, where each participant has a set of peer nodes, including validating nodes. Although the network operates in a cloud environment and is hosted by physical hardware vendors, participants can still control computing resources according to contracts, achieving decentralized configurations in a centralized environment.
Multiple networks hosted on cloud servers allow participants to manage peer nodes through cloud providers if these nodes can connect under Hyperledger TTP. The intranet hosted by participants uses Hypertext Transfer Protocol to utilize all networks of the participants.
Conclusion#
The mission of Hyperledger is to bring blockchain technology to the mainstream market. After reviewing feasible blockchain solutions and understanding the relevant use cases provided by industry leaders and technology promoters, we believe that blockchain will become a critical technological model driving innovation across numerous industries and enterprises. We note that there is currently an urgent need for a blockchain framework designed for enterprises that is efficient, scalable, and capable of providing enterprise-level support for privacy and confidentiality-related requirements. We have also identified various different use cases, each of which may require different underlying implementations of blockchain.
To fully explore the potential of blockchain technology and to create a standard that meets various usage needs, we have designed a flexible and extensible Hyperledger framework.
Additionally, we are guiding the default implementation of the Hyperledger protocol, which involves advanced achievements from various computer science disciplines.
To enhance your understanding of the Hyperledger protocol, you can read our protocol usage instructions, which will help you use Hyperledger to create your applications and promote project development.