Date   

Re: #fabric #docker-compose #Fabric #fabric-orderer #fabric #docker-compose #fabric-orderer

Brett T Logan <brett.t.logan@...>
 

 
Brett Logan
Software Engineer, IBM Blockchain
Phone: 1-984-242-6890
 
 
 

----- Original message -----
From: "Abdel-Rahman Ashraf" <abdelrahman9709@...>
Sent by: fabric@...
To: fabric@...
Cc:
Subject: [EXTERNAL] [Hyperledger Fabric] #fabric #docker-compose #Fabric #fabric-orderer
Date: Thu, May 21, 2020 10:30 PM
 
I know this could seem like a stupid question. when I run the my docker container , all the orderers exit after seconds and in the logs I get this error "  2020-05-22 02:04:18.771 UTC [orderer.common.server] Main -> PANI 004 Failed validating bootstrap block: initializing configtx manager failed: bad channel ID: 'Orderer-channel' contains illegal characters "

The thing is my channel ID is : mainchannel
I do not know what is Orderer-channel of where it came from as I revised all my files for 15 times without finding any thing about "Orderer-cahnnel"

This is my github repo https://github.com/AbdelrahmanAshraf9079/ExpleoHyperledgerFabric If you want to take a look.

Thanks in advance
 


#fabric #docker-compose #Fabric #fabric-orderer #fabric #docker-compose #fabric-orderer

Abdel-Rahman Ashraf <abdelrahman9709@...>
 

I know this could seem like a stupid question. when I run the my docker container , all the orderers exit after seconds and in the logs I get this error "  2020-05-22 02:04:18.771 UTC [orderer.common.server] Main -> PANI 004 Failed validating bootstrap block: initializing configtx manager failed: bad channel ID: 'Orderer-channel' contains illegal characters "

The thing is my channel ID is : mainchannel
I do not know what is Orderer-channel of where it came from as I revised all my files for 15 times without finding any thing about "Orderer-cahnnel"

This is my github repo https://github.com/AbdelrahmanAshraf9079/ExpleoHyperledgerFabric If you want to take a look.

Thanks in advance


How to write test case for fabric-contract-api-go #fabric-chaincode

saiomkar
 

hello,

What is the best way to write  test cases for  smart contracts written in golang using the fabric-contract-api-go  

Thanks in advance 


Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.

Siddharth Jain
 

we see this error in chaincode logs with 
"fabric-contract-api": "2.0.0",
does anyone know what is this about and how to fix this?


Re: [FAB-17598] Improve the efficiency of viperutil.EnhancedExactUnmarshal

Nicholas Basker
 

Thanks Matt, Brett for the reply. 

Let me dig more on `EnhancedExactUnmarshal` to understand the following statements better...
"it makes multiple passes over every configuration element using a combination of the yaml, viper, and mapstructure packages. It's also an example of code that relies on buggy behavior as a feature as it only works because of a bug in viper's case sensitivity / preservation behavior from a very, very old version of viper."

Towards that, it would help if you can point me to a test case or scenario that i can trigger which would cause the code flow to go through `EnhancedExactUnmarshal`. Intention is to use that flow understand the flow and dependencies better. 

I just picked this at random, in case if there is any other work item, that would be more useful for the project, let me know....

Nicholas.


On Thu, May 21, 2020 at 5:13 PM Matthew Sykes <matthew.sykes@...> wrote:
In my experience, Jira issues age more like a weathered parking lot than a fine wine....

The excessive times are most easily observed when running with the race detector enabled and this is how we run the tests in CI.
```
```
Notice that the version run with the race detector takes 7 times longer.

Regardless, the implementation of `EnhancedExactUnmarshal` is extremely inefficient as it makes multiple passes over every configuration element using a combination of the yaml, viper, and mapstructure packages. It's also an example of code that relies on buggy behavior as a feature as it only works because of a bug in viper's case sensitivity / preservation behavior from a very, very old version of viper.

So, as Brett said, we added a cache to ensure we would not repeatedly unmarshal the same configuration document multiple times in test. That reduced our unit test execution times by ~20 minutes. That reduced the urgency of improving the implementation but not the need.

Hope that helps.

On Wed, May 20, 2020 at 11:24 AM Brett T Logan <brett.t.logan@...> wrote:
This Jira is to improve the overall performance of the EnhancedExactUnmarshal. You won't be able to reproduce the slow times anymore as a change was push to cache the result of the call to EnhancedExactUnmarshal and pull from that cache rather than unmarshal it every time. I can try to find the PR where those changes were made so you can see the caching mechanism.
 
I assume we would still want to improve the performance of this call as the cache is a workaround to the poor performance, but I'll defer to Matt on that question.
 
Brett Logan
Software Engineer, IBM Blockchain
Phone: 1-984-242-6890
 
 
 
----- Original message -----
From: "Nicholas Basker" <nbasker@...>
Sent by: fabric@...
To: fabric@...
Cc:
Subject: [EXTERNAL] [Hyperledger Fabric] [FAB-17598] Improve the efficiency of viperutil.EnhancedExactUnmarshal
Date: Wed, May 20, 2020 10:06 AM
 
