← All CBDH Flashcard Decks

Documentation & Best Practices Flashcards

7 cards from real CBDH practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Documentation & Best Practices flashcards as text
  1. What is the typical way chaincode should signal a failed business rule to the client?

    Answer: Return an error response (e.g., shim.Error or a returned error)

    Returning an error produces a clean failed response without crashing the chaincode process.

  2. Which library lets chaincode enforce access control based on the caller's identity and certificate attributes?

    Answer: Client Identity (cid) library

    The cid library exposes MSP ID, ID, and attributes so chaincode can implement ABAC checks.

  3. What is the best practice for large files such as PDFs that relate to ledger assets?

    Answer: Store the file off-chain and keep its hash and a reference on the ledger

    Keeping bulky data off-chain preserves performance while the on-chain hash proves integrity.

  4. Frequent MVCC_READ_CONFLICT errors on a single counter key suggest what design fix?

    Answer: Avoid hot keys by writing separate delta records using composite keys and aggregating later

    Concurrent updates to the same key conflict, so spreading writes across keys avoids version conflicts.

  5. Which logging practice is recommended for chaincode and peers in production?

    Answer: Set levels via FABRIC_LOGGING_SPEC and never log sensitive data

    Logging levels are configurable, and sensitive data or keys must never appear in logs.

  6. Why should chaincode validate all input arguments?

    Answer: Because arguments arrive as untrusted client input

    Chaincode must check types, ranges, and formats itself, as clients can send arbitrary data.

  7. What does a good chaincode API document typically describe?

    Answer: Function names, parameters, return values, access rules, and error cases

    Clear API docs help client developers and auditors use the contract correctly and understand its permissions.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. blockchaintrainingalliance.com — Test delivery, passing score, score release, test dates, fees, exam format, time limit · verified Oct 2026