Date   

using go routine in the chaincode #fabric-chaincode #fabric-questions

elmira
 

 Hi,
Concurrency (using goroutine and go channel) can cause non-deterministic behavior in fabric.

I have not found any source or example on the use of Goroutines and go channels in fabric contracts; I need an example; Are there any links that I can read about it?.

I know that it is better not to use the following code, but I want to know how the race condition that is in the code causes inconsistency among peers.
I appritiate any help.

package main import (

"fmt"

"github.com/hyperledger/fabric/core/chaincode/shim"

"github.com/hyperledger/fabric/protos/peer"

)

type BadChainCode struct{

}

func (t *BadChainCode) Invoke(stub shim.ChaincodeStubInterface){


go writeToLedger(stub, “data1”)

go writeToLedger(stub, “data2”)

 

}
func writeToLedger(stub shim.ChaincodeStubInterface, data string){

stub.PutState(“key”,[]byte(data))

}


Kubernetes proposes Hyperledger Fabric

Hakan Eryargi
 

Dear Hyperledger Fabric Community,

I'd like to introduce Hyperledger Fabric Operator for Kubernetes:
https://github.com/raftAtGit/hl-fabric-operator

It's a wrapper around our previous work PIVT Helm charts and makes running and operating Hyperledger Fabric in Kubernetes even more easier.

It allows managing the whole HL Fabric network or part of it declaratively through the FabricNetwork CRD (Custom Resource Definition).

In particular it allows to:
  • Configure and launch the whole HL Fabric network or part of it, either:
    • A simple one, one peer per organization and Solo orderer
    • Or scaled up one, multiple peers per organization and Kafka or Raft orderer
  • Populate the network declaratively:
    • Create the channels, join peers to channels, update channels for Anchor peers
    • Install/Instantiate all chaincodes, or some of them, or upgrade them to newer version
  • Add new peer organizations to an already running network declaratively
This work started as an experimental/PoC hobby project of myself, but turned out to be quite complete and functional.

Apologies for the title. As we called the previous work as "Hyperledger Fabric meets Kubernetes", which I truly believe deserves its name, this one felt like a proper continuation :)

Any feedback is more than welcome!

Cheers,
Hakan


Hyperledger Project Quarterly Update Due #tsc-project-update - Thu, 04/15/2021 #tsc-project-update #cal-notice

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Hyperledger Project Quarterly Update Due #tsc-project-update

When:
Thursday, 15 April 2021

Organizer:
community-architects@...

Description:
Please file a project status report for the TSC here:

https://wiki.hyperledger.org/display/TSC/2021+Project+Updates

https://wiki.hyperledger.org/display/TSC/2021+TSC+Project+Update+Calendar


Re: Hyperledger fabric in IoT application

Chris Gabriel
 

Hi Nikos,
It really depends upon the use case. In mine, I use a raspberry pi as a server of IoT sensor data that gets polled for its data by an IoT gateway in Node Red, but the peers are running in the cloud in Kubernetes. I use the Fabric CA to issue identities for each org in the network and also assign each IoT device an identity from the CA as a security practice. Demo here:

https://youtu.be/rGHI8-tpzX0

On Apr 15, 2021, at 6:53 AM, Nikos Karamolegkos <nkaram@ics.forth.gr> wrote:

Hello everyone, I am new to BC and hyperledger. I would like to deploy a BC to an existing IoT network. I have not decide yet the architecture of the BC network (peer, orgs, etc) but I am thinking to deploy some peers in a raspberries which already act as IoT gateways (GWs) and receive sensor data. Also, in GW I would install the fabric client application to update the ledger (with the IoT data). The idea is the data to be distributed in all GWs acting as peers. Is this a good approach for start or should I have the BC network in the backbone?

--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)






Hyperledger fabric in IoT application

Nikos Karamolegkos
 

Hello everyone, I am new to BC and hyperledger. I would like to deploy a BC to an existing IoT network. I have not decide yet the architecture of the BC network (peer, orgs, etc) but I am thinking to deploy some peers in a raspberries which already act as IoT gateways (GWs) and receive sensor data. Also, in GW I would install the fabric client application to update the ledger (with the IoT data). The idea is the data to be distributed in all GWs acting as peers. Is this a good approach for start or should I have the BC network in the backbone?

--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


QSCC query equivalents for private collections

Simeon MacMillen
 

Hello community,

What would be the best approach to query an asset on a private collection by transaction ID?

Is there an equivalent of QSCC system chaincode APIs (such as getTransactionByTransactionID) for private collections?

Thank you,
Simeon MacMillen


