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 Fabrica.

New to Fabrica?

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 demo video.


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

curl -Lf -o ./fabrica && chmod +x ./fabrica

If you already have Fabrica installed, you can upgrade the current fabrica script by executing fabrica use 0.1.0 (for global installation) or ./fabrica use 0.1.0 (for a single project scope installation).

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.1.0, Fabrica 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 Fabrica config with a sample chaincode: ./fabrica init node.

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

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

Step 3: Start the network: ./fabrica 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 Fabrica 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 ./fabrica init command also creates the initial config file for the Hyperledger Fabric 2.3.2.

YAML support

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

Why use Fabrica config in YAML:

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

Why use Fabrica config in JSON:

  • JSON schema-based autosuggestions and syntax checks. Since the Fabrica 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 Fabrica config file to YAML, you can use, for example, this online tool.

Fabrica config improved

The Fabrica 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 Fabrica 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. Fabrica is available on GitHub: softwaremill/fabrica.

Fabrica 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.
Find more articles like this in Blog section

E-Book: Blockchain Adoption Kit

In this ebook you will learn:

  • The experts perspective on the future of blockchain
  • What questions to ask before blockchain adoption
  • How to find the right tech partner to put your idea into life

Blockchain is the first native digital medium for peer-to peer value exchange and can revolutionize the process for operating in various business areas, if the right problem is addressed with the right technology.

Find out more