NOTE:
April 2020 - Course updated to Fabric 2.1
Developers face many challenges when it comes to developing Hyperledger Fabric Chaincode.
NOTE:
April 2020 - Course updated to Fabric 2.1
Developers face many challenges when it comes to developing Hyperledger Fabric Chaincode.
Lack of documentation from developer's perspective
Need to setup the Fabric development environment
Non-availability of development tools | standard practices
No comprehensive guide on how to productively develop chaincode
This course is my attempt to address all of these challenges.
E.g., Student do not need to spend time on setting up dev environment from scratch - course provides "One Click Launch"
E.g., Course provides development utilities that will help developers to focus on learning to code
E.g., Shows step by step how to leverage various Fabric concepts to build working chaincode
E.g., Working chaincode for ALL concepts covered in the course
E.g., Commands to be used for development purposes (wrapped in utility scripts as part of the course)
Utility Scripts
Utility scripts are provided to achieve developer productivity; long commands on command line are difficult to follow & type
Students may need to go through some of the utility scripts on their own
PLEASE DO NOT JOIN THE COURSE if you do not like to use productivity/development scripts and rather type long command on the terminal prompt :-)
PS:
This is a Hands on course. Please do NOT join if you do not have experience in coding
Take a preview of the lectures. Please do NOT join if you do not understand my accent or lecture pace :-)
Course Highlights:
Ready to use development environment setup with multiple configurations (project repository available for download)
Hyperledger Explorer setup that may be launched by students to get a graphical view of the network
Provides easy to use tools/scripts so that developers can focus on learning Chaincode development
Sections start by going over the concepts. Walk through lectures show the concepts in action with REAL code
Every section requires the student to do coding (exercises)
ALL sections | ALMOST all lectures requires the student to do Hands On activities
Course Layout:
Setup the development environment
Basics of Fabric platform from development perspective
Structure of the GoLang Chaincode
Unit | Integration testing of chaincode
Designing for Private Data | Transactions
Setting up the Endorsement Policies
Querying with Rich Query Functions (using CouchDB)
Accessing the Asset History
Implementing Access | Authorization control using "Client Identity Library"
Building Applications using Fabric Node SDK
What is NOT covered in this course?
Basics of Hyperledger Fabric
Fabric Binaries details such as peer, orderer, configtxgen, cryptogen ...
Fabric certification authority (course mostly uses cryptogen generated crypto)
Design & Setup of Multi Org Setup
ALL of the above have been covered in my other courses. Please check them out.
Tips to get the most value out of this course
Course Layout
Link to the project repository
+ Fabric 2.x Updates
Overview of the course updates.
+ Returning students - Fast track to updating knowledge to Fabric 2.0
Minimum requirements for the Dev machine
Visual Studio Code Setup
Overview of Virtualization
Introduction to VirtualBox & Vagrant
Setup of the repo (git clone)
Walk through of the samples repository
+ Provides an overview of the development workflow
+ Discussion on the options for installation
Students who use the "VirtualBox" hypervisor may use this option to carry out this installation which is very fast and does not require manual installation of the tools.
Development environment overview
Development workflow
Installation of the Fabric Runtime
Installation of the dev tools in VM
Go Tools
Hyperledger Explorer
Node JS + Dev Utilities
Discussion on relationship between:
Distributed Ledger Technology
Transactions
Chaincode
How the scripts are used?
Environment scripts
Chain dev scripts
Chaincode utility
Explorer
Project repository has multiple utility scripts for managing the dev environment. Students will learn to use the dev management scripts
Students to try out the scripts and utilities.
Learn how to use the peer chaincode commands against the dev environment
Launching the explorer
Using the explorer interface
Students will learn how to use a utility script for executing peer commands
+ Chaincode Lifecycle Overview
+ Lifecycle stage 1 : Package and Install
Hands on with package and install commands
Lifecycle stage for approval & commit of the Chaincode
+ Approveformyorg
+ Commit
Hands on with the commands:
+ approveformyorg
+ install
Execution of the Init, Query & Invoke on a chaincode
Hands on with querying and invocation of the chaincode
Overview of how chaincode is upgraded:
+ Locally
+ Across the network
Hands on exercise for upgrading the chaincode
Overview of peer net versus dev mode
Chaincode instance registration
Functions in the interface
Chaincode logging functions
Controlling the log levels
Wlakthrough of the cc-logs.sh script
Students will learn about the required functions in the chaincode. After that students will test the chaincode using the dev environment and the utility scripts.
Sending the Success & Error response from Chaincode funtions
Checks students understanding
Provides an overview of ChaincodeStubInterface
Types of functions available on the interface
Goes over the functions available for getting transaction proposal information
GetSignedProposal
GetTxID
GetTxTimestamp
GetChannelId
GetTransient
Hands On Exercise:
Part 1 : Use the utility functions for getting info from proposal
Part 2 : Explore the SignedProposal
Solution walk through
How client send arguments to chaincode functions
Implementation of the invoke/init functions
Functions for accessing the arguments
getArgs
getStringArgs
getFunctionAndParameters
Checks students knowledge of transaction proposal and arguments
How data is managed in the Fabric Runtime
Learn about the state management functions:
GetState()
PutState()
DelState()
In this exercise students need to use the state management function to delete an asset
Checks students knowledge of State Data Management
Rules for invoking another chain code
Learn the use of InvokeChaincode function
Students will learn about events:
Types
Flow of events
Chaincode event subscription
Demonstrates the use of the SetEvent function on the Stub.
Tests knowledge of the events
General discussion on testing practices
Unit tests
Integration tests
Unit testing framework for GoLang
Shows how to use the GoLang Testing Framework
Fabric GoLang Unit Testing using the MockStub interface
Demonstrates the use of the MockStub Interface for unit testing the chaincode
Using Bash scripts and Utility scripts for automating testing
Demonstrates how to write testing scripts
Introduction to tokens & ERC20 standard
Discusses the project requirements in details
Walk through of the solution design | code
Testing the transfer events
There are 3 phases in the flow:
Transaction proposal
Broadcast
Commit
What are trust authorities? Their role in the Fabric network?
Understand the Endorsing Policies
Defining the EP Expression
Students will learn how the Dev environment is setup for the Lifecycle Endorsement Policy
Experience the Endorsement Policies
Make changes to the sample to gain better understanding of the Endorsement Policies
Data confidentiality
Options for achieving it on Fabric
Private Data Collections
How endorsement process works when there is Private data in the proposal
Defining the Collection in JSON
PDC Definition change in Fabric 2.0
Putting together the PDC JSON file
Experience the setup of PDC with chaincode
Practice exercise + walkthrough
GetPrivateData()
PuPrivateData()
DelPrivateData()
Walk through of the code - using the Stub API for private data
Extend the sample code to better understand the private data collections
Indexing on key
Key range specifications
GetStateByRange()
GetPrivateDataByRange()
Learn the use of GetStateByRange() functions
Why pagination is needed
How pagination is supported
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.