



























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This exam guide prepares candidates for blockchain development using Hyperledger frameworks, covering smart contracts, chaincode development, network configuration, security, and enterprise blockchain use cases. The guide emphasizes hands-on development concepts and exam-aligned technical scenarios.
Typology: Exams
1 / 99
This page cannot be seen from the preview
Don't miss anything!




























































































Question 1. Which component in Hyperledger Fabric is responsible for validating transaction signatures after ordering? A) Peer endorsement service B) Ordering service node (OSN) C) Validation system chaincode (VSCC) D) Membership Service Provider (MSP) Answer: C Explanation: VSCC runs on each peer during the validation phase to check that the transaction satisfies the endorsement policy and that signatures are valid. Question 2. In Fabric, what does the term “world state” refer to? A) The immutable ledger of all transactions B) The current key-value database representation of assets C) The configuration of the channel D) The collection of private data hashes Answer: B Explanation: The world state is a snapshot of the latest values for all keys, stored in LevelDB or CouchDB, enabling fast reads. Question 3. Which of the following is NOT a valid endorsement policy language construct? A) “AND('Org1.member','Org2.member')” B) “OR('Org1.admin','Org2.peer')” C) “NOutOf(2,'Org1.member','Org2.member','Org3.member')” D) “XOR('Org1.member','Org2.member')” Answer: D
Explanation: Fabric supports AND, OR, and NOutOf constructs; XOR is not part of the endorsement policy syntax. Question 4. What is the primary purpose of a Private Data Collection in Fabric? A) To store encrypted data on the blockchain B) To keep certain key-value pairs hidden from other channel members while still providing hash proof on the ledger C) To replicate the world state across all peers automatically D) To replace the need for channels Answer: B Explanation: Private data collections allow confidential data to be stored off-ledger for authorized organizations, while a hash is stored on the public ledger for integrity verification. **Question 5. Which Fabric component issues X.509 certificates to users and peers? ** A) Ordering Service Node (OSN) B) Certificate Authority (CA) C) Gossip service D) Ledger database Answer: B Explanation: The Fabric CA is responsible for generating and managing enrollment certificates (e-certs) for identities. Question 6. When a client application invokes a transaction proposal, which peer role processes the proposal first? A) Anchor peer
Question 9. Which of the following is a deterministic function that can safely be used in chaincode? A) math/rand.Intn() B) time.Now() C) crypto/sha256.Sum256() D) os.Getpid() Answer: C Explanation: Cryptographic hash functions produce the same output for identical inputs across all peers, satisfying determinism. Question 10. What is the role of the Gossip service in Fabric peers? A) To order transactions globally B) To propagate ledger blocks and state updates among peers in a channel C) To authenticate client identities D) To manage chaincode lifecycle approvals Answer: B Explanation: Gossip disseminates blocks and state data efficiently across peers, ensuring consistency within a channel. Question 11. Which ledger database is required to perform rich JSON queries? A) LevelDB B) CouchDB C) RocksDB D) SQLite Answer: B
Explanation: CouchDB stores world-state as JSON documents, enabling selector-based rich queries. Question 12. Which of the following statements about channels is FALSE? A) Channels provide data isolation between subsets of network participants. B) Each channel has its own genesis block and configuration. C) A peer can belong to multiple channels simultaneously. D) Private data collections can be shared across channels without additional configuration. Answer: D Explanation: Private data collections are scoped to a single channel; they cannot be shared across channels without defining separate collections. Question 13. In Fabric, what does the term “implicit collection” refer to? A) A collection automatically created for each organization on a channel B) A collection that stores encrypted data on the blockchain C) A collection that is defined in the chaincode source code only D) A collection that is visible to all channel members by default Answer: A Explanation: Implicit collections are automatically generated for each org, simplifying private data handling without explicit definition. Question 14. Which CLI tool is used to generate a channel configuration transaction (configtx) file? A) peer B) configtxlator C) osnadmin
B) Validation system chaincode (VSCC) C) Endorsement system chaincode (ESCC) D) Membership Service Provider (MSP) Answer: B Explanation: VSCC checks that the version numbers in the read-set match the current world state before committing. Question 18. In Fabric chaincode, which method is used to retrieve the client’s certificate attributes? A) GetCreator() B) GetBinding() C) GetAttributeValue() from the CID library D) GetTxID() Answer: C Explanation: The CID (Client Identity) library provides GetAttributeValue to read attributes embedded in the X.509 certificate. Question 19. Which of the following is a recommended practice to avoid non-deterministic behavior in chaincode? A) Use math/rand.Seed(time.Now().Unix()) at each invocation B) Store timestamps in world state for each transaction C) Rely on the peer’s local file system for temporary data D) Perform all random number generation off-chain in the client application Answer: D Explanation: Randomness should be generated outside the chaincode; otherwise peers may produce different results, causing validation failures.
Question 20. What does the peer lifecycle chaincode commit command do? A) Packages the chaincode source into a tar.gz file B) Installs the chaincode on all peers in the channel C) Finalizes the chaincode definition on the channel so that it can be invoked D) Generates a new channel genesis block Answer: C Explanation: commit records the approved chaincode definition on the channel, making the chaincode ready for transaction processing. Question 21. Which environment variable is used by Fabric peers to specify the MSP ID they belong to? A) CORE_PEER_MSPCONFIGPATH B) CORE_PEER_LOCALMSPID C) FABRIC_CA_CLIENT_HOME D) ORDERER_GENERAL_LOCALMSPID Answer: B Explanation: CORE_PEER_LOCALMSPID defines the MSP identifier for the peer’s organization. Question 22. In a Fabric network, what is the purpose of the ordering service’s “consensus type” set to “Raft”? A) To provide a crash-fault tolerant (CFT) ordering mechanism based on a replicated log B) To enable Byzantine fault tolerance (BFT) across orderer nodes C) To allow peer-to-peer transaction ordering without a separate orderer cluster
A) Go SDK B) Node.js SDK C) Java SDK D) All of the above Answer: D Explanation: The Gateway API is available in Go, Node.js, and Java SDKs, offering a high-level abstraction for submitting transactions. Question 26. In Fabric, which component is responsible for converting a channel configuration transaction from JSON to protobuf? A) configtxlator B) cryptogen C) peer CLI D) orderer daemon Answer: A Explanation: configtxlator performs the translation between JSON and protobuf formats for channel configuration updates. Question 27. What is the primary benefit of using Docker containers for Fabric components? A) They provide built-in consensus algorithms B) They isolate each component, simplifying deployment and version management C) They replace the need for a Certificate Authority D) They automatically generate endorsement policies Answer: B Explanation: Docker encapsulates peers, orderers, and CAs, ensuring consistent environments and easy scaling.
Question 28. Which of the following events can a client application listen to via the Fabric SDK? A) Block events only B) Transaction events only C) Chaincode events only D) Block, transaction, and chaincode events Answer: D Explanation: The SDK allows registration for block events, transaction commit events, and custom chaincode events. Question 29. When a chaincode invokes GetState(key), what does Fabric actually retrieve? A) The latest value of key from the ledger’s immutable transaction log B) The value of key from the world state database (LevelDB/CouchDB) C) The hash of the transaction that created key D) The endorsement policy associated with key Answer: B Explanation: GetState reads from the current world state, which reflects the latest committed values. Question 30. Which command is used to generate cryptographic material for organizations in a test network? A) peer channel create B) cryptogen generate C) configtxlator protoencode D) osnadmin channel join
B) Private data that is only shared among endorsing peers and not written to the ledger C) Temporary files created by the peer process D) The hash of a private data collection Answer: B Explanation: Transient data is passed with proposal requests, used during simulation, but never persisted on the blockchain. Question 34. Which of the following best describes the purpose of the peer channel fetch command? A) To retrieve the latest block from the ordering service for a channel B) To download the channel’s genesis block only C) To pull chaincode source code from the network D) To obtain the MSP configuration of a peer Answer: A Explanation: fetch can retrieve blocks (newest, oldest, or specific) from the orderer for a given channel. Question 35. What is the effect of setting CORE_PEER_GOSSIP_USELEADERELECTION=true? A) The peer will become an orderer node B) The peer will participate in leader election for gossip dissemination C) The peer will disable gossip entirely D) The peer will only receive blocks from the orderer, not from other peers Answer: B Explanation: Enabling leader election allows peers to elect a leader for efficient gossip propagation.
Question 36. Which cryptographic algorithm does Fabric use for signing transactions? A) RSA- 2048 B) ECDSA with the P-256 curve C) Ed D) SHA- 3 Answer: B Explanation: Fabric defaults to ECDSA-P256 for generating digital signatures on proposals and transactions. Question 37. In a Fabric network, which file typically contains the definition of an organization’s peers, orderers, and CAs for the SDK? A) core.yaml B) configtx.yaml C) Connection profile (YAML/JSON) D) docker-compose.yaml Answer: C Explanation: Connection profiles describe network endpoints and TLS settings for SDKs. Question 38. Which of the following is a valid reason to use a “channel” instead of a private data collection? A) To hide transaction data from all other organizations, including those on the same channel B) To enforce a separate ordering service for the subset of participants C) To achieve full data isolation with separate ledger copies
Question 41. Which attribute in an X.509 certificate can be used to implement attribute-based access control (ABAC) in chaincode? A) OU (Organizational Unit) B) CN (Common Name) C) Subject Alternative Name D) Custom attribute extensions (e.g., hf.Type) Answer: D Explanation: Fabric allows custom attribute extensions that can be read via the CID library for ABAC decisions. Question 42. What is the purpose of the CORE_PEER_TLS_ROOTCERT_FILE environment variable? A) To specify the peer’s own TLS certificate B) To point to the root CA certificate used to verify TLS connections with other nodes C) To define the MSP ID for the peer D) To configure the peer’s logging level Answer: B Explanation: This variable tells the peer where to find the root TLS CA certificate for validating peer and orderer TLS certificates. Question 43. Which of the following statements about chaincode “init” function in Fabric 2.x is TRUE? A) It must be called on every transaction invocation B) It is optional and only required if the chaincode defines an Init method C) It is automatically executed by the ordering service before any block is created D) It cannot access transient data
Answer: B Explanation: The Init function is optional; if defined, it can be invoked during the first instantiate/upgrade transaction. Question 44. In Fabric, what does the term “implicit collection” enable for an organization? A) Automatic creation of a private collection without explicit configuration B) Sharing of private data across all organizations on a channel C) Storing chaincode source code on the ledger D) Encrypting world state entries with a symmetric key Answer: A Explanation: Implicit collections are auto-generated per org, simplifying private data handling. Question 45. Which command is used to update a channel configuration to add a new organization? A) peer channel create B) peer channel update with a config update transaction C) peer lifecycle chaincode approveformyorg D) osnadmin channel join Answer: B Explanation: A config update transaction, generated via configtxlator, is submitted with peer channel update to modify the channel config. Question 46. What is the effect of setting CORE_CHAINCODE_MODE=dev for a peer? A) Chaincode runs inside a Docker container automatically
Question 49. In a Fabric network, what does the orderer.yaml file configure? A) Peer gossip parameters B) Chaincode lifecycle settings C) Ordering service node (OSN) properties, such as consensus type and TLS settings D) Client SDK connection details Answer: C Explanation: orderer.yaml holds configuration for OSN behavior, including Raft or Kafka consensus, ports, and security. Question 50. Which of the following is a recommended practice for indexing data in CouchDB used by Fabric? A) Create a single index for all document types to simplify queries B) Define specific JSON indexes for each query pattern to improve performance C) Disable indexing to reduce storage overhead D) Use LevelDB indexes instead of CouchDB indexes Answer: B Explanation: Tailored JSON indexes enable efficient selector queries, reducing query latency. Question 51. What does the peer lifecycle chaincode querycommitted command return? A) The list of chaincode packages installed on the peer B) The chaincode definition (name, version, sequence) that has been committed on a channel C) All endorsement policies for the channel D) The current block height of the channel
Answer: B Explanation: querycommitted shows the chaincode definition that the peer has recorded as committed on the specified channel. Question 52. Which of the following is a consequence of enabling TLS for Fabric peers? A) All communication between peers and orderers becomes encrypted and authenticated B) Endorsement policies are no longer required C) Private data collections are automatically encrypted at rest D) The world state is stored in memory only Answer: A Explanation: TLS secures network traffic, providing confidentiality and mutual authentication between nodes. Question 53. In Fabric, what is the purpose of the “channel genesis block”? A) It contains the first transaction that creates a private data collection B) It defines the initial configuration of the channel, including policies and consortium members C) It stores the hash of all subsequent blocks D) It holds the chaincode source code for the channel Answer: B Explanation: The genesis block is the first block of a channel, encapsulating its configuration. Question 54. Which of the following statements about “chaincode endorsement” is correct?