






















































































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
Measures proficiency in Hyperledger Fabric development, including chaincode programming (Go/Node.js), network configuration, channel management, certificate authority integration, and ledger operations. Candidates configure networks, write and test smart contracts, manage endorsements, and troubleshoot Fabric components. Real-world scenarios test lifecycle management, private data, MSP configuration, and Fabric CA operations.
Typology: Exams
1 / 94
This page cannot be seen from the preview
Don't miss anything!























































































Question 1. Which component in Hyperledger Fabric is responsible for establishing the ordering of transactions across the network? A) Endorsing Peer B) Orderer Service C) Certificate Authority D) Anchor Peer Answer: B Explanation: The Orderer Service receives endorsed transaction proposals, orders them into blocks, and delivers the blocks to committing peers, ensuring a total order of transactions. Question 2. In a permissioned blockchain, how are participants identified? A) By public keys only B) By pseudonymous addresses C) By X.509 certificates issued by a CA D) By IP addresses Answer: C Explanation: Permissioned blockchains like Fabric use a Certificate Authority to issue X. certificates that uniquely identify each participant. Question 3. Which of the following best describes the “World State” in Fabric? A) An immutable ledger of all blocks B) A mutable database storing the latest value of each key C) A collection of private data hashes D) A log of endorsement policies Answer: B
Explanation: The World State holds the current value of each asset (key‑value pairs) and is updated with each committed transaction, while the blockchain stores the immutable history. Question 4. What is the primary purpose of a channel in Hyperledger Fabric? A) To increase transaction throughput B) To provide data isolation between subsets of organizations C) To store private keys securely D) To enable smart contract execution on mobile devices Answer: B Explanation: Channels create separate ledgers that only members of the channel can access, ensuring privacy and confidentiality of transactions. Question 5. Which endorsement policy would require signatures from Org1 AND Org2 for a transaction to be considered valid? A) “OR('Org1.member','Org2.member')” B) “AND('Org1.member','Org2.member')” C) “OutOf(2,'Org1.member','Org2.member')” D) “MAJORITY('Org1.member','Org2.member')” Answer: B Explanation: The AND policy mandates that both organizations provide endorsements; OR would accept either, and OutOf(2,…) is equivalent but more verbose. Question 6. In Fabric’s “Execute‑Order‑Validate” flow, which step occurs first? A) Ordering the transaction into a block B) Validation of endorsement policies C) Execution (simulation) of the transaction proposal on endorsing peers
A) getState() B) putState() C) deleteState() D) queryState() Answer: B Explanation: putState(key, value) writes or updates a key‑value pair in the world state. Question 10. How can a chaincode developer create a composite key for assets that have two attributes, such as “owner” and “assetID”? A) stub.createCompositeKey('owner~assetID', [owner, assetID]) B) stub.putCompositeKey('owner~assetID', owner, assetID) C) stub.makeKey('owner', assetID) D) stub.concatKey(owner, assetID) Answer: A Explanation: createCompositeKey takes a namespace string and an array of attribute values to generate a deterministic composite key. Question 11. Which state database enables rich JSON queries in Fabric? A) LevelDB B) CouchDB C) RocksDB D) MySQL Answer: B Explanation: CouchDB stores world‑state entries as JSON documents, allowing complex queries using Mango selectors.
Question 12. When using CouchDB, why is it recommended to define indexes for frequently queried fields? A) To reduce the size of the blockchain B) To improve query performance by avoiding full scans C) To enable encryption of private data D) To allow multiple channels to share the same ledger Answer: B Explanation: Indexes let CouchDB locate matching documents quickly, avoiding expensive full‑database scans. Question 13. Which of the following statements about Private Data Collections (PDC) is true? A) Private data is stored on the ordering service. B) All channel members receive the private data hash. C) Private data is never written to any ledger. D) Private data can be accessed by any peer on the network. Answer: B Explanation: While the actual private data is only stored on authorized peers, every peer on the channel receives the hash to verify integrity. Question 14. In a collection policy, what does the “memberOnlyRead” rule enforce? A) Only the collection owner can read the data. B) Only members listed in the policy can read the data. C) All channel members can read the data. D) No one can read the data; it is write‑only. Answer: B
C) queryTransaction() D) invokeTransaction() Answer: B Explanation: submitTransaction sends the proposal to endorsing peers, collects endorsements, and submits the transaction to the ordering service for commitment. Question 18. In the Fabric Gateway, what does the “network” object represent? A) A specific peer node B) The ordering service cluster C) A channel within the Fabric network D) The collection of all organizations Answer: C Explanation: The network object is instantiated with a channel name and provides access to contracts (chaincode) deployed on that channel. Question 19. Which file typically contains the connection information (TLS certs, endpoints) for a Fabric client application? A) wallet.json B) connection-profile.yaml C) chaincode.tar.gz D) endorsement-policy.json Answer: B Explanation: The connection profile (YAML or JSON) defines the network topology, MSP IDs, and TLS details needed to connect via the gateway. Question 20. How does a client application retrieve a user’s identity from a wallet?
A) wallet.getUser(username) B) wallet.import(identity) C) wallet.get(username) D) wallet.fetch(username) Answer: C Explanation: wallet.get(username) returns the stored Identity (certificate and private key) for the given user. Question 21. Which event type can be listened to in a client application to be notified when a new block is committed? A) ChaincodeEvent B) BlockEvent C) TransactionEvent D) PeerEvent Answer: B Explanation: BlockEvent is emitted by the peer when a new block is added to the ledger, allowing applications to react to block‑level changes. Question 22. What command is used to package a Node.js chaincode into a .tar.gz archive for installation? A) peer lifecycle chaincode package mycc.tar.gz --path ./chaincode --lang node --label mycc_ B) fabric-ca-client package mycc.tar.gz --lang node C) orderer chaincode package mycc.tar.gz --path ./chaincode D) peer chaincode install mycc.tar.gz Answer: A
B) The transaction attempted to write to a private data collection without permission. C) The state version read during simulation is no longer current at commit time. D) The ordering service failed to order the transaction. Answer: C Explanation: MVCC (Multi‑Version Concurrency Control) read conflicts occur when the version of a key read during simulation has been updated by another transaction before commit. Question 26. In Fabric logs, which component typically prints messages prefixed with “orderer”? A) Peer node B) Certificate Authority C) Ordering Service node D) Chaincode container Answer: C Explanation: Orderer logs are emitted by the ordering service process, identified by the “orderer” prefix. Question 27. Which command can be used to query the installed chaincode packages on a peer? A) peer lifecycle chaincode queryinstalled B) peer chaincode listinstalled C) peer lifecycle chaincode querydefinition D) peer channel listinstalled Answer: A Explanation: “peer lifecycle chaincode queryinstalled” returns the package IDs of chaincode installed on the peer.
Question 28. What is the purpose of the “--signature-policy” flag when committing a chaincode definition? A) To set the TLS certificate for the orderer B) To define the endorsement policy required for future transactions C) To specify the private data collection name D) To configure the chaincode’s runtime language Answer: B Explanation: The signature policy defines how many and which organizations must endorse a transaction for the chaincode after it is committed. Question 29. Which of the following best describes a “Transient Map” in chaincode invocation? A) A permanent key‑value store on the ledger B) A temporary data structure passed to the chaincode that is not persisted to the ledger C) A configuration file for the orderer service D) A map of endorsement signatures Answer: B Explanation: Transient data is sent with the proposal, accessible to the chaincode, but never written to the world state, useful for private inputs. Question 30. When a client registers a new user with the Fabric CA, which piece of information must be provided? A) The user’s private key B) The user’s enrollment secret (password) C) The peer’s TLS certificate
B) Endorsing Peer C) Committing Peer (validation phase) D) Certificate Authority Answer: C Explanation: During the validation phase, committing peers check that the endorsements satisfy the policy before committing the block. Question 34. In a Fabric network using Raft consensus, what is the role of the leader node? A) To generate cryptographic hashes for blocks B) To order incoming transactions and broadcast blocks to followers C) To store private data collections D) To issue certificates to users Answer: B Explanation: The Raft leader receives transaction proposals from ordering service nodes, orders them into blocks, and replicates the blocks to follower orderer nodes. Question 35. Which of the following is NOT a valid way to restrict access to a private data collection? A) Defining an endorsement policy that excludes certain orgs B) Setting a collection policy with memberOnlyRead C) Encrypting the private data with a symmetric key stored on the orderer D) Using the “requiredPeerCount” attribute to specify minimum peers that must store the data Answer: C Explanation: The orderer does not store private data; encrypting data for the orderer does not control collection access. Access is managed via collection policies and endorsement settings.
Question 36. What does the “peer lifecycle chaincode querycommitted” command return? A) The list of chaincode packages installed on the peer B) The definition of chaincode that has been committed to a channel, including version and endorsement policy C) The current ledger height D) The private data collection configuration Answer: B Explanation: This command shows the chaincode definition that is active on a specific channel, confirming the committed version and policy. Question 37. Which attribute in a connection profile specifies the TLS root certificate for a peer? A) tlsCACerts.path B) grpcOptions.ssl-target-name-override C) url D) peerAdminIdentity Answer: A Explanation: The tlsCACerts.path points to the PEM file containing the root CA certificate used to verify the peer’s TLS certificate. Question 38. In a Node.js client application, which method is used to listen for chaincode events emitted during transaction execution? A) contract.addContractListener() B) network.addBlockListener() C) contract.addListener() D) gateway.registerEvent()
B) Determines how many transactions are batched into a single block before it is cut C) Sets the maximum size of a private data collection D) Controls the number of peers allowed in a channel Answer: B Explanation: maxMessageCount defines the block size in terms of number of messages (transactions) after which the orderer creates a new block. Question 42. Which component validates client certificates during TLS handshake in Fabric? A) The ordering service only B) Each peer and orderer validates against its configured root CA certificates C) The Certificate Authority validates every TLS connection D) The client validates the server’s certificate, but not vice‑versa Answer: B Explanation: Both peers and orderers perform TLS verification using the root CA certificates defined in their configuration. Question 43. In chaincode, which function can be used to retrieve the transaction ID of the current proposal? A) stub.getTxID() B) ctx.getTransactionID() C) stub.getTransactionID() D) ctx.txID() Answer: C Explanation: The ChaincodeStub method getTransactionID() returns the unique identifier for the current transaction proposal.
Question 44. What is the purpose of the “Chaincode as a Service” (CaaS) model introduced in Fabric v2.5? A) To run chaincode in external processes communicating via gRPC, enabling language‑agnostic deployment B) To embed chaincode directly into the ordering service C) To replace the peer’s gossip protocol with a REST API D) To store chaincode source code on the ledger for auditability Answer: A Explanation: CaaS allows chaincode to run as an external service (outside Docker), communicating with peers over gRPC, supporting any language that implements the chaincode interface. Question 45. Which environment variable can be set to increase the log level of a Fabric peer to “debug”? A) FABRIC_LOGGING_SPEC=debug B) PEER_LOG_LEVEL=debug C) CORE_LOGGING_LEVEL=debug D) FABRIC_DEBUG=true Answer: A Explanation: FABRIC_LOGGING_SPEC controls the logger specification; setting it to “debug” enables detailed debug output. Question 46. When a peer receives a block, which step is performed first? A) Validation of each transaction’s endorsement policy B) Updating the world state with write sets C) Storing the block in the file system D) Emitting block events to listeners
B) Using panic() to abort execution C) Returning an error object with a clear message via shim.Error() D) Ignoring the error and continuing execution Answer: C Explanation: shim.Error() returns a structured error that the client can interpret, providing clear diagnostics. Question 50. What is the purpose of the “Endorsement System Chaincode” (escc) that ships with Fabric? A) To manage private data collections B) To validate endorsement signatures during transaction validation C) To provide a default implementation of the endorsement policy logic used by peers D) To generate block hashes for the ordering service Answer: C Explanation: escc is a system chaincode that implements the endorsement policy evaluation; peers invoke it during validation. Question 51. Which of the following best describes the relationship between a “Channel” and a “Ledger”? A) Each channel has its own independent ledger (blocks + world state) B) All channels share a single ledger but have separate endorsement policies C) Channels only affect network routing; the ledger is global D) A ledger can span multiple channels simultaneously Answer: A Explanation: A channel encapsulates a distinct ledger, including its blockchain and world state, isolated from other channels.
Question 52. In a Fabric network using Raft, what happens if the leader orderer crashes? A) The network stops processing transactions permanently B) A new leader is elected among the remaining orderer nodes automatically C) All pending transactions are discarded D) Peers become temporary orderers to keep the network alive Answer: B Explanation: Raft automatically elects a new leader from the remaining nodes to continue ordering. Question 53. Which of the following is NOT a valid endorsement policy syntax? A) “OR('Org1.member','Org2.member')” B) “OutOf(2,'Org1.member','Org2.member','Org3.member')” C) “MAJORITY('Org1.member','Org2.member')” D) “AND('Org1.admin','Org2.admin')” Answer: C Explanation: Fabric policies support AND, OR, and OutOf; there is no built‑in MAJORITY keyword. Question 54. What does the “peer lifecycle chaincode checkcommitreadiness” command do? A) Verifies that all required organizations have approved the chaincode definition B) Checks that the chaincode source code compiles successfully C) Ensures the peer’s ledger is synchronized with the orderer D) Validates that the endorsement policy matches the installed package Answer: A