Learn Hyperledger Fabric via Questions and Answers Sets

Don Li
5 min readMay 28, 2019

--

Image credit: DMITRII GUZHANIN / ISTOCK

When I first started to learn Hyperledger Fabric I wish there were some practice questions that would help me to understand what concepts and terms are important. And by passing an exam based on such questions it would provide some proof that I possess a considerable practical knowledge of Hyperledger Fabric blockchain platform as its application developer.

Well, today I’m sharing twenty such vital questions about Hyperledger Fabric with you. You may find it’s a fun way to learn Hyperledger Fabric in addition to learning from training materials (ask me about them if interested).

Objective

To help software programmers and college students who are interested in learning Hyperledger Fabric to understand critical concepts and terms in HL Fabric via questions and answers.

Scope of Content

It is composed of the following three sections of Operating System and Supporting Technology and (Linux/Ubuntu + Docker), Hyperledger Fabric Blockchain Network Setup and Chaincode and How to Develop a Web Application on top of such Network.

But before we move to the question sets, let me thank the following Hyperledger Fabric professionals for their peer review of these question sets and for their valuable feedback:

Jorden Seet

Biser Dimitrov

Julia Shutova

Practice Question Sets

(1) To list files and directories at command line under a Linux/Ubuntu operating system

A. dir

B. ls

C. cmd

D. file manager

Answer: B

(2) To change file permission to be executable for all under a Linux/Ubuntu operating system

A. chmod user+x

B. chmod rwx

C. chmod a+x

D. chmod 700

Answer: C

(3) To find out all the docker images that have been installed on your current Linux/Ubuntu operating system

A. docker list

B. docker images

C. docker ps

D. docker exec

Answer: B

(4) For the famous “byfn” (Build Your First Network) sample application, if you encounter an unexpected error you’ll try to trouble shoot like the following:

A. docker network prune; docker volume prune

B. docker rm -f $(docker ps -qa)

C. A and B

D. docker delete

Answer: C

(5) What is YAML file within the Hyperledger Fabric and Docker context?

A. an optional descriptive text file about a particular peer

B. a configuration file that determines how the Fabric network and Docker should perform a specific task

C. a text file that specifies endorsement policy for transactions

D. an optional descriptive text file about a particular chaincode

Answer: B

(6) When creating a network according to an organization’s structure and also bootstrap a channel what are the following artifacts we would need to generate?

A. Genesis Block, ledger Configuration and Anchor Peer Configs for each organization.

B. Genesis Block, Channel Configuration and Anchor Peer Configs for each organization.

C. Genesis Block, Channel Configuration and Anchor MSP Configs for each organization.

D. Genesis Block, License File and Anchor Peer Configs for each organization.

Answer: B

(7) Hyperledger Fabric Ledger has two parts. What are they?

A. State data and Snapshots

B. State Data and Transaction Logs

C. Stateless Data and Snapshots

D. Stateful Data and Membership Logs

E. State Data and Membership Logs

Answer: B

(8) Level DB is the default database for Hyperledger Fabric and is particularly appropriate when ledger states comprise what type of data?

A. Complex key-value pairs

B. Simple key-value pairs

C. JSON data pairs

D. Rich Queries

Answer: B

(9) Blockchain services consist of three major components. What are they? (Select three.)

A. Consensus Manager

B. Peer to Peer Protocol

C. Reputation Manager

D. Membership Services

E. Distributed Ledger

Answer: A,B,E

(10) The ledger system in Hyperledger Fabric uses what database by default?

A. MS SQL

B. CouchDB

C. LevelDB

D. MySQL

E. PostGres SQL

Answer: C

(11) User chaincode has four life cycle of

A. “Install”, “Initiate”, “Invoke” and “Query”.

B. “Install”, “Instantiate”, “Invoke” and “Query”.

C. “Install”, “Update”, “Invoke” and “Query”.

D. “Install”, “Verify”, “Invoke” and “Query”.

Answer: B

(12) Chaincode may be written in any of which three languages?

A. Node (Node.JS), Golang (Go) and Java

B. C, C++ and Pascal
C. Basic, .NET and C

D. Java, PHP and C++

Answer: A

(13) What are the three different types of Nodes?

A. MSP Node, Docker Node and Admin Node

B. Peer Node, Orderer Node and Client Node

C. Anchor Peer Node, Lead Peer Node and Admin Node

D. None of the above

Answer: B

(14) What is Channel?

A. A channel in Hyperledger Fabric is the subnet of the main blockchain. You can have any number of Channels in a Blockchain.

B. A channel is a different name for consensus protocol

C. A channel is the mechanism for Membership Service Provider

D. A channel determines how endorsement policy works

Answer: A

(15) Can a Peer or Node be a part of many channels?

A. Yes

B. No

Answer: A

(16) What is Identity management?
A. An optional service for Hyperledger Fabric participants

B. A user account that can be used for any channel

C. A built-in service that handles Security, Members, Roles, and digital signatures of user accounts

D. Each chaincode has its own unique identity for access control

Answer: C

(17) What is Certificate Authority?

A. A mechanism for fulfilling endorsement policy

B. Fabric CA takes care of registration, issuance of e-certificates, role assignment, renewals and revocation to the various nodes before they can start communicating in the network

C. A consensus protocol and nothing more

D. A special mechanism for orderer

Answer: B

(18) Which of the following best describes Chaincode in Hyperledger Fabric?

  1. Is a key/value state database
  2. Maintains the state of the network and a copy of the ledger
  3. Accepts endorsed transactions, orders them into a block, and delivers the blocks to the committing peers
  4. Is the smart contract that runs on the peers and creates transactions

Answer: D

(19) How will transactions be processed if not all the nodes are online all the time (e.g.the ship is in the sea and does not have connectivity)?

A. Not solvable

B. Make the endorsement policies flexible, for instance, not requiring all the nodes be endorsers

C. Select random nodes as endorsers

Answer: B

(20)

curl -s -X POST http://{hostname}:{port}/chaincodes

-H ‘authorization: Bearer mytoken’

-H ‘content-type: application/json’

-d ‘{“”peers””: [“”peer0.org1.example.com””,””peer1.org1.example.com””],””chaincodeName””:””house””,””chaincodePath””:””/home/userid/fabric-samples/chaincode/houseproj/node””,””chaincodeType””: “”node””,””chaincodeVersion””:””v0"”}’

A. The above code installs chaincode named “house” onto peers named “peer0.org1.example.com” and “peer1.org1.example.com”

B. The above code instantiates chaincode named “house” onto a peer named “peer0.org1.example.com”

C. The above code queries the ledger with chaincode named “house”

D. The above code verifies if the channel has a chaincode named “house”

Answer: A

Hope you find the article informative. If you’re interested in receiving the full sets of 60 questions with correct answers and explanations where appropriate feel free to contact me. Just be upfront, they are available for a small fee.

--

--