I am using the configTx to create the channelTx and genesis block,
using the config-file.yaml.
Is there is any other way to create the channelTx and genesisTx using fabric-sdk-node ?
when the fabric network setup and running are it possible to update the channelTx ?
Thanks for asking this question, as many wants to know the answer to this question
Let me first talk about hyperledger fabric tools
cryptogen
configtxgen
configtxlator
protolator
idemixgen
Link here: https://github.com/hyperledger/fabric/tree/release-1.4/common/tools
These tools are opensource and built by IBM, fabric team, aims to fulfill configuration tasks. As of now 1.4 SDK's doesn't support for configuration tasks
Each & every tool is built by golang and make use of grpc
Coming to your second question:
Once the channel is created then no use of channel.tx file if you want to update you will have to send update transaction
Related
I'm trying to use DIDs/VCs from hyperledger Indy with Hyperledger Fabric. Simply I want to replace Fabric's certificate based identity/MSP with DIDs/VCs. However, as far as I understand this is not direct. The existing code based have lots of dependencies on Fabric-CA. Could someone help me to figure out potential starting points to do this customisation?
you cant try to use this modified peen-node:
https://github.com/trustbloc/fabric-mod
https://github.com/trustbloc/trustbloc-did-method/blob/main/docs/spec/trustbloc-did-method.md
or read this research:
https://arxiv.org/pdf/2104.03277.pdf
or check other did:methods that support HLF:
https://www.w3.org/TR/did-spec-registries/
or look to this project:
https://github.com/BLOCKOTUS/blockotus-organism
Currently, the only framework that can verify DID/VCs from Hyperldeger Indy is the Hyperledger Aries. There are several projects where people are trying to integrate either some of the Indy or Aries functionalities into Fabric in order to be able to issue and verify DID/VCs.
Take a look at the following projects in the "Hyperledger Mentorship Program" community:
Hyperledger Fabric - Hyperledger Aries Integration to support Fabric as Blockchain ledger
Or an older project Extending HL Fabric for connecting with HL Indy.
However, the easiest way is to have two DLTs, one for DID/VCs issue and verification (Indy), and one for transactions, etc.
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.
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.
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:)
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
In the context of HyperLedger Fabric I want to manually generate the private keys, then build and submit transactions. How can I do this?
I would like to do this in a very low level language, possibly C.
This is the analog of what I want in Sawtooth (in Python 3): https://sawtooth.hyperledger.org/docs/core/releases/1.0/_autogen/txn_submit_tutorial.html
Links and references are welcome.
Here's the Fabric transaction Flow : hyperledger-fabric.readthedocs.io/en/release-1.2/txflow.html
This explains all the necessary steps in depth. In fabric, we always have to generate private keys manually (Either through cryptogen tool or using CA) and then use these keys to invoke and order a transaction. As of now, Fabric provides SDKs in Go,Node,JAVA and Python to accomplish t he flow you're asking. Python and Go could come close to the low-level-language like C/C++ from the all available options.
I'm studying Hyperledger Fabric with the documentation(https://hyperledger-fabric.readthedocs.io/en/release-1.0/write_first_app.html)
I'm done with two samples, which is "Building Your First network" & "Writing Your First Application"
I'm also done adding 1 extra peer to each organization, by modifying certain files, as well as done trying all commands on "Writing Your Fist Application" session.
Now, I'd like to execute the same commands(e.g. Querying all cars, Adding new cars or whatever) on the first network where I have built up, not on the test Fabcar network.
The thing is that I really have no idea what to do and how to do, even though I know how to handle NodeJS program(by Writing Application webpage)
So I'd like to ask you some questions.
Should I modify some files in order to "move" all necessary things to my network? if so, which file should I modify?
By any chance, Could you please tell me the correct steps to make it? I feel like I need to install and instantiate the required smart contract on my peers. Am I right?
I really appreciate your help in advance.
To answer your question, you would need to read some documentation online that will help you understand the architecture and how you can build up the packages as hyperledger fabric provided freedom to users to create use case specific configurations.
To start with.
Make sure you have have understood the concept of peer, orderer, couchdb, ca authority. Those 4 things you need to play with most of the times.
Assuming you have installed nodejs and able to run node through terminal, Read through the following example
Tuna Fish example, it help you to understand the concept of injecting, updating, querying blockchin ledger. Also, It will help understand the usage of Nodejs backend and angularjs basic UI. or use the other examples as you have seen on the fabric-samples github repository. Fabric Samples. Balance Transfer will help you understand the channel and chaincode operations using Node JS. Build your first network will help you understand the configuration files(concentrate on docker-compose.yaml, scipt.js and byfn.js)
Then to answer your questions.
you just have to modify the mount drive config variables in docker-componse-cli.yaml. Then you can edit your startup script based on how you want to move chaincode to your peer.
you need to install chaincode on all the peers that are part of that channel. And you only need to instantiate chaincode once per channel.
Installation and instantiation combination is a powerful feature because it allows for a peer to interact with the same chaincode container across multiple channels. The only prerequisite is for the actual chaincode source files to be installed on the peer's file system. As such, if a piece of common chaincode is being used across dozens of channels, a peer would need only a single chaincode container to perform read/writes on all the channel ledgers.
To run the node js files on the fabric network.
welcome to blockchain world :)
I have been working on hyperledger fabric for some time. But I don’t understand where hyperledger composer comes in place . I do understand that it helps in visualizing the logic and transaction. But what I don’t get is how do you integrate it with fabric network? what does it create? Is it chaincode if not then what?
The Compose runtime is chain code that executes the business network archive artefacts created by the end-user.
Perhaps this will help?
https://blog.selman.org/2017/07/08/getting-started-with-blockchain-development/
The tech answer is that Hyperledger Composer is an abstraction layer over Hyperledger Fabric.
The practical answer is that it is awesome. Think how Angular and hundreds of other frameworks make web programming easier.
It is a framework where you can write your blockchain in Javascript and specify your data objects in an easy to understand text file. Throw in some querying, ACL stuff and pathways to use some nice opensource tools that let you do things like generate a Web API automatically and play around in a web environment without installing anything.
We are using it for the Integra Ledger Legal blockchain. (www.integraledger.com). I just spent the day working in it.