Skip to content

Hyperledger Fabric Network for file sharing using Multi-Authority Attribute Based Encryption as the encryption scheme and IPFS as the decentralised storage network

Notifications You must be signed in to change notification settings

jtatia/file-sharing-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file-sharing-system

Hyperledger Fabric Network for file sharing using Multi-Authority Attribute Based Encryption as the encryption scheme and IPFS as the decentralised storage network

Table of Contents

  1. Build
    1. Prerequisites
    2. Local Development Tools
    3. Local Hyperledger Fabric runtime
  2. Setup

Build

Prerequisites

Check this to get the updated list of pre-requisites. They are :-

  1. Docker Engine and Docker Compose
  2. Nodejs and NPM
  3. Git
  4. Python 2.7.x

For ubuntu you can use:-

curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
./prereqs-ubuntu.sh

###Dev-Tools Run the following commands to setup dev-tools:-

npm install -g composer-cli
npm install -g composer-rest-server
npm install -g composer-playground
npm install -g yo generator-hyperledger-composer

###Fabric-Runtime Run the following commands to Setup Local Hyperledger fabric Runtime:-

mkdir ~/fabric-dev-servers
cd ~/fabric-dev-servers
curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz
tar -xvf fabric-dev-servers.tar.gz
export FABRIC_VERSION=hlfv12
./downloadFabric.sh
./startFabric.sh
./createPeerAdminCard.sh

##Setup

  1. Generating a Business Network Archive (BNA)
composer archive create --sourceType dir --sourceName .
  1. Install and Deploy the BNA file To install execute:-
composer network install --archiveFile file-sharing-system@0.0.1.bna --card PeerAdmin@hlfv1

To deploy:-

composer network start --networkName file-sharing-system --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file file-sharing-admin.card

It then needs to be imported using:-

composer card import --file file-sharing-admin.card

You can check whether the network has been setup using:-

composer network ping --card admin@file-sharing-system

3.Setting up a Composer-Rest-Server To setup a composer rest server run:-

composer-rest-server

specify admin@file-sharing-system , select never use namespaces, and continue with the default options for the rest.

The File-Sharing-System network and rest server are up and running.

###References

  1. https://medium.freecodecamp.org/how-to-build-a-blockchain-network-using-hyperledger-fabric-and-composer-e06644ff801d

About

Hyperledger Fabric Network for file sharing using Multi-Authority Attribute Based Encryption as the encryption scheme and IPFS as the decentralised storage network

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published