Skip to content
Provides mechanisms for prototyping with Hyperledger Fabric
Python Gherkin HTML Other
Branch: master
Clone or download
jeffgarratt Added support to snapshot raft related data.
Simplified snashot code to use cp command.
Added raft config in orderer callback.

Signed-off-by: Jeff Garratt <>
Latest commit 6bf78cf Sep 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
common Support upgrade of peers/orderers Oct 14, 2017
features Added required orderer settings, raft now works!!! Sep 13, 2019
msp Initial commit Jul 16, 2017
orderer First attempt at Raft support. Sep 13, 2019
steps Added support to snapshot raft related data. Sep 14, 2019
templates/html Added support for snapshotting fabric components Feb 7, 2018
.behaverc Updated Sep 19, 2017
.gitattributes Initial commit Jul 16, 2017
.gitignore Initial commit Jul 16, 2017 Initial commit Jul 16, 2017
dc-base-5-thru-7.yml Cleaned up docker compose files. Sep 13, 2019
dc-base.yml Added required orderer settings, raft now works!!! Sep 13, 2019
dc-composer.yml Updated to NOT use synced folders for filestore Oct 3, 2017
dc-orderer-kafka-base.yml Add support Zookeeper upgrade Dec 4, 2017
dc-orderer-kafka.yml Add support Zookeeper upgrade Dec 4, 2017
dc-peer-base.yml Comment out debug level for gossip Dec 8, 2017
dc-peer-couchdb.yml Support version and data location for couchDB Dec 15, 2017
dc-sdk-node.yml Initial commit Jul 16, 2017 Give streams time to cleanup prior to exiting scenario. Feb 19, 2018 Updated to NOT use synced folders for filestore Oct 3, 2017
requirements.txt Updated to fix issue with PyOpenSSL compatibility Oct 3, 2017

Welcome to Fabric Prototype

Developers will find these mechanisms useful for prototyping variant Hyperledger Fabric based systems.

Getting started



Make sure you have a properly configured Hyperledger Fabric development environment.

Clone this repo into fabric root folder

From the fabric root folder

git clone
cd fabric-prototype

Setup python virtual environment wrapper usage

    sudo pip install virtualenv
    sudo pip install virtualenvwrapper
    export WORKON_HOME=~/Envs
    source /usr/local/bin/

Setup your virtual environment for behave

Virtual Environment Guide

    mkvirtualenv -p /usr/bin/python2.7 behave_venv

This will automaticall switch you to the new environment if successful. In the future, you can switch to the virtual environment using the workon command as shown below.

    workon behave_venv

Now install required modules into the virtual environment

NOTE: If you have issues installing the modules below, and you are running the vagrant environment, consider performing a vagrant destroy followed by a vagrant up.

You can install either using fixed versions with a requirments file or by installing the latest based upon pip.

Installing using a requirements.txt file with fixed versions
pip install -r requirements.txt
Installing using latest versions from pip
    pip install behave
    pip install grpcio-tools
    pip install "pysha3==1.0b1"
    pip install b3j0f.aop
    pip install jinja2
    # The pyopenssl install gives errors, but installs succeeds
    pip install pyopenssl
    pip install ecdsa
    pip install python-slugify
    pip install pyyaml

Running behave

Peer Executable and Docker containers

Behave requires the peer executable for packaging deployments. To make the peer execute the following command.

#Change to the root fabric folder to perform the following commands.
cd ..

# Optionally perform the following clean if you are unsure of your environments state.
make clean
make peer

The peer executable will be located in the build/bin folder. Make sure that your PATH enviroment variable contains the location. Execute the following command if necessary.

    export PATH=$PATH:$GOPATH/src/

The behave system also uses several docker containers. Execute the following commands to create the required docker containers.

    make peer-docker
    make orderer-docker

Change back to the bddtests folder (Where this readme is located) to execute subsequent behave commands.

    cd fabric-prototype

Running all of the behave features and suppressing skipped steps (-k)

The following behave commands should be executed from within this folder.

    behave -k

Running a specific feature

    behave -k features/bootstrap.feature

Deactivating your behave virtual environment

Once you are done using behave and you wish to switch back to your normal python environment, issue the following command.


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. s

You can’t perform that action at this time.