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

Agentic Reasoning Design Patterns in AI: Examples

In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…

1 month ago

LLMs for Adaptive Learning & Personalized Education

Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…

2 months ago

Sparse Mixture of Experts (MoE) Models: Examples

With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…

2 months ago

Anxiety Disorder Detection & Machine Learning Techniques

Anxiety is a common mental health condition that affects millions of people around the world.…

2 months ago

Confounder Features & Machine Learning Models: Examples

In machine learning, confounder features or variables can significantly affect the accuracy and validity of…

2 months ago

Credit Card Fraud Detection & Machine Learning

Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…

2 months ago