Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the basics of Hyperledger Fabric

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is to share with you what the basics of Hyperledger Fabric are. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Basic knowledge of Hyperledger Fabric

In this article, we will introduce the basics of Hyperledger Fabric and learn how to make the most of this versatile blockchain framework.

Blockchain technology provides rich opportunities for innovation. It provides a new way of trading, which can fundamentally change the implementation of the business.

So, among the many blockchain frameworks, which framework should developers master first? Hyperledger Fabric developed by IBM is definitely the best choice, especially when the common chain application is not clear today, using Fabric to develop alliance chains should be the most common and practical framework.

Hyperledger is an open source collaboration effort designed to promote cross-industry blockchain technology for use by enterprises. The global collaboration is hosted by The Linux Foundation.

Hyperledger incubates and supports a range of blockchain business technologies, frameworks, libraries and applications. The Hyperledger project hosts several blockchain frameworks, including Hyperledger Fabric. This article provides an overview of what Hyperledger Fabric is, how to use it to build solutions, and how to execute transactions in Hyperledger Fabric.

What is Hyperledger Fabric?

Hyperledger Fabric is an open source framework implementation for private and federated chain business networks, where membership and roles are known to other members. It is a modular architecture. It allows plug-and-play components such as account database, consensus mechanism and membership service. It uses container technology to provide enterprise-class network security, scalability and confidentiality.

The Hyperledger Fabric network has the following components:

Assets . An asset is anything of value. Assets have status and ownership. Assets are represented in Hyperledger Fabric as a collection of key-value pairs.

Shared ledger . The shared ledger records the status and ownership of the asset. The shared ledger consists of two parts:

World state describes the status of shared books at a given point in time. This is a database of shared ledgers.

Blockchain is a transaction log history that records all transactions.

Smart contract . The Hyperledger Fabric intelligence contract is called chaincode. Chaincode is software that defines assets and related transactions; in other words, it contains the business logic of the system. Chaincode is called when the application needs to interact with the shared account book. Chain codes can be written in Golang or Node.js.

Peer nodes . Peer is an essential element of the network because they host shared books and smart contracts. Peer executes chain codes, accesses shared ledger data, approves transactions and interfaces with applications. Peer can be either endorsing peers or endorsers. Each chain code can specify an endorsement strategy, which defines the necessary and sufficient conditions for effective transaction endorsement.

Channel . Channels are logical structures formed by peers collections. This feature allows a group of peers to create separate transaction sharing books.

Organizations . The Hyperledger Fabric network is built by peers owned and contributed by different organizations in the network. The network exists because organizations contribute their personal resources to the collective network. Peers has membership the identity (digital certificate) assigned by the service provider from the organization to which it belongs. The Peers of different organizations can be on the same channel.

Membership Services Provider (MSP). MSP is a certification authority that manages certificates used to authenticate membership and roles. In Hyperledger Fabric networks, all nodes must have authenticated identities in order to conduct transactions. MSP manages the user ID and authenticates all participants on the network, making Hyperledger Fabric a private and admittance network.

Ordering service . Ordering service packages the transaction into blocks to deliver to the peers on the channel. It ensures the smooth execution of transactions in the network. It communicates with peers and endorsing peers. Ordering service currently supports only Solo and Kafka.

The following figure shows the components and composition of Hyperledger Fabric:

How does the Hyperledger architecture work?

In the Hyperledger solution, the Hyperledger Fabric network acts as the back end, while the application front end communicates with the network. SDK helps you establish communication between the front end and the back end, such as Node.js SDK and Java SDK. SDK provides a way to execute user chain codes, perform transactions in the network, monitor events, and so on.

To write a blockchain application, you need to:

Write chaincode in a supported programming language, such as Go.

Deploy chain codes on the Hyperledger Fabric network.

Use SDK to develop client applications.

How Hyperledger transactions are executed

The request flow for transactions in the Hyperledger Fabric network is as follows:

The client connects to the Hyperledger Fabric network using Node.js or Java ™SDK. The client uses SDK API to create a transaction and send it to the endorsement peer.

Endorsing peer verifies the customer's signature, simulates the transaction, and sends an endorsement signature.

If the deal is approved, the customer submits the deal to ordering service. Otherwise, the deal will be cancelled.

Ordering service passes the transaction to peers. All peers commit and apply the same transaction sequence and update their status.

Thank you for reading! This is the end of this article on "what are the basics of Hyperledger Fabric?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report