HYPERLEDGER FABRIC CERTIFICATIONS: CHFA AND CHFD - DIRECTIONS

HYPERLEDGER FABRIC CERTIFICATIONS: CHFA AND CHFD - DIRECTIONS

Hi, first of all, I want to explain my motivation for writing this article. The main motive is that during my preparation phase for both certifications I felt very hard to find content to help me with my preparation and the lack of resources to have a good learning path that makes it safe to schedule and properly take the exams. So, I decided to help others to have a good learning path and, of course, respecting Linux Foundation Disclosure agreements.

This article is published on medium.com under this link:

https://medium.com/@davidfdr/chfa-and-chfd-thoughts-and-directions-2597d47064f0

This is my first article. So, i′m sorry if I miss something.

The Exams

Both certifications (CHFA — Certified Hyperledger Fabric Administrator / CHFD — Certified Hyperledger Fabric Developer) are very challenging. They really test your skills in real world scenarios. Unlike other multiple choice certs (nothing against the others), but the Linux Foundation certifications measure your knowledge against the test objectives in a profound way. The passing grades are:

  1. CHFA: 62% (My score was 80%)
  2. CHFD: 65% (My score was 78% and I used the free retake chance)

Both exams are proctored, so, you may have support during all the time regarding environment issues but not directly exam content.

Make sure that you have a good Webcam because the proctors need to validate your ID (Passport or Government ID).

You need to have a good mouse too, they provide a type of web notepad to copy and paste the commands. I used a lot of copy and paste actions using the mouse. The keys CTRL+C and CTRL+V do not always work in the environment.

For the CHFA, they provide a terminal to execute the commands and login at the environment. You need to login and execute the tasks simulating a real world scenario, so, you have to be familiarized with Linux commands (Ubuntu Linux until the date of my exam, Ubuntu 20.04).

HINT: The usage of Terminal Multiplexers may be a good thing to be able to check logs and execute the operations and have multiple shells available.

For the CHFD, they provide an IDE (Integrated Development Environment) to execute the programming tasks and access the linux terminal when needed. They say that it is Eclipse Theia, but is very similar to VSCode IDE from Microsoft.

Both exams must be finished in 2 (two) hours and this is the most challenging because the exam tests your capacity of resolving issues under little time window increasing the pressure received (A lot of real world situations demand this type of pressure).

HINT: YOU MUST MAINTAIN YOUR CALM OR YOU WILL LOSE TIME

A good thing is that both exams (CHFA and CHFD) have a free retake, so you may have a second try. I am almost completely sure that the main motive to have a NO PASS GRADE in both exams is the nervousness during the exam questions and tasks.

CHFA — CERTIFIED HYPERLEDGER FABRIC ADMINISTRATOR

N?o foi fornecido texto alternativo para esta imagem

As above mentioned, for each of the tasks, you will be asked to login in a different terminal in a completely different environment, so, the tasks do not depend on each other, but they follow an understanding path so, the commands crafted in one question may be reutilized on the next question.

The exam is based on the 2.2 LTS version (Currently on 2.2.5 until today′s publication of this article date).

As my learning path, I took the following courses and actions:

Tasks:

  • The official documentation:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/whatis.html

  • Read all the official documentation;
  • Execute ALL of Getting Started tasks;
  • Execute ALL of the tutorials a lot of times;
  • Get to know all of Fabric Samples structure for 2.2 LTS version (Do not use the latest);

Suggested Training?Courses:

  • Hyperledger Fabric 2.x Network Design & Setup (A very good one. You must execute this training course.):

https://www.udemy.com/course/hyperledger-fabric-network-design-setup/

  • EXPIRED Certified Hyperledger Fabric Administrator CHFA 1.4:

https://www.udemy.com/course/certified-hyperledger-fabric-administrator-chfa/

Yes, I know that this course is based on the 1.4 version. But execute the demanded tasks tailoring for the 2.2 version. This material really shows and presents a lot of exams like scenarios helping the understanding.

LFS272 — Hyperledger Fabric Administration: https://training.linuxfoundation.org/training/hyperledger-fabric-administration-lfs272/

This training course is not directed to the certification. You need much more understanding. I followed this course after the above presented trainings.
I did a lot of changes on the tasks simulating other problems. You need to do this. Only this training will not make a good preparation for the?exam.

CHFA DIRECTIONS:

The tasks are based on the Fabric Samples repository as I said earlier:

https://github.com/hyperledger/fabric-samples/tree/release-2.2

