Hyperledger Fabric is one of the enterprise grade solution, which provides the solution in a way which
are easily applicable to the enterprise needs.
Hyperledger Fabric is a very advanced blockchain platform which offers identity management services
with segregation of different channels and ledgers which you can use to distribute across the whole
firm.
Hyperledger Fabric architecture is based upon modular approach, as you have seen in the Bitcoin and
Ethereum architecture base.
The miners are the one who are performing a lot of different functionalities on top of blockchain.
The miners are going to validate the transactions.
They are going to add it inside the block.
Then they are going to process the block, gets the nonce value, and once the nonce value have been
guessed, they will confirm the block on top of blockchain.
And finally, they are going to communicate the block to all the different peers.
But inside Hyperledger fabric architecture, we are going to segregate the different tasks with different
kinds of entities.
We are not dependent upon one single entity to perform all these tasks.
So thus we provide a modular approach and provide a system which is easily upgradable.
So as you can see here, we have application here.
Application is going to create the transaction.
This application is going to run a software development kit.
Hyperledger Fabric provides software development kit with Go, Java and NodeJS programming languages.
The software development kit will receive the information from the application and create a transaction
proposal.
Keep a note that this is a transaction proposal.
This is not the actual transaction.
Yet.
This transaction proposal is first send to one of the entities which are known as endorsing peers.
Endorsing peers are the entities inside Hyperledger fabric, which are going to simulate the transaction
proposal and validate the transaction.
So endorsing peers receives the submitted transaction proposal.
Endorsing Peer is also part of the Hyperledger Fabric blockchain itself, but they don't execute this
transaction proposal on the main chain.
What they do is that they create a copy of the ledger and they simulate the transaction on top of the
copy of the ledger.
By simulating the transaction, they come to know that whether the transaction is validated or not,
whether the application has provided the right set of read and write peers for the ledger, whether
the application has provided right identity management, which is authorized to make the changes on
top of Hyperledger Fabric Ledger.
All those different kinds of validations are checked by simulating the transactions.
Again, make note that still the transaction is not updated on top of the main blockchain.
It's just simulated on top of the copy of the blockchain.
Once the simulation is done endorsing peers, adds the read and write set to the transaction.
Read and write sets are basically what kind of different information is going to be read from the blockchain
and what kind of different information is going to be right on top of blockchain once this transaction
makes effect.
These read and write sets are incorporated with the transaction proposal.
And finally, the endorsing peer signs this transaction proposal and send it back to the application
here.
We have only shown one endorsing peer, but in normal Hyperledger fabric application you will have multiple
endorsing peer here, and all these endorsing peer will send their endorsement responses by signing
them with their own certificates.
Which application will receive?
Application will check the endorsement policies which can state that you want to have at least two out
of three endorsement peers verifying the transactions.
Only then you can submit the transaction ahead.
So application will verify the endorsement policy.
If the endorsement policy is verified, application is going to send this transaction to another service
which is known as ordering service.
Ordering service inside Hyperledger Fabric is the entity which is going to take the transaction and
order the transaction inside the block.
This is a service which is actually confirming the block over the blockchain.
Once the block is on top of the blockchain, then the gossip protocol comes into effect.
Gossip protocol takes the block from the ordering service and communicate the block to all the committing
peers.
Committing peers will receive this new block which is coming in.
They will check whether the policies have been satisfied.
They will also check whether the read, set and write sets are incorrect format or not.
And if everything is valid, they will commit the transaction on top of the main chain.
And in this way a new block is added to the Hyperledger Fabric blockchain.
As you can see, we have divided the whole architecture in different entities.
The endorsing peer is going to validate the transaction ordering peer is going to add the transaction
to the blockchain and gossip protocol is going to take the block and deliver it to all the different
peers.
If you see the comparison with Bitcoin and Ethereum blockchain, you will realize that instead of holding
one single entity performing multiple operations, we have provided a modular approach where each entity
is performing a separate task and we can easily.
Plug in or plug out all these entities.
Hyperledger Fabric is known for enterprise solution because it offers a solution which is pluggable.
If you want the identity management, you can plug in.
If you want the consensus mechanism, you can plug in.
If you don't want these services, you can plug out from Hyperledger fabric.
So that's just a brief overview and architecture analysis for Hyperledger Fabric.
Hyperledger Fabric also offers you the feature set for the creation of smart contracts, which are known
as chain code in terms of Hyperledger fabric Chain code and Hyperledger Fabric runs through Docker containers
in comparison to Ethereum, where we use the Ethereum virtual machine to compile the smart contract.
In case of Hyperledger fabric, the Docker containers are going to be used to install and instantiate
the smart contracts on top of Hyperledger fabric.
Blockchain.
Hyperledger Fabric also offers the feature set of creation of channels.
Each channel inside Hyperledger Fabric is a separate ledger which offers you the segregation of data
as per the data management Act.
So this is more of like a generalized view of Hyperledger fabric architecture.
Another important enterprise blockchain platform is the code of blockchain.
Now let's go and analyze the code of blockchain platform architecture.