


















































































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 evaluates your understanding of blockchain networks built on Fabric. Tasks include configuring peers, ordering services, channels, chaincode lifecycle operations, identity management using MSPs, and writing smart contracts. You will troubleshoot ledger issues, analyze endorsement policies, optimize network performance, and deploy Fabric networks in real-world distributed setups.
Typology: Exams
1 / 90
This page cannot be seen from the preview
Don't miss anything!



















































































Question 1. In Hyperledger Fabric, which component is primarily responsible for ordering transactions into blocks? A) Peer B) Endorser C) Orderer D) Certificate Authority Answer: C Explanation: The Orderer service implements the ordering service, collecting endorsed transactions, ordering them, and packaging them into blocks for distribution to peers. Question 2. What distinguishes a permissioned DLT like Hyperledger Fabric from a public DLT such as Bitcoin? A) Use of proof‑of‑work consensus B) Open participation without identity verification C) Managed identity and access control via MSPs D) Absence of a blockchain data structure Answer: C Explanation: Permissioned DLTs require participants to be identified and authorized, which is achieved in Fabric through Membership Service Providers (MSPs) and certificate authorities. Question 3. Which type of peer validates and commits blocks but does not execute chaincode for endorsement? A) Endorsing peer B) Committing peer C) Leader peer D) Anchor peer Answer: B
Explanation: A committing peer receives ordered blocks, validates them against endorsement policies, and updates its ledger and world state but does not perform endorsement. Question 4. In Fabric’s modular architecture, which module can be swapped to change the consensus mechanism? A) MSP B) Ledger C) Ordering Service D) Chaincode lifecycle Answer: C Explanation: The ordering service is pluggable; Fabric supports Raft, Kafka, or solo consensus, allowing administrators to replace the consensus implementation. Question 5. Which database option provides rich JSON query capabilities for the world state? A) LevelDB B) CouchDB C) MySQL D) PostgreSQL Answer: B Explanation: CouchDB stores world‑state data as JSON documents, enabling complex queries and rich indexing, whereas LevelDB is a simple key‑value store. Question 6. During the transaction flow, which step creates a proposal that is sent to endorsing peers? A) Validation B) Ordering C) Proposal
C) To store the complete ledger copy D) To issue certificates to users Answer: B Explanation: Anchor peers are designated for cross‑organization communication; they are used by the discovery service to locate peers in other orgs. Question 10. Which command installs a packaged chaincode onto a peer? A) peer lifecycle chaincode approveformyorg B) peer lifecycle chaincode commit C) peer lifecycle chaincode install D) peer chaincode instantiate Answer: C Explanation: The “install” sub‑command uploads the chaincode package to the peer’s file system, making it available for definition approval. Question 11. In the Fabric CA workflow, what is the first step to obtain a signed certificate for a new user? A) Register the user identity B) Enroll the user identity C) Revoke the user identity D) Generate a CSR manually Answer: A Explanation: Registration creates an enrollment secret for the user; enrollment then uses that secret to obtain the signed X.509 certificate. Question 12. Which component validates that a transaction’s read‑write set matches the current world state before committing?
A) Endorser B) Orderer C) Committer D) Client SDK Answer: C Explanation: The committing peer validates the transaction’s RW set against the latest world state to ensure no conflicts before applying updates. Question 13. Which of the following best describes a private data collection (PDC) in Fabric? A) Data stored on the ordering service only B) Off‑chain data shared among a subset of organizations C) Public ledger entries visible to all channel members D) Encrypted data stored in the world state database Answer: B Explanation: PDCs keep data off the main blockchain; only authorized organizations receive the hash on the ledger while the actual data is stored privately. Question 14. What does the “MSP” acronym stand for in Hyperledger Fabric? A) Modular Service Provider B) Membership Service Provider C) Multi‑Signature Protocol D) Managed Security Platform Answer: B Explanation: MSP stands for Membership Service Provider, which defines the trusted root CAs and policies for an organization. Question 15. Which environment variable controls the logging level for Fabric components?
Question 18. Which of the following is NOT a valid endorsement policy syntax in Fabric? A) "AND('Org1MSP.member','Org2MSP.member')" B) "OR('Org1MSP.peer','Org2MSP.admin')" C) "OutOf(2,'Org1MSP.member','Org2MSP.member','Org3MSP.member')" D) "XOR('Org1MSP.member','Org2MSP.member')" Answer: D Explanation: Fabric policies support AND, OR, and OutOf expressions; XOR is not a supported operator. Question 19. What is the default state database used by Fabric when no explicit configuration is provided? A) CouchDB B) LevelDB C) MySQL D) PostgreSQL Answer: B Explanation: LevelDB is the default key‑value store for the world state if no other database is specified. Question 20. Which command displays the current configuration of a channel in JSON format? A) peer channel fetch configblock B) peer channel getinfo C) peer channel fetch config D) configtxlator proto_encode --input config.pb --type common.Config --output config.json Answer: D
Explanation: configtxlator can decode the binary config block to JSON, allowing inspection of the channel configuration. Question 21. In Fabric, what does the term “ledger immutability” refer to? A) The ability to delete old blocks after a certain period B) The guarantee that committed blocks cannot be altered retroactively C) The capability to modify the world state without affecting the blockchain D) The feature that allows peers to prune their local ledger copies Answer: B Explanation: Once a block is committed to the blockchain, its contents are cryptographically linked and cannot be changed, ensuring immutability. Question 22. Which of the following is a characteristic of the Raft consensus algorithm used by Fabric orderers? A) Leader election among orderer nodes B) Proof‑of‑work mining C) Byzantine fault tolerance without a leader D) Centralized single‑node ordering only Answer: A Explanation: Raft is a crash‑fault‑tolerant protocol that elects a leader among orderer nodes to sequence transactions. Question 23. Which Fabric component validates that a transaction complies with the channel’s ACLs? A) Endorser peer Endorser peers evaluate chaincode, not ACLs. The correct answer should be the peer’s validation system. Let's adjust.
C) To query the world state for chaincode data D) To invoke a chaincode function on the peer Answer: B Explanation: “queryinstalled” returns the package identifiers of chaincode that have been installed on the peer. Question 26. Which of the following best describes the role of the discovery service in Fabric? A) It signs transaction proposals on behalf of users B) It dynamically provides endorsement plans and peer endpoints to clients C) It stores the blockchain ledger for all peers D) It encrypts private data collections on the network Answer: B Explanation: The discovery service allows client applications to query peers for current endorsement policies and reachable peers, enabling dynamic routing. Question 27. When a chaincode transaction fails during execution, which component logs the error inside the chaincode container? A) Orderer logs B) Peer logs (chaincode container) C) CA logs D) Discovery service logs Answer: B Explanation: Errors occurring in chaincode execution are captured in the chaincode container’s stdout/stderr, which are aggregated into the peer’s logs. Question 28. Which environment variable is used to specify the MSP ID for a peer’s local MSP? A) CORE_PEER_LOCALMSPID
Answer: A Explanation: CORE_PEER_LOCALMSPID tells the peer which organization’s MSP it belongs to. Question 29. In a Fabric network, which entity issues the TLS certificates that secure gRPC communication? A) Orderer nodes themselves B) The same CA that issues enrollment certificates (or a separate TLS CA) C) The client SDK automatically generates them D) No TLS certificates are required in Fabric Answer: B Explanation: TLS certificates are typically issued by a dedicated TLS CA (which can be the same as the enrollment CA) to authenticate and encrypt peer‑orderer communications. Question 30. What is the effect of setting the “stateDatabase” parameter to “CouchDB” in core.yaml? A) Peers will store ledger blocks in CouchDB B) The world state will be persisted in CouchDB enabling JSON queries C) Chaincode source code will be stored in CouchDB D) Orderer service will use CouchDB for consensus metadata Answer: B Explanation: The “stateDatabase” config determines where the world state (current key‑value pairs) is stored; CouchDB enables rich query support.
Question 34. When revoking a user’s certificate via the Fabric CA, which artifact must be updated on peers to enforce revocation? A) The channel configuration block B) The MSP’s revocation list (CRL) C) The chaincode endorsement policy D) The orderer’s TLS certificates Answer: B Explanation: Revocation updates the Certificate Revocation List (CRL) within the MSP; peers periodically fetch the updated CRL to reject revoked identities. Question 35. In Fabric, what is a “state‑based endorsement” policy? A) A policy that changes based on the block height B) An endorsement policy attached to a specific key in the world state C) A global channel endorsement policy for all chaincode functions D) A policy that only applies to private data collections Answer: B Explanation: State‑based endorsement policies are set per key, allowing fine‑grained control over which orgs must endorse updates to that particular piece of data. Question 36. Which of the following actions requires an “admin” role in the channel’s ACL configuration? A) Submitting a transaction proposal B) Updating the channel configuration (e.g., adding an org) C) Querying chaincode data D) Installing chaincode on a peer Answer: B
Explanation: Modifying channel configuration is a privileged operation typically restricted to admins via ACLs. Question 37. What is the primary purpose of the “orderer.yaml” file? A) To define chaincode endorsement policies B) To configure the orderer service, including consensus and TLS settings C) To list all peers in the network D) To set the logging level for client SDKs Answer: B Explanation: orderer.yaml contains the configuration for the ordering service, such as Raft nodes, Kafka settings, and security parameters. Question 38. Which command generates a collection configuration file for a private data collection? A) peer lifecycle chaincode package B) configtxgen - outputCollectionConfig C) peer chaincode invoke - c collection-config.json D) configtxlator proto_encode --input collection.pb --type peer.CollectionConfigPackage -- output collection.json Answer: B Explanation: configtxgen can create a collection configuration JSON file using the “- outputCollectionConfig” flag. Question 39. When a peer restarts, which data must be persisted to avoid losing ledger history? A) Only the chaincode source code B) The block files and world state database C) The orderer configuration file
C) The method of generating TLS certificates for peers D) The mechanism for replicating ledger data across peers Answer: B Explanation: The chaincode lifecycle covers packaging, installation, approval, and commitment of a chaincode definition. Question 43. Which of the following is NOT a valid way to invoke a chaincode function from a client application? A) Using the Fabric Gateway API B) Directly calling the peer’s gRPC endpoint without endorsement C) Using the Fabric SDK “submitTransaction” method D) Executing “peer chaincode invoke” CLI command Answer: B Explanation: Directly calling the peer’s gRPC endpoint bypasses endorsement and validation, which is not allowed; proper invocation requires endorsement via SDK or CLI. Question 44. What does the “peer channel list” command display? A) All installed chaincode packages on the peer B) The names of channels the peer has joined C) The list of endorsing peers for each channel D) The configuration of the orderer service Answer: B Explanation: “peer channel list” shows the channel IDs that the local peer is a member of. Question 45. Which component of Fabric is responsible for validating that a transaction’s read‑set has not been changed since endorsement? A) Ordering service
B) Endorser peer C) Validation system of the committing peer D) Certificate Authority Answer: C Explanation: The committing peer runs the validation system, which checks that the read‑set version numbers match the current world state before applying writes. Question 46. In a Fabric network, what is the purpose of an “anchor peer” in the channel configuration? A) To serve as the only endorsing peer for its organization B) To act as a gossip bootstrap node for other orgs’ peers C) To store private data collections for the channel D) To generate the channel’s genesis block Answer: B Explanation: Anchor peers are used by the gossip protocol to disseminate blocks across organizations; they are the points of contact for inter‑org communication. Question 47. Which of the following is a consequence of setting “peer.gossip.useLeaderElection” to false? A) All peers will attempt to become the orderer leader B) Gossip messages will be broadcast only by a static leader defined in the config C) Peers will not participate in gossip at all D) The network will automatically disable TLS Answer: B Explanation: Disabling leader election makes the peer use a pre‑configured static leader for gossip dissemination.
Question 51. Which of the following actions will cause a peer to re‑download missing blocks from the orderer? A) Restarting the peer with a new MSP ID B) Executing “peer channel fetch” for a specific block number C) Changing the chaincode endorsement policy D) Adding a new private data collection Answer: B Explanation: “peer channel fetch” can retrieve specific blocks from the orderer, allowing the peer to fill gaps. Question 52. In Fabric, which policy governs who can instantiate a chaincode on a channel? A) Endorsement policy B) Lifecycle endorsement policy (definition) C) Chaincode installation policy D) ACL for “peer/chaincode/instantiate” Answer: D Explanation: The ACL entry for “peer/chaincode/instantiate” controls which identities may instantiate (now “define”) chaincode on a channel. Question 53. Which of the following is a valid reason to use a private data collection instead of storing data on the ledger? A) To reduce the size of the blockchain by keeping data off‑chain B) To enable public read access to the data C) To allow the orderer to validate private data signatures D) To avoid the need for TLS encryption between peers Answer: A
Explanation: Private data collections keep sensitive data off the immutable ledger, reducing ledger size and preserving confidentiality. Question 54. Which of the following statements about the “discovery service” is correct? A) It is only available on orderer nodes B) It requires each peer to have the “discovery” flag enabled in core.yaml C) It replaces the need for endorsement policies D) It stores the private data collection hashes on the blockchain Answer: B Explanation: Peers must enable the discovery service (core.yaml) to respond to discovery queries from clients. Question 55. What does the “peer lifecycle chaincode checkcommitreadiness” command do? A) It verifies that all required organizations have approved the chaincode definition B) It checks that the chaincode source code compiles without errors C) It ensures that the chaincode’s endorsement policy matches the channel’s ACLs D) It queries the world state for the chaincode’s installed version Answer: A Explanation: “checkcommitreadiness” returns a matrix indicating which orgs have approved the definition, helping determine if the commit can proceed. Question 56. Which component is responsible for generating the hash of a private data collection’s contents that is stored on the ledger? A) The endorsement peer that writes the private data B) The orderer service during block creation C) The client application before submission D) The discovery service during query