回复: 回复: [Hyperledger Fabric] install chaincode using API
david liu <david-khala@...>
One example is fabric-sdk-java/End2endLifecycleIT.java at main · hyperledger/fabric-sdk-java (github.com)
发件人: Nikos Karamolegkos <nkaram@...>
发送时间: 2021年10月5日 17:02 收件人: 刘 宇翔 <david-khala@...> 主题: Re: 回复: [Hyperledger Fabric] install chaincode using API Hello, Thank you for you reply. Can you give some guidance on how to use the SDK to process admin task like deploying a new channel, an organization or a chaincode? Thank you, On 10/5/21 07:54, 刘 宇翔 wrote:
-- Nikos Karamolegkos R & D engineer at ICS-FORTH Telecommunications and Networks Lab (TNL) |
||||||||||||||||
|
||||||||||||||||
Re: Minimal Implementation
Nancy Min
Does Fablo support some of Fabrics new functionality or integrate with other Hyperledger projects such as blockchain applicability framework?
toggle quoted message
Show quoted text
Thanks,
Nancy On Sep 30, 2021, at 5:47 AM, J K via lists.hyperledger.org <jsjkj434=yahoo.com@...> wrote:
|
||||||||||||||||
|
||||||||||||||||
回复: [Hyperledger Fabric] Minimal Implementation
david liu <david-khala@...>
If your purpose is simple and want to getting-started fast, please have try in MiniFabric
发件人: fabric@... <fabric@...>
代表 J K via lists.hyperledger.org
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
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. |
||||||||||||||||
|
||||||||||||||||
回复: [Hyperledger Fabric] install chaincode using API
david liu <david-khala@...>
Strongly agree with Marcos, “We really try to avoid script for HL Fabric administration” David Liu
发件人: fabric@... <fabric@...>
代表 Marcos Sarres
Actually we used the fabric-client SDK for NodeJs (planning to change to GoLang), I really try to avoid script for HL Fabric administration.
Then created a proxy to install, instantiate and upgrade chaincodes, it really made things a lot easier to work.
Here follows a Fabric demo chaincode that uses this proxy
https://github.com/GoLedgerDev/cc-tools-demo
Best regards,
Marcos Sarres | CEO | +55 61 98116 7866
De: Nikos Karamolegkos <nkaram@...>
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: Fabric strategic priorities
David Enyeart
Thank you to those that responded or discussed on the contributor call last week. We have incorporated feedback and produced an anonymous survey that can be completed by any community member through October 12th. There has been a lot of work on Fabric Gateway this year - the Fabric v2.4.0-beta release is out and we are working towards a final v2.4.0 release before the end of the year. There is also work ongoing in some other areas to socialize with the community in coming weeks, for example purging private data stores for GDPR scenarios, better kubernetes support, and improved samples. But with v2.4 coming soon, it is a good time to take a step back and have a discussion about strategic priorities for Fabric. I'll throw out some ideas that have already been discussed, but we'd love to hear about other ideas. Once we catalog the ideas we can also have a community survey to see which ones have the most interest from users and contributors, and then start building a plan. Here are a few of the items already being discussed: - BFT support in ordering service. This has been long discussed and there have been investments in SmartBFT (https://github.com/SmartBFT-Go/consensus/) and MirBFT (https://github.com/hyperledger-labs/mirbft) that could be leveraged to bring BFT support to Fabric. - Fabric Smart Client - Released as a lab last year, this is a new pattern for multi-party applications backed by Fabric that provides flexibility and privacy beyond existing chaincode and private data capabilities. We could further invest in this pattern and work towards full project status - https://github.com/hyperledger-labs/fabric-smart-client - Replace goleveldb with a more modern key/value embedded database with better performance characteristics. - Queryability options - We continue to see requests for additional ledger query options, and could consider query language support in peer on top of the embedded key/value state store, versus using a queryable external database (CouchDB or otherwise). - Pruning old blocks from peer and orderer to alleviate concerns around long term storage growth - Performance improvements - refactor peer validation/commit logic and private data handling to alleviate known performance bottlenecks If you have thoughts on any of these or other ideas, we'd love to hear them, either in this mail thread or an upcoming contributor meeting. |
||||||||||||||||
|
||||||||||||||||
Re: install chaincode using API
Marcos Sarres
Actually we used the fabric-client SDK for NodeJs (planning to change to GoLang), I really try to avoid script for HL Fabric administration.
Then created a proxy to install, instantiate and upgrade chaincodes, it really made things a lot easier to work.
Here follows a Fabric demo chaincode that uses this proxy
https://github.com/GoLedgerDev/cc-tools-demo
Best regards,
Marcos Sarres | CEO | +55 61 98116 7866
De: Nikos Karamolegkos <nkaram@...>
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
I solved it by rewriting the transactions I should search for using the composite key in the putState(). This way I can easily retrieve them. Thanks for your help Il giorno lun 4 ott 2021 alle ore 08:44 famar via lists.hyperledger.org <fabrizio.marangio=gmail.com@...> ha scritto:
|
||||||||||||||||
|
||||||||||||||||
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? |
||||||||||||||||
|