Develop Paper
  • Program
  • Server
  • Development Tool
  • Blockchain
  • Database
  • Artificial Intelligence
Position: Home > Blockchain > Content

Basic knowledge of hyperledger fabric

Time:2021-3-31

Basic knowledge of hyperledger fabric

In this article, we will introduce the basics of hyperledger fabric and learn how to make full use of this multi-functional blockchain framework.

Blockchain technology provides abundant opportunities for innovation. It provides a new way of transaction, which can fundamentally change the realization of business.

So, among the numerous blockchain frameworks, which framework should developers master first? Hyperledger fabric developed by IBM is definitely the best choice, especially in today’s uncertain public chain application, using fabric to develop alliance chain should be the most common and practical framework.

Hyperledger is an open source collaboration achievement, which aims to promote cross industry blockchain technology for enterprises to use. 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 outlines 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 chain and alliance chain business networks, in which membership and roles are known to other members. It is a modular architecture. It allows components such as ledger database, consensus mechanism and membership service to plug and play. It uses container technology to provide enterprise level network security, scalability and confidentiality.

Hyperledger fabric network has the following components:

  • Assets。 Assets are anything of value. Assets have status and ownership. Assets are represented in hyperledger fabric as a collection of key value pairs.
  • Shared ledger。 Shared ledgers record the status and ownership of assets. The shared ledger consists of two parts

    • World state describes the state of the shared ledger 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 smart contract is called chaincode. Chaincode is the 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 ledger. The chain code can use golang or Node.js to write.
  • Peer nodes。 Peer is an essential element of the network because they host shared ledgers and smart contracts. Peer executes chain codes, accesses shared ledger data, recognizes transactions, and interfaces with applications. Peer can be endorsing peers or endorsers. Each chain code can specify an endorsement policy, which defines the necessary and sufficient conditions for effective transaction endorsement.
  • Channel。 Channel is a logical structure formed by peers set. This function allows a group of peers to create a separate transaction shared ledger.
  • Organizations。 Hyperledger fabric network is constructed by peers owned and contributed by different organizations in the network. The network exists because the organization contributes its personal resources to the collective network. Peers have the identity (digital certificate) assigned by the membership service provider from its organization. Peers of different organizations can be on the same channel.
  • Membership Services Provider (MSP)。 MSP is a certification authority to manage certificates used to authenticate memberships and roles. In the hyperledger fabric network, all nodes must have an authenticated identity to trade. MSP manages user IDs and validates all participants on the network, making hyperledger fabric a private and accessible network.
  • Ordering service。 Ordering service packages the transaction into blocks to deliver to peers on the channel. It ensures the smooth execution of transactions in the network. It communicates with peers and endorsing peers. Currently, ordering service only supports solo and Kafka.

The following figure shows the components and composition of hyperledger fabric

Basic knowledge 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. The SDK helps you establish communication between the front end and the back end, such as Node.js SDK and Java SDK. SDK provides a method to execute user chain code, execute transaction and monitor events in the network.

To write a blockchain application, you need to:

  1. Write the chaincode in a supported programming language, such as go.
  2. Deploy chain code on hyperledger fabric network.
  3. Using SDK to develop client applications.

How to execute hyperledger transaction

The transaction request flow in the hyperledger fabric network is as follows:

  1. Client use Node.js Or Java ™ The SDK connects to the hyperledger fabric network. The client uses the SDK API to create a transaction and send it to the endorser.
  2. Endorsing peer will verify the customer’s signature, simulate the transaction and send endorsement signature.
  3. If the transaction is approved, the customer submits the transaction to the ordering service. Otherwise, the transaction is cancelled.
  4. The ordering service passes the transaction to peers. All peers commit and apply the same transaction sequence and update its status.

summary

Hyperledger fabric is a blockchain framework implementation. You can easily use hyperledger to build a private or federated network and write smart contracts for it.

Of course, hyperledger is more complex than other blockchain frameworks because it is designed for enterprise applications. We will explain it in detail later.

For more tutorials, please refer to flydean’s blog

Tags: Account book, block, frame, network, transaction

Recommended Today

Third party calls wechat payment interface

Step one: preparation 1. Wechat payment interface can only be called if the developer qualification has been authenticated on wechat open platform, so the first thing is to authenticate. It’s very simple, but wechat will charge 300 yuan for audit 2. Set payment directory Login wechat payment merchant platform( pay.weixin.qq . com) — > Product […]

  • Python series crawlers monitor bitcoin price trend
  • In 2021, the trend of intelligent data collection and annotation industry of four major industries is predicted; Tsinghua University proposes depth aligned clustering for new intention map discovery
  • #Open source, we are serious#
  • 388900! Huawei’s self driving model is on the market; hard disk mining may be out of stock; Firefox will no longer support FTP protocol
  • Opencv: a practical case of easy to use digital recognition
  • # Countdown to the press conference #
  • Community view | understanding the exchange protocol on mov chain
  • Why is dpos not easy to cause bifurcation?
  • Blockchain technology community: chain news (issue 3)
  • Independent innovation of blockchain technology should pay more attention to the exploration of blockchain application
Pre: Web pack to package CSS resources
Next: How to download and set vscode (Visual Studio code) v1.43.0 into Chinese language

    Tags

    address algorithm android array assembly attribute Browser c Catalog Character string Client code command configuration file css data Database data base Edition element Example file function html html5 ios java javascript linux Memory method mysql node object page parameter php Plug-in unit project python Route source code The server Thread user

    Recent Posts

    • Third party calls wechat payment interface
    • On status management of flutter
    • Make calculator support statement block
    • DDD Lite: simplified version of DDD Domain Driven Design microservice
    • Learning objects and prototypes from ECMAScript specification

    Recent Comments

    • voidint on Answer for Go send HTTP request except net / Is there any other good package for HTTP
    • Wooden paper kite on Answer for Go send HTTP request except net / Is there any other good package for HTTP
    • Meteor stay on Answer for An error is reported when Android studio starts for the first time
    • I'm a rookie on Answer for An error is reported when Android studio starts for the first time
    • I'm a rookie on Answer for An error is reported when Android studio starts for the first time

    Categories

    • .NET Core
    • Agile Development
    • Android
    • Apple MAC
    • Architecture Design
    • Artificial Intelligence
    • ASP.NET
    • Blockchain
    • C
    • C#
    • C++
    • Database
    • Development Tool
    • Embedded
    • Erlang
    • Freshman
    • Golang
    • HTML/CSS
    • HTML5
    • Information Security
    • IOS
    • Java
    • JavaScript
    • JSP
    • Linux
    • MongoDB
    • MsSql
    • MySql
    • OOP
    • oracle
    • Other DB
    • Other Technology
    • Perl
    • PHP
    • Program
    • Python
    • Redis
    • Regular Expression
    • Ruby
    • Rust
    • SAP
    • Server
    • VBS
    • VUE
    • WEB Front End
    • Windows
    • XML/XSLT
  • java
  • php
  • python
  • linux
  • windows
  • android
  • ios
  • mysql
  • html
  • .net
  • github
  • node.js

Copyright © 2021 Develop Paper All Rights Reserved   

  Sitemap    About DevelopPaper    Privacy Policy    Contact Us