You must get familiarized with fabric samples and the test network. Having this understanding you save a lot of time searching and crafting commands.

As a learning measure, I performed a lot of differen tasks using my imagination while running courses and tutorials from official documentation to gather knowledge and feel safe to take the exam.

Read and study the test network start scripts (network.sh and?others):

https://github.com/hyperledger/fabric-samples/blob/release-2.2/test-network/network.sh

  • Start a test network without using the network.sh script. But use the scripts to understand and be able to start a network completely from scratch executing all the commands in a terminal.
  • Try to add a lot of orderers (RAFT setup — do not need to study kafka based consensus);
  • Try to add lot of organizations;
  • Pay attention to the scripts responsible for creating the cryptomaterial. It is very importat have a good understanding of the processes creating users and certificates.
  • Change docker-compose yamls adding a lot of other peers and other components (couchdb and etc):

https://github.com/hyperledger/fabric-samples/tree/release-2.2/test-network/docker

DOCKER:

  • You must have a good understanding of dock containers.
  • See the logs: docker logs -f;
  • You will be asked to troubleshooting a lot of times and you will need to know how to access the containers logs (Certificate Authority, peers and orderers containers);
  • Execute cli container or get a bash command: docker exec -t <container> bash — It is good to know how to execute commands directly on the docker container;
  • docker ps (filtered to be able to view the running containers);

VI and?VIM:

  • Is good to know how to search strings, copy, paste and delete lines using VI or VIM. It will save you time.

Important tasks:

  • Knows how the leader election of the peers works. So, try to configure it in an environment with a lot of peers. Try to choose a specific peer to be the leader:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/channel_update_tutorial.html#configuring-leader-election

  • Add other orgs to the network without using test networks scripts:
  • Build other docker compose yaml files with other hyperledger fabric components:

  1. Peers;
  2. Orderers;
  3. CAs — certificate authorities;

  • Have a very good understanding of the process of updating the configuration of a running network:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/channel_update_tutorial.html#bring-up-org3-components

  • Fetch the configuration:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/channel_update_tutorial.html#fetch-the-configuration

  • Convert to human the protobuf configs:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/channel_update_tutorial.html#convert-the-configuration-to-json-and-trim-it-down

  • Add org crypto to the config (so the network will authenticate the new organization):

https://hyperledger-fabric.readthedocs.io/en/release-2.2/channel_update_tutorial.html#add-the-org3-crypto-material

  • Sign and submit the config:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/channel_update_tutorial.html#sign-and-submit-the-config-update

  • Join the peers:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/channel_update_tutorial.html#join-org3-to-the-channel

  • Set the anchor peers (Another config update):

https://hyperledger-fabric.readthedocs.io/en/release-2.2/channel_update_tutorial.html#updating-the-channel-config-to-include-an-org3-anchor-peer-optional

  • Remember: the JOB of adding another organization on a running Hyperledger Fabric network is almost the same as updating any configuration. So, after learning how to add manually another organization to the network, you need to do the following by yourself:
  • Add another Orderers to the organization;
  • Add another peers to the organization;
  • Change networks configuration as batch size or time out transaction params:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/config_update.html

  • Get to know the network configuration JSON structure so you will be able to change it using VI, VIM or jq (I have not tried to learn how to manipulate json using jq utility. But it may save you time).

Chaincode deploy?process:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/commands/peerlifecycle.html

You must be very well familiarized with peer lifecycle commands:

  • peer lifecycle package;
  • peer lifecycle install;
  • peer lifecycle aproveformyorg;
  • peer lifecycle commit;
  • Attention to the parameter –peerAddresses for specifying the peers. (array of peers)

For troubleshooting the chaincode deployment process:

  • peer lifecycle queryinstalled;
  • peer lifecycle queryapproved;
  • peer lifecycle querycommited;

Endorsement policies and init required:

  • Know how to use the parameter –signature-policy to specify the endorsement policy;
  • Know how to use the parameter –init-required to specify that a chaincode needs initialization;
  • Remember that the same parameters passed during peer lifecycle chaincode aproveformyorg must be the same when committing the chaincode — peer lifecycle commit or when querying (querycommited or queryapproved);
  • Know how to upgrade a chaincode modifying only the endorsement policies.

Chaincode invoke and?query:

  • peer chaincode invoke;
  • Be familiar how to pass the parameters and the function name;
  • –isInit parameter (Know how to initialize a chaincode);
  • Know how to use –peerAddresses parameter;
  • Know how to use –transient to pass parameters (private data);
  • –waitForEvent parameter.
  • peer chaincode query;

