How to Set Up a Private Blockchain Network using Hyperledger Fabric
A modular architecture for creating enterprise-grade distributed ledger applications is offered by the open-source blockchain platform Hyperledger Fabric. It was created by the Linux Foundationâs Hyperledger project and is designed to address the needs of businesses that require a flexible, scalable, and secure platform for Hyperledger application development.
Using a plug-and-play design, Hyperledger Fabric is a platform for building enterprise-grade blockchain networks. Hyperledger Fabric uses Distributed Ledger Technology (DLT) to build a permissioned blockchain system. Unlike other platforms that require non-standard or domain-specific languages, it is the first platform where smart contracts can be created in general-purpose programming languages like Java, Go, and Node.js.
Hyperledger Fabric and other permissioned blockchains are not like other blockchains. This implies logically that since the participants are not anonymous, it is impossible to fully trust them. In essence, the network can be governed by a framework for handling disputes that are based on the confidence between participants.
Also, Check |Â Hyperledger Fabric for Aviation Parts Marketplace Development
We will look at how to build up a Hyperledger Fabric private blockchain network in this developer's tutorial. The test network will utilize two nodes to demonstrate the setup.
Setting up a Private Test Network
To run a Docker-based fabric test network these are the prerequisites:
1. Install the latest version of git if it is not already installed.
$ sudo apt-get install git
2. Install the latest version of cURL if it is not already installed.
$ sudo apt-get install curl
3. Install the latest version of Docker if it is not already installed.
$ sudo apt-get install -y install docker-compose
Install Fabric and Fabric Samples
$ curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh && chmod +x install-fabric.sh
$ ./install-fabric.sh docker samples binary
Run the Fabric Test Network
1. Clone Fabric Samples git repo
$ git clone https://github.com/hyperledger/fabric-samples.git
2. Go to fabric-samples/test-network
$ cd fabric-samples/test-network
3. Start the test network
It will produce the following output
Creating network âfabric_testâ with the default driver
Creating volume ânet_orderer.example.comâ with default driver
Creating volume ânet_peer0.org1.example.comâ with default driver
Creating volume ânet_peer0.org2.example.comâ with default driver
Creating peer0.org2.example.com ⊠done
Creating orderer.example.com ⊠done
Creating peer0.org1.example.com ⊠done
Creating cli ⊠done
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1667543b5634 hyperledger/fabric-tools:latest â/bin/bashâ 1 second ago Up Less than a second cli
b6b117c81c7f hyperledger/fabric-peer:latest âpeer node startâ 2 seconds ago Up 1 second 0.0.0.0:7051->7051/tcp peer0.org1.example.com
703ead770e05 hyperledger/fabric-orderer:latest âordererâ 2 seconds ago Up Less than a second 0.0.0.0:7050->7050/tcp, 0.0.0.0:7053->7053/tcp orderer.example.com
718d43f5f312 hyperledger/fabric-peer:latest âpeer node startâ 2 seconds ago Up 1 second 7051/tcp, 0.0.0.0:9051->9051/tcp peer0.org2.example.com
The Components of the Test Network
We are a group of qualified Hyperledger developers who use frameworks hosted by Hyperledger to create quick and safe blockchain applications. After you let us know what you require, a technical specialist will set up a call to go over your idea in detail.