Date   
Re: [#fabric-sdk-java] Instantiating chaincode for peers using JavaSDK

PM
 

for each channel the chaincode needs to be instantiated only once and it can be done by any endorsing peer for that organization (assuming it is part of the channel). 

On Wed, 2019-03-20 at 07:15 +0530, Dewni Weeraman wrote:
Hi all,

I'm new to blockchain and currently trying out the Hyperledger Fabric JavaSDK. I've tested out the code in End2endIT.java . In this when a channel is created, peers from a single organization has been joined to the channel [1]. I have done some modifications to add peers from multiple organizations to the channel. Then I have installed the chaincode in all of these peers which are in the channel. In the instantiate chaincode step [2] I'm having doubts whether it should be done for all peers (which are added to the channel) or not. What is the correct approach to follow? If it is needed to be instantiated in all peers, then should the user context to perform the instantiation belong to the organization to which the peer belongs?  Any help regarding this is highly appreciated.


Thanks,
Dewni

Re: Any trick to determine if a web application is running off a Hyperledger Fabric blockchain?

Don Li
 

True.

(Don) Chunshen Li
Blockchain Consultant / Hyperledger Fabric Application Developer


On Tue, Mar 19, 2019 at 11:45 PM Tom Danner <tom.danner@...> wrote:

And this is yet another great reason why you have to think through one’s deployment & security architecture VERY CAREFULLY

 

From: "fabric@..." <fabric@...> on behalf of Don Li <lichunshen84@...>
Date: Tuesday, March 19, 2019 at 9:41 PM
To: fabric <fabric@...>
Subject: Re: [Hyperledger Fabric] Any trick to determine if a web application is running off a Hyperledger Fabric blockchain?

 

Upon further digging.  I notice that if we use couchdb to as State database instead of the default LevelDB then, we would be able to see such key/value etc. information stored in the State database via the following URL,

And we can control its access as well.  Maybe this is one way to prove that the underlying application is running on top of Hyperledger Fabric network.

 

Thanks.


(Don) Chunshen Li
Blockchain Consultant / Hyperledger Fabric Application Developer

 

 

On Fri, Mar 15, 2019 at 4:46 PM Don Li via Lists.Hyperledger.Org <lichunshen84=gmail.com@...> wrote:

Informative.  I appreciate it.

(Don) Chunshen Li
Blockchain Consultant / Hyperledger Fabric Application Developer

 

 

On Fri, Mar 15, 2019 at 10:59 AM Mohammad Ghasletwala <mohammad.ghasletwala@...> wrote:

According to me Hyperledger Explorer is everything we do not need.
It reads, decrypts all the ledger data and copies into local database.
It has all your keys so that it can read everything from peer.
It is most insecure piece of tool in Hyperledger.
Except during development, I won't recommend it in any other deployment of Fabric.

Regards,
Mohammad

Re: Any trick to determine if a web application is running off a Hyperledger Fabric blockchain?

thomas
 

And this is yet another great reason why you have to think through one’s deployment & security architecture VERY CAREFULLY

 

From: "fabric@..." <fabric@...> on behalf of Don Li <lichunshen84@...>
Date: Tuesday, March 19, 2019 at 9:41 PM
To: fabric <fabric@...>
Subject: Re: [Hyperledger Fabric] Any trick to determine if a web application is running off a Hyperledger Fabric blockchain?

 

Upon further digging.  I notice that if we use couchdb to as State database instead of the default LevelDB then, we would be able to see such key/value etc. information stored in the State database via the following URL,

And we can control its access as well.  Maybe this is one way to prove that the underlying application is running on top of Hyperledger Fabric network.

 

Thanks.


(Don) Chunshen Li
Blockchain Consultant / Hyperledger Fabric Application Developer

 

 

On Fri, Mar 15, 2019 at 4:46 PM Don Li via Lists.Hyperledger.Org <lichunshen84=gmail.com@...> wrote:

Informative.  I appreciate it.

(Don) Chunshen Li
Blockchain Consultant / Hyperledger Fabric Application Developer

 

 

On Fri, Mar 15, 2019 at 10:59 AM Mohammad Ghasletwala <mohammad.ghasletwala@...> wrote:

According to me Hyperledger Explorer is everything we do not need.
It reads, decrypts all the ledger data and copies into local database.
It has all your keys so that it can read everything from peer.
It is most insecure piece of tool in Hyperledger.
Except during development, I won't recommend it in any other deployment of Fabric.

Regards,
Mohammad

Re: Any trick to determine if a web application is running off a Hyperledger Fabric blockchain?

Don Li
 

Upon further digging.  I notice that if we use couchdb to as State database instead of the default LevelDB then, we would be able to see such key/value etc. information stored in the State database via the following URL,
And we can control its access as well.  Maybe this is one way to prove that the underlying application is running on top of Hyperledger Fabric network.

Thanks.

(Don) Chunshen Li
Blockchain Consultant / Hyperledger Fabric Application Developer


On Fri, Mar 15, 2019 at 4:46 PM Don Li via Lists.Hyperledger.Org <lichunshen84=gmail.com@...> wrote:
Informative.  I appreciate it.

(Don) Chunshen Li
Blockchain Consultant / Hyperledger Fabric Application Developer


On Fri, Mar 15, 2019 at 10:59 AM Mohammad Ghasletwala <mohammad.ghasletwala@...> wrote:
According to me Hyperledger Explorer is everything we do not need.
It reads, decrypts all the ledger data and copies into local database.
It has all your keys so that it can read everything from peer.
It is most insecure piece of tool in Hyperledger.
Except during development, I won't recommend it in any other deployment of Fabric.

Regards,
Mohammad

[#fabric-sdk-java] Instantiating chaincode for peers using JavaSDK

dewni.matheesha@...
 

Hi all,

I'm new to blockchain and currently trying out the Hyperledger Fabric JavaSDK. I've tested out the code in End2endIT.java . In this when a channel is created, peers from a single organization has been joined to the channel [1]. I have done some modifications to add peers from multiple organizations to the channel. Then I have installed the chaincode in all of these peers which are in the channel. In the instantiate chaincode step [2] I'm having doubts whether it should be done for all peers (which are added to the channel) or not. What is the correct approach to follow? If it is needed to be instantiated in all peers, then should the user context to perform the instantiation belong to the organization to which the peer belongs?  Any help regarding this is highly appreciated.


Thanks,
Dewni

Re: not able to upgrade chaincode

PM
 

After changes to chaincode did you increment the chaincodeVersion? I had the same problem and version increment fixed it.

Sent using Zoho Mail


---- On Tue, 19 Mar 2019 07:44:45 -0700 varun.ryp@... wrote ----

Hi,
I'm not able to upgrade my chaincode without removing old data, Can anybody please help.

Thanks


not able to upgrade chaincode

Varun Verma
 

Hi,
I'm not able to upgrade my chaincode without removing old data, Can anybody please help.

Thanks

Re: peer chaincode instantiate don't work because container exited with 2

sucheol kim <scheol83@...>
 

thanks Prasanth Sundaravelu


couchDB is not matter

i googling this error and find this error caused by cgo resolver

i attach the article


in this article, recommended solution is add env ( GODEBUG=netdns=go ) into container

but how can i add this env into ccenv image?? ( https://hub.docker.com/r/hyperledger/fabric-ccenv )

when i instantiate chaincode , peer run new chaincode container from ccenv image and make error in chaincode container and then remove chaincode container

after i add env to ccenv image

how can i make peer use my new ccenv image to run new chaincode container????

thanks

Next Hyperledger Fabric Developer Community call - Thursday March 21st 5pm UTC (5pm UK, 12pm ET, 9am PT)

Paul O'Mahoney
 

dear Fabric developer,

the next  "Hyperledger Fabric Developer" community call (lasts approx 30-60 mins) is scheduled for this  Thursday March 21st 5pm UTC (5pm UK, 12pm ET, 9am PT)

The latest agenda is posted here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas%3A+Community+Call

This community call is held bi-weekly via Zoom webconference and is aimed at :

- helping the worldwide Fabric Developer community grow in their development journey (eg.  developing applications, smart contracts, chaincode,  developing clients, using the SDK etc - eg. whether its NodeJS, Java, Go etc etc)
- caters for the developer perspective and the developer community.
- help developers understand / hear more about exciting new things in Fabric,eg. features upcoming or work in progress - ie things that appeal to the developer (feel free to make suggestions !).
- to foster more interest, best practices etc in developing with Hyperledger Fabric.  
- grow the Fabric developer ecosystem
- opportunity to ask questions of the Fabric team eg. you may have feedback/questions on your experiences developing with Fabric, using particular features etc.
- to share stuff you've done with the community, eg sample code / sample use cases that others may be interested in

If you wish to share content on a call, just let me know via email direct or DM me on Rocketchat (ID: mahoney1) and I'll put an item on the agenda. Provide the following:
-  the topic (state whether its presentation, or demo etc)
- the full name of the presenter, and
- approx length of your pitch in minutes

The Zoom webconference ID is https://zoom.us/my/hyperledger.community   

More information can be found on the community page -> https://wiki.hyperledger.org/display/fabric/Fabric+Developer+Community+Calls

many thanks for your time - feel free to forward this email if you think it is of interest to a colleague.

Paul O'Mahony
Community Lead - Hyperledger Fabric Developer
RocketChat: mahoney1


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Integration between Hyperledger Fabric and Machine learning modules #fabric #fabric-questions

Ilham Qasse
 

Hello Everyone,
I was wondering if there is any way to use machine learning modules within the hyperledger fabric chaincodes?
I wanted to create distributed intrusion detection system on top of hyperledger fabric using machine learning modules.
Another question, is there any dataset available for hyperledger fabric transactions?
Thank you 

Re: How to Distribute Orderers Across Multiple Organisations #fabric #fabric-questions #fabric-scrum

Arnaud Le Hors
 

Hi,

It is possible to have each organization run an orderer node, however, with KAFKA this has little advantage.

Kafka and Zookeeper, which Kafka uses, are not designed to be run across large networks. They are designed to be run in a tight group of hosts. So, this means that practically speaking you need to have one organization run the Kafka cluster and Zookeeper ensemble. Given that, having ordering nodes run by different organizations doesn't give you much because they will all need to go to the same Kafka cluster anyway. Unless you create a third organization to run the ordering service one organization will have to trust the other with running it for the network.

RAFT, which is coming up in the next release, will address this problem, making it straight forward to have each organization run their own orderer nodes without further dependencies.
--
Arnaud  Le Hors - Senior Technical Staff Member, Blockchain & Web Open Technologies - IBM




From:        bilalahmedpu@...
To:        fabric@...
Date:        03/18/2019 11:19 AM
Subject:        [Hyperledger Fabric] How to Distribute Orderers Across Multiple Organisations #fabric #fabric-questions #fabric-scrum
Sent by:        fabric@...




I'm currently working on a HyperLedger Network Setup. In my scenario, I have two organisation with each carrying two peers. I want each organisation to have an orderer node as well. But I couldn't find any configurations supporting this scenario as in tutorials a 3rd separate organisation is being used for the orderers. Is having separate 3rd organisation for orderer must?

How may I configure my organisations to provide an orderer node as well along with peers as I don't want to involve any 3rd separate organisation for this.



Re: peer chaincode instantiate don't work because container exited with 2

Prasanth Sundaravelu
 

Hi Sucheol,

I have noticed this in your logs:
2019-03-18 01:02:11.546 UTC [couchdb] handleRequest -> DEBU 1e6e Error handling CouchDB request. Error:not_found,  Status Code:404,  Reason:missing
2019-03-18 01:02:11.547 UTC [couchdb] ReadDoc -> DEBU 1e6f [ch1_lscc] Document not found (404), returning nil value instead of 404 error
Once the network is up, please make sure all the containers are up and running using "docker ps" including couchdb containers.

Regards,
Prasanth S 

How to Distribute Orderers Across Multiple Organisations #fabric #fabric-questions #fabric-scrum

bilalahmedpu@...
 

I'm currently working on a HyperLedger Network Setup. In my scenario, I have two organisation with each carrying two peers. I want each organisation to have an orderer node as well. But I couldn't find any configurations supporting this scenario as in tutorials a 3rd separate organisation is being used for the orderers. Is having separate 3rd organisation for orderer must?

How may I configure my organisations to provide an orderer node as well along with peers as I don't want to involve any 3rd separate organisation for this.

peer chaincode instantiate don't work because container exited with 2

sucheol kim <scheol83@...>
 

I made channel and joined anchor peer and installed chaincode

     peer chaincode install -n test -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/example02/cmd  

then i try this command

     peer chaincode instantiate -o orderer0:7050 -C ch1 -n test -v 1.0 -c '{"Args":["init","a","100","b","200"]}' --tls --cafile /root/ieetu/myfabric/tls/tlsca.crt --certfile /root/ieetu/myfabric/tls/server.crt --keyfile /root/ieetu/myfabric/tls/server.key

and i got this error

     Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 2

i attach my peer log

thanks everyone

Re: Question about SDK support

Ashutosh Kapuskar
 

It's really useful and important to be able to write chain code in java -- which is now possible. Java support in SDK is also  very important. Not only there is a very  large Java Server-side developer community, Java, being a compiled language, will be key to develop applications where performance is key.

One good think about HL/fabric is that the different SDKs and chain codes are interoperable - for example, it's possible to develop the application in javascript/node.js while developing the chain code in java -- and they work together! So, it's possible to use  right tool for the right job.


On Sunday, March 17, 2019, 12:53:22 AM PDT, Gari Singh <garis@...> wrote:


As you stated, chaincode and client SDKs are separate items.


On the chaincode side, Go chaincode has been around the longest but people have also been using Node CC as well.  Java CC was just recently promoted to supported in the 1.3/1.4 releases so we'll see what happens there as there was demand for it from some fairly large companies.

In terms of SDKs, there was initially more demand for Node / JavaScript and Java than there was for Go; the companies who were trying to build applications using Fabric has more Java and Node developers than Go developers.  Go is becoming more and more popular now.  But across the Fabric projects, there are only so many resources and the teams not only develop new features but also provide support for all of the components as well.

All of Fabric is open source and we are always looking for more contributors.  The SDKs are a great place to start as well and it seems given the interest in Go it would be great to start contributing there!



-----------------------------------------
Gari Singh
Distinguished Engineer, CTO - IBM Blockchain
IBM Middleware
550 King St
Littleton, MA 01460
Cell: 978-846-7499
garis@...
-----------------------------------------

-----fabric@... wrote: -----
To: fabric@...
From: "Yueming Xu"
Sent by: fabric@...
Date: 03/16/2019 10:46AM
Subject: Re: [Hyperledger Fabric] Question about SDK support

Why is Go SDK lagging behind Node and Java? Any special reasons that go-sdk is second-tier?  For chaincode, Golang is still the favorite since it does not depend on SDK, isn’t it?






Re: Question about SDK support

Gari Singh
 

As you stated, chaincode and client SDKs are separate items.


On the chaincode side, Go chaincode has been around the longest but people have also been using Node CC as well. Java CC was just recently promoted to supported in the 1.3/1.4 releases so we'll see what happens there as there was demand for it from some fairly large companies.

In terms of SDKs, there was initially more demand for Node / JavaScript and Java than there was for Go; the companies who were trying to build applications using Fabric has more Java and Node developers than Go developers. Go is becoming more and more popular now. But across the Fabric projects, there are only so many resources and the teams not only develop new features but also provide support for all of the components as well.

All of Fabric is open source and we are always looking for more contributors. The SDKs are a great place to start as well and it seems given the interest in Go it would be great to start contributing there!



-----------------------------------------
Gari Singh
Distinguished Engineer, CTO - IBM Blockchain
IBM Middleware
550 King St
Littleton, MA 01460
Cell: 978-846-7499
garis@...
-----------------------------------------

-----fabric@... wrote: -----
To: fabric@...
From: "Yueming Xu"
Sent by: fabric@...
Date: 03/16/2019 10:46AM
Subject: Re: [Hyperledger Fabric] Question about SDK support

Why is Go SDK lagging behind Node and Java? Any special reasons that go-sdk is second-tier? For chaincode, Golang is still the favorite since it does not depend on SDK, isn’t it?

Re: Question about SDK support

Michael Wang
 

I think it is because the label force is short? People do this open source with their interest in spare time.
If some project needs the product, they will be supported. And the sdk will get developed very quickly, I think.

Chaincode does not depends on SDK.

On Sat, Mar 16, 2019 at 10:46 PM Yueming Xu <yxucolo@...> wrote:
Why is Go SDK lagging behind Node and Java? Any special reasons that go-sdk is second-tier?  For chaincode, Golang is still the favorite since it does not depend on SDK, isn’t it?





--
This is my life,but world of us~~

Re: Question about SDK support

Yueming Xu
 

Why is Go SDK lagging behind Node and Java? Any special reasons that go-sdk is second-tier? For chaincode, Golang is still the favorite since it does not depend on SDK, isn’t it?

Re: Problem importing local go packages into the chaincode #fabric

Prasanth Sundaravelu
 

That's exactly how I did it!. Thank you Tom :)

Re: Any trick to determine if a web application is running off a Hyperledger Fabric blockchain?

Don Li
 

Informative.  I appreciate it.

(Don) Chunshen Li
Blockchain Consultant / Hyperledger Fabric Application Developer


On Fri, Mar 15, 2019 at 10:59 AM Mohammad Ghasletwala <mohammad.ghasletwala@...> wrote:
According to me Hyperledger Explorer is everything we do not need.
It reads, decrypts all the ledger data and copies into local database.
It has all your keys so that it can read everything from peer.
It is most insecure piece of tool in Hyperledger.
Except during development, I won't recommend it in any other deployment of Fabric.

Regards,
Mohammad