Hello:
 
New comer to HL fabric, starting out by building, running and understanding the unit and integration tests. Picked the help-wanted JIRA issue below
 
 
Just took a sample set of the following tests peer.TestCreateChannel, genesisconfig.TestLoadProfile.func1. Tried to reproduce as shown below, it seems to be completing in milliseconds as opposed ~5seconds below. I tried doing "make unit-test" and "make integration-test" but unable to get the issue.
 
Possibly am missing something in my repro steps, any pointers on steps to repro would be helpful.
 
Thanks,
Nicholas.
 
 
 
(Tried using the recommended method of TEST_PKGS="github.com/hyperledger/fabric/core/ledger/peermake unit-test, but the run was cached inspite of giving -count=1 in GO_TAGS, then resorted to the method below)

nb@~/Documents/github.com/nbasker/fabric$ go test -v github.com/hyperledger/fabric/core/peer | grep TestCreateChannel

=== RUN   TestCreateChannel

--- PASS: TestCreateChannel (0.29s)

nb@~/Documents/github.com/nbasker/fabric$ go test -v -count=1 github.com/hyperledger/fabric/internal/configtxgen/genesisconfig | grep TestLoadProfile

=== RUN   TestLoadProfile

=== RUN   TestLoadProfile/SampleDevModeKafka

=== RUN   TestLoadProfile/SampleDevModeSolo

=== RUN   TestLoadProfile/SampleSingleMSPChannel

=== RUN   TestLoadProfile/SampleSingleMSPKafka

=== RUN   TestLoadProfile/SampleSingleMSPSolo

--- PASS: TestLoadProfile (0.35s)

    --- PASS: TestLoadProfile/SampleDevModeKafka (0.33s)

    --- PASS: TestLoadProfile/SampleDevModeSolo (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPChannel (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPKafka (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPSolo (0.00s)

=== RUN   TestLoadProfileWithPath

=== RUN   TestLoadProfileWithPath/SampleDevModeKafka

=== RUN   TestLoadProfileWithPath/SampleDevModeSolo

=== RUN   TestLoadProfileWithPath/SampleSingleMSPChannel

=== RUN   TestLoadProfileWithPath/SampleSingleMSPKafka

=== RUN   TestLoadProfileWithPath/SampleSingleMSPSolo

--- PASS: TestLoadProfileWithPath (0.02s)

    --- PASS: TestLoadProfileWithPath/SampleDevModeKafka (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleDevModeSolo (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPChannel (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPKafka (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPSolo (0.00s)

 



--
Matthew Sykes
matthew.sykes@...


Re: Windows 10: Bug when installing chaincode using external builders #externalbuilders

Matthew Sykes
 

Windows is not a supported platform for running the peer node natively. While it may work, it is not tested. We do, however, generally support the cli. Within Fabric, we try very hard to keep the production code base as OS agnostic as possible; we *do not* want to sprinkle a bunch of OS checks throughout the code base.

The line of code you're pointing to is in master and not part of release 2.1. It was added to try to accommodate windows without introducing platform dependencies. The implementation of `LookPath` on Windows looks for the executable by taking into consideration file extensions from the PATHEXT environment variable (if set) or the default list of ".com", ".exe", ".bat", and ".cmd".


On Wed, May 20, 2020 at 10:33 AM clubmx7771 via lists.hyperledger.org <clubmx7771=rambler.ru@...> wrote:
Hello,

I'm trying to install chaincode on windows 10 using external builders. I have made detect.bat, build.bat and release.bat scripts. Detect and build scripts are working as expected. Release script is not run. I always get a message
"Skipping release step for 'fabcar:1363e2c060287407039f1f1949dafbc31bba901a1051e5b7488c31cf728c8049' as no release binary found"

Looks like there is a bug in the source code in that part https://github.com/hyperledger/fabric/blob/master/core/container/externalbuilder/externalbuilder.go#L319

I'm using hyperledger fabric of version 2.1.0



--
Matthew Sykes
matthew.sykes@...


Re: [FAB-17598] Improve the efficiency of viperutil.EnhancedExactUnmarshal

Matthew Sykes
 

In my experience, Jira issues age more like a weathered parking lot than a fine wine....

The excessive times are most easily observed when running with the race detector enabled and this is how we run the tests in CI.
```
```
Notice that the version run with the race detector takes 7 times longer.

Regardless, the implementation of `EnhancedExactUnmarshal` is extremely inefficient as it makes multiple passes over every configuration element using a combination of the yaml, viper, and mapstructure packages. It's also an example of code that relies on buggy behavior as a feature as it only works because of a bug in viper's case sensitivity / preservation behavior from a very, very old version of viper.

So, as Brett said, we added a cache to ensure we would not repeatedly unmarshal the same configuration document multiple times in test. That reduced our unit test execution times by ~20 minutes. That reduced the urgency of improving the implementation but not the need.

Hope that helps.

On Wed, May 20, 2020 at 11:24 AM Brett T Logan <brett.t.logan@...> wrote:
This Jira is to improve the overall performance of the EnhancedExactUnmarshal. You won't be able to reproduce the slow times anymore as a change was push to cache the result of the call to EnhancedExactUnmarshal and pull from that cache rather than unmarshal it every time. I can try to find the PR where those changes were made so you can see the caching mechanism.
 
I assume we would still want to improve the performance of this call as the cache is a workaround to the poor performance, but I'll defer to Matt on that question.
 
Brett Logan
Software Engineer, IBM Blockchain
Phone: 1-984-242-6890
 
 
 
----- Original message -----
From: "Nicholas Basker" <nbasker@...>
Sent by: fabric@...
To: fabric@...
Cc:
Subject: [EXTERNAL] [Hyperledger Fabric] [FAB-17598] Improve the efficiency of viperutil.EnhancedExactUnmarshal
Date: Wed, May 20, 2020 10:06 AM
 
Hello:
 
New comer to HL fabric, starting out by building, running and understanding the unit and integration tests. Picked the help-wanted JIRA issue below
 
 
Just took a sample set of the following tests peer.TestCreateChannel, genesisconfig.TestLoadProfile.func1. Tried to reproduce as shown below, it seems to be completing in milliseconds as opposed ~5seconds below. I tried doing "make unit-test" and "make integration-test" but unable to get the issue.
 
Possibly am missing something in my repro steps, any pointers on steps to repro would be helpful.
 
Thanks,
Nicholas.
 
 
 
(Tried using the recommended method of TEST_PKGS="github.com/hyperledger/fabric/core/ledger/peermake unit-test, but the run was cached inspite of giving -count=1 in GO_TAGS, then resorted to the method below)

nb@~/Documents/github.com/nbasker/fabric$ go test -v github.com/hyperledger/fabric/core/peer | grep TestCreateChannel

=== RUN   TestCreateChannel

--- PASS: TestCreateChannel (0.29s)

nb@~/Documents/github.com/nbasker/fabric$ go test -v -count=1 github.com/hyperledger/fabric/internal/configtxgen/genesisconfig | grep TestLoadProfile

=== RUN   TestLoadProfile

=== RUN   TestLoadProfile/SampleDevModeKafka

=== RUN   TestLoadProfile/SampleDevModeSolo

=== RUN   TestLoadProfile/SampleSingleMSPChannel

=== RUN   TestLoadProfile/SampleSingleMSPKafka

=== RUN   TestLoadProfile/SampleSingleMSPSolo

--- PASS: TestLoadProfile (0.35s)

    --- PASS: TestLoadProfile/SampleDevModeKafka (0.33s)

    --- PASS: TestLoadProfile/SampleDevModeSolo (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPChannel (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPKafka (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPSolo (0.00s)

=== RUN   TestLoadProfileWithPath

=== RUN   TestLoadProfileWithPath/SampleDevModeKafka

=== RUN   TestLoadProfileWithPath/SampleDevModeSolo

=== RUN   TestLoadProfileWithPath/SampleSingleMSPChannel

=== RUN   TestLoadProfileWithPath/SampleSingleMSPKafka

=== RUN   TestLoadProfileWithPath/SampleSingleMSPSolo

--- PASS: TestLoadProfileWithPath (0.02s)

    --- PASS: TestLoadProfileWithPath/SampleDevModeKafka (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleDevModeSolo (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPChannel (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPKafka (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPSolo (0.00s)

 



--
Matthew Sykes
matthew.sykes@...


Upcoming Event: Hyperledger Fabric Documentation Workgroup call - Eastern hemisphere - Fri, 05/22/2020 6:00am-7:00am #cal-reminder

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

Reminder: Hyperledger Fabric Documentation Workgroup call - Eastern hemisphere

When: Friday, 22 May 2020, 6:00am to 7:00am, (GMT+01:00) Europe/London

Where:https://zoom.us/j/6223336701

View Event

Organizer: Anthony O'Dowd a_o-dowd@... +441962816761

Description: Documentation workgroup call.
Agenda, minutes and recordings: https://wiki.hyperledger.org/display/fabric/Documentation+Working+Group


Re: Adding a peer node when no genesis block orderer exist in the channel #fabric-orderer #raft #hyperledger-fabric

chintanr97@...
 

One quick question.

What would happen in the scenario where peer is able to fetch the blocks of the channel from the genesis block orderers? I mean to say, how would the peer identify the Orderer Organization's root TLS certificate in that case (let's say when we have more than 1 Orderer Organization in the channel)?


Cancelled Event: Hyperledger Fabric Chaincode EVM #cal-cancelled

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

Cancelled: Hyperledger Fabric Chaincode EVM

This event has been cancelled.

When:
Wednesday, 20 November 2019
8:00am to 9:00am
(UTC-08:00) America/Los Angeles
Repeats: Monthly on the third Wednesday

Where:
https://zoom.us/my/hyperledger.community.backup

Organizer: Hyperledger Community Meetings linuxfoundation.org_nf9u64g9k9rvd9f8vp4vur23b0@...

Description:
Contact: Swetha Repakula srepaku@...

Topic: Hyperledger Fabric Chaincode EVM

Agenda: https://wiki.hyperledger.org/display/fabric/Meeting+Agenda

Join Zoom Meeting
https://zoom.us/j/6223336701

One tap mobile
+16699006833,,6223336701# US (San Jose)
+16465588656,,6223336701# US (New York)

Dial by your location
+1 669 900 6833 US (San Jose)
+1 646 558 8656 US (New York)
877 369 0926 US Toll-free
855 880 1246 US Toll-free
Meeting ID: 622 333 6701
Find your local number: https://zoom.us/u/acTtmm3MX4

-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-
Please do not edit this section of the description.

View your event at https://www.google.com/calendar/event?action=VIEW&eid=NHAwNjJlaXNnc2I3Zmg4OXYyanY3cDlpcW1fUjIwMTkwNTE1VDE1MDAwMCBmYWJyaWNAbGlzdHMuaHlwZXJsZWRnZXIub3Jn&tok=NzIjbGludXhmb3VuZGF0aW9uLm9yZ19uZjl1NjRnOWs5cnZkOWY4dnA0dnVyMjNiMEBncm91cC5jYWxlbmRhci5nb29nbGUuY29tMzU5NTM3MDhlMTNlOTNhNDA1NDJmYjNjNTQ5OTc3NmQ0MzgzMjhjNg&ctz=America%2FLos_Angeles&hl=en&es=1.
-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-


Re: Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode

David Enyeart
 

I've improved the error message a bit so that the next people to hit the issue at least know which communication has failed upfront:
https://github.com/hyperledger/fabric/pull/1308


Dave Enyeart

"Suresh Appana" ---05/20/2020 11:11:06 AM---Thanks Dave. The error message was not clear why it was failing. For others, if you end up with the

From: "Suresh Appana" <suresh.appana1@...>
To: David Enyeart <enyeart@...>
Cc: fabric <fabric@...>
Date: 05/20/2020 11:11 AM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode
Sent by: fabric@...





Thanks Dave. The error message was not clear why it was failing.

For others, if you end up with the same issue, to fix the error, make sure the TLS arguments passed correctly. An example working instantiation command with TLS is:

peer chaincode instantiate -o orderer:7050 --tls --cafile /fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"

Thanks,
Suresh
      On May 19, 2020, at 6:35 PM, David Enyeart <enyeart@...> wrote:

      As indicated at https://stackoverflow.com/questions/55394476/error-could-not-send-eof-on-instantiating-chaincode , EOF can be caused by TLS issues between client and orderer.
      This issue is now resolved by fixing the instantiate command TLS settings.


      Dave Enyeart

      <graycol.gif>David Enyeart---05/19/2020 03:21:01 PM---Looks like the client failed to send the results to the ordering service node: https://github.com/hy
      For
      From:
      David Enyeart/Durham/IBM
      To:
      suresh.appana1@...
      Cc:
      fabric <fabric@...>
      Date:
      05/19/2020 03:21 PM
      Subject:
      Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode




      Looks like the client failed to send the results to the ordering service node:
      https://github.com/hyperledger/fabric/blob/release-1.4/peer/common/broadcastclient.go#L63
      Not sure why grpc returned EOF upon send though...


      Dave Enyeart


      <graycol.gif>suresh.appana1---05/19/2020 02:57:43 PM---I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout e

      From:
      suresh.appana1@...
      To:
      David Enyeart <enyeart@...>
      Date:
      05/19/2020 02:57 PM
      Subject:
      [EXTERNAL] Private: Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode




      I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout error . Current values of timeouts are: CORE_CHAINCODE_EXECUTETIMEOUT: 60000s and CORE_CHAINCODE_DEPLOYTIMEOUT: 60000s

      On the client side I am getting this error for instantiation step: `Error: could not send: EOF`

      Snippet is:


      ```
      peer chaincode instantiate -o orderer:7050 — tls — cafile /fabric/crypto-config/ordererOrganizations/
      example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"
      2020-05-19 15:44:25.628 -03 [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
      2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.SW
      2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
      2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.SW.Hash setting to string SHA2
      2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: 256
      2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Security setting to int 256
      2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 007 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore
      2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input
      2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string
      2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 00a Found map[string]interface{} value for peer.BCCSP.PKCS11
      2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 00b Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.631 -03 [viperutil] getKeysRecursively -> DEBU 00c Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil>
      2020-05-19 15:44:25.631 -03 [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.632 -03 [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil>
      2020-05-19 15:44:25.633 -03 [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.634 -03 [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil>
      2020-05-19 15:44:25.635 -03 [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
      2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 013 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore
      2020-05-19 15:44:25.637 -03 [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.638 -03 [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil>
      2020-05-19 15:44:25.640 -03 [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.641 -03 [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil>
      2020-05-19 15:44:25.642 -03 [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
      2020-05-19 15:44:25.642 -03 [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.Default setting to string SW
      2020-05-19 15:44:25.642 -03 [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] PKCS11:map[Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil> Hash:<nil>] Default:SW]]
      2020-05-19 15:44:25.643 -03 [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/
      fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@.../msp/keystore]...done
      2020-05-19 15:44:25.643 -03 [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
      2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01d Using default escc
      2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01e Using default vscc
      Error: could not send: EOF

      ```


      Thanks,
      Suresh









Re: [FAB-17598] Improve the efficiency of viperutil.EnhancedExactUnmarshal

Brett T Logan <brett.t.logan@...>
 

This Jira is to improve the overall performance of the EnhancedExactUnmarshal. You won't be able to reproduce the slow times anymore as a change was push to cache the result of the call to EnhancedExactUnmarshal and pull from that cache rather than unmarshal it every time. I can try to find the PR where those changes were made so you can see the caching mechanism.
 
I assume we would still want to improve the performance of this call as the cache is a workaround to the poor performance, but I'll defer to Matt on that question.
 
Brett Logan
Software Engineer, IBM Blockchain
Phone: 1-984-242-6890
 
 
 

----- Original message -----
From: "Nicholas Basker" <nbasker@...>
Sent by: fabric@...
To: fabric@...
Cc:
Subject: [EXTERNAL] [Hyperledger Fabric] [FAB-17598] Improve the efficiency of viperutil.EnhancedExactUnmarshal
Date: Wed, May 20, 2020 10:06 AM
 
Hello:
 
New comer to HL fabric, starting out by building, running and understanding the unit and integration tests. Picked the help-wanted JIRA issue below
 
 
Just took a sample set of the following tests peer.TestCreateChannel, genesisconfig.TestLoadProfile.func1. Tried to reproduce as shown below, it seems to be completing in milliseconds as opposed ~5seconds below. I tried doing "make unit-test" and "make integration-test" but unable to get the issue.
 
Possibly am missing something in my repro steps, any pointers on steps to repro would be helpful.
 
Thanks,
Nicholas.
 
 
 
(Tried using the recommended method of TEST_PKGS="github.com/hyperledger/fabric/core/ledger/peermake unit-test, but the run was cached inspite of giving -count=1 in GO_TAGS, then resorted to the method below)

nb@~/Documents/github.com/nbasker/fabric$ go test -v github.com/hyperledger/fabric/core/peer | grep TestCreateChannel

=== RUN   TestCreateChannel

--- PASS: TestCreateChannel (0.29s)

nb@~/Documents/github.com/nbasker/fabric$ go test -v -count=1 github.com/hyperledger/fabric/internal/configtxgen/genesisconfig | grep TestLoadProfile

=== RUN   TestLoadProfile

=== RUN   TestLoadProfile/SampleDevModeKafka

=== RUN   TestLoadProfile/SampleDevModeSolo

=== RUN   TestLoadProfile/SampleSingleMSPChannel

=== RUN   TestLoadProfile/SampleSingleMSPKafka

=== RUN   TestLoadProfile/SampleSingleMSPSolo

--- PASS: TestLoadProfile (0.35s)

    --- PASS: TestLoadProfile/SampleDevModeKafka (0.33s)

    --- PASS: TestLoadProfile/SampleDevModeSolo (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPChannel (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPKafka (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPSolo (0.00s)

=== RUN   TestLoadProfileWithPath

=== RUN   TestLoadProfileWithPath/SampleDevModeKafka

=== RUN   TestLoadProfileWithPath/SampleDevModeSolo

=== RUN   TestLoadProfileWithPath/SampleSingleMSPChannel

=== RUN   TestLoadProfileWithPath/SampleSingleMSPKafka

=== RUN   TestLoadProfileWithPath/SampleSingleMSPSolo

--- PASS: TestLoadProfileWithPath (0.02s)

    --- PASS: TestLoadProfileWithPath/SampleDevModeKafka (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleDevModeSolo (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPChannel (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPKafka (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPSolo (0.00s)

 


Re: Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode

Suresh Appana
 

Thanks Dave. The error message was not clear why it was failing. 

For others, if you end up with the same issue, to fix the error, make sure the TLS arguments passed correctly.  An example working instantiation command with TLS is:

peer chaincode instantiate -o orderer:7050 --tls --cafile /fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"

Thanks,
Suresh

On May 19, 2020, at 6:35 PM, David Enyeart <enyeart@...> wrote:

As indicated at https://stackoverflow.com/questions/55394476/error-could-not-send-eof-on-instantiating-chaincode , EOF can be caused by TLS issues between client and orderer.
This issue is now resolved by fixing the instantiate command TLS settings.


Dave Enyeart

<graycol.gif>David Enyeart---05/19/2020 03:21:01 PM---Looks like the client failed to send the results to the ordering service node: https://github.com/hy
For
From: David Enyeart/Durham/IBM
To: suresh.appana1@...
Cc: fabric <fabric@...>
Date: 05/19/2020 03:21 PM
Subject: Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode




Looks like the client failed to send the results to the ordering service node:
https://github.com/hyperledger/fabric/blob/release-1.4/peer/common/broadcastclient.go#L63
Not sure why grpc returned EOF upon send though...


Dave Enyeart


<graycol.gif>suresh.appana1---05/19/2020 02:57:43 PM---I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout e

From: suresh.appana1@...
To: David Enyeart <enyeart@...>
Date: 05/19/2020 02:57 PM
Subject: [EXTERNAL] Private: Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode




I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout error . Current values of timeouts are: CORE_CHAINCODE_EXECUTETIMEOUT: 60000s and CORE_CHAINCODE_DEPLOYTIMEOUT: 60000s

On the client side I am getting this error for instantiation step: `Error: could not send: EOF`

Snippet is:

```
peer chaincode instantiate -o orderer:7050 — tls — cafile /fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"

2020-05-19 15:44:25.628 -03 [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.SW
2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.SW.Hash setting to string SHA2
2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: 256
2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Security setting to int 256
2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 007 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore
2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input
2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string
2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 00a Found map[string]interface{} value for peer.BCCSP.PKCS11
2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 00b Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.631 -03 [viperutil] getKeysRecursively -> DEBU 00c Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil>
2020-05-19 15:44:25.631 -03 [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.632 -03 [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil>
2020-05-19 15:44:25.633 -03 [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.634 -03 [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil>
2020-05-19 15:44:25.635 -03 [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 013 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore
2020-05-19 15:44:25.637 -03 [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.638 -03 [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil>
2020-05-19 15:44:25.640 -03 [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.641 -03 [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil>
2020-05-19 15:44:25.642 -03 [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2020-05-19 15:44:25.642 -03 [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.Default setting to string SW
2020-05-19 15:44:25.642 -03 [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] PKCS11:map[Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil> Hash:<nil>] Default:SW]]
2020-05-19 15:44:25.643 -03 [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@.../msp/keystore]...done
2020-05-19 15:44:25.643 -03 [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01d Using default escc
2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01e Using default vscc
Error: could not send: EOF
```

Thanks,
Suresh






Windows 10: Bug when installing chaincode using external builders #externalbuilders

clubmx7771@...
 

Hello,

I'm trying to install chaincode on windows 10 using external builders. I have made detect.bat, build.bat and release.bat scripts. Detect and build scripts are working as expected. Release script is not run. I always get a message
"Skipping release step for 'fabcar:1363e2c060287407039f1f1949dafbc31bba901a1051e5b7488c31cf728c8049' as no release binary found"

Looks like there is a bug in the source code in that part https://github.com/hyperledger/fabric/blob/master/core/container/externalbuilder/externalbuilder.go#L319

I'm using hyperledger fabric of version 2.1.0


[FAB-17598] Improve the efficiency of viperutil.EnhancedExactUnmarshal

Nicholas Basker
 

Hello:

New comer to HL fabric, starting out by building, running and understanding the unit and integration tests. Picked the help-wanted JIRA issue below


Just took a sample set of the following tests peer.TestCreateChannel, genesisconfig.TestLoadProfile.func1. Tried to reproduce as shown below, it seems to be completing in milliseconds as opposed ~5seconds below. I tried doing "make unit-test" and "make integration-test" but unable to get the issue.

Possibly am missing something in my repro steps, any pointers on steps to repro would be helpful.

Thanks,
Nicholas.



(Tried using the recommended method of TEST_PKGS="github.com/hyperledger/fabric/core/ledger/peermake unit-test, but the run was cached inspite of giving -count=1 in GO_TAGS, then resorted to the method below)

nb@~/Documents/github.com/nbasker/fabric$ go test -v github.com/hyperledger/fabric/core/peer | grep TestCreateChannel

=== RUN   TestCreateChannel

--- PASS: TestCreateChannel (0.29s)

nb@~/Documents/github.com/nbasker/fabric$ go test -v -count=1 github.com/hyperledger/fabric/internal/configtxgen/genesisconfig | grep TestLoadProfile

=== RUN   TestLoadProfile

=== RUN   TestLoadProfile/SampleDevModeKafka

=== RUN   TestLoadProfile/SampleDevModeSolo

=== RUN   TestLoadProfile/SampleSingleMSPChannel

=== RUN   TestLoadProfile/SampleSingleMSPKafka

=== RUN   TestLoadProfile/SampleSingleMSPSolo

--- PASS: TestLoadProfile (0.35s)

    --- PASS: TestLoadProfile/SampleDevModeKafka (0.33s)

    --- PASS: TestLoadProfile/SampleDevModeSolo (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPChannel (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPKafka (0.00s)

    --- PASS: TestLoadProfile/SampleSingleMSPSolo (0.00s)

=== RUN   TestLoadProfileWithPath

=== RUN   TestLoadProfileWithPath/SampleDevModeKafka

=== RUN   TestLoadProfileWithPath/SampleDevModeSolo

=== RUN   TestLoadProfileWithPath/SampleSingleMSPChannel

=== RUN   TestLoadProfileWithPath/SampleSingleMSPKafka

=== RUN   TestLoadProfileWithPath/SampleSingleMSPSolo

--- PASS: TestLoadProfileWithPath (0.02s)

    --- PASS: TestLoadProfileWithPath/SampleDevModeKafka (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleDevModeSolo (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPChannel (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPKafka (0.00s)

    --- PASS: TestLoadProfileWithPath/SampleSingleMSPSolo (0.00s)


Re: ERR! 404 Not Found - GET https://registry.npmjs.org/fabric-chaincode-api - Not found #fabric-sdk-node

Matthew White
 

Thanks for reporting that...  and Ry for putting in the PR!  Will merge it shortly.
 
Sorry about that.. can't believe I put the wrong name in that doc :-( 
 
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: "Ry Jones" <rjones@...>
Sent by: fabric@...
To: "Magno A. Cavalcante" <magnocav@...>
Cc: fabric@...
Subject: [EXTERNAL] Re: [Hyperledger Fabric] ERR! 404 Not Found - GET https://registry.npmjs.org/fabric-chaincode-api - Not found #fabric-sdk-node
Date: Tue, May 19, 2020 5:55 PM
   
On Tue, May 19, 2020 at 9:12 AM Magno A. Cavalcante <magnocav@...> wrote:
On Tue, May 19, 2020 at 10:16 AM, Matthew White wrote:
>
> Hello - the module is `fabric-contract-api`  rather than chaincode-api:-)
> Regards, Matthew.
> *Matthew B White* *IBM Blockchain Solutions Architect*
>

Thanks Matthew!
I changed the source code of my "package.json" as Matthew indicated, and my chaincode was successfully instantiated.

Explanation:
(1) I wrote my package.json with reference to the packages described in the URL "https://hyperledger.github.io/fabric-chaincode-node/master/api/tutorial-using-contractinterface.html". And in this page there is the code "dependencies": { "fabric-chaincode-api": "^1.4.0", "fabric-shim": "^1.4.0" }. So I believe that this code snippet has some inconsistency.

(2) Please, I ask the team that makes the "fabric-sdk-node" documentation to correct the content of the page at the above URL, to avoid that other professionals from getting into the same problem.

The correct source code of my "package.json" (which is working) is:
// -------------------
{
    "name": "democontract",
    "version": "1.0.0",
    "description": "Document Contract",
    "main": "index.js",
    "engines": {
                "node": ">=8.4.0",
                "npm": ">=5.3.0"
    },
    "scripts": {
        "lint": "eslint .",
        "pretest": "npm run lint",
        "start": "fabric-chaincode-node start",
        "mocha": "mocha test --recursive"
    },
    "engine-strict": true,
    "license": "Apache-2.0",
    "private": true,
    "dependencies": {
        "mkdirp": ">=0.5.5",
        "openpgp": "^4.10.0",
        "fabric-contract-api": "^1.4.3",
        "fabric-shim": "^1.4.3"
    },
    "devDependencies": {
        "chai": "^4.1.2",
        "chai-as-promised": "^7.1.1",
        "eslint": "^4.19.1",
        "mocha": "^5.2.0",
        "nyc": "^12.0.2",
        "sinon": "^6.0.0",
        "sinon-chai": "^3.2.0"
    }
}
// -------------------

---
Regards,
Magno A. Cavalcante


 
 
 
--
Ry Jones
Community Architect, Hyperledger
 
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: Error: You've asked to invoke a function that does not exist:

Matthew White
 

Hello;
 
Here's some things that I would try in similar circumstances. 
 
The error suggests that you've been able to connect.  Change the name of the function you're invoking to   org.hyperledger.fabric:GetMetadata  
Doesn't need any arguments - what you get back is a JSON payload that describes the contract that you've connected to. 
 
This will let you check that the function is there and validate the spelling of the name etc. 
 
It's also useful to monitor the chaincode docker container (docker logs -f <containerid>) as that will help show any errors. 
 
If you're able to copy your updated samples to a github gist or similar it could help.
 
 
Thanks!
 
 
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: "Skyler Saleebyan" <skylerbsaleebyan@...>
Sent by: fabric@...
To: fabric@...
Cc:
Subject: [EXTERNAL] [Hyperledger Fabric] Error: You've asked to invoke a function that does not exist:
Date: Wed, May 20, 2020 4:17 AM
 
Hello,
 
I copied the fabcar code and made a seperate in the fabric-samples and was tinkering with the chaincode to see if I can add new methods and functionalities, but I have been having issues.
 
I copied the chaincode/fabcar and fabcar folder to make chaincode/net-test and net-test folders
 
In chaincode/net-test/javascript/lib/fabcar.js I changed the code to have a createLocation method.
 
After saving these changes I adjusted /net-test/javascript/invoke.js to instead try calling my createLocation function.
 
I successfully ran startFabric.sh, as well as enrollAdmin.js, and registerUser.js . But when I run invoke I get the error:
 
Wallet path: /home/skyler/fabric-samples/net-test/javascript/wallet
2020-05-20T03:16:21.863Z - error: [Transaction]: Error: No valid responses from any peers. Errors:
    peer=peer0.org1.example.com:7051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation
    peer=peer0.org2.example.com:9051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation
Failed to submit transaction: Error: No valid responses from any peers. Errors:
    peer=peer0.org1.example.com:7051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation
    peer=peer0.org2.example.com:9051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation
 
I'm not quite sure what else I can do since I've already used startFabric.sh to reset the network. Help would be appreciated.
 
Thanks,
Skyler S.
 
 
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: You've asked to invoke a function that does not exist:

Skyler Saleebyan
 

Hello,

I copied the fabcar code and made a seperate in the fabric-samples and was tinkering with the chaincode to see if I can add new methods and functionalities, but I have been having issues.

I copied the chaincode/fabcar and fabcar folder to make chaincode/net-test and net-test folders

In chaincode/net-test/javascript/lib/fabcar.js I changed the code to have a createLocation method.

After saving these changes I adjusted /net-test/javascript/invoke.js to instead try calling my createLocation function.

I successfully ran startFabric.sh, as well as enrollAdmin.js, and registerUser.js . But when I run invoke I get the error:

Wallet path: /home/skyler/fabric-samples/net-test/javascript/wallet
2020-05-20T03:16:21.863Z - error: [Transaction]: Error: No valid responses from any peers. Errors:
    peer=peer0.org1.example.com:7051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation
    peer=peer0.org2.example.com:9051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation
Failed to submit transaction: Error: No valid responses from any peers. Errors:
    peer=peer0.org1.example.com:7051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation
    peer=peer0.org2.example.com:9051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation

I'm not quite sure what else I can do since I've already used startFabric.sh to reset the network. Help would be appreciated.

Thanks,
Skyler S.


Re: Error When Attempting to First Invoke Chaincode

White, Spencer (S.)
 

My apologies. If I had read further the first time I would have noticed this JIRA, immediately following the previous one I linked to, which clearly states you are working on documentation updates for compatibility concerning node versions. 

I updated my containers to version 1.4.5 and everything is working correctly.

Sincerely,

Spencer


From: White, Spencer (S.)
Sent: Tuesday, May 19, 2020 6:25 PM
To: fabric@... <fabric@...>
Subject: Error When Attempting to First Invoke Chaincode
 
Hello,

I am encountering the attached error in the first of my chaincode containers that is being invoked after the chaincode has been installed and instantiated on my peer.

I thought this could possibly be related to a recent update/JIRA ticket for the fabric-shim for node, which moved from the deprecated grpc, to @grpc/grpc-js.

I am using v1.4 of the all the docker images of all the fabric containers, including fabric-ccenv. Is this the issue? Does anyone know the version of node the v1.4 chaincode or fabric-ccenv containers are using?

My host machine node version is LTS v12.16.3 and npm is v6.14.4.

Any input or direction would be appreciated.

Sincerely,

Spencer


Re: Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode

David Enyeart
 

As indicated at https://stackoverflow.com/questions/55394476/error-could-not-send-eof-on-instantiating-chaincode , EOF can be caused by TLS issues between client and orderer.
This issue is now resolved by fixing the instantiate command TLS settings.


Dave Enyeart

David Enyeart---05/19/2020 03:21:01 PM---Looks like the client failed to send the results to the ordering service node: https://github.com/hy

From: David Enyeart/Durham/IBM
To: suresh.appana1@...
Cc: fabric <fabric@...>
Date: 05/19/2020 03:21 PM
Subject: Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode




Looks like the client failed to send the results to the ordering service node:
https://github.com/hyperledger/fabric/blob/release-1.4/peer/common/broadcastclient.go#L63
Not sure why grpc returned EOF upon send though...


Dave Enyeart


suresh.appana1---05/19/2020 02:57:43 PM---I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout e

From: suresh.appana1@...
To: David Enyeart <enyeart@...>
Date: 05/19/2020 02:57 PM
Subject: [EXTERNAL] Private: Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode




I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout error . Current values of timeouts are: CORE_CHAINCODE_EXECUTETIMEOUT: 60000s and CORE_CHAINCODE_DEPLOYTIMEOUT: 60000s

On the client side I am getting this error for instantiation step: `Error: could not send: EOF`

Snippet is:

```
peer chaincode instantiate -o orderer:7050 — tls — cafile /fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"

2020-05-19 15:44:25.628 -03 [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.SW
2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.SW.Hash setting to string SHA2
2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: 256
2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Security setting to int 256
2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 007 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore
2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input
2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string
2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 00a Found map[string]interface{} value for peer.BCCSP.PKCS11
2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 00b Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.631 -03 [viperutil] getKeysRecursively -> DEBU 00c Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil>
2020-05-19 15:44:25.631 -03 [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.632 -03 [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil>
2020-05-19 15:44:25.633 -03 [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.634 -03 [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil>
2020-05-19 15:44:25.635 -03 [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 013 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore
2020-05-19 15:44:25.637 -03 [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.638 -03 [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil>
2020-05-19 15:44:25.640 -03 [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil>
2020-05-19 15:44:25.641 -03 [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil>
2020-05-19 15:44:25.642 -03 [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2020-05-19 15:44:25.642 -03 [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.Default setting to string SW
2020-05-19 15:44:25.642 -03 [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] PKCS11:map[Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil> Hash:<nil>] Default:SW]]
2020-05-19 15:44:25.643 -03 [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@.../msp/keystore]...done
2020-05-19 15:44:25.643 -03 [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01d Using default escc
2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01e Using default vscc
Error: could not send: EOF
```

Thanks,
Suresh




3201 - 3220 of 11527