Use certificates from a non-Fabric CA with your Fabric network #signcerts #interoperability #fabric-ca #x509

sangieri@...
 

Hello Community, 

 

I'm working on a use case where I need to use certificates, which bind resources to identities, that have been already issued by an Authoritative CA with the Fabric Network I'm developing which is dealing with the same resources bound in the certificates. 

 

Reading the docs: https://hyperledger-fabric-ca.readthedocs.io/en/latest/deployguide/ca-deploy-topology.html 

I see that yes it is possible, but I cannot figure out How. 

There are several articles about how "to link" a third party or external CA to a HF CA, but I guess this is not the use case. Actually, instead of linking the Authoritative CA to a HF CA I would like just to use the certificates emitted by the Authoritative CA into my network.

Basically, I want to bind the existing authorization model to my HF network.  

 

So let's imagine a scenario: 

 

user with (certificate, private_key) externally emitted --> Fabric CA --> User credential for the Fabric Network

where the fabric CA can verify, using a trust anchor, the validity of the certificate provided by the user and upon successfull verification, emit the user credential for the fabric network.

 

Has such a solution already been implemented?  

Any advise, different solution or pointer to docs I can read about? 

 

Thanks to All, 

Stefano Angieri 

 

 

 


Re: Fabric Contributor Meeting - Wed, 04/14/2021 #cal-notice

Vitalii Demianets
 

Thank you all for the discussion of the "Orderer ledger snapshot" RFC on the Contributor Meeting!

The changes discussed on the call have been incorporated in the RFC text and the pull request has been updated.

--
// Vitalii Demianets @ norbloc AB

On Wed, Apr 14, 2021 at 3:00 PM fabric@... Calendar <noreply@...> wrote:

Fabric Contributor Meeting

When:
Wednesday, 14 April 2021
9:00am to 10:00am
(GMT-04:00) America/New York

Where:
https://zoom.us/my/hyperledger.community.3?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Organizer:
enyeart@...

Description:
For meeting agendas, recordings, and more details, see https://wiki.hyperledger.org/display/fabric/Contributor+Meetings

Join Zoom Meeting
 
Meeting ID: 518 494 7650
Passcode: 475869


Re: Running same application from multiple users

Brian Behlendorf <bbehlendorf@...>
 

Hi folks, no need to reply to Jayakar here about his repeated thread-hijacking, we'll handle off-list. Thanks.

Brian

On 4/14/21 7:08 AM, Jayakar wrote:

Proposing the interested to join at a Collaborative partnership network




-- 
Brian Behlendorf
General Manager for Blockchain, Healthcare and Identity
bbehlendorf@...
Twitter: @brianbehlendorf


Re: Running same application from multiple users

Jayakar <Jayakar_J_Joseph@...>
 

Proposing the interested to join at a Collaborative partnership network to build a Global Digital Healthcare Infrastructure by Integrated Apps & Devices in Hyperledger framework to proceed with a ‘Global Digital Human Coronavirus Harmful Mutants & lineage Control (HCHMC) Program by WHO. They may deploy a local native hybrid cloud server of Digital Cluster Control (DCC) Node with a cluster of 3 to 10 Digitizable Healthcare centres (DH) of Hospitals, Nursing homes, Clinics and Primary Health centres at their preferred locations.  

For more details on this to enrol as a collaborative partner for this project, they may please contact, Department of Research for Health, World Health Organization to participate in this project for the revival of humanity from this pandemic crisis, sustainably. 

Subsequently these collaborative partners may discuss between them at Hyperledger groups and Meetups, to integrate their developments in this framework, by receiving technology resources from that Department while that shall be deployed in CI/CD strategy and on governance by that Department. 



From: fabric@... <fabric@...> on behalf of 이종권 <jongkwon.lee@...>
Sent: Wednesday, April 14, 2021 6:00 AM
To: fabric@... <fabric@...>
Subject: Re: [Hyperledger Fabric] Running same application from multiple users
 
Yes. You can have multiple fabric users in the CitizenOrg. But, it will bring no benefit because inhabitants will not update the ledger, while it will make the inhabitant-application more complicated.
We could consider the staff-application to have multiple fabric users in the CityOrg. It will enable us to track who updated the ledger and it will not make the staff-application complicated assuming that there will be only several users in the CityOrg.


Fabric Contributor Meeting - Wed, 04/14/2021 #cal-notice

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Fabric Contributor Meeting

When:
Wednesday, 14 April 2021
9:00am to 10:00am
(GMT-04:00) America/New York

