Contents

You can now start a Hyperledger Fabric network easier and with a lot more features onboard. We are proud to release the newest stable version of Fablo.

New to Fablo?

This is our Open Source code project that tackles the complexity of setting up and managing a Hyperledger Fabric network. It suits CI and testing purposes best. Check the source code, the introductory post, or the video presentation at Hyperledger Media and Entertainment Special Interest Group .

Upgrading

The simplest way to install the newest stable version of Fablo for a single project scope is:

curl -Lf https://github.com/softwaremill/fablo/releases/download/0.2.0/fablo.sh -o ./fablo && chmod +x ./fablo

Private data

The private data mechanism will keep your data private and still guarantee its integrity by the blockchain. This is because when you save private data in a smart contract, a SHA-256 control sum of the data will be saved on the blockchain.

You can configure the private data collection in chaincode in a way that only selected organizations will have read or write access to the data. Regardless of permissions, all organizations may verify the data by checking if the hash saved on blockchain is the same as the hash of the data they want to check.

Since version 0.2.0, Fablo supports private data. If you want to try it, you just need to define the private data collection for the demo chaincode.

Step 1: Create Fablo config with a sample chaincode: ./fablo init node.

Step 2: Open the fablo-config.json file and update the chaincode definition (lines 7–10 from the gist were added):

    {
      "name": "chaincode1",
      "version": "0.2.0",
      "lang": "node",
      "channel": "my-channel1",
      "directory": "./chaincodes/chaincode-kv-node",
      "privateData": {
        "name": "org1-collection",
        "orgNames": ["Org1"]
      }
    }

Step 3: Start the network: ./fablo up.

Now you can query and invoke sample smart contracts that use private data collection: putPrivateMessage, getPrivateMessage, and verifyPrivateMessage. See more details in the chaincode source code. Remember that if you want to call smart contracts with private data, you need to encode the private data values with Base64.

Support for Fabric 2.x

The previous Fablo version supported only from 1.3 up to the 1.4.x Hyperledger Fabric versions. In version 2.0, along with many improvements, a new flow of chaincode installation was introduced. It took us a while to implement the support for it.

Right now, you can use Hyperledger Fabric versions up to the newest 2.3.2 version. The ./fablo init command also creates the initial config file for the Hyperledger Fabric 2.3.2.

YAML support

We decided to support the Fablo config file in the YAML format as well. See the sample YAML config. Besides, right now Fablo supports both default config file names: fablo-config.json and fablo-config.yaml.

Why use Fablo config in YAML:

  • More concise syntax, easier to read.
  • Support for comments.
  • Support for anchors and aliases.

Why use Fablo config in JSON:

  • JSON schema-based autosuggestions and syntax checks. Since the Fablo config JSON file contains the $schema attribute, your IDE will probably provide you with autosuggestions, syntax checks and validate if your file matches the schema. JSON schema validation for YAML is supported only in few IDEs (like VSC).
  • Easier parsing in common programming languages (if you need it).

If you want to convert your Fablo config file to YAML, you can use, for example, this online tool.

Fablo config improved

The Fablo config file contained more redundant information and was too verbose. We limited the required information and introduced many defaults, for example:

  • autogenerating MSP names,
  • default CA, orderer, and peer prefixes,
  • default database for peers (LevelDB),
  • default endorsement policies for chaincodes.

You can obviously provide it by yourself in the Fablo config file if you need something custom. Read more in the documentation.

In case you need something else, feel free to create an issue or fork us. Fablo is available on GitHub: softwaremill/fablo.

Fablo lets developers simplify their work with Hyperledger Fabric. Hyperledger is our tool of choice when building enterprise blockchain solutions. Want to discuss your project? Meet with our Blockchain Team to get expert advice.

Blog Comments powered by Disqus.