Hyperledger

Hyperledger Fabric Transaction Flow (Interview Q&A & Notes)

This article represents concepts in relation to, how does a transaction flow in Hyperledger Fabric Blockchain network, in form of notes and interview questions and answers. Those appearing for Hyperledger Fabric interview would find the questions and notes very useful for quick brush-up.

Hyperledger Fabric is a platform for distributed ledger solutions. The following represents key participants in Hyperledger Fabric Blockchain network who are involved in the transaction flow right from the initiation of transaction proposal to committing a transaction into the distributed ledger.

  • Application: Gets involved in following capacity:
    • Sends the transaction proposal to endorsing peers
    • Receives the transaction results from endorsing peers
    • Broadcasts the transaction message to ordering service
  • Endorsing peers: Do some of the following:
    • Validates the transaction proposal
    • Invokes chaincode for processing transaction proposal
    • Sends back the transaction result to application
    • Commit the transaction block to blockchain; Writes the data to state database
  • Membership service provider: Do some of the following:
    • Verify the transaction proposal requests
    • Sign the transaction results
  • Ordering service: Do some of the following:
    • Creates the block of transaction for each channel
    • Send the block of transaction to all peer


Notes – Transaction Flow in Hyperledger Fabric Blockchain Network

  • Hyperledger Fabric supports transactions such as reading from the ledger and writing to ledger.
  • The transaction related to querying data from ledger are not submitted to ordering service
  • Transaction proposal is related to the invocation of chaincode for reading and writing data from/to the state database/ledger.
  • Membership service provider (MSP) is used to verify the transaction requests and sign the transaction results.
  • The transaction result of transaction proposal request consists of following:
    • Read set
    • Write set
    • Response value
  • No updates are made to the ledger at transaction proposal endorsement stage.
  • Transaction proposal responses can be verified at following stages:
    • Application verifies whether the proposal responses fulfill the endorsement policies
    • Endorsement policies are once again enforced during commit validation phase.
  • Transaction message sent to ordering service consists of the following information:
    • Transaction proposal
    • Transaction proposal responses sent by endorsing peers
  • Ordering service groups the transaction based on the channel they belong to.
  • Upon receiving the block of transactions from ordering service, peer nodes do the following before committing the transactions to the ledger
    • Ensure endorsement policy is fulfilled
    • Ensure that there have been no changes to ledger state for read-set variables
  • The following is done as part of committing the block to Blockchain:
    • Append the block of transactions to the channel’s blockchain
    • Persist the write-sets into world state database for each of the valid transactions.


Practice Test – Transaction Flow in Hyperledger Fabric Blockchain Network

[wp_quiz id=”6193″]

Other Practice Tests


References

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking.

Recent Posts

Retrieval Augmented Generation (RAG) & LLM: Examples

Last updated: 25th Jan, 2025 Have you ever wondered how to seamlessly integrate the vast…

1 week ago

How to Setup MEAN App with LangChain.js

Hey there! As I venture into building agentic MEAN apps with LangChain.js, I wanted to…

2 weeks ago

Build AI Chatbots for SAAS Using LLMs, RAG, Multi-Agent Frameworks

Software-as-a-Service (SaaS) providers have long relied on traditional chatbot solutions like AWS Lex and Google…

2 weeks ago

Creating a RAG Application Using LangGraph: Example Code

Retrieval-Augmented Generation (RAG) is an innovative generative AI method that combines retrieval-based search with large…

3 weeks ago

Building a RAG Application with LangChain: Example Code

The combination of Retrieval-Augmented Generation (RAG) and powerful language models enables the development of sophisticated…

3 weeks ago

Building an OpenAI Chatbot with LangChain

Have you ever wondered how to use OpenAI APIs to create custom chatbots? With advancements…

3 weeks ago