Where:
https://zoom.us/my/hyperledger.community.3?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Organizer:
enyeart@...

Description:
For meeting agendas, recordings, and more details, see https://wiki.hyperledger.org/display/fabric/Contributor+Meetings

Join Zoom Meeting
https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09
 
Meeting ID: 518 494 7650
Passcode: 475869


How to set up private data for each user identity in an org

Brian Carpenter
 

I'm building out a basic digital asset transfer application for images.  I'd like:

1) some of the data about the image (filename, base64_encode) to be public to everyone
2) some data (download_url) to be private only to the user who adds the image to the BC until they grant access to view the download_url to another person/s.

Seems like a private data collection structure would be ideal.

Can private data collection be private at a user identity level within an organization?  As in, each Org user has a private data collection defined and managed separately.

Any suggestions on how to structure a solution if a private data collection is the wrong approach?


Re: Running same application from multiple users

Nikos Karamolegkos
 

Nice ideas both. So to be more specific, the CityOrg would have some raspberries as IoT gateways (network) which are receiving sensor measurements (like empty parking positions, temperature, etc) from the end devices. I am thinking of running a fabric application into raspberries (i.e the client application runs in raspberry) to use the smart contracts (chaincode) to write the measurements (or a hash for better memory utilization) to the ledger. I am thinking also running some GW raspberries as peers too (eg. 3-4 PI).  For the CitizenOrg/ValidatorOrg I am thinking to have two applications (running to PCs), one for the citizen to just read the data (I have to think which of your proposed two approaches to follow), and an other application which can change the data to the ledger (e.g set a parking position to unavailable for some reason). Also, the CitizenOrg/ValidatorOrg would have some peer (3 or 4) which will be part of the endorsing policy for writing data to ledger by CityOrg (to avoid the control of the ledger by a single org). I have to think how to deploy the orderers too.

In case an other city want to join the BC network will be a new org with characteristics similar to CityOrg.

Bases on your experience are these all steps a good approach? I am new to BC idea so any other ideas are welcome. We have already build an IoT network with raspberries for GWs (flow: sensor-> gateway->broker->database->ui) and we would like to make the BC part of it


Errors seen when setting logspout with fabric 2.2

satheesh
 

Errors seen when setting logspout with fabric 2.2
Any pointers is appreciated.

Following steps described here to setup logspout: https://hyperledger-fabric.readthedocs.io/en/release-2.2/deploy_chaincode.html

Running this produces below errors: ./monitordocker.sh net_test Starting monitoring on all containers on the network net_test xxxx docker: Error response from daemon: network net_test not found. curl: (7) Failed to connect to 127.0.0.1 port 8000: Connection refused

xxx@xxxx:/home/fabric/fabric-samples/test-network# xxx@xxxx:/home/fabric/fabric-samples/test-network# ./monitordocker.sh Starting monitoring on all containers on the network basicnetwork_basic xxxx docker: Error response from daemon: network basicnetwork_basic not found. curl: (7) Failed to connect to 127.0.0.1 port 8000: Connection refused

xxx@xxxx:/home/fabric/fabric-samples/test-network# xxxx@xxxx:/home/fabric/fabric-samples/test-network# ./monitordocker.sh net_basic Starting monitoring on all containers on the network net_basic xxxx docker: Error response from daemon: network net_basic not found. curl: (7) Failed to connect to 127.0.0.1 port 8000: Connection refused


-Satheesh


Re: Running same application from multiple users

conanoc
 

Yes. You can have multiple fabric users in the CitizenOrg. But, it will bring no benefit because inhabitants will not update the ledger, while it will make the inhabitant-application more complicated.
We could consider the staff-application to have multiple fabric users in the CityOrg. It will enable us to track who updated the ledger and it will not make the staff-application complicated assuming that there will be only several users in the CityOrg.


Fabric contributor meeting - April 14, 2021

David Enyeart
 

Hyperledger Fabric Contributor Meeting

When: Every other Wednesday 9am US Eastern, 13:00 UTC

Where: https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Agendas and Recordings: https://wiki.hyperledger.org/display/fabric/Contributor+Meetings

----------------------------------------------------------------------------------------------------

Agenda for April 14, 2021

- Orderer ledger pruning/snapshots RFC - https://github.com/hyperledger/fabric-rfcs/pull/44 - Vitalii Demianets




Re: Running same application from multiple users

Jayakar <Jayakar_J_Joseph@...>
 