Couchdb queries:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/couchdb_tutorial.html#run-the-query-using-the-peer-command

  • Query with pagination and build custom queries;

Service discovery:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/discovery-overview.html?highlight=service%20discovery#why-do-we-need-service-discovery

  • Know how to configure service discovery and use.

Operations Guide:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/ops_guide.html

Configuration files, you must be familiar with the configuration yamls:

  • configtx.yaml;
  • Know how to configure a consortium. Know how to pass a profile when generating the genesis block.
  • core.yaml;
  • orderer.yaml;
  • fabric-ca-client-config.yaml;
  • fabric-ca-server-config.yaml;
  • You need to know the configuration structure to be able to do changes and make corrections when the config file has errors;
  • You must know how to change and configure endorsement policies and ACLs using configtx.yaml file.

HSM — Hardware security?module:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/hsm.html

  • You must know how to configure a HSM;

Upgrade Hyperledger Fabric Components:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/upgrade.html

Fabricate some?labs:

  • Learn how to upgrade from 2.2.2 version to 2.2.5 for an example.

Fabric CA — Certificate Authority:

https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html

  • How to bootstrap fabric ca and enroll the bootstrap identity

Register identities:

https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html#registering-a-new-identity

  • Know how to pass attributes during register operation: –id.attrs parameter;

Enroll identities:

  • Enroll peer, orderer and client identities with specific attributes.
  • Add identities:

https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html#registering-a-new-identity

  • Modify identities;
  • Generate CRL;
  • List identities;
  • Manage certificates:

https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html#registering-a-new-identity

  • Revoke certificates and identities;
  • Add and modify affiliations;

Start a CA?server:

https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html#starting-the-server

fabric-ca-client cli:

https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/clientcli.html

fabric-ca-server cli:

https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/servercli.html

Well, thats all for the CHFA. I choose to first take the CHFA exam to learn and have a good understanding of the Hyperledger Fabric architecture. I reused a lot of knowledge of CHFA on the CHFD exam.

CHFD — CERTIFIED HYPERLEDGER FABRIC DEVELOPER

N?o foi fornecido texto alternativo para esta imagem

n my opinion, the CHFD exam is harder than CHFA. Maybe because my main developer language is JAVA and the exam is in NodeJS (Javascript). It was my first contact with the NODEJS platform. I needed to learn NodeJS from scratch.

My learning path began with the LFD272 (Hyperledger Fabric for Developers) training course. I consider the LFD272 very superficial and do not provide a good preparation for the CHFD exam. So, you must do a lot of tailoring during the course path to try other examples (Again, use your imagination). If you are running LFD272, when the course tells that a subject will not be covered, try to go further (Example: testing or asset specific endorsement policies). But the LFD272 was the only accessible course that I have found.

