Date   

Hyperledger DCI Survey

Gari Singh <garis@...>
 

At Hyperledger, "All are welcome here!" Having a community that has a culture of encouraging people to voice their diverse opinions is crucial for the long term success of the project.

Today we are launching a survey ( https://www.surveymonkey.com/r/DCIWGsurvey ) to help us understand our community better.

We need to hear from you. Whether you are a frequent or occasional contributor, past or present we want to know more about you and your experiences here at Hyperledger.

Diversity, Civility, and Inclusion can cover many different community health issues. The DCI Working Group will be using this data to help guide our efforts over the coming year. We plan to release results from the survey at the Hyperledger Global Forum March 3-6.

Thanks for taking this survey. This one simple action is an important contribution you make to continue building a healthy open source community.

https://www.surveymonkey.com/r/DCIWGsurvey

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


ANNOUNCEMENT: Hyperledger Fabric v2.0 is now available!

David Enyeart
 

The Hyperledger Fabric maintainers are pleased to announce the availability of Fabric v2.0!

Given this important milestone, Baohua Yang and I have written a blog to reflect on the evolution of Fabric and the significance of the new release:
https://www.hyperledger.org/blog/2020/01/30/welcome-hyperledger-fabric-2-0:-enterprise-dlt-for-production

As always, you can find additional details of release content in the What’s New documentation:
https://hyperledger-fabric.readthedocs.io/en/release-2.0/whatsnew.html

Information about Fabric changes and upgrade considerations can be found in the release notes:
https://github.com/hyperledger/fabric/releases/tag/v2.0.0

Download Hyperledger Fabric v2.0 today and give the new test network in the fabric-samples repository a try:
https://hyperledger-fabric.readthedocs.io/en/release-2.0/install.html

Concerning Fabric CA server, while the Fabric CA server remains a preferred and tested certificate authority for Hyperledger Fabric, a new major release of Fabric CA will not be released at this time, since none of the new Fabric features required Fabric CA changes. Fabric CA will remain at v1.4.x for the time being.

Thank you to everybody in the community that helped to make the Fabric v2.0 release possible!

The Hyperledger Fabric maintainers


Re: Peer communication during chaincode execution

Yacov
 

Look at my last commits from https://github.com/yacovm/fabric2/commits/p2p

There is a sample that uses this API to performa secure summation



From:        "Kimheng SOK" <sok.kimheng@...>
To:        Yacov Manevich <YACOVM@...>
Cc:        fabric@..., hyperledger-fabric@...
Date:        01/30/2020 09:22 AM
Subject:        [EXTERNAL] Re: [Hyperledger Fabric] Peer communication during chaincode execution
Sent by:        fabric@...




Hi,

Could you show me more about those two new APIs, and where can I find all the related files related to Gossip protocol and Chaincode Shim API, 
I would love to learn and may be have time to customize those methods too.
It is good to deep dive into the protocol level as a hyperleder developer, as now I am only a fresh hyperledger user.

Bests,


On Thu, Jan 30, 2020 at 8:17 AM Yacov Manevich <YACOVM@...> wrote:
Unfortunately Fabric doesn't have this feature yet... you can comment in the JIRA that it's needed for you, but I am skeptic that we'll have this feature anytime soon

If you are willing to use your own Fabric build with custom modifications, I can point you to a PoC that adds 2 methods to the chaincode shim API:


        P2PSend(payload []byte, to ... string)
        P2PRecv() (payload []byte, from string)


However, this PoC is experimental.




From:        
"Kimheng SOK" <sok.kimheng@...>
To:        
Yacov Manevich <YACOVM@...>
Cc:        
hyperledger-fabric@...
Date:        
01/30/2020 02:55 AM
Subject:        
[EXTERNAL] Re: [Hyperledger Fabric] Peer communication during chaincode execution
Sent by:        
fabric@...




Hi,

My usecase is chaincode need to call external program, in the case of multiple peers, each peer could produce non-deterministic result and the invoke function will return Error: Could not assemble transaction. So all peers need to communicate with each other about the result and compute deterministic result so that the error will not happen. 

This feature could open the possibility to avoid all peers just passively receiving the deterministic result from a client or central entity.
For sure the computation time will increase, because the more peers we have, the more communication need to be done just like gossip protocol. So it is a trade-off .
The good news is hyperledger is a permission blockchain, so the number of peers is limited depend on the use case, so some applications could be useful to have this feature.

Bests,


On Thu, Jan 30, 2020 at 6:14 AM Yacov Manevich <YACOVM@...> wrote:
See
https://jira.hyperledger.org/browse/FAB-11980

May I ask why do you need it? what's your use case?




From:        
"Kimheng SOK" <sok.kimheng@...>
To:        
hyperledger-fabric@...
Date:        
01/29/2020 11:57 PM
Subject:        
[EXTERNAL] [Hyperledger Fabric] Peer communication during chaincode execution
Sent by:        
fabric@...




Dear all,

I wonder is it possible for peers to pass message to each other on the channel during the chaincode execution in the context of chaincode developer level not the protocol level? Or we need to modify the gossip protocol it self.

Appreciate for answering the question.








Re: Customize chaincode docker image

Matthew White
 

Hello - my best guess would be that the chaincode is failing to call back to the peer to 'register'. 
 
Usually capturing the docker logs of the chaincode really helps in cases like this. 
 
Can I ask what your requirement is to customize the docker image? Just curious!
 
 
Regards, Matthew.
Matthew B White  IBM Blockchain Solutions Architect
 
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at  calanais.me.uk
 
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday 
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN

"The wrong answers are the ones you go looking for when the right answers stare you in the face"
 
 
 
----- Original message -----
From: sanjaykumar3989@...
Sent by: fabric@...
To: fabric@...
Cc:
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Customize chaincode docker image
Date: Thu, Jan 30, 2020 5:46 AM
 
Hi,

I have created the customized image from hyperledger/fabric-javaenv:amd64-1.4.4. and used as CORE_CHAINCODE_JAVA_RUNTIME=sanjaykumar3989/myenv:amd64-1.4.4.

In this new image i am replacing build.sh and start file in location  /root/chaincode-java/. 
The build.sh is running successfully as my jar is building but after that it exit with below msg:
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1
 
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


Re: anyone able to iterate over records using getStateByRange?

Matthew White
 

Hello;
 
 
Will need to double check, but as a workaround for an unbounded range try this as the end key
 
const MAX_UNICODE_RUNE_VALUE = '\u{10ffff}';
 
Though such an unbounded range could potentially give you a lot data; worth looking at the pagination variants especially if there's any doubt about the size of data that might come back 
 
Regards, Matthew.
Matthew B White  IBM Blockchain Solutions Architect
 
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at  calanais.me.uk
 
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday 
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN

"The wrong answers are the ones you go looking for when the right answers stare you in the face"
 
 
 
----- Original message -----
From: "Siddharth Jain" <siddjain@...>
Sent by: fabric@...
To: "fabric@..." <fabric@...>
Cc:
Subject: [EXTERNAL] [Hyperledger Fabric] anyone able to iterate over records using getStateByRange?
Date: Wed, Jan 29, 2020 9:24 PM
 
this method:
 
Note that startKey and endKey can be empty string, which implies unbounded range query on start or end.
 
is supposed to enable enumerating records in the database but when we tried it, it did not work. e.g.:
 
public async getAssets(ctx: Context): Promise<Asset[]> {
        const assets: Asset[] = [];
        const results = await ctx.stub.getStateByRange('', '');
        while (true) {
            let item = await results.next();
            if (item.done) {
                break;
            } else {
                let buffer = item.value.getValue();
                let asset = JSON.parse(buffer.buffer.toString()) as Asset;     // buffer.buffer returns many records not just once and the JSON.parse will fail           
                assets.push(asset);                
            }
        }
        await results.close();
        return assets;
    }
 
buffer.toString()
"ByteBufferNB(offset=22,markedOffset=-1,limit=386,capacity=1981)"
 
buffer.buffer.toString()
"
�
�
mycc00000�{"createdBy":"","id":"00000","lastModifiedBy":"","metadata":"","owner":"org2MSP"}
�
�
mycc00001�{"createdBy":"","id":"00001","lastModifiedBy":"","metadata":"","owner":"org1MSP"}
�
�
mycc00002�{"createdBy":"","id":"00002","lastModifiedBy":"","metadata":"","owner":"org1MSP"}
�
�
mycc00003�{"createdBy":"","id":"00003","lastModifiedBy":"","metadata":"","owner":"org1MSP"}
�
�
mycc00004�{"createdBy":"","id":"00004","lastModifiedBy":"","metadata":"","owner":"org1MSP"}$efc8d188-16ae-41e8-a024-7880a8d0bf31"
 
 
JSON.parse(buffer.buffer.toString())
SyntaxError: Unexpected token � in JSON at position 1
 
buffer.buffer.buffer.toString()
"[object ArrayBuffer]"
has anyone been able to use this method successfully?
 
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


Error when I start the peer node

Marina Wanis <marinamaged1996@...>
 

Hi,

 

Does any one know why am I getting the following error in the orderer logs, once I start the

Peer node?

 

 

Thank you,

Marina

 

 

 

Sent from Mail for Windows 10

 


Re: Peer communication during chaincode execution

Kimheng SOK
 

Hi,

Could you show me more about those two new APIs, and where can I find all the related files related to Gossip protocol and Chaincode Shim API, 
I would love to learn and may be have time to customize those methods too.
It is good to deep dive into the protocol level as a hyperleder developer, as now I am only a fresh hyperledger user.

Bests,

On Thu, Jan 30, 2020 at 8:17 AM Yacov Manevich <YACOVM@...> wrote:
Unfortunately Fabric doesn't have this feature yet... you can comment in the JIRA that it's needed for you, but I am skeptic that we'll have this feature anytime soon

If you are willing to use your own Fabric build with custom modifications, I can point you to a PoC that adds 2 methods to the chaincode shim API:

        P2PSend(payload []byte, to ... string)
        P2PRecv() (payload []byte, from string)


However, this PoC is experimental.



From:        "Kimheng SOK" <sok.kimheng@...>
To:        Yacov Manevich <YACOVM@...>
Cc:        hyperledger-fabric@...
Date:        01/30/2020 02:55 AM
Subject:        [EXTERNAL] Re: [Hyperledger Fabric] Peer communication during chaincode execution
Sent by:        fabric@...




Hi,

My usecase is chaincode need to call external program, in the case of multiple peers, each peer could produce non-deterministic result and the invoke function will return Error: Could not assemble transaction. So all peers need to communicate with each other about the result and compute deterministic result so that the error will not happen. 

This feature could open the possibility to avoid all peers just passively receiving the deterministic result from a client or central entity.
For sure the computation time will increase, because the more peers we have, the more communication need to be done just like gossip protocol. So it is a trade-off .
The good news is hyperledger is a permission blockchain, so the number of peers is limited depend on the use case, so some applications could be useful to have this feature.

Bests,


On Thu, Jan 30, 2020 at 6:14 AM Yacov Manevich <YACOVM@...> wrote:
See https://jira.hyperledger.org/browse/FAB-11980

May I ask why do you need it? what's your use case?




From:        
"Kimheng SOK" <sok.kimheng@...>
To:        
hyperledger-fabric@...
Date:        
01/29/2020 11:57 PM
Subject:        
[EXTERNAL] [Hyperledger Fabric] Peer communication during chaincode execution
Sent by:        
fabric@...




Dear all,

I wonder is it possible for peers to pass message to each other on the channel during the chaincode execution in the context of chaincode developer level not the protocol level? Or we need to modify the gossip protocol it self.

Appreciate for answering the question.






Re: Customize chaincode docker image

sanjaykumar3989@...
 

Hi,

I have created the customized image from hyperledger/fabric-javaenv:amd64-1.4.4. and used as CORE_CHAINCODE_JAVA_RUNTIME=sanjaykumar3989/myenv:amd64-1.4.4.

In this new image i am replacing build.sh and start file in location  /root/chaincode-java/. 
The build.sh is running successfully as my jar is building but after that it exit with below msg:
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1


Re: Proposal : Hyperledger Fabric block archiving

nekia <atsushin@...>
 

Hi Jay,

Thank you for your confirmation. I could see the situation on my local by using byfn of fabric-samples on fabric v2.0.0-beta. (But I haven't understood yet how to decide which order delivers block to which peer).

If we can align the size of metadata on each orderer to a certain size regarding each block, I think we are still able to keep our assumption available yet.
Is it possible to estimate the size of SignatureHeader and Signature at most? If it's possible, by padding to the maximum size on each orderer, we can align the size of metadata of each block across orderers, I think.
If it's not possible, we need to consider going to the way of block-based (not blockfile-based) archiving logic.

Thanks,
Atsushi


Re: Peer communication during chaincode execution

Yacov
 

Unfortunately Fabric doesn't have this feature yet... you can comment in the JIRA that it's needed for you, but I am skeptic that we'll have this feature anytime soon

If you are willing to use your own Fabric build with custom modifications, I can point you to a PoC that adds 2 methods to the chaincode shim API:

        P2PSend(payload []byte, to ... string)
        P2PRecv() (payload []byte, from string)


However, this PoC is experimental.



From:        "Kimheng SOK" <sok.kimheng@...>
To:        Yacov Manevich <YACOVM@...>
Cc:        hyperledger-fabric@...
Date:        01/30/2020 02:55 AM
Subject:        [EXTERNAL] Re: [Hyperledger Fabric] Peer communication during chaincode execution
Sent by:        fabric@...




Hi,

My usecase is chaincode need to call external program, in the case of multiple peers, each peer could produce non-deterministic result and the invoke function will return Error: Could not assemble transaction. So all peers need to communicate with each other about the result and compute deterministic result so that the error will not happen. 

This feature could open the possibility to avoid all peers just passively receiving the deterministic result from a client or central entity.
For sure the computation time will increase, because the more peers we have, the more communication need to be done just like gossip protocol. So it is a trade-off .
The good news is hyperledger is a permission blockchain, so the number of peers is limited depend on the use case, so some applications could be useful to have this feature.

Bests,


On Thu, Jan 30, 2020 at 6:14 AM Yacov Manevich <YACOVM@...> wrote:
See https://jira.hyperledger.org/browse/FAB-11980

May I ask why do you need it? what's your use case?




From:        
"Kimheng SOK" <sok.kimheng@...>
To:        
hyperledger-fabric@...
Date:        
01/29/2020 11:57 PM
Subject:        
[EXTERNAL] [Hyperledger Fabric] Peer communication during chaincode execution
Sent by:        
fabric@...




Dear all,

I wonder is it possible for peers to pass message to each other on the channel during the chaincode execution in the context of chaincode developer level not the protocol level? Or we need to modify the gossip protocol it self.

Appreciate for answering the question.






Re: Peer communication during chaincode execution

Kimheng SOK
 

Hi,

My usecase is chaincode need to call external program, in the case of multiple peers, each peer could produce non-deterministic result and the invoke function will return Error: Could not assemble transaction. So all peers need to communicate with each other about the result and compute deterministic result so that the error will not happen. 

This feature could open the possibility to avoid all peers just passively receiving the deterministic result from a client or central entity.
For sure the computation time will increase, because the more peers we have, the more communication need to be done just like gossip protocol. So it is a trade-off .
The good news is hyperledger is a permission blockchain, so the number of peers is limited depend on the use case, so some applications could be useful to have this feature.

Bests,


On Thu, Jan 30, 2020 at 6:14 AM Yacov Manevich <YACOVM@...> wrote:
See https://jira.hyperledger.org/browse/FAB-11980

May I ask why do you need it? what's your use case?



From:        "Kimheng SOK" <sok.kimheng@...>
To:        hyperledger-fabric@...
Date:        01/29/2020 11:57 PM
Subject:        [EXTERNAL] [Hyperledger Fabric] Peer communication during chaincode execution
Sent by:        fabric@...




Dear all,

I wonder is it possible for peers to pass message to each other on the channel during the chaincode execution in the context of chaincode developer level not the protocol level? Or we need to modify the gossip protocol it self.

Appreciate for answering the question.




Re: Issues w/ tutorial: Build Your First Network

Kimheng SOK
 

Why don't you use "byfn.sh" script to run the whole things, or you want to run it step by step.

On Thu, Jan 30, 2020 at 5:58 AM Salmon, Erika <esalmon@...> wrote:

Hi,

 

I’m having issues in this tutorial and I’m not sure why or how to resolve it. I follow every step exactly but when in bash I enter the command:

 

#peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

 

After I enter it, I get this error:

 

2020-01-29 22:46:13.000 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2020-01-29 22:46:13.019 UTC [cli.common] readBlock -> INFO 002 Expect block, but got status: &{NOT_FOUND}

2020-01-29 22:46:13.022 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized

2020-01-29 22:46:13.452 UTC [cli.common] readBlock -> INFO 004 Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:13.455 UTC [channelCmd] InitCmdFactory -> INFO 005 Endorser and orderer connections initialized

2020-01-29 22:46:13.656 UTC [cli.common] readBlock -> INFO 006 Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:13.662 UTC [channelCmd] InitCmdFactory -> INFO 007 Endorser and orderer connections initialized

2020-01-29 22:46:13.863 UTC [cli.common] readBlock -> INFO 008 Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:13.867 UTC [channelCmd] InitCmdFactory -> INFO 009 Endorser and orderer connections initialized

2020-01-29 22:46:14.069 UTC [cli.common] readBlock -> INFO 00a Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:14.073 UTC [channelCmd] InitCmdFactory -> INFO 00b Endorser and orderer connections initialized

2020-01-29 22:46:14.275 UTC [cli.common] readBlock -> INFO 00c Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:14.278 UTC [channelCmd] InitCmdFactory -> INFO 00d Endorser and orderer connections initialized

2020-01-29 22:46:14.480 UTC [cli.common] readBlock -> INFO 00e Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:14.484 UTC [channelCmd] InitCmdFactory -> INFO 00f Endorser and orderer connections initialized

2020-01-29 22:46:14.687 UTC [cli.common] readBlock -> INFO 010 Received block: 0

 

Could you please help me resolve this? I would like to continue with the tutorials but this error is preventing me from going forward.

 

 

Kind Regards,

 

Erika Salmon

 

This e-mail and any attachments to it are confidential. You must not use, disclose or act on the e-mail if you are not the intended recipient. If you have received this e-mail in error, please let us know by contacting the sender and deleting the original e-mail. Liability limited by a scheme approved under Professional Standards Legislation. Deloitte refers to a Deloitte member firm, one of its related entities, or Deloitte Touche Tohmatsu Limited (“DTTL”). Each Deloitte member firm is a separate legal entity and a member of DTTL. DTTL does not provide services to clients. Please see www.deloitte.com/about to learn more. Nothing in this e-mail, nor any related attachments or communications or services, have any capacity to bind any other entity under the ‘Deloitte’ network of member firms (including those operating in Australia).


Re: Issues w/ tutorial: Build Your First Network

email4tong@gmail.com
 

On Wednesday, January 29, 2020, 5:58:44 PM EST, Salmon, Erika <esalmon@...> wrote:


Hi,

 

I’m having issues in this tutorial and I’m not sure why or how to resolve it. I follow every step exactly but when in bash I enter the command:

 

#peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

 

After I enter it, I get this error:

 

2020-01-29 22:46:13.000 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2020-01-29 22:46:13.019 UTC [cli.common] readBlock -> INFO 002 Expect block, but got status: &{NOT_FOUND}

2020-01-29 22:46:13.022 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized

2020-01-29 22:46:13.452 UTC [cli.common] readBlock -> INFO 004 Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:13.455 UTC [channelCmd] InitCmdFactory -> INFO 005 Endorser and orderer connections initialized

2020-01-29 22:46:13.656 UTC [cli.common] readBlock -> INFO 006 Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:13.662 UTC [channelCmd] InitCmdFactory -> INFO 007 Endorser and orderer connections initialized

2020-01-29 22:46:13.863 UTC [cli.common] readBlock -> INFO 008 Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:13.867 UTC [channelCmd] InitCmdFactory -> INFO 009 Endorser and orderer connections initialized

2020-01-29 22:46:14.069 UTC [cli.common] readBlock -> INFO 00a Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:14.073 UTC [channelCmd] InitCmdFactory -> INFO 00b Endorser and orderer connections initialized

2020-01-29 22:46:14.275 UTC [cli.common] readBlock -> INFO 00c Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:14.278 UTC [channelCmd] InitCmdFactory -> INFO 00d Endorser and orderer connections initialized

2020-01-29 22:46:14.480 UTC [cli.common] readBlock -> INFO 00e Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:14.484 UTC [channelCmd] InitCmdFactory -> INFO 00f Endorser and orderer connections initialized

2020-01-29 22:46:14.687 UTC [cli.common] readBlock -> INFO 010 Received block: 0

 

Could you please help me resolve this? I would like to continue with the tutorials but this error is preventing me from going forward.

 

 

Kind Regards,

 

Erika Salmon

 

This e-mail and any attachments to it are confidential. You must not use, disclose or act on the e-mail if you are not the intended recipient. If you have received this e-mail in error, please let us know by contacting the sender and deleting the original e-mail. Liability limited by a scheme approved under Professional Standards Legislation. Deloitte refers to a Deloitte member firm, one of its related entities, or Deloitte Touche Tohmatsu Limited (“DTTL”). Each Deloitte member firm is a separate legal entity and a member of DTTL. DTTL does not provide services to clients. Please see www.deloitte.com/about to learn more. Nothing in this e-mail, nor any related attachments or communications or services, have any capacity to bind any other entity under the ‘Deloitte’ network of member firms (including those operating in Australia).


Re: Peer communication during chaincode execution

Yacov
 

See https://jira.hyperledger.org/browse/FAB-11980

May I ask why do you need it? what's your use case?



From:        "Kimheng SOK" <sok.kimheng@...>
To:        hyperledger-fabric@...
Date:        01/29/2020 11:57 PM
Subject:        [EXTERNAL] [Hyperledger Fabric] Peer communication during chaincode execution
Sent by:        fabric@...




Dear all,

I wonder is it possible for peers to pass message to each other on the channel during the chaincode execution in the context of chaincode developer level not the protocol level? Or we need to modify the gossip protocol it self.

Appreciate for answering the question.




Issues w/ tutorial: Build Your First Network

esalmon@...
 

Hi,

 

I’m having issues in this tutorial and I’m not sure why or how to resolve it. I follow every step exactly but when in bash I enter the command:

 

#peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

 

After I enter it, I get this error:

 

2020-01-29 22:46:13.000 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2020-01-29 22:46:13.019 UTC [cli.common] readBlock -> INFO 002 Expect block, but got status: &{NOT_FOUND}

2020-01-29 22:46:13.022 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized

2020-01-29 22:46:13.452 UTC [cli.common] readBlock -> INFO 004 Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:13.455 UTC [channelCmd] InitCmdFactory -> INFO 005 Endorser and orderer connections initialized

2020-01-29 22:46:13.656 UTC [cli.common] readBlock -> INFO 006 Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:13.662 UTC [channelCmd] InitCmdFactory -> INFO 007 Endorser and orderer connections initialized

2020-01-29 22:46:13.863 UTC [cli.common] readBlock -> INFO 008 Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:13.867 UTC [channelCmd] InitCmdFactory -> INFO 009 Endorser and orderer connections initialized

2020-01-29 22:46:14.069 UTC [cli.common] readBlock -> INFO 00a Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:14.073 UTC [channelCmd] InitCmdFactory -> INFO 00b Endorser and orderer connections initialized

2020-01-29 22:46:14.275 UTC [cli.common] readBlock -> INFO 00c Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:14.278 UTC [channelCmd] InitCmdFactory -> INFO 00d Endorser and orderer connections initialized

2020-01-29 22:46:14.480 UTC [cli.common] readBlock -> INFO 00e Expect block, but got status: &{SERVICE_UNAVAILABLE}

2020-01-29 22:46:14.484 UTC [channelCmd] InitCmdFactory -> INFO 00f Endorser and orderer connections initialized

2020-01-29 22:46:14.687 UTC [cli.common] readBlock -> INFO 010 Received block: 0

 

Could you please help me resolve this? I would like to continue with the tutorials but this error is preventing me from going forward.

 

 

Kind Regards,

 

Erika Salmon

 

This e-mail and any attachments to it are confidential. You must not use, disclose or act on the e-mail if you are not the intended recipient. If you have received this e-mail in error, please let us know by contacting the sender and deleting the original e-mail. Liability limited by a scheme approved under Professional Standards Legislation. Deloitte refers to a Deloitte member firm, one of its related entities, or Deloitte Touche Tohmatsu Limited (“DTTL”). Each Deloitte member firm is a separate legal entity and a member of DTTL. DTTL does not provide services to clients. Please see www.deloitte.com/about to learn more. Nothing in this e-mail, nor any related attachments or communications or services, have any capacity to bind any other entity under the ‘Deloitte’ network of member firms (including those operating in Australia).


Re: Chaincode gets instantiated but not able to invoke or list it #fabric #fabric-chaincode

stefan.riembauer@...
 

Hey mrudav, 

Did you make any progress on this? I am trying the same and it also fails at initializing the chaincode. On the worker node I can see that the chaincode container is started with a log message like "successfully started, sending signal to peer node". Also almost the exact configuration worked about a week ago with eks. Meanwhile I think that this could be a problem on the ami/docker/kubernetes-version which is used on eks... I purged my whole setup today and retried but still the same problem..

br
Stefan 


Peer communication during chaincode execution

Kimheng SOK
 

Dear all,

I wonder is it possible for peers to pass message to each other on the channel during the chaincode execution in the context of chaincode developer level not the protocol level? Or we need to modify the gossip protocol it self.

Appreciate for answering the question.


anyone able to iterate over records using getStateByRange?

Siddharth Jain
 

this method:

Note that startKey and endKey can be empty string, which implies unbounded range query on start or end.

is supposed to enable enumerating records in the database but when we tried it, it did not work. e.g.:

public async getAssets(ctx: Context): Promise<Asset[]> {
        const assets: Asset[] = [];
        const results = await ctx.stub.getStateByRange('', '');
        while (true) {
            let item = await results.next();
            if (item.done) {
                break;
            } else {
                let buffer = item.value.getValue();
                let asset = JSON.parse(buffer.buffer.toString()) as Asset;     // buffer.buffer returns many records not just once and the JSON.parse will fail           
                assets.push(asset);                
            }
        }
        await results.close();
        return assets;
    }


buffer.toString()
"ByteBufferNB(offset=22,markedOffset=-1,limit=386,capacity=1981)"

buffer.buffer.toString()
"
�
�
mycc00000�{"createdBy":"","id":"00000","lastModifiedBy":"","metadata":"","owner":"org2MSP"}
�
�
mycc00001�{"createdBy":"","id":"00001","lastModifiedBy":"","metadata":"","owner":"org1MSP"}
�
�
mycc00002�{"createdBy":"","id":"00002","lastModifiedBy":"","metadata":"","owner":"org1MSP"}
�
�
mycc00003�{"createdBy":"","id":"00003","lastModifiedBy":"","metadata":"","owner":"org1MSP"}
�
�
mycc00004�{"createdBy":"","id":"00004","lastModifiedBy":"","metadata":"","owner":"org1MSP"}$efc8d188-16ae-41e8-a024-7880a8d0bf31"


JSON.parse(buffer.buffer.toString())
SyntaxError: Unexpected token � in JSON at position 1

buffer.buffer.buffer.toString()
"[object ArrayBuffer]"

has anyone been able to use this method successfully?


Peer crash due to error during block commit #fabric #couchdb

Faisal
 

Error:
Got error while committing(read tcp 10.0.9.49:37944->10.0.9.15:5984: read: connection reset by peer

error reading response body

 

 

We have the following environment setup and configurations for an HLF 1.4.2 network.

 

1- Network deployed using docker swarm with service recovery

2- Peer and CouchDB directories mapped in order to persist data to maintain state after crashes

3- Prometheus deployed for event monitoring and log aggregation

4- Configuration for CouchDB set to

a.    - CORE_LEDGER_STATE_COUCHDBCONFIG_REQUESTTIMEOUT=120s

b.   - CORE_LEDGER_STATE_COUCHDBCONFIG_MAXRETRIES=5

c.    - CORE_LEDGER_STATE_COUCHDBCONFIG_MAXUPDATEBATCHSIZE=5000

d.   - CORE_LEDGER_STATE_COUCHDBCONFIG_INTERNALQUERYLIMIT=5000

e.    - CORE_LEDGER_STATE_COUCHDBCONFIG_TOTALQUERYLIMIT=5000

 

The CouchDB and Peer are running on the same HOST and the specs for the host are given below

 

RAM:                           8GB

Processor:                   Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz

Storage:                      400GB

CPU Cores:                  2

 

The Peer sends a request to CouchDB for committing a block and in return gets an invalid response or the connection times out which causes the peer to crash. The logs can be found in the peer.log file attached. 

The logs for the CouchDB are also attached and an error can be seen at the same time at which the peer crashed but the error does not provide any useful information to the user.

 

As a result of this only the PEER container crashes, and the swarm creates a new peer container to recover. The CouchDB container doesn’t crash and maintains the healthy state. When we looked at the Prometheus dashboard to check if there was any downtime for the peer, we see that there was no downtime recorded may be because the scrape_interval is set to 30sec and the service returns to its healthy state before it. 

Please note that after the crash we don’t lose any state or see issues with any of the other services.

We have found that a similar issue was opened on Jira, but that issue was also closed without any conclusive solution. The Fix Version is set to v1.4.5 that is not even a valid version for HLF.

https://jira.hyperledger.org/browse/FAB-16611?jql=text%20~%20%22couch%20db%20timeout%22

 

 

Expectation:

we are looking for either a fixed version of CouchDB that doesn't throw this error or fixed code in the peer so that if CouchDB returns this error the peer can retry the request or handle it gracefully without crashing.


Re: Error: could not assemble transaction: ProposalResponsePayloads do not match

Kimheng SOK
 

I got this error often, the reason is all the peer node execute their own chaincode individually and even if the result is successful, it doesn't means that all the payload are the same. By looking at the payload we can see that the output from different peer are different. So to solve the problem is to find the root cause inside our chaincode that make the different output. Normally I try to print the output step by step to see where there is the problem and solve it.

I used Nodejs chaincode, so console.log and console.info is what help me to see the inequality of the output, and then using docker logs ChaincodeContainerID to view the output.

On Wed, Jan 29, 2020 at 1:29 AM Siddharth Jain <siddjain@...> wrote:
could anyone point us to the code where the response payload is generated? is there any doc explaining what the response payload is? its a byte array but what does it contain?


From: Siddharth Jain <siddjain@...>
Sent: Monday, January 27, 2020 5:17 PM
To: fabric@... <fabric@...>
Subject: Error: could not assemble transaction: ProposalResponsePayloads do not match
 
we get this error when trying to invoke the chaincode on a network of 3 peers. However, we have verified if we invoke the chaincode individually on the peer nodes, all of them respond with Chaincode invoke successful. result: status:200. does anyone have any idea what could be wrong here?

3901 - 3920 of 11527