Introduction

Ledger snapshot is one of the two features introduced in Fabric v2.3, which was released November last year. The snapshot gives us an alternative way to join new peers into a fabric network. In this article we will give highlights on the ledger snapshot, and walk through a demonstration on how things work.

Overview

For those who are familiarized with the process of adding new peers in a running fabric network, either in existing peer organization or in a new organization, we use the peer channel join with the channel genesis block file, and the new peer will then obtain the whole ledger from other peers in the channel. After going through all the transactions in the block, the world state gets updated. …


Introduction

BSN (Blockchain-based Service Network) is the blockchain infrastructure-as-a-service for decentralized applications (smart contracts) deployment and consumption. In my previous article I showed how to deploy a sample chaincode (from Hyperledger Fabric) on the BSN Testnet for Permissioned Services. We also saw how to access the chaincode deployed in BSN through BSN specific API.

Besides permissioned blockchain platforms, BSN also provides Permissionless Services. In short, BSN provides gateway services to a number of permissionless blockchain networks. Through the gateway we can access our accounts and invoke functions of smart contracts deployed in these permissionless blockchain networks. …


Introduction

In the previous work we have demonstrated how to use JavaScript SDK to open accounts and transfer Algos between them in Algorand. Here we further demonstrate another important feature about digital assets in Algorand, known as Algorand Standard Asset (ASA), and see how to use JavaScript SDK to create, manage and delete digital assets. We will also use AlgoSigner, a browser plug-in wallet for Algorand recently released by PureStake, to perform transfer of digital assets between accounts.

Quick Overview of ASA and AlgoSigner

For those having experience in Ethereum, digital assets (always known as tokens) are implemented through (smart) contract, riding on top of an Ethereum network. This is called Layer-2 implementation. Algorand is taking a different approach, making digital assets as states of any given accounts. It is called Layer-1 implementation. When we inspect the account information of a given account, we can see the balance of Algos, the native currency in Algorand, and all the digital assets held in this account. …


Overview

This article shows how to revoke a user in a fabric network such that the user cannot access fabric network and chaincode any more. We first give a high-level walk-through of the process, and later use Test Network to demonstrate the revocation. The script provided in Test Network makes bringing Fabric CA servers much easier and we can use the material to perform the demonstration.

Revisit: Bring Up Test Network with Fabric CA Server

Here we first revisit what happens when we bring up the Test Network with Fabric CA Server. Script network.sh gives us everything by this simple command.

./network.sh up createChannel -ca

The details of this process can be summarized in the following steps. …


Introduction

BSN (Blockchain-based Service Network) was first announced last year. Since then, they keep deploying nodes in China and across the world, and launched international portal for services on a variety of blockchain frameworks. Here is my first experience on their permissioned services on Hyperledger Fabric through their Testnet. In this article I first provided a very brief introduction about BSN, and made a quick demonstration on how to deploy a standard smart contract package (chaincode) on the Hyperledger Fabric framework integrated into the BSN.

Quick Overview of BSN

To understand more about BSN, the best source of information is from BSN. Here you can find the official information. …


Overview

Chaincode in Hyperledger Fabric comes with an API InvokeChaincode() to allow a chaincode invoking a function in another chaincode. Here is the description about this API in the documentation. (link)

For chaincode to chaincode interactions using the invokeChaincode() API, both chaincodes must be installed on the same peer.

For interactions that only require the called chaincode’s world state to be queried, the invocation can be in a different channel to the caller’s chaincode.

For interactions that require the called chaincode’s world state to be updated, the invocation must be in the same channel as the caller’s chaincode.

In this article we try to create some test cases to observe the behaviour of this cross chaincode function invoking. …


Introduction

This is my second attempt on Algorand. In my previous work I was using the CLI tool goal to access a private network setup. In this one I write scripts in JavaScript, send transactions to the Algorand TestNet. We will walk through all the steps, from preparing the environment, account creation, funding accounts with faucet, and Algos transfer between accounts.

Note that this demonstration is done with Algod v2 API, released in June this year.

It is assumed that you have basic knowledge of and skill in Node JS. We will provide all the scripts with explanation.

Source

Reference is made from some articles. …


Introduction

Those having experience in developing chaincode in Fabric know well how a chaincode looks like. In a nutshell, we define the data structure (state) for some assets, and functions which one can query the state, or invoke if change of state is needed. Since v2.1, Fabric team also introduces Contract API (link) which simplifies the way chaincode is written. This still follows the same pattern.

Recently I see another attempt to change the way we develop smart contracts with classes and objects, which is a favourite model for many developers. Prasaga introduces Extensible Blockchain Object Model, XBOM, in which assets are defined as objects and owned by accounts. XBOM provides a coding environment and methodology, which is currently implemented in Hyperledger Fabric for a permissioned chain offering and will be available on DataGrid Blockchain (DGB), an open permissionless chain in the future. …


Introduction

In my previous work several important concepts like template, contract and transaction about DAML were introduced, with a very simple IOU demonstrating the relationship between them. We have seen how a new contract instance of the same template is created through choices. Here we make it more interesting and realistic: how two contracts are interacting with each other in DAML through choices.

DAML tutorial 6 gives us a good example, which is good for extending our previous IOU example. As it is needed to make owner as signatory (in addition to issuer), the transfer of IOU now is implemented as proposal-acceptance model, which means that one party proposes a transfer, and the other party can accept or reject it. …


Introduction

Early this July my article System Channel and Application Channel was about a tutorial “Adding an Org to a Channel” (link), driven by a question from my readers. I received another question this week which again led me to revisit this topic. The question was about modifying a batch timeout (amount of time to wait before creating a block) in Hyperledger Fabric. While it is quite clear that we can update configuration through the standard (and tedious) process, what puzzled me at the beginning is which channel I should work on: system channel or application channel.

My very first guess is that, as blocks are created in an orderer, the configuration update should be made on the system (orderer) channel, and then the orderer will honour this new timeout for all channels. After some experiments my guess is wrong! (Always learn new things in each hands-on practice.) …

About

KC Tam

Happy to share what I learn on blockchain. Visit http://www.ledgertech.biz/kcarticles.html for my works. or reach me on https://www.linkedin.com/in/ktam1/.

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