PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label hyperledger-fabric. Show all posts
Showing posts with label hyperledger-fabric. Show all posts

Monday, September 26, 2022

[FIXED] How do I install Hyperledger Fabric's binaries only?

 September 26, 2022     binaries, hyperledger-fabric, installation     No comments   

Issue

I would like to install/download the HLF binaries, without the images and fabric-samples. How do I do that?

This is what I've tried so far:

  1. I've followed the instruction on https://hyperledger-fabric.readthedocs.io/en/release-1.4/install.html, but that also installs the images (which is unwanted).
  2. I've looked into the hlf repository, but the /bin/ directory is absent there and a name-search for 'contigtxgen' and others yielded no results other than it being used inside other scripts in the repo
  3. googled for any mention of binary-only install of hlf, without positive results

Desired result would be a cli command with which I can suppress the installing of images, or something similar.


Solution

If you download this script (and set execute permission):

https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh

Then run the script with -h you will see the options to suppress download of Binaries or Docker Images.



Answered By - R Thatcher
Answer Checked By - Cary Denson (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Sunday, September 25, 2022

[FIXED] What is diffrence between enrolling and registering a certificate in Hyperledger fabric CA

 September 25, 2022     blockchain, hyperledger-fabric, hyperledger-fabric-ca     No comments   

Issue

What exactly is difference between enrolling and registering a certificate in Hyperledger Fabric CA. I am new to cryptography and i am really confused about the working of Fabric CA. Also how are certificates generated via cryptogen is diffrent from certificates generated via Fabric CA.


Solution

So from what i understand when you "enrol" an identity you get the certificates and private keys for it. When you "register" the identity, you are simply creating the user name and password for that identity with the CA server.

The certificates that the cryptogen tool generate are not any different to the ones generated by the Fabric CA, the cryptogen tool is there for convenience in development. It should not be used in a live / production environment. Under the hood the cryptogen tool actually spins up a fabric ca server locally.

Here is a link to the latest documentation for Fabric CA:

https://hyperledger-fabric-ca.readthedocs.io/en/latest/



Answered By - zaf187
Answer Checked By - Cary Denson (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Thursday, July 28, 2022

[FIXED] How is a leader elected in Hyperledger Fabric PBFT?

 July 28, 2022     blockchain, hyperledger-fabric     No comments   

Issue

In Hyperledger Fabric, the leader is responsible for adding blocks to the blockchain. All the validating nodes elect the leader. But how is this leader elected?


Solution

For Hyperledger Fabric Gossip, see Leader Election and Channels for a description of how a leader is elected



Answered By - Richard
Answer Checked By - Pedro (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Saturday, May 14, 2022

[FIXED] How can I rectify from Error: flag needs an argument: 'c' in -c?

 May 14, 2022     blockchain, chaincode, hyperledger-fabric, ubuntu     No comments   

Issue

I used the following command to initialise the chaincode after committing it to the hyperledger fabric test network.

peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA -C testchannel -n property --peerAddresses localhost:7051 --tlsRootCertFiles $CORE_PEER_TLS_ROOTCERT_FILE_ORG1 --peerAddresses localhost:9051 --tlsRootCertFiles $CORE_PEER_TLS_ROOTCERT_FILE_ORG2 --isInit -c `{"Args":[]}`

Then I encountered with the following error,

{Args:[]}: command not found
Error: flag needs an argument: 'c' in -c

Error Screenshot

How can I rectify this error. Thanks in advance!


Solution

I'm not sure about this as I don't generally use the --isInit flag, but I believe that if it is used, you need to have an Init function in your contract to match the expectation of this flag i.e. it should have a method signature to suit what use of the flag expects to find.

I tend not to use the flag and instead, call a home grown Init function, as shown below.

-c '{"function":"initLedger","Args":[]}'

Have a look at this link if you haven't already.



Answered By - Jerome O'Mahony
Answer Checked By - Mary Flores (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing