banner
leaf

leaf

It is better to manage the army than to manage the people. And the enemy.
follow
substack
tg_channel

Hyperledger White Paper Chinese Version

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 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 significant 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 technology 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 standard operational flows for internal organizations. 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 validated by a group of stakeholders. Smart contracts are highly effective in business automation processes and are trustworthy, allowing stakeholders to collectively process and validate 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 the computational 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 traditional blockchain models, including 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 computational cycles, achieving effective scalability, and addressing various industry application requirements.

As we entered 2016, the understanding of blockchain grew increasingly, making it more urgent to develop a suitable and scalable solution.

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, which makes 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 that blockchain technology will bring innovation and change to modern business transactions, analyzing industry use cases and key requirements, and designing and establishing a system to promote the widespread use of blockchain technology.

Note: It is recommended that you review the glossary before continuing to read the following material.

A World Covering Numerous Networks#

We hope to see the emergence of numerous blockchain networks, 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 functionalities 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 (on-chain code) from another ledger through a transaction of one ledger.

image

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 authorities determine 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 inter-network access, 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 must 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 the technical level. If you feel that any aspect is unsatisfactory, you can propose changes. Please do not exceed four abstract use cases; three would be 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 information leakage to external parties who can also access the ledger. While confidentiality agreements are crucial for business cases, there are many situations where contracts should also be made public to ensure that all personnel on the ledger can easily access the information, such as to determine quotes for bidding. Such contracts need to be standardized so that bidders can quickly obtain information.

Asset Custody#

Assets such as financial securities must be decentralized on the blockchain network, allowing stakeholders of the same type of asset to directly access each asset to initiate transactions and obtain relevant information without going through layers of intermediaries. Transactions essentially achieve real-time settlement, and it must also ensure 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 trace the source of raw materials; record telemetry data of component production; trace the origin of shipped goods; and ensure that all records, including production, storage, sales, 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 deep searchability, ensuring that required 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 and have driven 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, blockchain commercial applications 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 and their activities on the ledger without a mechanism.

Thus, the Hyperledger protocol emerges, registering a cryptographic certificate with a registration authority, locking user confidential data. The registration authority can issue and revoke the identity verification of network participants. For each identity, the protocol generates a key for members to conduct transactions 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, then 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 in 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 can only be decrypted and executed by stakeholders. Additionally, business logic (implemented through smart contracts) is also encrypted to ensure security (if confidentiality is required by stakeholders), 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 the consensus algorithm in their configuration. The initial release of the Hyperledger protocol will provide Byzantine Fault Tolerance (BFT), 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," are protocols automatically executed between parties, where all relevant terms are coded, allowing for automatic settlement, and can 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), restrict 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#

If we understand the network applications of blockchain frameworks from an economic perspective, then long-term performance must be considered during the design process. A ledger or a set of ledgers must be able to operate continuously for over 100 years and allow customers to use its issuance, search, identity verification, and other functions within a timeframe accessible to users.

However, as time goes on, the number of nodes and transaction personnel in the designated network 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.

image

Figure 2: Hyperledger Reference Architecture

Membership services are responsible for managing identity verification, privacy, and confidentiality on the network. Participants obtain identities through registration, after which attribute authorities can issue keys for transactions. Reputation managers enable auditors to browse a participant's transaction history if the auditors have been granted appropriate access permissions by the participant.

Blockchain services are responsible for managing the distributed ledger, operating through a peer-to-peer protocol established over HTTP 2.0. The data structure is optimized to effectively maintain the overall state replicated among participants. Different consensus algorithms may be embedded in each configuration to ensure high consistency (handling errors through Byzantine Fault Tolerance, delays and interruptions through crash tolerance, or addressing censorship through proof-of-work schemes).

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 languages, as well as software development kits and execution environments for Golang (in preparation), Java (planned), Node.js (planned), and other programming languages if needed.

image

image

The distributed ledger uses RocksDB to permanently store datasets, and to meet its three main attributes, it has also 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 for 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 in JEE using a uniform resource identifier. It is noteworthy that 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 decides how to organize and when to execute them 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 properties, as the same event may occur multiple times, and each time it will cover every peer node. Callback functions can terminate multiple calls to receive 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 will trigger events without regard to order. These events do not exist indefinitely, so applications must capture them in a timely manner if needed.

image

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 invoke 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 variables will be submitted to the database, and the total number of state blocks will increase by one. If the 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 aspect is that applications must verify the legitimacy of an individual's permissions through some form of interaction with a peer node, where the client's information is signed with its identity verification and must be verified by the node.

image

Hyperledger has a command-line interface (CLI) to manage the running network. This command-line interface can also be used during the on-chain code testing process. The REST application programming interface and software development kits (SDK) 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 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#

image

Network Technology#

There are three potential configuration models:

  1. A single network hosted on cloud servers,
  2. Multiple networks hosted on cloud servers, and
  3. 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 computational resources according to contracts, achieving a decentralized configuration 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 Hyperledger TTP 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 needs. 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 create a standard that meets various usage needs, we have designed a flexible and extensible Hyperledger framework.

Furthermore, we are also 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 utilize Hyperledger to create your applications and promote project development.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.