Re: install chaincode using API
Nikos Karamolegkos
Thus, I have to build functions which will call the peer
lifecycle chaincode commands? For example using bash? On 10/1/21 22:31, Marcos Sarres wrote:
-- Nikos Karamolegkos R & D engineer at ICS-FORTH Telecommunications and Networks Lab (TNL) |
||||||||||||||||
|
||||||||||||||||
Re: Retrieve transaction details
famar
Thank you for your reply.
I'm trying to set the composite key. I know that i can retrieve the ID of the user who is launching the transaction in this way : String userId = ctx.getClientIdentity().getID(); Now I need to create a composite key to make a search with this ID and the plate number. The GetHistoryForKey() accept a String so i tried this way: String[] keyAttribute = {userId,plateId}; String compositeKey = ctx.getStub().createCompositeKey("user-plate",keyAttribute).toString(); QueryResultsIterator<KeyModification> queryResult = ctx.getStub().getHistoryForKey(compositeKey); but this way I'm not able to retrieve any transaction. If I use only the plateId in the getHistoryForKey() it works fine so the problem is in the creation of the composite key. Could you tell me what I'm doing wrong? Thanks Il giorno gio 30 set 2021 alle ore 15:05 David Enyeart <enyeart@...> ha scritto:
|
||||||||||||||||
|
||||||||||||||||
Re: Check out my co-authored new book on Fabric V2 published by O'Reilly
blind.line
Thanks for sharing. I love learning from books
toggle quoted message
Show quoted text
James On Oct 3, 2021, at 12:03, Mark Anthony Morris <mark.morris@...> wrote:
|
||||||||||||||||
|
||||||||||||||||
Check out my co-authored new book on Fabric V2 published by O'Reilly
Mark Anthony Morris <mark.morris@...>
Hello All, I recommend this new O’Reilly book, I co-authored. It is available at Amazon, O’Reilly, and others. It will help your learning and development: Hands-On Smart Contract Development with Hyperledger Fabric V2: Building Enterprise Blockchain Applications Amazon: Learn more: https://www.amazon.com/dp/1492086126/ref=cm_sw_em_r_mt_dp_8QP2R4WFE6NS505Y0CMJ Google Books: Sincerely, Mark Anthony Morris
|
||||||||||||||||
|
||||||||||||||||
Re: 回复: [Hyperledger Fabric] How to modify the behaviour of fabric peer
#fabric-peer
BigBang019
I'm sorry I posted a stupid question:
I did use javascript sdk to submit transaction, and I've found what I need in module fabric-network, where the logic of clients' receiving endorsement from peers and send to orderer is coded in fabric-network/lib/transaction.js: function submit(). |
||||||||||||||||
|
||||||||||||||||
回复: [Hyperledger Fabric] How to modify the behaviour of fabric peer
#fabric-peer
david liu <david-khala@...>
I believe there is no need to intercept by WireShark if you are using any sdk to receive the proposal response. So I guess you are using command lien with binary, is it?
Best Regards, David Liu
发件人: fabric@... <fabric@...>
代表 BigBang019
Hi, thanks for your reply. |
||||||||||||||||
|
||||||||||||||||
Re: Private data dissemination for new peers from the same org after joining an existing channel in HLF 2.x
#fabric-peer
Yacov
It will pull the private data from peers in the collection eventually, it takes time.
----- Original message ----- |
||||||||||||||||
|
||||||||||||||||
Re: install chaincode using API
Marcos Sarres
In my case, we had to create our own API for installing, instantiating and upgrading chaincodes and HLF clients.
Regards,
Marcos Sarres | CEO | +55 61 98116 7866
De: fabric@... <fabric@...> Em nome de Nikos Karamolegkos
Hello, as I have seen I can install a smart contract to a peer by running to peer: peer lifecycle chaincode install ... In case I want to install or update a chaincode using a Web UI can I do that by using the API? Thank you, -- Nikos Karamolegkos R & D engineer at ICS-FORTH Telecommunications and Networks Lab (TNL) |
||||||||||||||||
|
||||||||||||||||
Private data dissemination for new peers from the same org after joining an existing channel in HLF 2.x
#fabric-peer
jefferson.rs@...
Hi everyone.
I'm doing some testing over the use of private data and I've got into a doubt which should be the default behaviour in HLF 2.x.
Assuming a network with 2 orgs (orgA and orgB) and each org have one peer (peer1.orgA and peer1.orgB): there's a chaincode installed in the channel with explicit private collection defined where each org have it's own private collection (collectionOrgA and collectionOrgB) with the following configurations:
memberOnlyRead: true,
memberOnlyWrite: false,
requiredPeerCount: 0,
maxPeerCount: 3
I've executed one TX that runs a PutPrivateData to collectionOrgA and another TX to collectionOrgB. So the private data were stored successfully.
Later on I up a new peer to orgA (peer2.orgA) and I've executed the join operation for this peer to this channel. After the join, I've noticed that this node didn't received any private data back just the hashes.
So I've got these doubts:
1) Is this the expected behaviour in HLF 2.x?
2) Would it be possible for a new peer that joins the channel to get this private data that belongs to his own org (in this case orgA)? If so, which would be the setup to enable this?
Thanks in advance,
Jeff.
|
||||||||||||||||
|
||||||||||||||||
Re: Retrieve transaction details
Marcos Sarres
Hello Fabrizio,
Although you are a java developer, there is an open-source repository in GoLang that maybe could help you.
It provides a chaincode with create, update, read, delete, search and history transactions, already with a rest server integrated for HL Fabric 1.4 and 2.2.
You could find more info here:
https://goledger-cc-tools.readthedocs.io/en/latest/
regards,
Marcos Sarres | CEO | +55 61 98116 7866
De: fabric@... <fabric@...> Em nome de famar
Hello everyone, I would like to search for a transaction in hyperledger fabric, filtering against the person who launched it and the ID it refers to. Thank you. |
||||||||||||||||
|
||||||||||||||||
install chaincode using API
Nikos Karamolegkos
Hello, as I have seen I can install a smart contract to a peer by running to peer: peer lifecycle chaincode install ... In case I want to install or update a chaincode using a Web UI can I do that by using the API? Thank you, -- Nikos Karamolegkos R & D engineer at ICS-FORTH Telecommunications and Networks Lab (TNL) |
||||||||||||||||
|
||||||||||||||||
Re: Retrieve transaction details
David Enyeart
You can use chaincode API GetHistoryForKey() to retrieve all historical transactions associated with a key. Therefore if you make your key the number plate, or number plate and user id concatenated as a composite key, you can retrieve what you need. Hello everyone, I'm trying to develop chaincode in java. I would like to search for a transaction in hyperledger fabric, filtering against the person who launched it and the ID it refers to. For example, let's say we have a generic car asset ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd Hello everyone, I'm trying to develop chaincode in java. I would like to search for a transaction in hyperledger fabric, filtering against the person who launched it and the ID it refers to. Thank you.
|
||||||||||||||||
|
||||||||||||||||
Re: Hyperledger fabric peer high memory usage
#fabric
David Enyeart
400MB is fairly typical after peer has completed processing a load. Hi, I am running a fabric network of 3 peers, 2 orderers and 2 external chaincodes on K8s cluster. Everything's running fine and smooth as expected. I have been monitoring the memory usage of the fabric peers which keeps growing and doesn't ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd Hi, I am running a fabric network of 3 peers, 2 orderers and 2 external chaincodes on K8s cluster. Everything's running fine and smooth as expected. I have been monitoring the memory usage of the fabric peers which keeps growing and doesn't comes down despite no transactions being executed. As and when I am invoking 100-200 transactions there seems to be no unusual spike in the memory usage of peers, or marginal increase which is expected. I stopped executing transactions altogether and just kept monitoring the resource usage, and since the last two days the memory usage has increase to ~400MiB which is too high considering no transactions have been executed in the past 2 days. Please have a look at the screenshot from Grafana of the memory usage. Even though the peers use gossip protocol to communicate about the new blocks, and other stuffs, the high memory usage is kind of unexplainable. I have checked that the /var/hyperledger/production directory has been mapped to a persistent storage. This issue happens only after few days after the network has been deployed, as this is the second time I have re-deployed the whole fabric network. Any suggestions on what could have one wrong, or is there some configuration which I am missing? Or what's the appropriate memory that should be allocated to the peers for running in production? |
||||||||||||||||
|
||||||||||||||||
Re: Minimal Implementation
J K
There's a new one called Fablo, I tried it, it is good and gives you the flexibility of creating what you need, even if it is bare minimum.
Cheers
On Sunday, 19 September, 2021, 05:27:12 pm IST, Nicholas Leonardi via lists.hyperledger.org <nlzanutim=yahoo.com@...> wrote:
Accidently sent without the link, here it is GitHub - lepar/hyperledger-fabric-generic-network: A hyperledger fabric generic network with production ready components to be used as a reference or starting point
Em domingo, 19 de setembro de 2021 01:33:02 BRT, mhdalkhaldibc@... <mhdalkhaldibc@...> escreveu:
I'm trying to trim down fabric. My use case is simple, basic token transfer with utxos, so I want to simplify and remove features and components I'm not using. I will most likely have one org, one ca, and no special endorsement policies. Could you please help me find some relevant resources to look at? Thanks |
||||||||||||||||
|
||||||||||||||||
Retrieve transaction details
famar
Hello everyone,
I'm trying to develop chaincode in java. I would like to search for a transaction in hyperledger fabric, filtering against the person who launched it and the ID it refers to. Thank you. |
||||||||||||||||
|
||||||||||||||||
Re: HA on Kubernetes
Yacov
The important thing to remember is to never ever give the same certificate (TLS or enrollment certificate) to two or more peers or orderers.
Or in other words, Fabric only needs redundancy of nodes and manages HA on its own.
It should also be noted that the common model adopted in the web world where you have the container orchestration platform spin up new nodes upon demand, does not apply to Fabric, not even to peers, as it takes a fresh peer a long time to replicate the blocks, and while bootstrapping it from a snapshot is probably something you can script, it's better to plan ahead.
----- Original message ----- |
||||||||||||||||
|
||||||||||||||||
Re: HA on Kubernetes
Tom Lamm
Hi, Tom Lamm
From: fabric@... <fabric@...> On Behalf Of nrostkowski@...
Sent: Wednesday, September 29, 2021 6:37 AM To: fabric@... Subject: [Hyperledger Fabric] HA on Kubernetes
Hi, what's the proper way to achieve High Availability of Hyperledger Fabric on Kubernetes?
Can we just scale up existing orderers and peers Deployments or do we need to add new Deployments and each Deployment must have only one replica?
Norbert Rostkowski |
||||||||||||||||
|
||||||||||||||||
Now: Fabric Contributor Meeting - 09/29/2021
#cal-notice
fabric@lists.hyperledger.org Calendar <noreply@...>
Fabric Contributor Meeting When: Where: Organizer: Dave Enyeart enyeart@... Description: Join Zoom Meeting
https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09
Meeting ID: 518 494 7650
Passcode: 475869
|
||||||||||||||||
|
||||||||||||||||
HA on Kubernetes
nrostkowski@wp.pl
Hi, what's the proper way to achieve High Availability of Hyperledger Fabric on Kubernetes? Can we just scale up existing orderers and peers Deployments or do we need to add new Deployments and each Deployment must have only one replica? Norbert Rostkowski |
||||||||||||||||
|
||||||||||||||||
Fabric Contributor Meeting - September 29, 2021
David Enyeart
Hyperledger Fabric Contributor Meeting Where: https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09 Agendas and Recordings: https://wiki.hyperledger.org/display/fabric/Contributor+Meetings |
||||||||||||||||
|