I successfully completed a hyperledger composer and working it well.
I just created explorer for the same network using the git https://github.com/hyperledger/blockchain-explorer. This explorer is slow to load. I just decide to create own explorer using Node.js . My questions is
How to get blocks number, hash, etc using node.js.(I already visited the site node api link . But do not see any example how to use it)??
Have any idea to increase the speed of existing hyperledger explorer.??
Please give any suggestion for my problem. Thanks in advance
Fabric 1.1.0
Composer 0.19.16
Os: Ubuntu 16.04
Hyperledger Explorer has to traverse the blockchain to build its view of the ledger (stored in a PostgreSQL DB). If you have a large number of blocks, this can take some time. However, once this has been built, new blocks should be picked up as fast as your network can supply them.
However, if you want to look at improving it, why not just start with the existing code? This is after all the whole point of open-source software :)
Hyperledger explorer is provide API such as http://localhost:8080/blocks/{channel name}/{block number}
We can easily implement the front end and call the API at back end. Hope you help you. Thanks
Related
I am new to block chain and learning from past few weeks about block chain but until now I have many times heard about hyper ledger fabric but never found a good documentation for a begginer.
As previously answered, the official documentation is quite good and it will definitely be helpful for a beginner. I have used this documentation to create and run blockchain networks on MacBooks and laptops running on Ubuntu. I have no experience of running Hyperledger on a Windows machine. If you have a Windows machine, create a dual boot so that you can use Ubuntu for your Hyperledger work.
Use the tutorials provided as part of the Hyperledger download. They do work as long as all of the pre-requisites are satisified. The test-network tutorial is quite good as it starts you off with building a 2-peer network.
If you use Visual Studio Code, there is an IBM extension that you can use as well. I'm not sure if it has advanced beyond version 1.4 yet, but it will help you to get a single peer network up and running quickly so that you can concentrate on perhaps developing some contract code. YouTube is a great source for Hyperledger tutorial videos which should be quite helpful.
Best of luck.
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
I am working on hyper ledger composer based project. I am writing chain code using javascript.
But I do not want to use automated generated rest server APIs to submit transactions, assets etc.
Can we develop own API in the node to interact with the network?
How?
Please share any code sample or link or any description about this scenario.
This article should help to get you started, along with the Hyperledger Fabric SDK documentation.
The article referenced above was literally the third result when I Googled "hyperledger api rest server example" (and the first result on duckduckgo). Please put at least a minimal amount of effort into research before asking a question.
I am a blockchain learner. I took Hyperledger composer as the implementation for blockchain.
Developed a sample application using composer.
Now my question is
how do I find the hashcode generated for the transaction? I can see only transaction ID's which are getting generated.
How do I get a previous transaction or block information using current transaction?
How to tell its a block chain based on the information stored?
I am not sure if this is the right question please correct.
I think you should install hyperledger-explorer along side. Check this link here
Edit the explorer port in appConfig.json as explorer and playground will be using the same port (8080)
I've finished the Hyperledger Composer tutorial and successfully deployed/run it locally (with composer-rest-server).
Now I want to deploy it (eg. Google Cloud) so that I can show it to external people, but I feel confused about what to do now and haven't been able to find any good tutorial for this "next step".
Since composer is running on fabric, I guess I need to get fabric going - but that consists of many docker containers running. So I presume I should collect all that in a stackfile or similar (right?).
Question: How would you go about moving forward beyond deploying/running hyperledger fabric/composer locally and deploying it somewhere? (I understand that there are many ways of doing this but I would appreciate some general guidance as well as some concrete example)
If you are not concerned with scaling to a more robust deployment, and just want to host a small development environment on your favorite cloud platform, you can provision a VM that is configured similarly to the vagrant devenv that the team developing Fabric used before the availability of native support for Docker on Mac and Windows. Then you can simply use Docker Compose to spin up the fabric-samples/first-network tutorial network. It would be suitable for developing in the cloud.
If you are looking for a framework to deploy to various cloud platforms, you might look into use of the Cello Ansible driver. It has been tested against a few of the cloud providers.
Here is one path. Sign up for an IBM Bluemix account. You get one free cluster to play with. Follow the instructions here
https://ibm-blockchain.github.io/ for a cloud sandbox including the composer rest server.
You end up installing the .bna file using the installed playground.
I used the IBM cloud foundry template to create a simple Node site with a single page hitting the API exposed in the cluster. If you just want to show the blockchain you can just use the explore page that the Rest server exposes or use something like Postman to hit the API.
Note that they do not mention. The command line tools require Python 2.6 so I had to downgrade from 3.
IBM Bluemix offers the following with respect to Blockchain:
Hyperledger Composer based Solution Architecture here https://hyperledger.github.io/composer/introduction/solution-architecture.html
Hyperledger Composer Online Playground here https://hyperledger.github.io/composer/installing/getting-started-with-playground.html
You can deploy to live network using this IBM Blockchain Platform Recipe here https://ibm-blockchain.github.io/platform-deployment/
Sample Apps
Marbles App https://github.com/IBM-Blockchain/marbles
Fabrid Car App https://github.com/hyperledger/fabric-samples/tree/release/fabcar
Do go through the links and try it out.
Hope this helps.