7

I've been studying the Hyperledger Fabric framework reading the docs for quite a while now but I'm getting a little lost in the middle of all that info. My question is: Is there any guidelines/"Step by step" on how to design a blockchain network from scratch? If you are starting a new project, where do you start?

Because I think I would understand it way more quicker if I actually started coding a little instead of reading and reading and reading...

Thanks a lot!

Edit 1:

I've chosen @kekomal answer as the correct one but I'd like to thank @Isha Padalia for the awesome VS Code extension and tutorial.

d3v9
  • 97
  • 6

3 Answers3

11

If you are really interested in learning and diving into Hyperledger Fabric, avoid byfn script. It performs a lot of magic for building a very simple Hyperledger Fabric network. After that, you have a network that you don't know how has been created and you have absolutely no idea of how to start deploying your custom network. There are daily questions here from people who started that way and are absolutely lost.

I find interesting this tutorial: https://medium.com/beyondi/setup-the-hyperledger-fabric-network-from-scratch-b82913b47549. Take into account that it is a little bit outdated.

You can complement it with this newer tutorial: https://www.blockchainexpert.uk/blog/how-to-deploy-hyperledger-fabric-network-from-scratch. Don't only run the steps. Analyze the files in https://github.com/blockchain-expert/hyperledger-fabric-network-from-scratch. Try playing with configtx.yaml, crypto-config.yaml and docker-compose files to customize your network and understand what you are doing.

Customize your organizations, your consortiums, your ordering service, your peers... Create your channels, join them, update your anchor peers... And understand what you are doing.

After that, if your network had one orderer, deploy a new one with more than one (with Raft consensus). If your network was using cryptogen, deploy a new one using Fabric-CAs instead. Or you can follow by playing with chaincodes.

NOTE: Apart from Hyperledger Fabric itself, it is essential to have basic notions of docker and PKI.

kekomal
  • 2,179
  • 11
  • 12
  • the "Blockchian Network" item in "Key Concepts" describes a few steps: first starting a orderer node and so on. If you're starting a new network would you build it following those steps? – d3v9 Dec 03 '19 at 12:01
  • 1
    Better follow the steps in the tutorials and try to match those steps with "Key Concepts > Blockchain network" to know what you are doing. Normally: 1. Generate cryptographic for your organizations (MSP and TLS; using `cryptogen` or Fabric-CA). 2. Check your `configtx.yaml`. 3. Generate the genesis block, channel and anchor transactions using `configtxgen`. 4. Launch orderers. 5. Launch peers. 6. Create channels, join channels and update channel anchors via clients. – kekomal Dec 03 '19 at 14:12
  • I am getting the following error `Could not find profile: workspaceChannel` while running this `configtxgen -profile workspaceChannel -outputCreateChannelTx ./channel-artifacts/workspace.tx -channelID $CHANNEL_NAME` . where can finc the workspaceChannel profile?? – shamon shamsudeen Jan 14 '20 at 13:27
  • Could you please update the answer for hyperledger 2.x, as many things have broken since this new release and old tutorials are not working – Aritro May 16 '23 at 17:37
5

You are a beginner in Hypelredger fabric development then you have first cleared the concept of the orderer, peer, CA, and organization concept. And then first you have to start IBM Blockchain Platform VS Code extension for fabric. It will provide a local fabric environment to create, test and deploy a fabric smart contract. Also generate 1 peer, 1 orderer, 1 CA service under VS code environment.

Here is a link to start development with VS code extension.

Hope it will help you:)

Isha Padalia
  • 877
  • 7
  • 24
-2

hi @d3v9 start from here https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html. also you can find some great article on medium

rahul_eth
  • 123
  • 3