Introduction

Not long ago I prepared a one-hour crash course for my team about Hyperledger Fabric. Here I am sharing what I have covered in this course. I hope this provides the first glance about Fabric before you further explore how interesting and complex this enterprise blockchain framework is.

The topic and flow of my exploration will be

  1. Fabric network: the infrastructure
  2. Chaincode
  3. Deployment of chaincode on a Fabric network
  4. Client application
  5. Overall flow: from invoking a chaincode function to ledger being updated

Fabric Network

Unlike any public permissionless blockchains, in which a Mainnet is always up and running, Fabric as permissioned blockchain…


Introduction

We continue our demonstration of Daml working with various types of ledger. In the previous several articles, we have walked through the code and tested it with Daml Studio (link), and then the same code on Daml Sandbox and Navigator (link). The latest one is the same code persistent in PostgreSQL-based ledger (link), which is close to a production environment when a centralized ledger is required. In case a distributed or decentralized setup is needed, like a cross-organization deployment, we can use a distributed ledger environment. In this article we use the same “fix my bike” example and deploy it…


Introduction

In my previous article we have seen how to bring up a decentralized fabric network with no system channel. With decentralization, there is no separate orderer organization and orderers are contributed by each participating organization. Each organization now does not need to use an orderer from a third party. We also see the simplified process when the system channel is no longer needed any more.

This article is built upon the previous one. Here I am showing how to add a new organization, with her own orderer and peer, joining a running network. …


Introduction

In Hyperledger Fabric, ordering service plays an important role of keeping the consortium configuration and creating blocks. Over the past two years, the implementation of ordering service keeps evolving. Raft-based ordering service enables a type of decentralization, as participating organizations (peer organizations) can now have their own ordering service nodes. This means fabric can now support a setup with no orderer organization. Meanwhile, Fabric keeps using the system channel to manage the consortium, which creates an additional layer of administration. Fabric v2.3 supports a fabric network setup without a system channel. …


Introduction

One feature that amazes me a lot in Daml is that we can work on the model (smart contract) first before we choose which and what type of ledger our model is deployed. This is how I arrange these several articles. The first article (link) focused on the code: modeling a real life example with Daml and testing it in Daml Studio. Everything happened inside the studio and no ledger was used yet. In the next article (link) we worked on a complete deployment, with Daml Sandbox as the ledger, and Navigator as the frontend. …


Introduction

Besides the ledger snapshot, Fabric v2.3 also introduced a new feature, bringing up application channels without system channel. The process is documented in details in the readthedoc. In this article I am using the configuration and script provided in Test Network and show what is needed to modify in order to bring up such a no-system-channel setup.

Overview

Prior to v2.3, we see two types of channels: system channel and application channel(s). System channel holds the consortium configuration, while all or part of the consortium members are joining various application channels according to the requirements. You may have seen that some…


Introduction

In my previous works on Daml, I keep using Daml Studio to learn, practice, and test this modeling language. Besides code editing, Daml Studio has an environment of script execution, which is good for code development and workflow simulation. Through simulation we can observe the lifecycle of contracts in the Daml ledger and make interactions with these active contracts through exercising choices.

Daml comes with another good tool, Navigator, which gives us a more intuitive graphical user interface (GUI) and lets us interact with the contracts on the fly. No test script is needed as everything is done on the…


Introduction

Andreas Lochbihler of Digital Asset conducted a guest lecture at Rapperswil last May, and in the lecture he demonstrated a real life example, showing how a bike shop offers a repair service for a bike owner in return of the cash the bike owner is holding. Here you can find his guest lecture:

This is a good guided tutorial for those who are interested to learn Daml and build a more complex contract step by step. This article serves as a supplementary work to his demonstration, providing the code and some explanation on the test result. …


Overview

In Part 1 we have seen how asset is created and transferred. In this part we focus on asset trading in Tutorial 7.

Asset trade can be seen as two asset transfers happening at the same time: one party hands out her asset in return of the asset from another party. One challenge is to ensure both transfers happen atomically. Both transfers are either completed or failed. It should never happen that one side receives the asset while the other side does not. When assets are implemented in DAML, this can be implemented with proper flow design.

Tutorial 7 gives…


Overview

DAML is the smart contract language modeling digital assets, which can then be deployed in a variety of environments, from databases to distributed ledger platforms such as Hyperledger Fabric and Corda. Their documentation comes with a 10-module tutorial. In my previous articles I talked about the concept of template and contract, and a very common proposal-acceptance model on DAML. They are good for us to get into Tutorial 7, a more comprehensive and well-structured modeling for asset trading. This article is a deep-dive into the Tutorial 7.

In this tutorial we see a more comprehensive and well-structured setup for an…

KC Tam

Visit http://www.ledgertech.biz/kcarticles.html for all my works. Reach me on https://www.linkedin.com/in/ktam1/ or follow me @kctheservant in Twitter.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store