Hyperledger Fabric Certified Practitioner Free Sample Questions

Create a free account to browse all 20 sample questions. The full practice test includes 204 questions. Use the simulator for timed and flashcard mode.

Try Simulator

HFCP Sample Questions

  1. Question 1

    Q1

    A financial consortium is deploying a Hyperledger Fabric network with three ordering service nodes using the Raft consensus protocol. To ensure high availability, the operations team wants to allow for one orderer node to fail without impacting the network's ability to process transactions. What is the minimum number of orderer nodes that must be operational to maintain a quorum?

    Show answer & explanation

    Correct answer: B

    Raft is crash fault tolerant as long as a majority of the consenters (a quorum) is available. The quorum is floor(N/2) + 1, so for N = 3 it is 2: a three-node ordering service can lose one node and keep ordering transactions, but if two nodes fail the remaining node cannot form a majority and the channel stops producing blocks.

  2. Question 2

    Q2

    A developer is writing a Go chaincode function to update an asset's state. To ensure data privacy, the asset's price must be passed to the chaincode function but NOT recorded in the transaction's read-write set on the public ledger. Which method should be used to access this private data within the chaincode?

    Show answer & explanation

    Correct answer: C

    The GetTransient() method on the chaincode stub is used to access the transient data field of a transaction proposal. Data in the transient field is passed to the chaincode but is not included in the final transaction that gets committed to the ledger, making it ideal for passing private or confidential information for processing.

  3. Question 3

    Q3

    A system administrator is joining a peer of a newly added organization to an existing channel. When the administrator requests the channel's genesis block from the ordering service (peer channel fetch 0 ...) so that the peer can join, the request is rejected and the ordering node's logs show 'access denied' policy-check failures for the request. The TLS connection to the ordering node is established successfully, and the organization's MSP ID is correct. What is a common cause of this issue?

    Show answer & explanation

    Correct answer: C

    The ordering service delivers a channel's blocks only to identities that satisfy the channel's read policy. In the Fabric 'Adding an Org to a Channel' tutorial, the new organization fetches block 0 only after the configuration update that adds its MSP has been committed: if the organization had not been successfully appended to the channel configuration, the ordering service would reject the request. A missing orderer TLS CA certificate (for example, no --cafile on the CLI call) causes a TLS handshake or certificate-verification failure instead of an access-denied policy error, and the state database, chaincode containers and genesis block content do not decide whether the request is authorized.

  4. Question 4

    Q4

    A developer is building a client application using the Fabric Gateway SDK. The application needs to query the current world state to display information to a user but should not create a transaction that goes through the ordering service. Which Gateway method is most efficient for this purpose?

    Show answer & explanation

    Correct answer: B

    The evaluateTransaction() method is specifically designed for read-only operations (queries). It submits a proposal to a single peer, which executes the chaincode and returns the result directly to the client. This avoids the overhead of the full transaction flow involving endorsement from multiple peers and ordering, making it highly efficient for queries.

  5. Question 5

    Q5

    True or False: When using Private Data Collections (PDCs), the actual private data is sent to the ordering service and included in the block, but it is encrypted so only authorized peers can decrypt it.

    Show answer & explanation

    Correct answer: B

    This statement is false. The core privacy mechanism of PDCs is that the private data itself is NOT sent to the ordering service. Instead, only a hash of the private data is included in the public transaction. The actual private data is transmitted peer-to-peer via the gossip protocol only between the authorized organizations.

  6. Question 6

    Q6Multiple answers

    During a chaincode upgrade using the new lifecycle, an administrator successfully packages and installs the new version. However, when trying to commit the new chaincode definition to the channel, the transaction fails. Which of the following are potential reasons for this commit failure? (Select TWO)

    Show answer & explanation

    Correct answers: B, D

    The chaincode lifecycle requires that each new definition committed to a channel must have a sequence number that is exactly one greater than the previously committed sequence number. Failing to increment the sequence number is a common reason for commit failure.

    Committing a chaincode definition requires satisfying the channel's LifecycleEndorsement policy (typically a majority of organizations). If not enough organizations have submitted an 'approveformyorg' transaction for the new definition, the 'commit' transaction will fail validation.

  7. Question 7

    Q7

    A supply chain network uses anchor peers to facilitate cross-organization communication. Org1 has two peers, peer0.org1 and peer1.org1. Initially, only peer0.org1 was defined as an anchor peer. The administrator now wants to add peer1.org1 as a second anchor peer for redundancy. Which tool and process should be used to perform this update on a running network?

    Show answer & explanation

    Correct answer: C

    Anchor peers are defined in the channel configuration. To update them on a live network, an administrator must create a channel configuration update transaction. This involves fetching the latest config block, using configtxlator to convert it to JSON, modifying the anchor peer definition, converting it back to a protobuf, and submitting the signed update transaction to the channel.

  8. Question 8

    Q8

    A developer needs to implement a query in chaincode that finds all assets belonging to a specific owner. The assets are stored with keys like ASSET_1, ASSET_2, etc., and the owner is an attribute in the JSON value. To make this query efficient without scanning the entire state database, which feature should be used?

    Show answer & explanation

    Correct answer: B

    CouchDB supports rich queries against the JSON data values stored in the world state. To make these queries performant and avoid full database scans, a corresponding index must be created for the fields being queried (in this case, the 'owner' field). The chaincode can then use a GetQueryResult call with a selector to efficiently find all assets for that owner.

  9. Question 9

    Q9

    An event-listening service is designed to monitor a Hyperledger Fabric channel for specific chaincode events. The service crashes and is restarted. To avoid processing duplicate events or missing events that occurred during the downtime, what mechanism should the application implement?

    Show answer & explanation

    Correct answer: B

    This is event checkpointing. The Fabric Gateway client API does not reconnect automatically: after a failure the application must start a new eventing session at the correct start position. A checkpointer (for example checkpointers.file(path)) persists the block number and the last processed transaction ID within that block; passing it as the checkpoint option to getChaincodeEvents() resumes eventing just after the last processed event, with no missed or duplicated events. There is no replay=true option, and neither evaluateTransaction nor a peer buffer setting can recover missed events.

  10. Question 10

    Q10

    A DevOps engineer is setting up monitoring for a production Hyperledger Fabric network using Prometheus. To get detailed metrics about transaction validation latency and chaincode execution time, which component's configuration must be updated to enable the operations service?

    Show answer & explanation

    Correct answer: C

    The operations service, which exposes a REST API for health checks and a /metrics endpoint for Prometheus, must be enabled and configured on the components you wish to monitor. This is done within the operations section of the core.yaml file for peers and the orderer.yaml file for orderers.

Register free to unlock 10 more sample questions

Create a free account to continue with the rest of the HFCP sample set.

Lifetime One

Own this practice test forever.

$79.99
$75.99
one-time
  • Full access to 204 questions
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • Brainy AI Assistant
  • Lifetime updates

Two

Any 2 exams per month.

$20.00/exam
$39.99
/month
  • 2 active exam slots
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • 1,000 Brainy AI Credits
  • Cancel anytime

Premium Twelve

Any 12 exams over 3 months.

$15.00/exam
$179.99
/3 months
  • 4 active exam slots
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • 15,000 Brainy AI Credits
  • Dedicated support
  • Friend seat included — full access

Trusted by professionals at

NvidiaSupabaseGitHubOpenAITursoClerkClaude AIAmazon