I saw some of the Roland Bole (https://www.dhirubhai.net/in/samlinux/ ) videos. He knows a lot about Hyperledger Fabric:

https://www.youtube.com/watch?v=KFf1qzYP-bA

The CHFD exam is based on fabric samples repository, you must be familiar with all fabric samples. The exam tasks will be real world development scenarios using the fabric samples chaincodes and applications.

As mentioned above, they will provide you with an IDE to do the development thing. You will write a lot of code. And having a good understanding of fabric samples and where the javascript samples are will save you a lot of time.

Consider do the following as learning actions:

  • Deploy all javascript chaincodes and execute all javascript applications from fabric sampos repository:

Must know chaincodes and applications:

  • Fabcar:

https://github.com/hyperledger/fabric-samples/tree/release-2.2/fabcar/javascript

https://github.com/hyperledger/fabric-samples/tree/release-2.2/chaincode/fabcar/javascript

  • Abstore:

https://github.com/hyperledger/fabric-samples/tree/release-2.2/chaincode/abstore/javascript (fabric-shim);

  • Marbles:

https://github.com/hyperledger/fabric-samples/tree/release-2.2/chaincode/marbles02/javascript

  • Asset transfer basic:

https://github.com/hyperledger/fabric-samples/tree/release-2.2/asset-transfer-basic/chaincode-javascript

https://github.com/hyperledger/fabric-samples/tree/release-2.2/asset-transfer-basic/application-javascript

  • Asset transfer private data:

https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-private-data

  • Asset transfer edger queries:

https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-ledger-queries

https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-ledger-queries/chaincode-javascript

  • Auctions examples:

https://github.com/hyperledger/fabric-samples/tree/main/auction-simple/application-javascript

https://github.com/hyperledger/fabric-samples/tree/main/auction-dutch/application-javascript

  • Commercial Paper:

https://github.com/hyperledger/fabric-samples/tree/release-2.2/commercial-paper

Execute all commercial paper tutorials.

Private Data:

  • You must know how to pass transient data for the chaincode from the application and how to get it inside the chaincode:

transaction.setTransient();
const transientMap = await ctx.stub.getTransient();
You need to know how private data collections work.

Identity programatic check:

  • Test and check if the user submitting the transaction has a specific attribute value

const hasRights = ctx.clientIdentity.assertAttributeValue(‘identityAuthService’, ‘true’);

Must know and do?items:

  • Learn how to iterate promised iterators (The new way):

https://hyperledger.github.io/fabric-chaincode-node/release-2.2/api/tutorial-using-iterators.htm

for await (const res of promiseOfIterator) {…}

  • Learn how to query the asset history;
  • Try to find the error in this code (asset transfer ledger):

https://github.com/hyperledger/fabric-samples/blob/release-2.2/asset-transfer-ledger-queries/chaincode-javascript/lib/asset_transfer_ledger_chaincode.js#L309

  • Implement a new get all results method using for await (const res of promiseOfIterator) {…}?;
  • Learn how to implement paginated queries:

https://github.com/hyperledger/fabric-samples/blob/f3db0572d0bfe6517ccdedefd8531a30ef460f67/asset-transfer-ledger-queries/chaincode-javascript/lib/asset_transfer_ledger_chaincode.js#L285

  • Usage of composite keys and query:

https://github.com/hyperledger/fabric-samples/blob/f3db0572d0bfe6517ccdedefd8531a30ef460f67/asset-transfer-ledger-queries/chaincode-javascript/lib/asset_transfer_ledger_chaincode.js#L199

https://github.com/hyperledger/fabric-samples/blob/f3db0572d0bfe6517ccdedefd8531a30ef460f67/asset-transfer-ledger-queries/chaincode-javascript/lib/asset_transfer_ledger_chaincode.js#L181

https://github.com/hyperledger/fabric-samples/blob/f3db0572d0bfe6517ccdedefd8531a30ef460f67/asset-transfer-ledger-queries/chaincode-javascript/lib/asset_transfer_ledger_chaincode.js#L144

let colorNameIndexKey = ctx.stub.createCompositeKey(indexName, [assetJSON.color, assetJSON.assetID]);

FabricCA — Certificate Authority:

  • You must know the process to Register and Enroll users:

https://github.com/hyperledger/fabric-samples/blob/f3db0572d0bfe6517ccdedefd8531a30ef460f67/test-application/javascript/CAUtil.js#L53

  • Pay attention to the following interfaces

EnrollmentRequest: https://hyperledger.github.io/fabric-sdk-node/release-2.2/global.html#EnrollmentRequest
RegisterRequest: https://hyperledger.github.io/fabric-sdk-node/release-2.2/global.html#RegisterRequest__anchor;

  • You need to know the process of registering a user with a specific attribute and enrolling the same user with this same attribute.

Connection profiles:

  • You must know the connection profile structure and how to connect to a network.
  • Note: when you brings up the test network, the connections profiles for the organizations are generated under this directory:

  • You need to know how to load the connection profile using JSON and YAML versions.



You need to use your imagination and extend the fabric samples applications and chaincodes. Change operation signatures, execute all tutorials and read all README.md orientations.

During the exam, you will develop deployable chaincodes and remember to always run “npm install” before starting coding.

You will do a lot of deployments. Knowing the peer lifecycle chaincode commands are essential (In both exams — CHFA and CHFD). Pay attention and make sure that you know how to package, deploy, approve, commit, query and invoke a chaincode. You will have access to a terminal to execute those commands. The parameters — signature-policy (pass specific endorsement policy), –init-required are very important (the same as CHFA). The parameter — collections-config is important too because of the private data.

Again, same as the CHFA exam, you have to know about docker commands to troubleshoot and check for errors. You must know how to see the containers logs (chaincode containers, peers and orderers), docker logs -f <container_name_id>.

To execute the peer commands to deploy and etc, you will have access to a cli container, and you need to know how to connect docker exec -it <container> bash.



Develop Environment used / lab?setup

To be able to execute the samples and run the fabric test network, I decided to use the following setup:

  1. Vagrant: https://www.vagrantup.com/;
  2. Oracle Virtual Box: https://www.virtualbox.org/;
  3. Linux Ubuntu Vagrant Box: config.vm.box = “bento/ubuntu-20.04”
  4. VSCode with IBM Developer Platform plugin (Remote development through ssh of linux box);
  5. IBM Microfabric — Only for the CHFD exam;
  6. INTELLIJ Webstorm: https://www.jetbrains.com/pt-pt/lp/idea-extended-trial/
  7. Windows 10 host machine (Lenovo Yoga 9 slim laptop);

I choose vagrant because it protects the host operating system and permits to run a lot of configurations, such as simulating various networks etc.

Last suggestions (CHFA and?CHFD)

Read all linux foundation information about the exams:

  1. https://docs.linuxfoundation.org/tc-docs/certification/lf-candidate-handbook
  2. https://docs.linuxfoundation.org/tc-docs/certification/faq-hyperledger
  3. https://docs.linuxfoundation.org/tc-docs/certification/tips-chfd;
  4. https://docs.linuxfoundation.org/tc-docs/certification/important-information-chfa-and-chsa

During the exam, your environment may present issues, connection problems or freeze when trying to access a terminal. If this happens to you, call the proctor using the chat window and explain to him. Maintain calm. The proctor will give you more time if there is a problem with the exam environment. Have a good internet connection.

Create a bookmark system on the chrome tab browser. Both exams will be executed using Google Chrome browser and you may open one additional tab to show the official documentation. I suggest during the preparation phase, save important links and anchors from official docs. Thoose bookmarks will let you quickly find a topic or a command without the need to navigate through internal links of the docs. This will save you a lot of time. For an example, if you need to find the right command to do a chaincode approval, you may go direct to this link (using the bookmark):

https://hyperledger-fabric.readthedocs.io/en/release-2.2/deploy_chaincode.html#approve-a-chaincode-definition

and copy the command to the web notepad:

peer lifecycle chaincode approveformyorg -o localhost:7050 — ordererTLSHostnameOverride orderer.example.com — channelID mychannel — name basic — version 1.0 — package-id $CC_PACKAGE_ID — sequence 1 — tls — cafile ${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

And change it according to the task.

One last tip:

Use TWO monitors:

O big one to show the exam environment;
A small one to show the documentation tab.
N?o foi fornecido texto alternativo para esta imagem


In my case, I used one monitor 27” with 4k resolution and the notebook screen (full hd).

I have spent 1 (one) month of preparation for each of the exams, two months in total. Well, almost 3 months.

About the?author

Name: David Reis

Instagram: https://www.instagram.com/davidfaulstich/

Linkedin: https://www.dhirubhai.net/in/david-faulstich-reis/

Github: https://github.com/davidfdr

Linux Foudation openprofile.dev: https://openprofile.dev/profile/davidfdr

Country: Brazil;

Experience:

23 years developing cool solutions mostly in Java.

Blockchain consultant and instructor. Feel free to reach me if needed!

Hyperledger Fabric especialist.

Hyperledger Fabric community contributor.

I am a blockchain developer and engineer, father and husband. Overlander 4x4 off road enthusiast, love to camping and HAM — Amateur Radio.

Brazilian HAM — Amateur Radio enthusiat. Callsign: PU2DAV

QRZ.COM lookup: https://www.qrz.com/db/PU2DAV/

IN OPEN SOURCE WE TRUST

N?o foi fornecido texto alternativo para esta imagem


Credly:

https://www.credly.com/users/david-reis.c1dbeb11/badges

CHFA — Certified Hyperledger Fabric Administrator

CHFD — Certified Hyperledger Fabric Developer

Professional Scrum Master

SCJP — Sun Certified Java Programmer 1.4.

Fabric like any tech is a moving target really. At the risk of sounding like a conspiracy theorist, certification is a way for institution to make money. Also if you expand all your effort to get a cert for a particular verson of a tech and the tech has moved on you will be no better. Also companies deploying any tech will have their own twist to the baseline implementation anyway. A better way to learn tech and show off your knowledge is to experiment, blog about it and be challenged.

回复
Sravani A

Engineering solutions, Information Security, Blockchain adoption, Generative AI, Prompt Engineering, Virtual Agents, EGMP @IIMB

3 年

Congratulations..Comprehensive compilation..ThanQ!

Chandramohan Jagtap

Senior Blockchain Engineer ( Architect | Blockchain Consultant)

3 年

Congratulations, Well explained.

Congratulation. And thanks for this great sharing!

Parabéns pela iniciativa David Faulstich Congratulations on the initiative.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了