fabric-common | not a fork | Runtime Evironment library
kandi X-RAY | fabric-common Summary
kandi X-RAY | fabric-common Summary
not a fork of official fabric-common
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fabric-common
fabric-common Key Features
fabric-common Examples and Code Snippets
Community Discussions
Trending Discussions on fabric-common
QUESTION
I'm writing a fabric client application using nodejs and the latest fabric-network library. I have setup multiple orderer nodes running in VMs and want to prioritize which orderer node to be used when submitting transactions.
I wrote my own connection profile including the above orderer nodes and let the application use it to create gateway object. Then, I'm calling transaction#submit method to execute transactions. I want to use the nearest orderer node from the application but I don't know if it's possible.
I read through fabric-skd-node source code and found that commitment procedure is done at Commit.js#send method and it pick the first healthy orderer node from the orderer list retrieved using Channel.js#getTargetCommitters method. So, my rough guess is that the first orderer node listed in connection profile is used if it's connectable.
Please correct me if I'm wrong, I'd be very grateful.
...ANSWER
Answered 2022-Feb-04 at 15:46It looks like you are correct in the case that you are not using service discovery, and you client is only using nodes defined in your connection profile.
If you are using service discovery to dynamically discover network nodes then the list of orderers is randomised on each invocation to help distribute load more evenly across orderers and better handle orderer outages.
Remember that orderers will replicate transactions they receive to other orderers to maintain consistency and avoid single points of failure, so you are not avoiding transactions being sent to more distant ordering nodes.
QUESTION
I have two test tests, one reading and one writing on the blockchain. I'm getting two different errors, one at the start of the test and one at the writing test. The reading test is working normally without problems.
Initial error:
...ANSWER
Answered 2021-Dec-21 at 21:56From the network file you posted a couple of points
- you can't define any nodes in it (for example you've added orderers). They are ignored
- you've specified that your connection profile is a dynamic profile by setting discover to true in your network file, this means it will use discovery to determine the network topology and may not use the nodes you have explicitly defined in your connection profile. If you want to be explicit in your connection profile (and thus define a static connection profile) like you have in your above example, you should set
discover
to false, which hopefully will solve your problem.
As a side note, if you use discovery then the node-sdk (used by caliper) and caliper by default converts all discovered node hosts to localhost
, which is why you see it trying to contact localhost
. To disable this see Runtime settings in https://hyperledger.github.io/caliper/v0.4.2/fabric-config/new/
QUESTION
My fabric-node-sdk based application is listening for chaincode events using network.getContract(smartContractName).addContractListener
. When I kill all the peer nodes, it prints the following logs, disconnects the event listener, and never tries
ANSWER
Answered 2021-Aug-24 at 10:51This is the issue reported in this Jira: https://jira.hyperledger.org/browse/FABN-1657
It should be fixed in current npm packages tagged unstable-2.2
, and in a forthcoming v2.2.9 release of the Node SDK.
QUESTION
I am trying to set up a Hyperledger Fabric Network with Hyperledger Explorer. I spin up a VM on the digital ocean cloud with ubuntu OS. From there, I spin up 3 orderers node, and 2 peers node. Which result in total of 5 nodes. (I am using RAFT setup).
However, I encounter the error as below when trying to start the hyperledger fabric explorer docker-container images.
Error: ...ANSWER
Answered 2021-Feb-20 at 23:54All configurations seems good, however you have to upgrade explorer version to be compatible with hyperledger fabric version.
So please use v1.1.4 instead of v1.1.1
Also make sure that you have mounted crypto config correctly, try to access this path inside the container /tmp/crypto/peerOrganizations/acme.com/tlsca/tlsca.acme.com-cert.pem
Try to change tlsCACerts
path to use peer tls ca.crt
/tmp/crypto/peerOrganizations/acme.com/peers/peer1.acme.com/tls/ca.crt
You have mentioned that the same configurations works with hyperledger fabric v2, if you have tried it locally not on the same server so I please disable the firewall on the server and give it a try
To check if you can reach domain and port please try this
cat > /dev/tcp/peer1.acme.com/7051
Check this https://support.bluemedora.com/s/article/Using-Bash-to-test-if-a-TCP-port-on-a-remote-system-is-open
QUESTION
I am trying to sign transaction proposals with offline key. I have generated signed certificate by Org CA
and now I am trying to create User
with fabric-common
nodejs SDK version 2.2.5.
ANSWER
Answered 2021-Mar-17 at 11:45So the problem was that I was using node v12.6.0
which is required by fabric-common
module. When I downgraded node version to v11.6.0
and installed dependencies with flag --ignore-engines
everything worked as expected.
QUESTION
Caliper (v.0.4.2) is installed and setup the configuration on my machine (laptop), and ready to communicate with the existing deployed fabric network which is in google-cloud. To communicate these two caliper and fabric network, I have provided connection profile of org1(where my contract is deployed). I found the error and not solved.
How to solve this error?
Error: Could not find details for contract ID
Below is information for finding the solutions of given problem.
Caliper is startup using following commands
...ANSWER
Answered 2021-Jan-27 at 09:16Your network config file is not complete. Caliper still has to explicitly know about the chaincodes (aka contracts) that have been deployed onto your channels.
Referring to this section in the tutorial
https://hyperledger.github.io/caliper/v0.4.2/fabric-tutorial/tutorials-fabric-existing/#populating-the-template-file
you will see a section on Channels
which describe adding information about channels to the network config file. For example from that tutorial it defines this section
QUESTION
I'm trying to access my peer through the fabric-network
nodejs sdk.
However, I encounter an error during the gateway.connect
in the sdk and the logs I find in the peer container is not helpful.
All I have, even with the grpc=debug
logging mode is :
ANSWER
Answered 2020-Sep-21 at 22:58You try a gRPC call in peer Server where peer server is secured with it's TLS system. So if you fail to provide the valid TLS certificate, server tls handshake will be failed and you will not get success to establish the connection.
Please check that your network config file is properly develop, also check that you are using the same TLS certificate that is used to run the peer server and your TLS certificate path is correct.
QUESTION
The running instances were fine today in the afternoon, but suddenly this error started to pop out. It presumes to call the function and write to the ledger successfully but rejects with this:
...ANSWER
Answered 2020-Jun-19 at 17:41The number of concurrent requests to the peer services has been capped by default in Fabric v2.1.0+ to prevent poorly programmed or malicious clients from DoS-ing the peers. You can always remove this restriction, or increase it by modifying these values in core.yaml. To remove the restriction, set the limit to 0, or increase it to a value that makes sense for your environment.
Generally speaking, if these messages are occurring, it is because the client application is misbehaving and not appropriately releasing resources. Once a client is done with a particular call, it's important to close and cleanup the associated network resources. A common source of leaks for connections to the peer is requesting event streams, reading one event, and then opening a new one without closing the previous.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fabric-common
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page