# Hyperledger Fabric HLF

* The Linux Foundation founded the Hyperledger project in Y2015 to advance **cross-industry** blockchain technologies.
    
* HLF is one of the Framework from *"HL Framework & Tools ecosystem"* with the primary objective to provide **Permissioned with Channel Support**. i.e., HLF is one of the blockchain projects within Hyperledger.
    
* Like other blockchain technologies (Etherum), it also has
    
    * a ledger,
        
    * uses smart contracts,
        
    * participants manage their transactions,
        
    * Data Provenance\* by offering *immutable and cryptographically verifiable record of transactions*
        
* Unlike other Blockchain technologies (Ethereum), it differs as
    
    * **private and permissioned**,
        
    * **No open permissionless system**,
        
    * **No unpermissioned entry** to any member/*unknown identities* to participate in the network,
        
    * **No PoW** ( “proof of work” protocol to validate transactions and secure the network),
        
    * **Membership Service Provider (MSP)**: Restricted Entry to Members of a Hyperledger Fabric network enroll through a trusted MSP.
        

### Overview of Hyperledger Framework and Tools

Broader ecosystem of *HL Framework & Tools:*

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1627311977415/bzbHBYPAgh.png align="left")

### Key Concpets of Hyperledger FABRIC

##### Blockchain network

A blockchain network is a technical infrastructure that provides ledger and smart contract (chaincode) services to applications

##### Block and Chain

A block contains an ordered set of transactions. It is cryptographically linked to the preceding block, and in turn it is linked to be subsequent blocks.

The ledger’s chain is a transaction log structured as hash-linked blocks of transactions. Suuch as, Blockchain B contains blocks 0, 1, 2.

##### Smart Contract

A smart contract is code (invoked by a client application external to the blockchain network) that manages access and modifications to a set of *key-value pairs* in the *World State* via Transaction.

##### Chain Code

In Hyperledger Fabric, smart contracts are packaged as chaincode. Chaincode is installed on peers and then defined and used on one or more channels.

##### World State

*World state* maintains “current state” of transaction in Ledger, and such data is stored in a state database for efficient reads and queries from chaincode. Supported databases include - *couchDB*.

##### Channel

A channel is a private blockchain *overlay* which allows for data isolation and confidentiality. A channel-specific ledger is shared across the peers in the channel, and transacting parties must be authenticated to a channel in order to interact with it. Channels are defined by a *Configuration-Block*.

##### Membership Service Provider

MSP refers to an abstract component of the system that provides credentials to clients, and peers for them to participate in HLF.

##### Ordering Service

Also known as orderer. A defined collective of nodes that orders transactions into a block and then distributes blocks to connected peers for validation and commit. The ordering service exists independent of the peer processes and orders transactions on a first-come-first-serve basis for all channels on the network.

---

HLF also leverages *Gossip Protocol* & *Raft Algo* for following 3 major functions: - 1) manages peer discovery and channel membership; - 2) disseminates ledger data across all peers on the channel; - 3) syncs ledger state across all peers on the channel

The same *protocol* and *Algo* is used in **Progrium Consul** (a distributed computing CONSENSUS Algo for Leader election and worker management), and it is applied in Seneca (a Microservice Framework on Nodejs)

---

### Hyperledger FABRIC, Hyperledger COMPOSER, Hyperledger EXPLORER

**Hyperledger FABRIC:**

```plaintext
- A very popular Blockchain Network from Hyperledger ecosystem. 
- Whereas other Blockchain Network from Hyperledger ecosystem, such as Hyperledger SAWTOOTH is the 2nd popular network.
```

**Hyperledger EXPLORER:**

```plaintext
User-friendly Web application tool from Hyperledger ecosystem to used to 
- view, invoke, deploy or query 
   - blocks,
   - transactions and associated data, 
   - network information (name, status, list of nodes), 
   - chain codes and transaction families, 
   - as well as any other relevant information stored in the ledger.
```

Reference: [Official Link](https://www.hyperledger.org/use/explorer) Reference: [Video Demo](https://www.youtube.com/watch?v=mI6-qRagn_Q)

**Hyperledger COMPOSER:**

```plaintext
The Hyperledger Composer Playground provides a user interface for the 
- configuration, deployment and testing of a business network. 
- Advanced Playground features permit users to manage 
 	- the security of the business network, 
	- invite participants to business networks and 
	- connect to multiple blockchain business networks.
```

Reference: [Official Link](https://hyperledger.github.io/composer/latest/playground/playground-index) Reference: [Video Demo](https://www.youtube.com/watch?v=gAxK6zYrfxI)

### DOCKER Hyperledger FABRIC Hyperledger EXPLORER

* [Fabric baseimage from hyperledger](https://github.com/hyperledger/fabric-baseimage)
    
* [Official reference](https://hyperledger-fabric.readthedocs.io/en/release-2.0/install.html)
    

---

<table><tbody><tr><td colspan="1" rowspan="1"><p><a target="_self" rel="noopener noreferrer nofollow" href="https://www.hyperledger.org/use/explorer" style="pointer-events: none">Hyperledger EXPLORER </a>Official Link of Hyperledger Explorer</p></td><td colspan="1" rowspan="1"><p><a target="_self" rel="noopener noreferrer nofollow" href="https://hyperledger.github.io/composer/latest/playground/playground-index" style="pointer-events: none">Hyperledger COMPOSER </a>Official Link of Hyperledger Composer</p></td></tr></tbody></table>

Thank you for joining! Stay connected with the latest updates and insights by visiting my website [**www.DeepHiveMind.com**](http://www.deephivemind.com/). Don't forget to follow me on social media for more tech tips and discussions. Let's continue exploring the exciting world of technology together! #TechTalks #StayConnected

* LinkedIn:[**https://www.linkedin.com/in/harshvardhan-ai/**](https://www.linkedin.com/in/harshvardhan-ai/)
    
* GitHub: [**https://github.com/DeepHiveMind**](https://github.com/DeepHiveMind)