Proposing the interested to join at a Collaborative partnership network to build a Global Digital Healthcare Infrastructure by Integrated Apps & Devices in Hyperledger framework to proceed with a ‘Global Digital Human Coronavirus Harmful Mutants & lineage Control (HCHMC) Program by WHO. They may deploy a local native hybrid cloud server of Digital Cluster Control (DCC) Node with a cluster of 3 to 10 Digitizable Healthcare centers (DH) of Hospitals, Nursing homes, Clinics and Primary Health centers at their preferred locations.  

For more details on this to enroll as a collaborative partner for this project, they may please contact, Department of Research for Health, World Health Organization to participate in this project for the revival of humanity from this pandemic crisis, sustainably. 

Subsequently these collaborative partners may discuss between them at Hyperledger groups and Meetups, to integrate their developments in this framework, by receiving technology resources from this Department, that shall be deployed in CI/CD strategy, governed by this Department.  



From: fabric@... <fabric@...> on behalf of Tsvetan Georgiev <tsvetan@...>
Sent: Wednesday, April 14, 2021 4:14 AM
To: "이종권" <jongkwon.lee@...>
Cc: fabric <fabric@...>
Subject: Re: [Hyperledger Fabric] Running same application from multiple users
 
You can have a Fabric user for each citizen with certificate issued by the CitizenOrg. Inside the certificate of each citizen you can add attributes. For example you can add a user ID, user account ID and anything else that may help you do application level access control inside the chaincode - i.e. user role... That way you will know exactly who triggers a transaction as you will have unique fabric user for each application user.
You can use any identity and access management system to manage your user registration, authentication etc. Internally you can have a fabric wallet for each of those users and use it to interact with the network.

Senofi

Tsvetan Georgiev
Director, Senofi Inc.

438-494-7854 | tsvetan@...

www.senofi.ca

www.consortia.io







---- On Tue, 13 Apr 2021 23:06:03 -0400 이종권 <jongkwon.lee@...> wrote ----

I would make two org for the BC network: CityOrg and CitizenOrg. And register one user for each Org. I would make two applications. One for city staff and one for inhabitants. Every inhabitant in the city will use the inhabitant-application which is a web application and members of the city staff will use the staff-application. If you want to give different user IDs to inhabitants, make a new account system in the inhabitant-application, not in the BC. The inhabitant-application will have only one fabric user in its wallet to access the BC network, while handling thousands of accounts for inhabitants.






Re: Running same application from multiple users

Tsvetan Georgiev
 

You can have a Fabric user for each citizen with certificate issued by the CitizenOrg. Inside the certificate of each citizen you can add attributes. For example you can add a user ID, user account ID and anything else that may help you do application level access control inside the chaincode - i.e. user role... That way you will know exactly who triggers a transaction as you will have unique fabric user for each application user.
You can use any identity and access management system to manage your user registration, authentication etc. Internally you can have a fabric wallet for each of those users and use it to interact with the network.

Senofi

Tsvetan Georgiev
Director, Senofi Inc.

438-494-7854 | tsvetan@...

www.senofi.ca

www.consortia.io







---- On Tue, 13 Apr 2021 23:06:03 -0400 이종권 <jongkwon.lee@...> wrote ----

I would make two org for the BC network: CityOrg and CitizenOrg. And register one user for each Org. I would make two applications. One for city staff and one for inhabitants. Every inhabitant in the city will use the inhabitant-application which is a web application and members of the city staff will use the staff-application. If you want to give different user IDs to inhabitants, make a new account system in the inhabitant-application, not in the BC. The inhabitant-application will have only one fabric user in its wallet to access the BC network, while handling thousands of accounts for inhabitants.






Re: Running same application from multiple users

conanoc
 

I would make two org for the BC network: CityOrg and CitizenOrg. And register one user for each Org. I would make two applications. One for city staff and one for inhabitants. Every inhabitant in the city will use the inhabitant-application which is a web application and members of the city staff will use the staff-application. If you want to give different user IDs to inhabitants, make a new account system in the inhabitant-application, not in the BC. The inhabitant-application will have only one fabric user in its wallet to access the BC network, while handling thousands of accounts for inhabitants.


Private Chaincode Lab - Tue, 04/13/2021 #cal-notice

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Private Chaincode Lab

When:
Tuesday, 13 April 2021
8:00am to 9:00am
(GMT-07:00) America/Los Angeles

Where:
https://zoom.us/my/hyperledger.community.3?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Organizer:
bur@...

Description:
Two of the Hyperleger Labs projects (private data objects and private chain code) are collaborating to develop a "private smart contracts" capability.

Join Zoom Meeting https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09 Meeting ID: 518 494 7650 Passcode: 475869

581 - 600 of 10385