rjones (Thu, 23 Mar 2017 18:12:41 GMT):
User User_1 added by rjones.

rjones (Thu, 23 Mar 2017 18:12:53 GMT):
troyronda

rjones (Thu, 23 Mar 2017 18:13:09 GMT):
feel free to invite other people (the other committers)

troyronda (Thu, 23 Mar 2017 18:38:24 GMT):
User User_2 added by troyronda.

troyronda (Thu, 23 Mar 2017 18:38:44 GMT):
User User_3 added by troyronda.

troyronda (Thu, 23 Mar 2017 19:02:41 GMT):
User User_4 added by troyronda.

troyronda (Thu, 23 Mar 2017 19:02:48 GMT):
User User_5 added by troyronda.

jimthematrix (Thu, 23 Mar 2017 23:17:20 GMT):
Welcome Go SDK to join the community!

mastersingh24 (Fri, 24 Mar 2017 11:26:07 GMT):
Go Go! ;)

gvlax (Sat, 25 Mar 2017 14:57:17 GMT):
Has joined the channel.

rjones (Mon, 27 Mar 2017 21:16:16 GMT):
@aleksandar.likic me

rjones (Mon, 27 Mar 2017 21:19:03 GMT):
who is the component lead?

rjones (Mon, 27 Mar 2017 21:19:58 GMT):
(it can be nobody)

rjones (Mon, 27 Mar 2017 21:20:23 GMT):
OK I added fabric-sdk-go as a component of the fabric project

JasonD (Tue, 28 Mar 2017 04:38:49 GMT):
Has joined the channel.

ZionTam (Tue, 28 Mar 2017 11:12:16 GMT):
Has joined the channel.

MrMoneyChanger (Wed, 29 Mar 2017 18:32:49 GMT):
Has joined the channel.

YE.Yaocheng (Thu, 30 Mar 2017 02:38:23 GMT):
Has joined the channel.

raj (Thu, 30 Mar 2017 09:09:02 GMT):
Has joined the channel.

kuangchao (Thu, 30 Mar 2017 17:24:44 GMT):
Has joined the channel.

krupabathia (Mon, 03 Apr 2017 06:27:03 GMT):
Has joined the channel.

mihai.cimpoesu (Tue, 04 Apr 2017 08:48:18 GMT):
Has joined the channel.

tiennv (Tue, 04 Apr 2017 15:58:52 GMT):
Has joined the channel.

svanharmelen (Tue, 04 Apr 2017 17:47:28 GMT):
Has joined the channel.

bmatsuo (Tue, 04 Apr 2017 22:05:41 GMT):
Has joined the channel.

in0rdr (Wed, 05 Apr 2017 19:09:03 GMT):
Has joined the channel.

passkit (Thu, 06 Apr 2017 15:22:01 GMT):
Has joined the channel.

smallant (Thu, 06 Apr 2017 18:03:34 GMT):
Has joined the channel.

divyank (Thu, 06 Apr 2017 20:32:03 GMT):
Has joined the channel.

divyank (Thu, 06 Apr 2017 20:33:41 GMT):
[ ](https://chat.hyperledger.org/channel/ci-pipeline?msg=fqtzyCWBh8WPDYfJq)

rjones (Fri, 07 Apr 2017 05:15:05 GMT):
@divyank I think @rameshthoomu checked those in today?

rameshthoomu (Fri, 07 Apr 2017 05:15:05 GMT):
Has joined the channel.

peter.kalambet (Fri, 07 Apr 2017 08:01:37 GMT):
Has joined the channel.

divyank (Fri, 07 Apr 2017 16:47:14 GMT):
Yes, I'm checking an additional script to run our integration tests.

divyank (Fri, 07 Apr 2017 16:47:14 GMT):
Yes, I'm checking in an additional script to run our integration tests.

troyronda (Fri, 07 Apr 2017 19:20:44 GMT):
@rjones - could we please turn off the issue tracker on https://github.com/hyperledger/fabric-sdk-go and also set the mirror information in the description?

rjones (Fri, 07 Apr 2017 19:22:27 GMT):
@troyronda done

troyronda (Fri, 07 Apr 2017 19:31:10 GMT):
ty

rjones (Fri, 07 Apr 2017 19:34:27 GMT):
@divyank are your CI scripts working like you expect now?

troyronda (Fri, 07 Apr 2017 19:34:33 GMT):
like watching paint dry heh.

troyronda (Fri, 07 Apr 2017 19:34:40 GMT):
https://jenkins.hyperledger.org/job/fabric-sdk-go-tests-verify-x86_64/2/console

divyank (Fri, 07 Apr 2017 19:36:37 GMT):
Yes, it went through as expected

rjones (Fri, 07 Apr 2017 19:37:32 GMT):
15 minutes isn't terrible https://jenkins.hyperledger.org/job/fabric-sdk-go-tests-verify-x86_64/buildTimeTrend

troyronda (Fri, 07 Apr 2017 20:04:47 GMT):
i know :)

troyronda (Fri, 07 Apr 2017 20:04:55 GMT):
yay - build passing

troyronda (Fri, 07 Apr 2017 20:04:55 GMT):
https://github.com/hyperledger/fabric-sdk-go

JonathanLevi (Sat, 08 Apr 2017 03:54:06 GMT):
Has joined the channel.

kuangchao (Sat, 08 Apr 2017 15:09:32 GMT):

Message Attachments

kuangchao (Sat, 08 Apr 2017 15:10:55 GMT):

Message Attachments

pd93 (Mon, 10 Apr 2017 12:34:57 GMT):
Has joined the channel.

divyank (Mon, 10 Apr 2017 12:49:41 GMT):
@kuangchao It looks like your copy of example_cc.go is in executable format. Installation of executable files on the peer is not permitted. You can set this back by running: `chmod 644 test/fixtures/src/github.com/example_cc/example_cc.go`

zian (Mon, 10 Apr 2017 14:02:17 GMT):
Has joined the channel.

bstasyszyn (Mon, 10 Apr 2017 14:37:54 GMT):
Has joined the channel.

bstasyszyn (Mon, 10 Apr 2017 14:41:34 GMT):
@cbf @jimthematrix @mastersingh24 Chris, re. your comment on commit https://gerrit.hyperledger.org/r/#/c/7891/ - do you have any ideas on how Go SDK can reduce dependencies on Fabric?

cbf (Mon, 10 Apr 2017 14:41:34 GMT):
Has joined the channel.

troyronda (Mon, 10 Apr 2017 14:42:12 GMT):
I would think this discussion is how to best do dependency management while still reusing the code :).

cbf (Mon, 10 Apr 2017 16:06:53 GMT):
@bstasyszyn the dependency is not my complaint - it is how we are implementing

cbf (Mon, 10 Apr 2017 16:07:53 GMT):
vendoring implies a (fairly) static relationship - I would not want to try to develop the SDK as the vendored code was being evolved.

cbf (Mon, 10 Apr 2017 16:08:43 GMT):
I know that some such as @greg.haskins loathe submodules. but there aren't lots of great options.

greg.haskins (Mon, 10 Apr 2017 16:08:43 GMT):
Has joined the channel.

cbf (Mon, 10 Apr 2017 16:10:17 GMT):
we could build the SDK in a container that includes the current dependent code, and have those containers built for a particular build of Fabric - this will get as complicated as submodules

cbf (Mon, 10 Apr 2017 16:10:49 GMT):
@troyronda exactly

cbf (Mon, 10 Apr 2017 17:43:42 GMT):
so, I realize I am not a maintainer on the go SDK, kind of uncool to merge when someone gives a -1 or -2

cbf (Mon, 10 Apr 2017 17:44:11 GMT):
in this case, I can appreciate the need to get the code in, but still

cbf (Mon, 10 Apr 2017 17:44:17 GMT):
I was trying to be helpful

cbf (Mon, 10 Apr 2017 17:44:43 GMT):
vendoring is not the long or even short term answer

troyronda (Mon, 10 Apr 2017 18:34:08 GMT):
@cbf - thanks for this - for sure, need advice on this topic! vendoring is problematic.

troyronda (Mon, 10 Apr 2017 18:34:39 GMT):
@cbf @aleksandar.likic @firas.qutishat @mastersingh24 @jimthematrix - any suggestions ^^^^

cbf (Mon, 10 Apr 2017 18:37:55 GMT):
completely understand, this was just feedback - you'd know if I was pissed;-)

troyronda (Tue, 11 Apr 2017 00:23:59 GMT):
If someone has an idea for improving dependency management: https://jira.hyperledger.org/browse/FAB-3080

troyronda (Tue, 11 Apr 2017 00:23:59 GMT):
If someone has an idea for improving dependency management, please discuss and edit https://jira.hyperledger.org/browse/FAB-3080

troyronda (Tue, 11 Apr 2017 00:32:34 GMT):
this is good feedback - good idea to discuss with the reviewer and channel here.

troyronda (Tue, 11 Apr 2017 00:32:34 GMT):
this is good feedback - good idea to discuss with the reviewer and channel here. thanks!!

troyronda (Tue, 11 Apr 2017 00:32:34 GMT):
this is great feedback - good idea to discuss with the reviewer and channel here (and on gerrit), so those involved can understand the rationale & plan prior to merge. thanks!

troyronda (Tue, 11 Apr 2017 00:34:12 GMT):
@cbf - btw, the current mechanism for CI uses the contents of https://github.com/hyperledger/fabric-sdk-go/blob/master/test/scripts/fabric_test_commitlevel.sh for determining what version of fabric to test against (by building and deploying that version of the fabric docker containers).

troyronda (Tue, 11 Apr 2017 00:35:00 GMT):
(similar to the vendoring a certain version of fabric).

troyronda (Tue, 11 Apr 2017 00:35:44 GMT):
I am curious on your docker build idea. (sorry i'm just getting back to this thread)

cbf (Tue, 11 Apr 2017 01:25:25 GMT):
yeah, I had different ideas about improving dependencies through pinning build output in images.

jimthematrix (Tue, 11 Apr 2017 02:37:28 GMT):
@troyronda @cbf looks like dependency management is something the golang core team have been working on and have proposed a roadmap: https://github.com/golang/dep/wiki/Roadmap, not sure inventing something ourselves for the time being is worth the effort

jimthematrix (Tue, 11 Apr 2017 02:39:08 GMT):
also, what's the concern on using govendor for the time being? things getting out of sync with the source because it had to be done manually and is explicitly managed via checking into source control? note that it is not a unique situation to the golang dependencies, all the SDKs so far had to deal with the same situation for the protos

jimthematrix (Tue, 11 Apr 2017 02:41:32 GMT):
guess what I'm saying is for now manually manage the vendor folder, and it's by and large manageable (although definitely far from being optimal). and utilize whatever the official dependency management tool when it comes out later this year

jimthematrix (Tue, 11 Apr 2017 02:41:40 GMT):
just my 2 cents...

passkit (Tue, 11 Apr 2017 03:14:57 GMT):
Having trouble compiling the latest build on OSX (10.12.4). Not sure if it was XCode 8.3 that broke things or not, but have spent 2 days trying to resolve this with no success.

passkit (Tue, 11 Apr 2017 03:19:37 GMT):
Every time I try to build, I get CGO stating there are 139 duplicate symbols.

passkit (Tue, 11 Apr 2017 04:47:38 GMT):
``` # command-line-arguments /usr/local/go/pkg/tool/darwin_amd64/link: running clang failed: exit status 1 duplicate symbol _CloseAllSessions in: /var/folders/38/tcbhwy0d24z6hf4r91q40g500000gn/T/go-link-446565840/000004.o /var/folders/38/tcbhwy0d24z6hf4r91q40g500000gn/T/go-link-446565840/000006.o duplicate symbol _CloseSession in: /var/folders/38/tcbhwy0d24z6hf4r91q40g500000gn/T/go-link-446565840/000004.o /var/folders/38/tcbhwy0d24z6hf4r91q40g500000gn/T/go-link-446565840/000006.o >>> >>> 137 more symbols >>> ld: 139 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ```

troyronda (Tue, 11 Apr 2017 11:11:09 GMT):
https://blog.gopheracademy.com/advent-2016/saga-go-dependency-management/ https://github.com/golang/dep/ (the article and tool in the link from @jimthematrix, thanks)

troyronda (Tue, 11 Apr 2017 11:59:16 GMT):
@passkit - i had different issues with Go 1.8 that are now resolved after upgrading to 1.8.1. What versions do you have checked-out, and what commands are you running to build?

cbf (Tue, 11 Apr 2017 12:40:59 GMT):
@troyronda my main concern is the coordination and the churn in the codebase

cbf (Tue, 11 Apr 2017 12:42:09 GMT):
if things were more stable, might be an option

Lin-YiTang (Tue, 11 Apr 2017 21:13:40 GMT):
Has joined the channel.

jongeun.park (Wed, 12 Apr 2017 09:13:13 GMT):
Has joined the channel.

qasimhbti (Wed, 12 Apr 2017 09:55:08 GMT):
Has joined the channel.

JeetMukesh (Wed, 12 Apr 2017 11:54:52 GMT):
Has joined the channel.

passkit (Wed, 12 Apr 2017 14:38:53 GMT):
@troyronda Upgrading to go 1.8.1 didn't help. Checked-out c47bbf2 and simply using `go build`

swettdj (Wed, 12 Apr 2017 14:58:55 GMT):
Has joined the channel.

troyronda (Wed, 12 Apr 2017 17:34:40 GMT):
I have Xcode 8.3.1 (with upgraded command line tools) and Go 1.8.1

troyronda (Wed, 12 Apr 2017 17:35:21 GMT):
I've also tested on Ubuntu 16.0.4

passkit (Thu, 13 Apr 2017 01:07:54 GMT):
Ok - looks like there was some anomaly with 8.3. Upgrading to 8.3.1 seems to have fixed it.

troyronda (Thu, 13 Apr 2017 01:15:42 GMT):
@passkit awesome :)

zlliu (Thu, 13 Apr 2017 01:47:45 GMT):
Has joined the channel.

passkit (Thu, 13 Apr 2017 05:43:33 GMT):
In `fabric-client/events/eventhub.go` line 185, the connection timeout is specified as an integer which causes a remote connection to timeout. Can you change to `time.Second * 5` or fix `.NewEventsClient` to accept and process an integer?

passkit (Thu, 13 Apr 2017 07:07:07 GMT):
Also, in the event of a txCallback error, it would be helpful to pass through the error code to avoid unnecessary processing to determine whether or not to retry the transaction.

passkit (Thu, 13 Apr 2017 08:34:17 GMT):
Another helpful change would be to not to write any logging output until the log-level has been set. Currently`config.InitConfig` logs 3 items before the log level has ben set, making it impossible to suppress.

warm3snow (Fri, 14 Apr 2017 07:23:56 GMT):
Has joined the channel.

warm3snow (Fri, 14 Apr 2017 07:35:39 GMT):
hi, When I test the fabric-sdk-go/test/integration/end_to_end_test.go. I got this

warm3snow (Fri, 14 Apr 2017 07:35:57 GMT):

Message Attachments

warm3snow (Fri, 14 Apr 2017 09:02:09 GMT):

Message Attachments

warm3snow (Fri, 14 Apr 2017 09:04:22 GMT):
I was testing the `fabric-sdk-go`. Can anyone give me some clue? It'll be very appreciated

warm3snow (Fri, 14 Apr 2017 09:05:33 GMT):
The client is stuck at ``` hxy@ubuntu:/opt/gopath/src/github.com/hyperledger/fabric-sdk-go/test/integration$ go test 2017/04/14 02:00:51 Using config file: ../fixtures/config/config_test.yaml 2017/04/14 02:00:51 http://localhost:7054 2017/04/14 02:00:51 fabric_sdk_go Logging level: info 02:00:51.346 [SW_BCCSP] DEBU : KeyStore opened at [/tmp/keystore]...done 02:00:51.347 [BCCSP_FACTORY] DEBU : Initialize BCCSP [SW] 02:00:51.347 [fabric_sdk_go] INFO : KeyStore path [/tmp/enroll_user] missing [false]: [%!s()] 02:00:51.348 [SW_BCCSP] DEBU : Loading private key [082a5f9da9a74244782b82ac9761833199be9585043b1d4dde4b2612ce8b9d0b] at [/tmp/keystore/082a5f9da9a74244782b82ac9761833199be9585043b1d4dde4b2612ce8b9d0b_sk]... 02:00:51.379 [fabric_sdk_go] INFO : Constructed Chain instance: &{testchannel true map[] 200 map[] 0xc4201a2f40 } 02:00:51.395 [fabric_sdk_go] INFO : ***** Creating and Joining channel: testchannel ***** 02:00:56.679 [fabric_sdk_go] INFO : ***** Created and Joined channel: testchannel ***** ******* EventHub connect to peer (localhost:7053) ******* 02:00:56.704 [fabric_sdk_go] INFO : Using config file: ../fixtures/config/config_test.yaml 02:00:56.706 [fabric_sdk_go] INFO : fabric_sdk_go Logging level: info 02:00:56.706 [fabric_sdk_go] INFO : KeyStore path [/tmp/enroll_user] missing [false]: [%!s()] 02:00:56.707 [SW_BCCSP] DEBU : Loading private key [082a5f9da9a74244782b82ac9761833199be9585043b1d4dde4b2612ce8b9d0b] at [/tmp/keystore/082a5f9da9a74244782b82ac9761833199be9585043b1d4dde4b2612ce8b9d0b_sk]... 02:00:56.709 [fabric_sdk_go] INFO : Constructed Chain instance: &{testchannel true map[] 200 map[] 0xc420359d40 } ******* EventHub connect to peer (localhost:7053) ******* ```

warm3snow (Fri, 14 Apr 2017 09:07:04 GMT):
I was testing the `fabric-sdk-go`. Can anyone give me some clue? It'll be very appreciated

ivanm (Fri, 14 Apr 2017 09:09:46 GMT):
Has joined the channel.

warm3snow (Fri, 14 Apr 2017 09:31:04 GMT):
``` f2b19f73fc93a5e27b6a502c45f)) peer0 | 2017-04-14 09:28:38.207 UTC [chaincode] Launch -> ERRO 513 launchAndWaitForRegister failed Timeout expired while starting chaincode 2nxj44e1mv:v0(networkid:dev,peerid:peer0,tx:7f8d86cc6e4aa96b652d9a4781961fcf9568bf2b19f73fc93a5e27b6a502c45f) peer0 | 2017-04-14 09:28:38.207 UTC [lockbasedtxmgr] Done -> DEBU 514 Done with transaction simulation / query execution [817cf13a-4135-4d1d-9dff-815e0f91e9ba] peer0 | 2017-04-14 09:28:42.719 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 515 Sleeping 5s peer0 | 2017-04-14 09:28:47.721 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 516 Sleeping 5s ```

warm3snow (Fri, 14 Apr 2017 09:34:09 GMT):
Hi, everyone. I got this when I test the `fabric-sdk-go/test/integration/`. ``` peer0 | 2017-04-14 09:28:22.706 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 506 Sleeping 5s peer0 | 2017-04-14 09:28:27.710 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 507 Sleeping 5s peer0 | 2017-04-14 09:28:32.392 UTC [gossip/discovery#peer0:7051] periodicalReconnectToDead -> DEBU 508 Sleeping 25s peer0 | 2017-04-14 09:28:32.714 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 509 Sleeping 5s peer0 | 2017-04-14 09:28:37.716 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 50a Sleeping 5s peer0 | 2017-04-14 09:28:38.153 UTC [chaincode] launchAndWaitForRegister -> DEBU 50b stopping due to error while launching Timeout expired while starting chaincode 2nxj44e1mv:v0(networkid:dev,peerid:peer0,tx:7f8d86cc6e4aa96b652d9a4781961fcf9568bf2b19f73fc93a5e27b6a502c45f) peer0 | 2017-04-14 09:28:38.154 UTC [container] lockContainer -> DEBU 50c waiting for container(dev-peer0-2nxj44e1mv-v0) lock peer0 | 2017-04-14 09:28:38.154 UTC [container] lockContainer -> DEBU 50d got container (dev-peer0-2nxj44e1mv-v0) lock peer0 | 2017-04-14 09:28:38.167 UTC [dockercontroller] stopInternal -> DEBU 50e Stop container dev-peer0-2nxj44e1mv-v0(Container not running: dev-peer0-2nxj44e1mv-v0) peer0 | 2017-04-14 09:28:38.178 UTC [dockercontroller] stopInternal -> DEBU 50f Kill container dev-peer0-2nxj44e1mv-v0 (API error (500): {"message":"Cannot kill container dev-peer0-2nxj44e1mv-v0: Container b678054e12902f307b020b16a4d0f55c572c6a8848f70253e3a64947dc2c3d14 is not running"} peer0 | ) peer0 | 2017-04-14 09:28:38.206 UTC [dockercontroller] stopInternal -> DEBU 510 Removed container dev-peer0-2nxj44e1mv-v0 peer0 | 2017-04-14 09:28:38.206 UTC [container] unlockContainer -> DEBU 511 container lock deleted(dev-peer0-2nxj44e1mv-v0) peer0 | 2017-04-14 09:28:38.207 UTC [chaincode] launchAndWaitForRegister -> DEBU 512 error on stop Error stopping container: context canceled(Timeout expired while starting chaincode 2nxj44e1mv:v0(networkid:dev,peerid:peer0,tx:7f8d86cc6e4aa96b652d9a4781961fcf9568bf2b19f73fc93a5e27b6a502c45f)) peer0 | 2017-04-14 09:28:38.207 UTC [chaincode] Launch -> ERRO 513 launchAndWaitForRegister failed Timeout expired while starting chaincode 2nxj44e1mv:v0(networkid:dev,peerid:peer0,tx:7f8d86cc6e4aa96b652d9a4781961fcf9568bf2b19f73fc93a5e27b6a502c45f) peer0 | 2017-04-14 09:28:38.207 UTC [lockbasedtxmgr] Done -> DEBU 514 Done with transaction simulation / query execution [817cf13a-4135-4d1d-9dff-815e0f91e9ba] peer0 | 2017-04-14 09:28:42.719 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 515 Sleeping 5s peer0 | 2017-04-14 09:28:47.721 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 516 Sleeping 5s peer0 | 2017-04-14 09:28:52.724 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 517 Sleeping 5s peer0 | 2017-04-14 09:28:57.398 UTC [gossip/discovery#peer0:7051] periodicalReconnectToDead -> DEBU 518 Sleeping 25s peer0 | 2017-04-14 09:28:57.731 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 519 Sleeping 5s peer0 | 2017-04-14 09:29:02.737 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 51a Sleeping 5s peer0 | 2017-04-14 09:29:07.740 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 51b Sleeping 5s peer0 | 2017-04-14 09:29:12.743 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 51c Sleeping 5s peer0 | 2017-04-14 09:29:17.745 UTC [gossip/discovery#peer0:7051] periodicalSendAlive -> DEBU 51d Sleeping 5s peer0 | 2017-04-14 09:29:22.401 UTC [gossip/discovery#peer0:7051] periodicalReconnectToDead -> DEBU 51e Sleeping 25s ``` And I wait a long time at ```******* EventHub connect to peer (localhost:7053) ******* ``` Then an error occurs.

warm3snow (Mon, 17 Apr 2017 00:52:06 GMT):
@aleksandar.likic I have fixed the error. It seems a `fabric` `fabric-ca` `fabric-sdk-go` version problem. I updated the source code and everything goes fine. Any way, thanks a lot.

warm3snow (Mon, 17 Apr 2017 00:54:49 GMT):
@aleksandar.likic I updated the source code and the error goes away. :-) Any way, thx

dhuseby (Mon, 17 Apr 2017 14:39:49 GMT):
Has joined the channel.

giridharg (Mon, 17 Apr 2017 17:18:53 GMT):
Has joined the channel.

YoungHoonKim (Tue, 18 Apr 2017 00:41:10 GMT):
Has joined the channel.

sitomani (Tue, 18 Apr 2017 07:50:54 GMT):
Has joined the channel.

zhoupeiwen (Wed, 19 Apr 2017 03:00:58 GMT):
Has joined the channel.

zhangmenghang (Wed, 19 Apr 2017 03:02:03 GMT):
Has joined the channel.

zhoupeiwen (Wed, 19 Apr 2017 03:02:39 GMT):
hi , I just run the e2e test and got the following error:error from Initialize CreateAndJoinChannel return error: Error initializing chain: Unable to retrieve channel configuration from orderer service: error returned from orderer service: Got error from ordering service: EOFexit status 255. my fabric version is 1.0 alpha and everything works fine with Java sdk.

ylsGit (Wed, 19 Apr 2017 04:00:43 GMT):
Has joined the channel.

sitomani (Wed, 19 Apr 2017 11:55:01 GMT):
anybody using the fabric-go-sdk with IBM vNext Limited Beta?

JohnWhitton (Wed, 19 Apr 2017 19:11:23 GMT):
Has joined the channel.

dklesev (Wed, 19 Apr 2017 22:17:05 GMT):
Has joined the channel.

ylsGit (Thu, 20 Apr 2017 04:01:22 GMT):
When use goSDK , error: KeyImport return error: Failed storing ECDSA key [Cannot store key. This is a dummy read-only KeyStore].....why?

zhangmenghang (Thu, 20 Apr 2017 05:38:22 GMT):
Hi guys, I want to use fabric-sdk-go in a beego project ,but when I run my beego project , I got errors as follows:

zhangmenghang (Thu, 20 Apr 2017 05:38:23 GMT):
[root@osboxes testapi]# bee run -gendoc=true ______ | ___ \ | |_/ / ___ ___ | ___ \ / _ \ / _ \ | |_/ /| __/| __/ \____/ \___| \___| v1.8.1 2017/04/20 04:12:17 INFO ▶ 0001 Using 'testapi' as 'appname' 2017/04/20 04:12:17 INFO ▶ 0002 Initializing watcher... testapi/controllers testapi/routers testapi # testapi /app/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /tmp/go-link-295706176/000004.o: In function `GetSessionInfo': /app/fabric-alpha/src/github.com/hyperledger/fabric-sdk-go/vendor/github.com/miekg/pkcs11/pkcs11.go:184: multiple definition of `GetSessionInfo' /tmp/go-link-295706176/000002.o:(.text+0x50f): first defined here /tmp/go-link-295706176/000004.o: In function `FindObjects': /app/fabric-alpha/src/github.com/hyperledger/fabric-sdk-go/vendor/github.com/miekg/pkcs11/pkcs11.go:298: multiple definition of `FindObjects' /tmp/go-link-295706176/000002.o:(.text+0x973): first defined here /tmp/go-link-295706176/000004.o: In function `VerifyRecover': /app/fabric-alpha/src/github.com/hyperledger/fabric-sdk-go/vendor/github.com/miekg/pkcs11/pkcs11.go:573: multiple definition of `VerifyRecover' /tmp/go-link-295706176/000002.o:(.text+0x1532): first defined here /tmp/go-link-295706176/000004.o: In function `DecryptInit': /app/fabric-alpha/src/github.com/hyperledger/fabric-sdk-go/vendor/github.com/miekg/pkcs11/pkcs11.go:368: multiple definition of `DecryptInit' /tmp/go-link-295706176/000002.o:(.text+0xc6e): first defined here /tmp/go-link-295706176/000004.o: In function `Decrypt': /app/fabric-alpha/src/github.com/hyperledger/fabric-sdk-go/vendor/github.com/miekg/pkcs11/pkcs11.go:374: multiple definition of `Decrypt' /tmp/go-link-295706176/000002.o:(.text+0xcb0): first defined here /tmp/go-link-295706176/000004.o: In function `DigestFinal': /app/fabric-alpha/src/github.com/hyperledger/fabric-sdk-go/vendor/github.com/miekg/pkcs11/pkcs11.go:457: multiple definition of `DigestFinal' /tmp/go-link-295706176/000002.o:(.text+0x104b): first defined here

zhangmenghang (Thu, 20 Apr 2017 05:39:00 GMT):
Anyone knows how to solve it?

ylsGit (Thu, 20 Apr 2017 06:33:52 GMT):
把miekg删掉,重新go get

cophey (Thu, 20 Apr 2017 06:34:07 GMT):
Has joined the channel.

fennelD7 (Thu, 20 Apr 2017 09:08:01 GMT):
Has joined the channel.

pd93 (Thu, 20 Apr 2017 15:29:26 GMT):
In the SDK docs for `sendTransaction()` (see here: https://fabric-sdk-node.github.io/Chain.html#sendTransaction__anchor) it states that it returns a `BroadcastResponse`. This raises a couple of questions for me. - Firstly, can I return an object from my chaincode when *invoking* a method (I'd like to return a status struct which contains a lot of detail about what the chaincode has done) - Secondly, the returned `BroadcastResponse` looks like this `[ undefined, { status: 'SUCCESS' } ]`. What is the `undefined` part supposed to be?

fennelD7 (Mon, 24 Apr 2017 09:06:23 GMT):
Hello, can anybody give me a little help? In these two functions: ```chain.QueryBlock chain.QueryBlockByHash``` Response common.block is like: ```type Block struct { Header *BlockHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` Data *BlockData `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` Metadata *BlockMetadata `protobuf:"bytes,3,opt,name=metadata" json:"metadata,omitempty"` } type BlockHeader struct { Number uint64 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"` PreviousHash []byte `protobuf:"bytes,2,opt,name=previous_hash,json=previousHash,proto3" json:"previous_hash,omitempty"` DataHash []byte `protobuf:"bytes,3,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` } type BlockData struct { Data [][]byte `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` } type BlockMetadata struct { Metadata [][]byte `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty"` }``` But I can't find more, how can I parse BlockData and BlockMetadata, get the informations like `number of transactions in the block`, `date/type/chaincode of the transactions`?

SotirisAlfonsos (Mon, 24 Apr 2017 13:23:14 GMT):
Has joined the channel.

SotirisAlfonsos (Mon, 24 Apr 2017 14:23:33 GMT):
Hello everyone. I just installed fabric-sdk-go on my server. When i run the tests i get the following error error from Initialize CreateAndJoinChannel return error: Error querying channels for primary peer: Invoke cscc GetChannels return error: QueryByChaincode return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority FAIL github.com/hyperledger/fabric-sdk-go/test/integration 0.077s error: exit status 1 panic: EOF

SotirisAlfonsos (Mon, 24 Apr 2017 14:23:33 GMT):
Hello everyone. I just installed fabric-sdk-go on my server. When i run the tests i get the following error error from Initialize CreateAndJoinChannel return error: Error querying channels for primary peer: Invoke cscc GetChannels return error: QueryByChaincode return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority FAIL github.com/hyperledger/fabric-sdk-go/test/integration 0.077s error: exit status 1 panic: EOF

SotirisAlfonsos (Mon, 24 Apr 2017 14:23:33 GMT):
Hello everyone. I just installed fabric-sdk-go on my server. When i run the tests i get the following error error from Initialize CreateAndJoinChannel return error: Error querying channels for primary peer: Invoke cscc GetChannels return error: QueryByChaincode return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority FAIL github.com/hyperledger/fabric-sdk-go/test/integration 0.077s error: exit status 1 panic: EOF Can anyone provide some feedback?

divyank (Mon, 24 Apr 2017 18:00:52 GMT):
@fennelD7 The BlockData struct contains the transactions. You can unmarshal the transaction envelope protobufs inside BlockData by doing something like this: ``` env := &common.Envelope{} err = proto.Unmarshal(data, env); ```

divyank (Mon, 24 Apr 2017 18:01:19 GMT):
See fabric commit validation for an example on how to handle blocks: https://github.com/hyperledger/fabric/blob/master/core/committer/txvalidator/validator.go#L124

kletkeman (Mon, 24 Apr 2017 23:28:27 GMT):
Has joined the channel.

bbjj040471 (Tue, 25 Apr 2017 02:19:18 GMT):
Has joined the channel.

bbjj040471 (Tue, 25 Apr 2017 02:20:32 GMT):
anybody let sdk and special chaincode to be a db driver?

reoim10 (Tue, 25 Apr 2017 02:42:39 GMT):
Has joined the channel.

fennelD7 (Tue, 25 Apr 2017 08:34:05 GMT):
@divyank Thank you very much! I traced to ChannelHeader ```type ChannelHeader struct { Type int32 `protobuf:"varint,1,opt,name=type" json:"type,omitempty"` Version int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"` Timestamp *google_protobuf.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp,omitempty"` ChannelId string `protobuf:"bytes,4,opt,name=channel_id,json=channelId" json:"channel_id,omitempty"` TxId string `protobuf:"bytes,5,opt,name=tx_id,json=txId" json:"tx_id,omitempty"` Epoch uint64 `protobuf:"varint,6,opt,name=epoch" json:"epoch,omitempty"` Extension []byte `protobuf:"bytes,7,opt,name=extension,proto3" json:"extension,omitempty"` }``` Seemed like what I was looking for, unmarshaled til it I got: ```type:3 channel_id:"testchannel" tx_id:"adc982638cefbd8661544315c9ec3470846e30e8ec0bcedeeed5135f5c62e2d5" extension:"\022\006\022\004lccc"``` So, a few questions more :) 1. In the data I got, there are no Version and Timestamp, where are these two attributes? 2. The type is defined like: ```enum HeaderType { MESSAGE = 0; // Used for messages which are signed but opaque CONFIG = 1; // Used for messages which express the channel config CONFIG_UPDATE = 2; // Used for transactions which update the channel config ENDORSER_TRANSACTION = 3; // Used by the SDK to submit endorser based transactions ORDERER_TRANSACTION = 4; // Used internally by the orderer for management DELIVER_SEEK_INFO = 5; // Used as the type for Envelope messages submitted to instruct the Deliver API to seek CHAINCODE_PACKAGE = 6; // Used for packaging chaincode artifacts for install }``` how can I parse the type and get to know if the transaction's type is genesis or instantiate? 3. I didn't find date and chaincode name with the transactions, do I need to get them elsewhere or parse deeper into Block.Data.Data.Payload? could you give me some guide?

SotirisAlfonsos (Tue, 25 Apr 2017 13:30:26 GMT):
Does anyone happen to know if there is a problem with the latest fabric release? I keep getting invalid certificate errors.

prashiyn (Wed, 26 Apr 2017 05:39:51 GMT):
Has joined the channel.

SotirisAlfonsos (Wed, 26 Apr 2017 14:01:17 GMT):
@aleksandar.likic Thank you for your reply. I did a fresh install for both fabric and fabric-ca version v1.0.0-alpha. However i still get this error when running the integration tests. 'error from Initialize CreateAndJoinChannel return error: Error querying channels for primary peer: QueryByChaincode return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority exit status 255 FAIL github.com/hyperledger/fabric-sdk-go/test/integration 0.056s' I would appreciate it if anyone happens to know anything about that.

SotirisAlfonsos (Wed, 26 Apr 2017 14:01:17 GMT):
@aleksandar.likic Thank you for your reply. I did a fresh install for both fabric and fabric-ca version v1.0.0-alpha. However i still get this error when running the integration tests. "error from Initialize CreateAndJoinChannel return error: Error querying channels for primary peer: QueryByChaincode return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority exit status 255 FAIL github.com/hyperledger/fabric-sdk-go/test/integration 0.056s" I would appreciate it if anyone happens to know anything about that.

SotirisAlfonsos (Wed, 26 Apr 2017 14:01:17 GMT):
@aleksandar.likic Thank you for your reply. I did a fresh install for both fabric and fabric-ca version v1.0.0-alpha. However i still get this error when running the integration tests. error from Initialize CreateAndJoinChannel return error: Error querying channels for primary peer: QueryByChaincode return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority exit status 255 FAIL github.com/hyperledger/fabric-sdk-go/test/integration 0.056s I would appreciate it if anyone happens to know anything about that.

SotirisAlfonsos (Wed, 26 Apr 2017 14:01:17 GMT):
@aleksandar.likic Thank you for your reply. I did a fresh install for both fabric and fabric-ca version v1.0.0-alpha. However i still get this error when running the integration tests. error from Initialize CreateAndJoinChannel return error: Error querying channels for primary peer: QueryByChaincode return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority exit status 255 FAIL github.com/hyperledger/fabric-sdk-go/test/integration 0.056s I would appreciate it if anyone happens to know anything about that. Ends up i had the wrong certificates in /tmp/enroll_user and /tmp/keystore from previous runs.

SotirisAlfonsos (Wed, 26 Apr 2017 14:01:17 GMT):
@aleksandar.likic Thank you for your reply. I did a fresh install for both fabric and fabric-ca version v1.0.0-alpha. However i still get this error when running the integration tests. error from Initialize CreateAndJoinChannel return error: Error querying channels for primary peer: QueryByChaincode return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority exit status 255 FAIL github.com/hyperledger/fabric-sdk-go/test/integration 0.056s I would appreciate it if anyone happens to know anything about that. *Ends up i had the wrong certificates in /tmp/enroll_user and /tmp/keystore from previous runs.*

silliman (Wed, 26 Apr 2017 14:30:59 GMT):
Has joined the channel.

bmkor (Thu, 27 Apr 2017 02:30:00 GMT):
Has joined the channel.

bmkor (Thu, 27 Apr 2017 02:31:18 GMT):
Hi. May I ask if TCert is only used in proposal transactions between client and SDK?

bmkor (Thu, 27 Apr 2017 04:20:26 GMT):
@aleksandar.likic Thanks. So no TCert in 1.0, i suppose?

bmkor (Thu, 27 Apr 2017 04:22:00 GMT):
@aleksandar.likic Thanks a lot

SyneBlockChainTeam (Fri, 28 Apr 2017 10:27:02 GMT):
Has joined the channel.

vugranam (Fri, 28 Apr 2017 12:15:13 GMT):
Has joined the channel.

mytrile (Sat, 29 Apr 2017 21:22:29 GMT):
Has joined the channel.

rjones (Mon, 01 May 2017 18:29:43 GMT):
Has left the channel.

ZengLingYou (Tue, 02 May 2017 06:42:32 GMT):
Has joined the channel.

Aleks-visser (Tue, 02 May 2017 09:11:22 GMT):
Has joined the channel.

Aleks-visser (Tue, 02 May 2017 09:41:46 GMT):
Hello I am looking to learn the go sdk, are there any resources that would make this easier/ possible . Thanks

Aleks-visser (Wed, 03 May 2017 05:07:00 GMT):
@aleksandar.likic a massive thank you is in order

kuangchao (Wed, 03 May 2017 05:14:27 GMT):

Message Attachments

samwood (Fri, 05 May 2017 01:02:59 GMT):
Has joined the channel.

samwood (Fri, 05 May 2017 01:04:46 GMT):
integration tests worked for me :thumbsup: -- does the go-sdk presently include all the features found in the node-sdk?

samwood (Fri, 05 May 2017 01:08:31 GMT):
also, is the SDK presently compatible w/ chaintools?

bbjj040471 (Fri, 05 May 2017 03:24:22 GMT):
i change db to postgre ,how to init table , now i have question about "pq: relation "users" does not exist"

tom.appleyard (Fri, 05 May 2017 09:55:09 GMT):
Has joined the channel.

bmkor (Fri, 05 May 2017 16:13:31 GMT):
Anyone also encountered this problem? ``` # github.com/hyperledger/fabric-sdk-go/fabric-client ../../fabric-client/chain.go:904: undefined: c in c.name ```

samwood (Fri, 05 May 2017 16:39:30 GMT):
@aleksandar.likic thank you. re: ciaintool, I was confused because I saw the packer was bundling .go files and it wasn't clear to me if I could use go-sdk to install car packages

samwood (Fri, 05 May 2017 22:06:54 GMT):
@aleksandar.likic thanks

bmkor (Sat, 06 May 2017 02:56:14 GMT):
Trying to run the integration test and encountering this. ``` cd $GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/integration/ go test ``` [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mL8QHW8FBR45bHqWe) @aleksandar.likic

bmkor (Sat, 06 May 2017 02:56:14 GMT):
Trying to run the integration test and encountering this error. ``` cd $GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/integration/ go test ``` [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mL8QHW8FBR45bHqWe) @aleksandar.likic

warm3snow (Sat, 06 May 2017 04:41:29 GMT):
Hi, everyone. I got this problem. The docker-compose logs ```Handle -> WARN 5c8 Error reading from stream: stream error: code = 1 desc = "context canceled"``` But the integration test return timeout error.

warm3snow (Sat, 06 May 2017 04:41:58 GMT):
Hi, everyone. I got this problem. The docker-compose logs ```Handle -> WARN 5c8 Error reading from stream: stream error: code = 1 desc = "context canceled" ``` But the integration test return timeout error

bmkor (Sat, 06 May 2017 05:01:23 GMT):
Thanks. Let me try again. [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Nk2uTtN6mHACcu3oj) @aleksandar.likic

bmkor (Sun, 07 May 2017 01:54:48 GMT):
Did clone the latest go sdk from GitHub and tried to setup dockers for integration test, and got this error: ``` 2017-05-07 01:48:08.244 UTC [orderer/multichain] newLedgerResources -> CRIT 06b Error creating configtx manager and handlers: Error deserializing key ChainCreationPolicyNames for group /Channel/Orderer: Unexpected key ChainCreationPolicyNames ``` What have I missed? [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=C2rDf7gGhq9rc7eN4) @bmkor

bmkor (Sun, 07 May 2017 01:54:48 GMT):
Did clone the latest go sdk from GitHub and tried to setup dockers for integration test, and got this error: ``` 2017-05-07 01:48:08.244 UTC [orderer/multichain] newLedgerResources -> CRIT 06b Error creating configtx manager and handlers: Error deserializing key ChainCreationPolicyNames for group /Channel/Orderer: Unexpected key ChainCreationPolicyNames ``` What have I missed? [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=C2rDf7gGhq9rc7eN4) @aleksandar.likic

bmkor (Sun, 07 May 2017 01:54:48 GMT):
Did clone the latest go sdk from GitHub and tried to setup dockers for integration test, and got this error in orderer: ``` 2017-05-07 01:48:08.244 UTC [orderer/multichain] newLedgerResources -> CRIT 06b Error creating configtx manager and handlers: Error deserializing key ChainCreationPolicyNames for group /Channel/Orderer: Unexpected key ChainCreationPolicyNames ``` What have I missed? [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=C2rDf7gGhq9rc7eN4) @aleksandar.likic

sergefdrv (Mon, 08 May 2017 16:39:22 GMT):
Has joined the channel.

nauqnew (Tue, 09 May 2017 03:39:20 GMT):
Has joined the channel.

jojialex2 (Wed, 10 May 2017 03:57:49 GMT):
Has joined the channel.

lenin.mehedy (Thu, 11 May 2017 01:28:39 GMT):
Has joined the channel.

wangdong (Thu, 11 May 2017 05:28:17 GMT):
Has joined the channel.

antitoine (Thu, 11 May 2017 09:50:16 GMT):
Has joined the channel.

vitaly.ilinykh (Fri, 12 May 2017 09:46:51 GMT):
Has joined the channel.

KentLandholm (Sat, 13 May 2017 07:50:32 GMT):
Has joined the channel.

vitaly.ilinykh (Sat, 13 May 2017 10:34:47 GMT):
hi guys. I'm trying to make a CLI app with fabric-sdk-go and got stuck into some strange issue. Here is my code: `import ( fabricClient "github.com/hyperledger/fabric-sdk-go/fabric-client" bccspFactory "github.com/hyperledger/fabric/bccsp/factory" ... ) ... func main() { err := bccspFactory.InitFactories(nil) cryptoSuite := bccspFactory.GetDefault() client := fabricClient.NewClient() client.SetCryptoSuite(cryptoSuite)`

vitaly.ilinykh (Sat, 13 May 2017 10:34:47 GMT):
hi guys. I'm trying to make a CLI app with fabric-sdk-go and got stuck into some strange issue. Here is my code: `import ( fabricClient "github.com/hyperledger/fabric-sdk-go/fabric-client" bccspFactory "github.com/hyperledger/fabric/bccsp/factory" ... ) ... func main() { err := bccspFactory.InitFactories(nil) cryptoSuite := bccspFactory.GetDefault() client := fabricClient.NewClient() client.SetCryptoSuite(cryptoSuite)`

vitaly.ilinykh (Sat, 13 May 2017 10:34:47 GMT):
hi guys. I'm trying to make a CLI app with fabric-sdk-go and got stuck into some strange issue. Here is my code: `import ( fabricClient "github.com/hyperledger/fabric-sdk-go/fabric-client" bccspFactory "github.com/hyperledger/fabric/bccsp/factory" ... ) ... func main() { err := bccspFactory.InitFactories(nil) cryptoSuite := bccspFactory.GetDefault() client := fabricClient.NewClient() client.SetCryptoSuite(cryptoSuite)`

vitaly.ilinykh (Sat, 13 May 2017 10:43:51 GMT):
@here hi guys. I'm trying to make a CLI app with fabric-sdk-go and got stuck into some strange issue. Here is my pretty straight-forward code: ``` import ( fabricClient "github.com/hyperledger/fabric-sdk-go/fabric-client" bccspFactory "github.com/hyperledger/fabric/bccsp/factory" ... ) ... func main() { err := bccspFactory.InitFactories(nil) cryptoSuite := bccspFactory.GetDefault() /* 1 */ client := fabricClient.NewClient() client.SetCryptoSuite(cryptoSuite) /* 2 */ ``` It doesn't even compile! Error in the last line: ``` cannot use cryptoSuite (type "github.com/hyperledger/fabric/bccsp".BCCSP) as type "github.com/hyperledger/fabric-sdk-go/vendor/github.com/hyperledger/fabric/bccsp".BCCSP in argument to client.SetCryptoSuite: "github.com/hyperledger/fabric/bccsp".BCCSP does not implement "github.com/hyperledger/fabric-sdk-go/vendor/github.com/hyperledger/fabric/bccsp".BCCSP (wrong type for Decrypt method) have Decrypt("github.com/hyperledger/fabric/bccsp".Key, []byte, "github.com/hyperledger/fabric/bccsp".DecrypterOpts) ([]byte, error) want Decrypt("github.com/hyperledger/fabric-sdk-go/vendor/github.com/hyperledger/fabric/bccsp".Key, []byte, "github.com/hyperledger/fabric-sdk-go/vendor/github.com/hyperledger/fabric/bccsp".DecrypterOpts) ([]byte, error) ``` As far as I understand types `BCCSP` in line 1 and line 2 are the same but located in different packages: "github.com/hyperledger/fabric/bccsp" and "github.com/hyperledger/fabric-sdk-go/vendor/github.com/hyperledger/fabric/bccsp". How can I fix that??? Probably I don't understand something important in Go?

tom.appleyard (Mon, 15 May 2017 10:05:07 GMT):
Hey All, I'm getting this when deploying: `Error: Error endorsing chaincode: rpc error: code = 2 desc = Failed to execute transaction (Timeout expired while executing transaction)` has anyone seen this before?

tom.appleyard (Tue, 16 May 2017 09:05:23 GMT):
Hey All, does anyone know what `GetStateByRange`'s arguments are supposed to be

tom.appleyard (Tue, 16 May 2017 09:05:40 GMT):
In the sense of how does it do 'ranges' on strings exactly?

bmkor (Tue, 16 May 2017 23:53:00 GMT):
Let me try. Thanks. [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sLjXybtJmPAM2N6Br) @aleksandar.likic

kesavannb (Wed, 17 May 2017 07:06:41 GMT):
Has joined the channel.

zhoupeiwen (Wed, 17 May 2017 07:42:51 GMT):
All, does the go sdk work for the fabric alpha2 ?

troyronda (Wed, 17 May 2017 10:10:58 GMT):
@zhoupeiwen - it's being updated ... (not yet)

bmatsuo (Wed, 17 May 2017 16:50:43 GMT):
Is it possible to use fabric-sdk-go to interact with chaincode instantiated from a CAR file (archive produced by fabric-chaintool)? Somewhere I need to specify the ChaincodeSpec.Type to be CAR (not GOLANG, which appears to be the default) but I can't find a way to do that using any of the higher level functions of the SDK. Do I need to go down to the lowest level API functions implement my own helpers to interact with CARs?

bmatsuo (Wed, 17 May 2017 16:50:43 GMT):
Is it possible to use fabric-sdk-go to interact with chaincode instantiated from a CAR file (archive produced by fabric-chaintool)? Somewhere I need to specify the ChaincodeSpec.Type to be CAR (not GOLANG, which appears to be the default) but I can't find a way to do that using any of the higher level functions of the SDK. Do I need to go down to the lowest level API functions and implement my own helpers to interact with CARs?

bmatsuo (Wed, 17 May 2017 16:58:17 GMT):
Actually, I'm trying to instantiate the CAR using fabric-sdk-go as well (though packaging/installation does not need to be done using the sdk)

lenin.mehedy (Thu, 18 May 2017 02:49:19 GMT):
HI guys, is there any reason why we need absolute path for tls.certificate i the config.yaml file? Is there a way to use relative path?

divyank (Thu, 18 May 2017 15:30:00 GMT):
@bmatsuo We do not currently support this

divyank (Thu, 18 May 2017 15:31:08 GMT):
@lenin.mehedy You can override this with your application configuration while calling NewPeer() or NewOrderer() which support relative paths as well.

dragosh (Thu, 18 May 2017 19:37:18 GMT):
Has joined the channel.

antitoine (Fri, 19 May 2017 07:58:44 GMT):
Hi, I'm currently trying to use the Fabric SDK Go, but when I initialise factories (fabric/bccsp/factory) like in the example provide by the integration test, the build process failed (errors in the file bellow). I have any error when I run integration tests directly in the fabric-sdk-go directory. Any idea?

antitoine (Fri, 19 May 2017 07:58:55 GMT):

Message Attachments

divyank (Fri, 19 May 2017 13:45:35 GMT):
Hi @antitoine, your build is failing because your application contains multiple definitions of the pkcs11 library. One used by fabric-sdk-go, and the other comes from your GOPATH when you initialize BCCSP. We handle this by using a tool like `govendor` to flatten these dependencies. After installing the tool, in your application directory, run: `govendor init && govendor add +external`

antitoine (Fri, 19 May 2017 13:52:22 GMT):
@divyank Thanks, the issue is solved!

smithbk (Fri, 19 May 2017 17:23:09 GMT):
Has joined the channel.

smithbk (Fri, 19 May 2017 17:27:59 GMT):
Hi, just wondering how the go SDK is tracking with the node SDK in terms of feature status. Can someone provide an overview?

yedendra (Sat, 20 May 2017 14:11:43 GMT):
Has joined the channel.

mackeee (Sun, 21 May 2017 06:23:18 GMT):
Has joined the channel.

zhangmenghang (Mon, 22 May 2017 02:31:54 GMT):
Hi, Is there any plans that when GO SDK

zhangmenghang (Mon, 22 May 2017 02:32:39 GMT):
Hi, Is there any plans that when GO SDK can support fabric-1.0.0-alpha2 ?

Calvin_Heo (Mon, 22 May 2017 02:53:24 GMT):
Has joined the channel.

Sij (Mon, 22 May 2017 06:01:10 GMT):
Has joined the channel.

antitoine (Mon, 22 May 2017 10:20:16 GMT):
Hi, I can't instanciate chaincode with the SDK Go. The following error occur: `Error from install and instantiate chaincode: SendInstantiateProposal Endorser localhost:7051 return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = Error starting container: API error (404): {"message":"network fixtures_default not found"}` I follow integration tests to install and instansiate the chaincode. So I don't know why I have this error that is not present when I run the SDK integration tests.

dolanor (Mon, 22 May 2017 15:15:36 GMT):
Has joined the channel.

antitoine (Tue, 23 May 2017 08:01:02 GMT):
Hi, It is possible to make multiple transaction at the same time (multi thread) using the same SDK initialisation ? My program is very slow because of the transaction delay, and when I run every transaction in a different thread, some transactions failed.

antitoine (Tue, 23 May 2017 08:01:02 GMT):
Hi, It is possible to make multiple transactions at the same time (multi thread) using the same SDK initialisation ? My program is very slow because of the transaction delay, and when I run every transaction in a different thread, some transactions failed.

antitoine (Tue, 23 May 2017 08:01:02 GMT):
Hi, It is possible to make multiple transactions at the same time (multi thread) using the same SDK initialisation ? My program is very slow because of the transaction delay, and when I run every transaction in a different thread, some transactions failed. For now, I loop until the transaction succeed in the goroutine with the same SDK initialisation, but I don't know if it is the right way to do it.

habpygo (Tue, 23 May 2017 08:06:10 GMT):
Has joined the channel.

lenin.mehedy (Tue, 23 May 2017 08:40:11 GMT):
Is there any getting started guid to demonstrate the use of fabric-sdk-go?

antitoine (Tue, 23 May 2017 08:50:28 GMT):
@lenin.mehedy I found nothing, but the integration tests show a lot and I started with that.

lenin.mehedy (Tue, 23 May 2017 08:52:21 GMT):
@antitoine Thanks for responding. Do you have any sample code?

lenin.mehedy (Tue, 23 May 2017 08:54:37 GMT):
@antitoine can you share the commit version of fabric and fabric-ca that you are using to compile your code?

antitoine (Tue, 23 May 2017 09:00:08 GMT):
@lenin.mehedy The integration test are there https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration and I have nothing for now to show in public repository, sorry. My fabric repository is at the v1.0.0-alpha tag (fa3d88cde177750804c7175ae000e0923199735c) and fabric CA repository is also at the v1.0.0-alpha tag (b587a4809438cc91787c49c11198dea70e2647b4)

lenin.mehedy (Tue, 23 May 2017 09:00:55 GMT):
Sure, no problem. Thanks for those commit version.

habpygo (Tue, 23 May 2017 09:30:45 GMT):
Hi everyone, I’m at the crossroad of making a choice between `fabric-sdk-node` or `fabric-sdk-go`. Will `fabric-sdk-go` work with fabric alpha2? I saw @troyronda ’s response to @zhoupeiwen regarding the status being updated, but … Is it worthwhile waiting? I’m a bit under time pressure to set up a pilot and I really would like to do the backend and chaincode in go. Thanks.

divyank (Tue, 23 May 2017 16:02:54 GMT):
Hi @habpygo, @zhangmenghang, we are working on fabric alpha2 compatibility but do not have an ETA at this point.

divyank (Tue, 23 May 2017 16:04:12 GMT):
Hi @antitoine, I don't believe the SDK is thread safe. In my application, I have a RWMutex lock on the SDK instance to synchronize access from different go routines.

divyank (Tue, 23 May 2017 16:05:40 GMT):
@lenin.mehedy The end to end test is a good place to start. It creates a transaction on the blockchain and queries the result of the transaction. https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/end_to_end_test.go

troyronda (Tue, 23 May 2017 17:03:54 GMT):
@divyank @habpygo @zhangmenghang - re: alpha 2 compatibility ... probably next week

habpygo (Tue, 23 May 2017 17:04:47 GMT):
@troyronda Great! Looking forward to it!

lenin.mehedy (Tue, 23 May 2017 23:25:58 GMT):
Thanks @divyank . I got it working finally. Initially I was trying to compile with alpha2, and it was displaying build errors.

zhangmenghang (Wed, 24 May 2017 00:56:22 GMT):
@troyronda @divyank Thank you for your effort!

tedljw (Wed, 24 May 2017 02:16:38 GMT):
Has joined the channel.

antitoine (Wed, 24 May 2017 06:51:54 GMT):
@divyank Thanks! I will add a mutex too. But if I initialise multiple instance of the SDK, contact the same peer is not an issue ?

habpygo (Wed, 24 May 2017 09:46:07 GMT):
Hey guys, @troyronda is there a mistake either in the `Makefile` or the `README.md` file on GitHub https://github.com/hyperledger/fabric-sdk-go ? The command `make check` doesn’t work, because it should be `make checks` looking at `Makefile`

troyronda (Wed, 24 May 2017 11:01:41 GMT):
Thanks @habpygo - I added the fix to https://gerrit.hyperledger.org/r/#/c/9743/

troyronda (Wed, 24 May 2017 11:02:21 GMT):
If you have more suggestions, please comment

troyronda (Wed, 24 May 2017 13:34:25 GMT):
and now updated at https://github.com/hyperledger/fabric-sdk-go

habpygo (Wed, 24 May 2017 13:40:42 GMT):
:thumbsup:

antitoine (Wed, 24 May 2017 13:52:33 GMT):
Hi, by following E2E tests, I'm trying to install and instantiate another chaincode (not example_cc). The installation works, but the instantiate not. The orderer respond with an error provide by the example_cc chaincode (`SendInstantiateProposal Endorser localhost:7051 return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = Transaction returned with failure: Incorrect number of arguments. Expecting 4`). Why ? Do I need to do some work with orderers ?

antitoine (Wed, 24 May 2017 13:52:33 GMT):
Hi, by following E2E tests, I'm trying to install and instantiate another chaincode (not example_cc). The installation works, but the instantiate not. The orderer respond with an error provide by the example_cc chaincode ( `SendInstantiateProposal Endorser localhost:7051 return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = Transaction returned with failure: Incorrect number of arguments. Expecting 4` ). Why ? Do I need to do some work with orderers ?

antitoine (Wed, 24 May 2017 13:52:33 GMT):
Hi, by following E2E tests, I'm trying to install and instantiate another chaincode (not example_cc). The installation works, but the instantiate not. The endorser respond with an error provide by the example_cc chaincode ( `SendInstantiateProposal Endorser localhost:7051 return error: Error calling endorser 'localhost:7051': rpc error: code = 2 desc = Transaction returned with failure: Incorrect number of arguments. Expecting 4` ). Why ? Do I need to do some work with endorsers ?

divyank (Wed, 24 May 2017 16:10:29 GMT):
@antitoine It looks like that error message is generated by example_cc. Maybe check the arguments to install and instantiate to make sure the correct chaincode is being used?

fennelD7 (Thu, 25 May 2017 14:52:35 GMT):
Hi, I've found that there are no tags in go-sdk. Now I need to use go-sdk in fabric alpha1, which commit should I checkout?

troyronda (Thu, 25 May 2017 14:59:42 GMT):
@fennelD7 - gosdk master is currently at alpha1

troyronda (Thu, 25 May 2017 14:59:58 GMT):
it will be updated to alpha2 targetting next week

fennelD7 (Thu, 25 May 2017 15:40:50 GMT):
@troyronda Thank you!

wyanglau (Thu, 25 May 2017 18:29:06 GMT):
Has joined the channel.

antitoine (Fri, 26 May 2017 09:20:40 GMT):
@divyank Thanks, my problem was the chaincode version. I tried to instantiate the chaincode version v0.0.1 and I think it was the previous chaincode version number, so the `example_cc` (right ?). I upgraded to v0.0.2 and the instantiation (after the install) works.

antitoine (Fri, 26 May 2017 09:20:40 GMT):
@divyank Thanks, my problem was the chaincode version. The docker image isn't cleaned, so every time the same chaincode was loaded.

antitoine (Fri, 26 May 2017 09:21:55 GMT):
It was not very obvious, maybe an error can help if we instantiate a chaincode with the same version number ?

ivaylopivanov (Sun, 28 May 2017 10:25:10 GMT):
Has joined the channel.

dushyant (Mon, 29 May 2017 08:56:53 GMT):
Has joined the channel.

troyronda (Mon, 29 May 2017 19:22:52 GMT):
@lenin.mehedy - FYI a CLI example has been posted here: https://github.com/securekey/fabric-examples/tree/master/fabric-cli

troyronda (Mon, 29 May 2017 19:26:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hZdPBsiXEJgWtWBJF) Suggest adding note to the readme

lenin.mehedy (Tue, 30 May 2017 08:02:38 GMT):
Thanks @troyronda

noursaadallah (Tue, 30 May 2017 09:11:12 GMT):
Has joined the channel.

livespotty (Tue, 30 May 2017 13:54:02 GMT):
Has joined the channel.

balakrishna.devasani (Tue, 30 May 2017 17:11:02 GMT):
Has joined the channel.

tylerdmace (Wed, 31 May 2017 02:35:01 GMT):
Has joined the channel.

kontos (Wed, 31 May 2017 13:27:09 GMT):
Has joined the channel.

romchik (Wed, 31 May 2017 18:43:41 GMT):
Has joined the channel.

romchik (Wed, 31 May 2017 18:43:49 GMT):
any one has any idea if there are any resources for writing Blockchain smart contracts for Hyperledger in Go? books, podcasts, videos, paid premium content, or even private courses i cannot find anything other than IBM website course which is not that comprehensive any help from the Golang community will be highly appreciated

holocron (Wed, 31 May 2017 21:05:06 GMT):
Has joined the channel.

ShenthilkumarCK (Thu, 01 Jun 2017 06:19:06 GMT):
Has joined the channel.

jriachi (Thu, 01 Jun 2017 06:53:29 GMT):
Has joined the channel.

LordGoodman (Thu, 01 Jun 2017 10:18:06 GMT):
Has joined the channel.

vdods (Thu, 01 Jun 2017 22:54:00 GMT):
Has joined the channel.

vdods (Thu, 01 Jun 2017 22:54:53 GMT):
@troyronda Hi Troy, has fabric-sdk-go targeted for alpha2 been released?

vdods (Thu, 01 Jun 2017 22:55:29 GMT):
(The readme.md doesn't indicate such, but documentation sometimes falls out of date, so I wanted to make sure)

troyronda (Thu, 01 Jun 2017 22:55:47 GMT):
not yet - still working on it

vdods (Thu, 01 Jun 2017 23:05:26 GMT):
Is it known that the current state of fabric-sdk-go will not work against alpha2?

vdods (Fri, 02 Jun 2017 01:23:39 GMT):
Or better yet, when it's estimated that alpha2 will be supported?

vdods (Fri, 02 Jun 2017 01:24:18 GMT):
I've been struggling with fabric-sdk-node, and fabric-sdk-go looks much much clearer and simpler (on top of being written in a statically compiled language)

holocron (Fri, 02 Jun 2017 01:26:45 GMT):
it helps a bit that fabric's all written in go too :D

vdods (Fri, 02 Jun 2017 03:09:41 GMT):
@holocron Totally!

xiejunxi (Fri, 02 Jun 2017 06:01:06 GMT):
Has joined the channel.

pavlov-tony (Fri, 02 Jun 2017 07:03:46 GMT):
Has joined the channel.

pavlov-tony (Fri, 02 Jun 2017 07:09:25 GMT):
Hello, can anyone share a link to example project with fabric-sdk-go? Thanks!

hhwill (Fri, 02 Jun 2017 08:05:13 GMT):
Has joined the channel.

Fanarito (Fri, 02 Jun 2017 09:32:30 GMT):
Has joined the channel.

holocron (Fri, 02 Jun 2017 13:30:34 GMT):
@pavlov-tony CLI: An example CLI for Fabric built with the Go SDK.

holocron (Fri, 02 Jun 2017 13:30:34 GMT):
@pavlov-tony CLI: An example CLI for Fabric built with the Go SDK. https://github.com/securekey/fabric-examples/tree/master/fabric-cli/

pavlov-tony (Fri, 02 Jun 2017 13:49:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=d5GeKKFniqsGQFHFS) @holocron Thanks!

troyronda (Fri, 02 Jun 2017 14:56:10 GMT):
@vdods we are actively working on the alpha2 update (and we need it for ourselves too :)

troyronda (Fri, 02 Jun 2017 14:56:10 GMT):
@vdods we are actively working on the alpha2 update ... and we need it for ourselves too :)

vdods (Fri, 02 Jun 2017 15:48:27 GMT):
Thanks, Troy :)

ivaylopivanov (Fri, 02 Jun 2017 20:03:34 GMT):
@troyronda do you guys have any ETA for that? Like 1 week, 1 month?

Elguana (Sat, 03 Jun 2017 10:43:41 GMT):
Has joined the channel.

hanhzf (Wed, 07 Jun 2017 14:03:19 GMT):
Has joined the channel.

troyronda (Wed, 07 Jun 2017 14:49:21 GMT):
@ivaylopivanov very soon

troyronda (Wed, 07 Jun 2017 14:49:21 GMT):
@ivaylopivanov soon :-)... should be this week.

troyronda (Wed, 07 Jun 2017 14:49:21 GMT):
@ivaylopivanov soon :-)... aiming for this week.

JonathanLevi (Wed, 07 Jun 2017 14:57:03 GMT):
BTW (and I know you know it @troyronda ) we are about to have another release/tag. So if it is easier to work against the *master* branch of fabric, which we are freezing, it may save you a full "cycle".

JonathanLevi (Wed, 07 Jun 2017 14:57:50 GMT):
The Node SDK has been updated between alpha2 and master ( <--- the upcoming *v1.0.0-beta* )

troyronda (Wed, 07 Jun 2017 15:10:28 GMT):
@JonathanLevi - Yes we were chatting about this possibility this morning.

troyronda (Wed, 07 Jun 2017 15:11:07 GMT):
The plan is to wrap up the existing work on alpha2 ... do a quick smoke test against master. if it works then we plan to just go against beta; otherwise push what we have.

troyronda (Wed, 07 Jun 2017 15:11:48 GMT):
In the latter case, then quickly work on the beta changes :)

JonathanLevi (Wed, 07 Jun 2017 15:11:52 GMT):
Yes, this makes sense too. In a way there is a larger "diff" between beta and alpha, compared to alpha2 and alpha.

troyronda (Wed, 07 Jun 2017 15:12:08 GMT):
Yes... alpha1 -> alpha2 turned out to be bigger than expected.

JonathanLevi (Wed, 07 Jun 2017 15:12:15 GMT):
Yes, I understand. Just thought I should the 2 lines above. Makes sense.

JonathanLevi (Wed, 07 Jun 2017 15:12:24 GMT):
Oh yeah. Tell me about it ;-)

troyronda (Wed, 07 Jun 2017 15:12:30 GMT):
haha.

troyronda (Wed, 07 Jun 2017 15:12:42 GMT):
Hopefully we will know soon.

JonathanLevi (Wed, 07 Jun 2017 15:13:26 GMT):
Really a lot got into alpha2, which is also a Good Thing (tm), but it carries/carried a lot more other changes that are/were required along with it.

troyronda (Wed, 07 Jun 2017 15:13:29 GMT):
btw - partially this is due to not starting on the alpha2 work until it was tagged.

troyronda (Wed, 07 Jun 2017 15:13:51 GMT):
we will need to figure out a flow for the future where we don't have this impediment.

troyronda (Wed, 07 Jun 2017 15:14:18 GMT):
(aka Go SDK against master vs latested tagged)

troyronda (Wed, 07 Jun 2017 15:14:18 GMT):
(aka Go SDK against master vs latest tagged)

JonathanLevi (Wed, 07 Jun 2017 15:14:36 GMT):
Trying to make these converge better, going forward. I am/we are blocking a LOT of stuff from getting into the master branch these days.

JonathanLevi (Wed, 07 Jun 2017 15:14:51 GMT):
Hopefully from *beta* to *GA* things will go smoother.

troyronda (Wed, 07 Jun 2017 15:15:01 GMT):
I'm sure it will :)

JonathanLevi (Wed, 07 Jun 2017 15:15:28 GMT):
"sure" as in, "why wouldn't they?" eh? ;-)

JonathanLevi (Wed, 07 Jun 2017 15:15:38 GMT):
Alright, back to work! ;-)

troyronda (Wed, 07 Jun 2017 15:15:56 GMT):
adding tot he above ... When Fabric figures out the vNext development mechanism, we will need similar for the SDK

troyronda (Wed, 07 Jun 2017 15:15:56 GMT):
adding to the above ... When Fabric figures out the vNext development mechanism, we will need similar for the SDK

JonathanLevi (Wed, 07 Jun 2017 15:16:48 GMT):
Well, hopefully right after 1.0 the Go SDK will get to be an officially supported/required one.

JonathanLevi (Wed, 07 Jun 2017 15:17:05 GMT):
The HACERA guys will be all over it, I can tell you this right now.

JonathanLevi (Wed, 07 Jun 2017 15:17:46 GMT):
I'm sure that many others. Many companies have a large Golang developers pool...

JonathanLevi (Wed, 07 Jun 2017 15:17:46 GMT):
I'm sure that many others. Many companies have a large (proportion of) Golang developers pool...

troyronda (Wed, 07 Jun 2017 15:19:11 GMT):
Cool :).

troyronda (Wed, 07 Jun 2017 15:19:49 GMT):
We are using it for our client development (to state the obvious).

troyronda (Wed, 07 Jun 2017 15:19:49 GMT):
We are also using it for our client development (to state the obvious).

silliman (Thu, 08 Jun 2017 14:56:50 GMT):
Has left the channel.

grapebaba (Fri, 09 Jun 2017 01:12:59 GMT):
Has joined the channel.

butch.g (Fri, 09 Jun 2017 02:08:23 GMT):
Has joined the channel.

JaemanHong (Mon, 12 Jun 2017 06:15:32 GMT):
Has joined the channel.

samwood (Wed, 14 Jun 2017 01:21:06 GMT):
I'm having trouble understanding the state of fabric-sdk-go right now, is it based off fabric-alpha ?

waytoharish (Wed, 14 Jun 2017 05:56:59 GMT):
Has joined the channel.

dolanor (Wed, 14 Jun 2017 14:02:55 GMT):
@samwood From what I see, they started from scratch.

dolanor (Wed, 14 Jun 2017 14:14:22 GMT):
They are finishing to be compatible with fabric alpha2 (and then going as fast as possible to be compatible with beta from the previous chat log)

dolanor (Wed, 14 Jun 2017 14:24:13 GMT):
@troyronda has the target been reached last week (compat with alpha2) ?

troyronda (Wed, 14 Jun 2017 14:37:47 GMT):
Here's where we are. The changeset for alpha2 has been posted (and is being reviewed). To enable TLS to the Fabric CA, the integration scripts need to be updated (being done today). We want to do the initial alpha2 merge once the integration script is done.

troyronda (Wed, 14 Jun 2017 14:37:47 GMT):
Here's where we are. The changeset for alpha2 has been posted (and is being reviewed). To enable TLS to the Fabric CA, the integration test scripts need to be updated (being done today). We want to do the initial alpha2 merge once the integration script is done.

troyronda (Wed, 14 Jun 2017 14:37:47 GMT):
Here's where we are. The changeset for alpha2 has been posted... To enable TLS to the Fabric CA, the integration test scripts need to be updated (being done today). We want to do the initial alpha2 merge once the integration script is done.

troyronda (Wed, 14 Jun 2017 14:37:47 GMT):
Here's where we are. The changeset for alpha2 has been posted (but not yet merged)... To enable TLS to the Fabric CA, the integration test scripts need to be updated (being done today). We want to do the initial alpha2 merge once the integration script is done.

troyronda (Wed, 14 Jun 2017 14:38:45 GMT):
Once the merge is done for alpha2, we want to quickly move onto beta. We also have a list of refactorings we are looking at.

samwood (Wed, 14 Jun 2017 16:27:23 GMT):
thank you @dolanor and @troyronda for the updates, looking forward to alpha2 and beta.

naolduga (Wed, 14 Jun 2017 17:22:13 GMT):
Has joined the channel.

troyronda (Wed, 14 Jun 2017 19:01:34 GMT):
@here alpha2 change set has been merged.

ianco (Wed, 14 Jun 2017 19:09:21 GMT):
Has joined the channel.

guruce (Thu, 15 Jun 2017 13:27:35 GMT):
Has joined the channel.

ivaylopivanov (Thu, 15 Jun 2017 15:57:24 GMT):
@troyronda can you update us here when it's compatible with beta?

ivaylopivanov (Thu, 15 Jun 2017 15:57:50 GMT):
like the same way you did yesterday :D

troyronda (Thu, 15 Jun 2017 18:21:26 GMT):
@here beta change set has been merged.

dolanor (Thu, 15 Jun 2017 21:03:42 GMT):
You're on fire!

dolanor (Thu, 15 Jun 2017 21:03:47 GMT):
Thank you!

samwood (Thu, 15 Jun 2017 22:50:50 GMT):
:thumbsup:

habpygo (Fri, 16 Jun 2017 07:38:37 GMT):
Great job @troyronda :thumbsup:

baofeng022 (Fri, 16 Jun 2017 08:11:55 GMT):
Has joined the channel.

guruce (Fri, 16 Jun 2017 08:35:13 GMT):
@here Is this available in Alpha 2?

guruce (Fri, 16 Jun 2017 08:35:19 GMT):
https://github.com/hyperledger/fabric/blob/v1.0.0-alpha2/proposals/r1/Custom-Events-High-level-specification.md

hangyuliu (Fri, 16 Jun 2017 09:49:29 GMT):
Has joined the channel.

hangyuliu (Fri, 16 Jun 2017 09:49:51 GMT):
:thumbsup:

jmcnevin (Fri, 16 Jun 2017 16:34:06 GMT):
Has joined the channel.

sfukazu (Mon, 19 Jun 2017 06:36:55 GMT):
Has joined the channel.

anilchdry (Tue, 20 Jun 2017 04:25:59 GMT):
Has joined the channel.

dongqi (Tue, 20 Jun 2017 08:38:57 GMT):
Has joined the channel.

firas.qutishat (Tue, 20 Jun 2017 18:06:37 GMT):
@here We are changing the fabric-sdk-go structure (FAB-4629) to match the golang best practices, This change will break the import path. if you have feedback about the structure change please send to us ASAP. Gerrit issue: https://gerrit.hyperledger.org/r/#/c/10785/

firas.qutishat (Tue, 20 Jun 2017 18:06:37 GMT):
@here We are changing the fabric-sdk-go structure (FAB-4629) to match the golang best practices, This change include import path changes, rename the chain to channel and the NewClient, NewPeer, NewOrderer functions need config implementation. if you have feedback about the structure change please send to us ASAP. Gerrit issue: https://gerrit.hyperledger.org/r/#/c/10785/

troyronda (Tue, 20 Jun 2017 18:08:59 GMT):
Clickable jira link: https://jira.hyperledger.org/browse/FAB-4629

divyank (Tue, 20 Jun 2017 18:32:11 GMT):
@guruce Yes, we do support chaincode events in alpha2. See eventhub.RegisterChaincodeEvent() https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha2/fabric-client/events/eventhub.go#L387

tinywell (Wed, 21 Jun 2017 01:23:12 GMT):
Has joined the channel.

KevinBai (Wed, 21 Jun 2017 02:09:39 GMT):
Has joined the channel.

KevinBai (Wed, 21 Jun 2017 02:10:36 GMT):
how to fix problem: http: TLS handshake error from 172.23.0.1:58452: tls: oversized record received with length 21536

KevinBai (Wed, 21 Jun 2017 02:11:18 GMT):
I use th fabric-sdk-go

divyank (Wed, 21 Jun 2017 13:31:37 GMT):
@KevinBai Is TLS enabled on both client and server?

KevinBai (Thu, 22 Jun 2017 03:53:37 GMT):
@divyank yes, is enabled. but I want to use tls

guruce (Thu, 22 Jun 2017 11:55:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tpYQgtw7TPsz4z8zn) @divyank worked thanks :)

divyank (Thu, 22 Jun 2017 12:09:20 GMT):
@KevinBai Is it your fabric-ca running at `172.23.0.1:58452`?

troyronda (Thu, 22 Jun 2017 14:30:43 GMT):
The folder updates have been merged. If there is further feedback on the package structure - please comment here: https://jira.hyperledger.org/browse/FAB-4929

ArvsIndrarys (Thu, 22 Jun 2017 14:37:53 GMT):
Has joined the channel.

ArvsIndrarys (Thu, 22 Jun 2017 14:56:16 GMT):
Hi ! I want to try the go dsk but on the first step I get : ``` marc@marc-Inspiron-7548:~/go/src/github.com/hyperledger/fabric-sdk-go$ go get -u github.com/hyperledger/fabric-sdk-go/fabric-client package github.com/hyperledger/fabric-sdk-go/fabric-client: cannot find package "github.com/hyperledger/fabric-sdk-go/fabric-client" in any of: /usr/local/go/src/github.com/hyperledger/fabric-sdk-go/fabric-client (from $GOROOT) /home/marc/go/src/github.com/hyperledger/fabric-sdk-go/fabric-client (from $GOPATH) ```

ArvsIndrarys (Thu, 22 Jun 2017 14:56:16 GMT):
Hi ! I want to rty the go dsk but on the first step I get : ``` marc@marc-Inspiron-7548:~/go/src/github.com/hyperledger/fabric-sdk-go$ go get -u github.com/hyperledger/fabric-sdk-go/fabric-client package github.com/hyperledger/fabric-sdk-go/fabric-client: cannot find package "github.com/hyperledger/fabric-sdk-go/fabric-client" in any of: /usr/local/go/src/github.com/hyperledger/fabric-sdk-go/fabric-client (from $GOROOT) /home/marc/go/src/github.com/hyperledger/fabric-sdk-go/fabric-client (from $GOPATH) ```

ArvsIndrarys (Thu, 22 Jun 2017 14:56:32 GMT):
Any idea what I'md doing wrong?

ArvsIndrarys (Thu, 22 Jun 2017 14:56:32 GMT):
Any idea what I'm doing wrong?

troyronda (Thu, 22 Jun 2017 15:01:49 GMT):
sorry about that ... the readme needs to be updated for the new folder structure. try go get -u github.com/hyperledger/fabric-sdk-go/pkg/fabric-client

troyronda (Thu, 22 Jun 2017 15:02:17 GMT):
(note the /pkg/ path)

troyronda (Thu, 22 Jun 2017 15:04:21 GMT):
likewise for ca-client: go get -u github.com/hyperledger/fabric-sdk-go/pkg/fabric-ca-client

ArvsIndrarys (Thu, 22 Jun 2017 15:08:35 GMT):
@troyronda Thanks it seems to work. If I'm not THAT bat, perhaps the make has to get some changes too ? ``` marc@marc-Inspiron-7548:~/go/src/github.com/hyperledger/fabric-sdk-go$ make Installing dependencies... Checking committed files for SPDX-License-Identifier headers ... grep: config/config.go: Aucun fichier ou dossier de ce type grep: config/config_test.go: Aucun fichier ou dossier de ce type grep: config/test.yaml: Aucun fichier ou dossier de ce type grep: fabric-ca-client/fabricca.go: Aucun fichier ou dossier de ce type grep: fabric-ca-client/fabricca_test.go: Aucun fichier ou dossier de ce type grep: fabric-ca-client/mocks/mockkey.go: Aucun fichier ou dossier de ce type grep: fabric-client/chain.go: Aucun fichier ou dossier de ce type grep: fabric-client/chain_test.go: Aucun fichier ou dossier de ce type grep: fabric-client/client.go: Aucun fichier ou dossier de ce type grep: fabric-client/client_test.go: Aucun fichier ou dossier de ce type grep: fabric-client/events/consumer/consumer.go: Aucun fichier ou dossier de ce type grep: fabric-client/events/eventhub.go: Aucun fichier ou dossier de ce type grep: fabric-client/events/eventhub_test.go: Aucun fichier ou dossier de ce type grep: fabric-client/events/eventmocks.go: Aucun fichier ou dossier de ce type grep: fabric-client/keyvaluestore/filekeyvaluestore.go: Aucun fichier ou dossier de ce type grep: fabric-client/keyvaluestore/filekeyvaluestore_test.go: Aucun fichier ou dossier de ce type grep: fabric-client/keyvaluestore/keyvaluestore.go: Aucun fichier ou dossier de ce type grep: fabric-client/mockbroadcastserver.go: Aucun fichier ou dossier de ce type grep: fabric-client/mockcryptosuite.go: Aucun fichier ou dossier de ce type grep: fabric-client/mockdata.go: Aucun fichier ou dossier de ce type grep: fabric-client/mockendorserserver.go: Aucun fichier ou dossier de ce type grep: fabric-client/mockorderer.go: Aucun fichier ou dossier de ce type grep: fabric-client/mockpeer.go: Aucun fichier ou dossier de ce type grep: fabric-client/orderer.go: Aucun fichier ou dossier de ce type grep: fabric-client/orderer_test.go: Aucun fichier ou dossier de ce type grep: fabric-client/packager.go: Aucun fichier ou dossier de ce type grep: fabric-client/packager/golang.go: Aucun fichier ou dossier de ce type grep: fabric-client/packager/golang_test.go: Aucun fichier ou dossier de ce type grep: fabric-client/peer.go: Aucun fichier ou dossier de ce type grep: fabric-client/peer_test.go: Aucun fichier ou dossier de ce type grep: fabric-client/user.go: Aucun fichier ou dossier de ce type grep: fabric-client/user_test.go: Aucun fichier ou dossier de ce type grep: fabric-client/util/chain_util.go: Aucun fichier ou dossier de ce type grep: fabric-client/util/client_util.go: Aucun fichier ou dossier de ce type grep: fabric-client/util/events_util.go: Aucun fichier ou dossier de ce type grep: fabric-client/util.go: Aucun fichier ou dossier de ce type grep: fabric-client/util/user_util.go: Aucun fichier ou dossier de ce type grep: test/integration/chain_queries_test.go: Aucun fichier ou dossier de ce type All files have SPDX-License-Identifier headers Running linters... Checking ./pkg/config YOU MUST FIX THE FOLLOWING GOIMPORTS ERRORS: pkg/config/config.go END GOIMPORTS ERRORS Makefile:28 : la recette pour la cible « lint » a échouée make: *** [lint] Erreur 1 ``` I have the pkg/config/config.go file but it seems there's no mention of it in the greps

troyronda (Thu, 22 Jun 2017 15:10:52 GMT):
Interesting - I'll take a look

ArvsIndrarys (Thu, 22 Jun 2017 15:11:00 GMT):
here : ``` marc@marc-Inspiron-7548:~/go/src/github.com/hyperledger/fabric-sdk-go$ ls pkg/config/ config.go config_test.go test.yaml ```

troyronda (Thu, 22 Jun 2017 15:18:30 GMT):
Created https://jira.hyperledger.org/browse/FAB-4932 to track - I'll update once I give it a try

troyronda (Thu, 22 Jun 2017 15:18:42 GMT):
(soon)

troyronda (Thu, 22 Jun 2017 15:27:12 GMT):
Did you check out the SDK for the first time today? (I'm not getting the GOIMPORTS error)

troyronda (Thu, 22 Jun 2017 15:33:57 GMT):
@firas.qutishat @divyank ^^^

divyank (Thu, 22 Jun 2017 15:45:37 GMT):
@ArvsIndrarys I just ran `go get -u github.com/hyperledger/fabric-sdk-go/pkg/fabric-client` and `make` in a clean environment and did not see the goimports errors. Are you sure you don't have any local changes? You can run `git status` to check

troyronda (Thu, 22 Jun 2017 20:45:06 GMT):
@here - the readme has been fixed

KevinBai (Fri, 23 Jun 2017 01:47:21 GMT):
@divyank yes,it is running at `172.23.0.1:58452`. I use the default setting, can you tell me how to fix it?

JiuZhuYou (Fri, 23 Jun 2017 02:03:12 GMT):
Has joined the channel.

ArvsIndrarys (Fri, 23 Jun 2017 08:03:26 GMT):
@troyronda Yes, first time @divyank branch is up to date with origin/master Okay , I got it working ! ($GOPATH setup problem) A last thing, I get that warning : ``` grep: pkg/fabric-client/client/client.go: Aucun fichier ou dossier de ce type grep: pkg/fabric-client/client/client_test.go: Aucun fichier ou dossier de ce type ``` When I copy these files from pkg/fabric-client to fabric-client/client, the make results in an error, but nothing serious in there.

ArvsIndrarys (Fri, 23 Jun 2017 08:03:26 GMT):
@troyronda Yes, first time @divyank branch is up to date with origin/master Okay , I got it working ! ( A go "expert" told me that with the last go version, I didn't have to set up the $GOPATH) A last thing, I get that warning : ``` grep: pkg/fabric-client/client/client.go: Aucun fichier ou dossier de ce type grep: pkg/fabric-client/client/client_test.go: Aucun fichier ou dossier de ce type ``` When I copy these files from pkg/fabric-client to fabric-client/client, the make results in an error, but nothing serious in there.

dolanor (Fri, 23 Jun 2017 08:52:52 GMT):
hello

dolanor (Fri, 23 Jun 2017 08:53:10 GMT):
BTW, you should tag the version that is compatible with 1.0.0-beta :)

troyronda (Fri, 23 Jun 2017 12:02:26 GMT):
hi @dolanor - head is currently compatible with 1.0.0-beta. We wanted to apply the next tag once we settle down on some outstanding tickets.

dolanor (Fri, 23 Jun 2017 12:27:57 GMT):
Ok, understood :) It's just we had to dig in the commits to see it was already compatible :)

jmcnevin (Fri, 23 Jun 2017 14:02:37 GMT):
Trying to put together something simple based on the test examples, and I'm running into this error: ``` cannot use apiConfig.GetCSPConfig() (type *"github.com/hyperledger/fabric-sdk-go/vendor/github.com/hyperledger/fabric/bccsp/factory".FactoryOpts) as type *"github.com/hyperledger/fabric/bccsp/factory".FactoryOpts in argument to "github.com/hyperledger/fabric/bccsp/factory".InitFactories ```

jmcnevin (Fri, 23 Jun 2017 14:03:10 GMT):
Has anyone seen this before.. I'm a little new to golang, so maybe I've set something up incorrectly.

divyank (Fri, 23 Jun 2017 14:34:19 GMT):
@jmcnevin the build is failing because your application contains multiple definitions of BCCSP. One used by fabric-sdk-go, and the other comes from your GOPATH. We handle this by using a tool like `govendor` to flatten these dependencies. After installing the tool, in your application directory, run: `govendor init && govendor add +external`

yyyyyyy9 (Sat, 24 Jun 2017 07:06:32 GMT):
Has joined the channel.

passkit (Sun, 25 Jun 2017 23:00:42 GMT):
``` CreateAndSendTransactionProposal return error: invoke Endorser mypeer.mydomain.com:7051 return error: Error calling endorser 'mypeer.mydomain.com:7051': rpc error: code = Unknown desc = Authorization for getccdata on channel has been denied with error Failed getting local MSP principal during channelless check policy with policy [/Channel/Application/Readers]: [MSP Principal role [/Channel/Application/Readers] not recognized.] - make sure the chaincode my-chaincode has been successfully instantiated and try again ```

passkit (Sun, 25 Jun 2017 23:01:07 GMT):
I'm getting the above error when trying to invoke my CC

passkit (Sun, 25 Jun 2017 23:02:20 GMT):
Should i be doing something in the init to set a policy for the user?

troyronda (Mon, 26 Jun 2017 13:37:13 GMT):
@here the Go SDK has been updated to support 1.0.0 RC1 (and still works with beta).

passkit (Mon, 26 Jun 2017 15:12:56 GMT):
Great. Noticed a potential bug in pkg/fabric-client/events/eventhub.go (259). The regTimeout for the event hub is hardcoded as an int of 5, not a time.Duration. This short timeout may work when testing locally, but over a network, the connection is terminated prematurely. Ideally, this should be configurable, or set to a higher value (E.g. time.Duration(time.Second*5)

troyronda (Mon, 26 Jun 2017 19:43:00 GMT):
yup - in general, I think there should be configurable timeouts (there are other places as well).

muralisr (Mon, 26 Jun 2017 19:43:04 GMT):
Has joined the channel.

muralisr (Mon, 26 Jun 2017 19:43:49 GMT):
@troyronda just pulled the go sdk and going to try a sample

troyronda (Mon, 26 Jun 2017 19:43:58 GMT):
nice :)

muralisr (Mon, 26 Jun 2017 19:44:01 GMT):
thanks!

muralisr (Mon, 26 Jun 2017 19:44:02 GMT):
:-)

troyronda (Mon, 26 Jun 2017 19:44:23 GMT):
There is some refactoring going on to improve go conventions and for code coverage

muralisr (Mon, 26 Jun 2017 19:44:38 GMT):
ok

troyronda (Mon, 26 Jun 2017 19:44:56 GMT):
We'll also post an updated sample that targets RC1 shortly (it's in code review)

muralisr (Mon, 26 Jun 2017 19:50:42 GMT):
`api` provides atomic operations that use and hide protos complexity for manipulating structures directly (channels, msp etc)

muralisr (Mon, 26 Jun 2017 19:50:44 GMT):
?

troyronda (Mon, 26 Jun 2017 20:02:04 GMT):
where did you see that?

muralisr (Mon, 26 Jun 2017 20:16:27 GMT):
@troyronda was just guessing based on names such as `UpdateChannel` and `AddOrderer`

muralisr (Mon, 26 Jun 2017 20:16:50 GMT):
could be totally wrong ?

troyronda (Mon, 26 Jun 2017 20:17:42 GMT):
Oh I see - I thought you were asking about a comment :)

troyronda (Mon, 26 Jun 2017 20:18:21 GMT):
Some of the interfaces are to enable decoupling the folder hierarchy

muralisr (Mon, 26 Jun 2017 20:18:57 GMT):
ah right. I was reading too much into names

troyronda (Mon, 26 Jun 2017 20:19:09 GMT):
yeh - "api" was a three letter folder name :)

muralisr (Mon, 26 Jun 2017 20:19:14 GMT):
thanks... will keep quiet and play with it !

troyronda (Mon, 26 Jun 2017 20:19:30 GMT):
for sure speak up :)

troyronda (Mon, 26 Jun 2017 20:20:05 GMT):
The push is to improve things in the next short while

muralisr (Mon, 26 Jun 2017 20:27:25 GMT):
is there a standalone example by any chance ?

muralisr (Mon, 26 Jun 2017 20:27:25 GMT):
is there a standalone example by any chance (as opposed to a unit test) ?

muralisr (Mon, 26 Jun 2017 20:27:33 GMT):
(just being lazy..)

passkit (Mon, 26 Jun 2017 20:55:14 GMT):
@troyronda so will this be addressed? Because, right now, the SDK is unusable with network

passkit (Mon, 26 Jun 2017 20:55:14 GMT):
@troyronda so will this be addressed? Because, right now, the SDK is unusable with network deployments

troyronda (Mon, 26 Jun 2017 20:56:07 GMT):
@firas.qutishat @divyank ^^^

troyronda (Mon, 26 Jun 2017 20:58:46 GMT):
https://jira.hyperledger.org/browse/FAB-5016

troyronda (Mon, 26 Jun 2017 20:59:51 GMT):
@passkit mentioned the timeout in eventhub.. I also noticed a hard-coded timeout in the peer package (which I marked as a TODO for fixing)

troyronda (Mon, 26 Jun 2017 21:00:21 GMT):
@passkit - created a ticket for timeouts.

troyronda (Mon, 26 Jun 2017 21:02:54 GMT):
@muralisr https://github.com/securekey/fabric-examples/tree/master/fabric-cli

troyronda (Mon, 26 Jun 2017 21:25:02 GMT):
https://github.com/securekey/fabric-examples/tree/master/fabric-cli/ has been updated to target RC1

troyronda (Mon, 26 Jun 2017 21:25:14 GMT):
( @muralisr )

muralisr (Mon, 26 Jun 2017 21:25:45 GMT):
pulling it

snorlaxative (Tue, 27 Jun 2017 06:04:26 GMT):
Has joined the channel.

AlexanderEx123 (Tue, 27 Jun 2017 12:04:01 GMT):
Has joined the channel.

ArvsIndrarys (Tue, 27 Jun 2017 12:43:39 GMT):
Hey guys ! I was just wondering from where could I build the builder image? Or is it already up for an armv7l architecture?

troyronda (Tue, 27 Jun 2017 14:02:57 GMT):
@passkit - yes - we will add a config for timeouts

muralisr (Tue, 27 Jun 2017 20:36:42 GMT):
is github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/fixtures/config/config_test.yaml a good template to follow for config.yaml ?

muralisr (Tue, 27 Jun 2017 20:37:17 GMT):
the `_test` is the reason for the question

KevinBai (Wed, 28 Jun 2017 03:07:00 GMT):
hi, I use putstate to put some date put to the ledger, but I call getstate is nil?

dolanor (Wed, 28 Jun 2017 10:00:33 GMT):
Hello

dolanor (Wed, 28 Jun 2017 10:01:54 GMT):
I checked the test/integration and they all use the enrollement system (if I'm not wrong). Is there an example of use without a live fabric CA, and only using certs and private locally stored?

divyank (Wed, 28 Jun 2017 12:35:15 GMT):
@muralisr Yes, that is the sample configuration provided.

divyank (Wed, 28 Jun 2017 12:35:53 GMT):
@dolanor We have utility methods to load pre-enrolled users. Example here: https://github.com/hyperledger/fabric-sdk-go/blob/85fa3101eb4694d464003c3a900672d632f17833/test/integration/utils.go#L32

dolanor (Wed, 28 Jun 2017 13:01:52 GMT):
thanks divyank, exactly what I needed!

dolanor (Wed, 28 Jun 2017 13:02:05 GMT):
Couldn't find it by myself

wlahti (Wed, 28 Jun 2017 14:04:03 GMT):
Has joined the channel.

jyellick (Wed, 28 Jun 2017 14:23:12 GMT):
Has joined the channel.

jyellick (Wed, 28 Jun 2017 15:11:08 GMT):
Looking at `pkg/util/chain_util.go` I see: ``` func SendInstallCC(client api.FabricClient, channel api.Channel, chainCodeID string, chainCodePath string, chainCodeVersion string, chaincodePackage []byte, targets []api.Peer, deployPath string) error { ``` But the `channel` parameter is unused, presumably because chaincode installs to a peer not to a channel. But I see the integration test trying to pass in a channel. This seems like a mild bug to me?

divyank (Wed, 28 Jun 2017 15:34:42 GMT):
@jyellick Thanks for pointing that out. We are refactoring those utils and will remove the unused parameter.

SDChoi (Wed, 28 Jun 2017 22:52:20 GMT):
Has joined the channel.

rezamt (Thu, 29 Jun 2017 04:24:39 GMT):
Has joined the channel.

troyronda (Thu, 29 Jun 2017 16:46:03 GMT):
FYI - the config has been updated to support a network/consortium structure (https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml provides an example)

dashengSun (Fri, 30 Jun 2017 10:53:55 GMT):
Has joined the channel.

jmcnevin (Fri, 30 Jun 2017 14:22:02 GMT):
dumb question from a golang rookie... I've been able to get as far as calling `channel.QueryInfo()`. I notice that `currentBlockHash` and `previousBlockHash` come back as byte arrays. What would be the best way to cast those values as strings?

jmcnevin (Fri, 30 Jun 2017 14:22:55 GMT):
simply doing something like string(bytes) gives me back something not very pretty

jmcnevin (Fri, 30 Jun 2017 14:25:45 GMT):
nvm, that seems to do the trick: https://github.com/hyperledger/fabric/blob/master/core/chaincode/platforms/java/hash.go#L88

jyellick (Fri, 30 Jun 2017 15:46:28 GMT):
@jmcnevin If you are looking for a slightly more compact encoding, you could also do base64: https://golang.org/pkg/encoding/base64/

rishabh1102 (Mon, 03 Jul 2017 09:28:01 GMT):
Has joined the channel.

ArvsIndrarys (Mon, 03 Jul 2017 09:45:09 GMT):
Hi guys ! I'm attempting to adapt the go sdk for one of my project, and I'm stuck at something. Here's my function : ``` func getChannels(url string) ([]string, error) { chaincodes := make([]string, 0, 5) sunchainconfig, err := config.InitConfig("./config.yaml") if err != nil { return nil, fmt.Errorf("Error while initializing config : %v", err) } client := fabricclient.NewClient(sunchainconfig) cert := "./certificates/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem" hostname := "sunchain_peer0.1.0fc2hscyyhrtwzescfnp8qltj" peer, err := peer.NewPeerTLSFromCert(url, cert, hostname, sunchainconfig) if err != nil { return nil, fmt.Errorf("Couldn't create peer : %v", err) } response, err := client.QueryChannels(peer) if err != nil { return nil, fmt.Errorf("Couldn't query the chaincode : %v", err) } chaincodes = append(chaincodes, response.String()) return chaincodes, nil } ``` When I try to call it in my tests, I get the following error : ` client_test.go:22: Error querying the blockchain: Couldn't query the chaincode : QueryByChaincode return error: CreateTransactionProposal return error: Error getting creator: User is nil ` Thing is, the functions I call don't permit me to specify any user. Any idea on how I could get this through ?

rishabh1102 (Mon, 03 Jul 2017 10:00:13 GMT):
Is there any tutorial available as to how I could use the sdk with the docker setup?

antitoine (Mon, 03 Jul 2017 12:00:26 GMT):
@rishabh1102 I'm working on it. I will publish it at the end of the week (I hope)

jmcnevin (Mon, 03 Jul 2017 13:52:32 GMT):
kind of a go newb here.. can someone help me understand what exactly is happening in this code example? https://github.com/hyperledger/fabric/blob/master/examples/events/block-listener/block-listener.go#L45

jmcnevin (Mon, 03 Jul 2017 13:53:36 GMT):
Not really familiar with that type of syntax: `msg.Event.(*pb.Event_Block)`

rishabh1102 (Mon, 03 Jul 2017 14:19:29 GMT):
@antitoine, I just want to invoke and query an already instantiated chaincode using this

rishabh1102 (Mon, 03 Jul 2017 14:19:32 GMT):
How can I do that

rishabh1102 (Mon, 03 Jul 2017 14:21:00 GMT):
For example, I want to make the equivalent of invoke.js in the fabcar example of fabric-samples

antitoine (Mon, 03 Jul 2017 14:25:37 GMT):
@rishabh1102 the best demonstration for now is the integration test (https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/base_test_setup.go#L218) and the CLI app (https://github.com/securekey/fabric-examples/tree/master/fabric-cli/)

awattez (Mon, 03 Jul 2017 16:03:29 GMT):
Has joined the channel.

rishabh1102 (Mon, 03 Jul 2017 21:35:45 GMT):
Can anyone please explain how I could issue multiple invokes to an instantiated (deployed) chaincode using either nodeJS or Java SDK By multiple invokes, I mean, that they should be issued in parallel, at a frequency of 60Hz At least 60Hz*

zhasni (Tue, 04 Jul 2017 09:06:29 GMT):
Has joined the channel.

habpygo (Tue, 04 Jul 2017 14:10:28 GMT):
Hi @antitoine I'm getting this error when just running `make` in the `/fabric-sdk-go` directory ```spell checker passed Running tests... ? github.com/hyperledger/fabric-sdk-go/api [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apitxn [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apitxn/mocks [no test files] ? github.com/hyperledger/fabric-sdk-go/api/mocks [no test files] ? github.com/hyperledger/fabric-sdk-go/def/fabapi [no test files] # testmain /var/folders/3f/ymhxl5l90qbdlyjlh1x8pbhr0000gn/T/go-build245471937/github.com/hyperledger/fabric-sdk-go/pkg/config/_test/_testmain.go:118: cannot use matchString (type func(string, string) (bool, error)) as type testing.testDeps in argument to testing.MainStart: func(string, string) (bool, error) does not implement testing.testDeps (missing MatchString method) FAIL github.com/hyperledger/fabric-sdk-go/pkg/config [build failed] error: exit status 2 panic: EOF``` What am I doing wrong?

habpygo (Tue, 04 Jul 2017 14:10:28 GMT):
Hi @antitoine I'm getting this error when just running `make` in the `/fabric-sdk-go` directory ```spell checker passed Running tests... ? github.com/hyperledger/fabric-sdk-go/api [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apitxn [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apitxn/mocks [no test files] ? github.com/hyperledger/fabric-sdk-go/api/mocks [no test files] ? github.com/hyperledger/fabric-sdk-go/def/fabapi [no test files] # testmain /var/folders/3f/ymhxl5l90qbdlyjlh1x8pbhr0000gn/T/go-build245471937/github.com/hyperledger/fabric-sdk-go/pkg/config/_test/_testmain.go:118: cannot use matchString (type func(string, string) (bool, error)) as type testing.testDeps in argument to testing.MainStart: func(string, string) (bool, error) does not implement testing.testDeps (missing MatchString method) FAIL github.com/hyperledger/fabric-sdk-go/pkg/config [build failed] error: exit status 2 panic: EOF

antitoine (Tue, 04 Jul 2017 14:23:33 GMT):
@habpygo Do you checkout the last commits ? I made a test (git clone then make) and it works.

habpygo (Tue, 04 Jul 2017 14:40:09 GMT):
I did a `git clone https://gerrit.hyperledger.org/r/fabric-sdk-go` and it gives me the same error + another one now at the beginning. ```fatal: unable to access 'https://github.com/axw/gocov/': Could not resolve host: github.com package github.com/axw/gocov: exit status 1 ``` I tried it again and this failure is gone; however, still this messages that there are no test files and then the one I mentioned earlier.

habpygo (Tue, 04 Jul 2017 14:40:09 GMT):
I did a `git clone https://gerrit.hyperledger.org/r/fabric-sdk-go` and it gives me the same error + another one now at the beginning. ```fatal: unable to access 'https://github.com/axw/gocov/': Could not resolve host: github.com package github.com/axw/gocov: exit status 1 ```

antitoine (Tue, 04 Jul 2017 14:52:55 GMT):
@habpygo sorry, I have no clue what is the problem. Maybe someone else can help you.

habpygo (Tue, 04 Jul 2017 14:53:20 GMT):
OK, thanks anyway.

dolanor (Tue, 04 Jul 2017 16:30:59 GMT):
Hi

dolanor (Tue, 04 Jul 2017 16:31:33 GMT):
I got : ` client_test.go:13: Error quering the blockchain couldn't get the channel: Not implemented yet` while trying to use fabric-sdk-go. But I'm wondering, how are the e2e tests pass then? I guess it is implemented, no?

dolanor (Tue, 04 Jul 2017 16:37:22 GMT):
Found it, in fact, GetChannelInfo is not implemented. You're not using it in the tests…

troyronda (Tue, 04 Jul 2017 16:46:04 GMT):
Thanks for noticing @dolanor - created https://jira.hyperledger.org/browse/FAB-5171

dolanor (Tue, 04 Jul 2017 16:48:27 GMT):
great!

dolanor (Tue, 04 Jul 2017 16:49:45 GMT):
Anyway, I succeeded by using client.NewChannel + channel.AddPeer + channel.SetPrimaryPeer so fabrictxn.QueryChaincode works

dolanor (Tue, 04 Jul 2017 16:50:01 GMT):
but now I'm hitting a timeout, and I don't know where to set it

divyank (Tue, 04 Jul 2017 17:05:11 GMT):
@dolanor Can you point me to the method that returns Not implemented? We have channel info at api/Channel.QueryInfo(). That might be what you're looking for.

troyronda (Tue, 04 Jul 2017 17:27:28 GMT):
@divyank client.go:104

troyronda (Tue, 04 Jul 2017 17:27:49 GMT):
(in pkg/fabric-client)

aneb (Wed, 05 Jul 2017 04:27:20 GMT):
Has joined the channel.

aneb (Wed, 05 Jul 2017 04:39:34 GMT):
Hi, Sorry if this has already been ask but couldn't find it in the search. Is is currently better advised to start from the Base and E2E unit test implementations or I could start from the CLI demo app as well? While going through the code I noticed that while the CLI app targets the rc version, the vendor dependencies are out of sync as a lot of things changed it seems. No more fabric-sdk-go/pkg/util, differentiation between the api folders (before just /api now apifabclient etc). I guess the unit tests have the more up to date implementations? Thanks

cactis (Wed, 05 Jul 2017 06:07:56 GMT):
Has joined the channel.

dolanor (Wed, 05 Jul 2017 10:12:37 GMT):
My timeout disappeared in the night… Now I get a 500 because of wrong parameters passed. I guess I can figure this one out

habpygo (Wed, 05 Jul 2017 11:54:11 GMT):
Hi, Could someone help me with the this problem. Running `make` from the `fabric-sdk-go` folder (cloned from https://github.com/hyperledger/fabric-sdk-go.git), gives me the following errors. ``` Installing dependencies... Checking committed files for SPDX-License-Identifier headers ... All files have SPDX-License-Identifier headers Running linters... Checking ./pkg/config Checking ./pkg/fabric-ca-client Checking ./pkg/fabric-client Checking ./test Checking changed go files for spelling errors ... spell checker passed Running tests... ? github.com/hyperledger/fabric-sdk-go/api/apiconfig [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apiconfig/mocks [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apifabca [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apifabclient [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apitxn [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apitxn/mocks [no test files] ? github.com/hyperledger/fabric-sdk-go/def/fabapi [no test files] # testmain /var/folders/3f/ymhxl5l90qbdlyjlh1x8pbhr0000gn/T/go-build083524085/github.com/hyperledger/fabric-sdk-go/pkg/config/_test/_testmain.go:118: cannot use matchString (type func(string, string) (bool, error)) as type testing.testDeps in argument to testing.MainStart: func(string, string) (bool, error) does not implement testing.testDeps (missing MatchString method) FAIL github.com/hyperledger/fabric-sdk-go/pkg/config [build failed] error: exit status 2 panic: EOF ``` Also running `go test` in the `fabric-sdk-go/test/integration` folder yields the same error. FYI, I can run both the `byfn.sh` and the `fabcar` examples with v:latest. I have no idea what I’m doing wrong. Any help would be appreciated.

habpygo (Wed, 05 Jul 2017 11:54:11 GMT):
Hi, Could someone help me with the this problem. Running `make` from the `fabric-sdk-go` folder (cloned from https://github.com/hyperledger/fabric-sdk-go.git), gives me the following errors. ``` Installing dependencies... Checking committed files for SPDX-License-Identifier headers ... All files have SPDX-License-Identifier headers Running linters... Checking ./pkg/config Checking ./pkg/fabric-ca-client Checking ./pkg/fabric-client Checking ./test Checking changed go files for spelling errors ... spell checker passed Running tests... ? github.com/hyperledger/fabric-sdk-go/api/apiconfig [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apiconfig/mocks [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apifabca [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apifabclient [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apitxn [no test files] ? github.com/hyperledger/fabric-sdk-go/api/apitxn/mocks [no test files] ? github.com/hyperledger/fabric-sdk-go/def/fabapi [no test files] # testmain /var/folders/3f/ymhxl5l90qbdlyjlh1x8pbhr0000gn/T/go-build083524085/github.com/hyperledger/fabric-sdk-go/pkg/config/_test/_testmain.go:118: cannot use matchString (type func(string, string) (bool, error)) as type testing.testDeps in argument to testing.MainStart: func(string, string) (bool, error) does not implement testing.testDeps (missing MatchString method) FAIL github.com/hyperledger/fabric-sdk-go/pkg/config [build failed] error: exit status 2 panic: EOF ``` Also running `go test` in the `fabric-sdk-go/test/integration` folder yields the same Golang error -- the one at the end `matchString`. FYI, I can run both the `byfn.sh` and the `fabcar` examples with v:latest. I have no idea what I’m doing wrong. Any help would be appreciated.

bdufour (Wed, 05 Jul 2017 13:06:02 GMT):
Has joined the channel.

bdufour (Wed, 05 Jul 2017 13:08:48 GMT):
Hi all, I would like to know if the SDK in go is already officially released and supported or when is it planned?

antitoine (Wed, 05 Jul 2017 13:28:35 GMT):
@bdufour the SDK Go support already alpha, apha2, beta and RC1 ;)

troyronda (Wed, 05 Jul 2017 16:30:34 GMT):
@habpygo can you check your Go environment is all good and Go environment variables are all set appropriately (including GOROOT matches your Go version). What go version are you using?

habpygo (Wed, 05 Jul 2017 18:54:00 GMT):
Hi @troyonda, Here are the answers: ```2017-07-05 20:45:11 ⌚ Harrys-MacBook-Pro in / ○ → go version go version go1.7.4 darwin/amd64 ``` And this is my go environment: ```○ → go env GOARCH="amd64" GOBIN="/Users/harryboer/Developer/DappDevelopment/Blockchain_Projects/Gowork/bin" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/harryboer/Developer/DappDevelopment/Blockchain_Projects/Gowork" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/3f/ymhxl5l90qbdlyjlh1x8pbhr0000gn/T/go-build609608093=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1" ```

passkit (Thu, 06 Jul 2017 12:21:06 GMT):
`"github.com/hyperledger/fabric-sdk-go/pkg/fabric-txn/internal"` has some problems with vendoring, due to the use of `internal`. I cannot run with vendored files unless I rename the package. Is there a simpler workaround and if not, would it be possible to rename?

divyank (Thu, 06 Jul 2017 13:34:06 GMT):
@passkit is the 'internal' package not vendored in for you?

divyank (Thu, 06 Jul 2017 13:34:06 GMT):
@passkit is the `internal` package not vendored in for you?

passkit (Thu, 06 Jul 2017 13:35:55 GMT):
@divyank it gets vendored, but it seems like govendor has some issues with packages names 'internal'. There is a similar issue discussed in this thread regarding golang/oauth2 https://github.com/golang/oauth2/issues/178

passkit (Thu, 06 Jul 2017 13:35:55 GMT):
@divyank it gets vendored, but it seems like govendor has some issues with packages named 'internal'. There is a similar issue discussed in this thread regarding golang/oauth2 https://github.com/golang/oauth2/issues/178

passkit (Thu, 06 Jul 2017 13:36:30 GMT):
For now, I have refactored, so I no longer need to access the `internal` package directly.

divyank (Thu, 06 Jul 2017 13:49:04 GMT):
@passkit I believe this is by design. `internal` is a reserved golang package that cannot be accessed from outside. More info here: https://docs.google.com/document/d/1e8kOo3r51b2BWtTs_1uADIA5djfXhPT36s6eHVRIvaU/edit

passkit (Thu, 06 Jul 2017 13:55:16 GMT):
Thanks, that makes sense

antitoine (Thu, 06 Jul 2017 14:03:53 GMT):
Hi, I finished a very simple tutorial that explain bases of the Fabric SDK Go. Because of the lack of documentation, I experienced a lot of difficulties when I started a new project with this SDK. I'm not a Go expert and even less with Hyeperledger Fabric. So I hope this tutorial will help someone: https://github.com/chainHero/heroes-service

antitoine (Thu, 06 Jul 2017 14:10:36 GMT):
The SDK Go is really great, thanks for your work. If you have any suggestions about this tutorial, I'm really open.

passkit (Thu, 06 Jul 2017 14:25:58 GMT):
I have a quick question on the use of multiple peers. I see `setup.Channel.PrimaryPeer()` is used exclusively in the examples to select a peer. What if that peer is unavailable? How to fallback and retry with other peers?

passkit (Thu, 06 Jul 2017 14:29:12 GMT):
@antitoine Just taken a quick look at your tutorial. Having felt similar pain getting started, I am sure it will be very welcome. You might want to check it with the latest version though, as the last few commits have made some radical breaking changes.

antitoine (Thu, 06 Jul 2017 14:38:06 GMT):
@passkit look at this part https://github.com/hyperledger/fabric-sdk-go/blob/3a54d75a9d4734133c41cad3f0198800d25717ac/pkg/fabric-client/channel/txnproposer.go#L127 Like you see, you can provide an array of peer and for each peer given, a request is made. So I think that if a peer doesn't answer, this is not an issue. Thanks for the feedback, I will try to update the tutorial.

passkit (Thu, 06 Jul 2017 14:40:20 GMT):
@antitoine - I'm not sure that is ideal though, in that it generates extra and unnecessary traffic by sending to all peers each time.

antitoine (Thu, 06 Jul 2017 14:42:56 GMT):
@passkit You can choose to just give one peer (array of size one) when you send the proposal and switch to another peer if there is a timeout or an error. But by sending to every peers given, It's the best way to get a quick response.

passkit (Thu, 06 Jul 2017 14:44:48 GMT):
That was my conclusion - although, I was hoping that the SDK would be able to automate that, given that the peers are readily available.

antitoine (Thu, 06 Jul 2017 14:55:42 GMT):
Maybe the SDK already implements a kind of failure detector? I don't know. But I think it's possible to keep a list of available peers and remove one during a period of time if it doesn't answer. The SDK can ask randomly to two or three peers from this list. I think that this is the best compromise.

passkit (Thu, 06 Jul 2017 15:02:24 GMT):
I see that for queries, the primary peer is hardcoded into `fabrixtxn.QueryChaincode`

passkit (Thu, 06 Jul 2017 15:05:47 GMT):
With `CreateAndSendTransactionProposal` now being contained within the internal package, the only option to specify a different peer for queries seems to be to build custom `CreateAndSendTransactionProposal` function

passkit (Thu, 06 Jul 2017 15:05:47 GMT):
With `CreateAndSendTransactionProposal` now being contained within the internal package, the only option to specify a different peer for queries seems to be to build a custom `CreateAndSendTransactionProposal` function

jrui (Fri, 07 Jul 2017 07:25:52 GMT):
Has joined the channel.

tedljw (Fri, 07 Jul 2017 08:11:53 GMT):
Hi, I would like to ask, how is the file in the folder fixtures/channl/crypto-config generated, and how is the corresponding crypto-config.yaml configuration file. how is the file in the folder fixtures/tls/fabricca generated?

KevinBai (Fri, 07 Jul 2017 08:15:52 GMT):
use the configtxgen tool @tedljw

KevinBai (Fri, 07 Jul 2017 08:18:18 GMT):
you can refer to the script "generateArtifacts.sh" in example

troyronda (Fri, 07 Jul 2017 13:29:43 GMT):
hi @antitoine - awesome tutorial .. thanks for doing this!

troyronda (Fri, 07 Jul 2017 13:30:36 GMT):
@passkit @antitoine - yes, there is some ongoing refactoring to improve the API surface (so that we can settle down as soon as possible)

troyronda (Fri, 07 Jul 2017 13:30:46 GMT):
if you have suggestions, please post

troyronda (Fri, 07 Jul 2017 13:31:31 GMT):
the intention of the fabric-txn is to make getting started easier, but this is taking several iterations to accompish

troyronda (Fri, 07 Jul 2017 13:35:05 GMT):
@passkit on the use of multiple peers - probably adding a targets option similar to Node SDK

troyronda (Fri, 07 Jul 2017 13:35:30 GMT):
(if nothing is passed, default is used otherwise the specific target)

antitoine (Fri, 07 Jul 2017 13:46:03 GMT):
@troyronda Thanks! From my point of view, this is the easiest SDK in order to use Fabric. So I hope this will increase the number of people using it and reward your great work!

troyronda (Fri, 07 Jul 2017 20:03:51 GMT):
The latest commit separates the chaincode function name from the arguments

troyronda (Fri, 07 Jul 2017 20:03:51 GMT):
The latest commits separates the chaincode function name from the arguments

troyronda (Fri, 07 Jul 2017 20:04:06 GMT):
The new parameter is fcn

troyronda (Fri, 07 Jul 2017 20:04:44 GMT):
At the lower layer (in pkg/fabric-client), a struct can now be provided with the invoke arguments

troyronda (Fri, 07 Jul 2017 20:04:44 GMT):
At the lower layer (in pkg/fabric-client), a struct can now be provided with the invoke parameters and arguments

troyronda (Fri, 07 Jul 2017 20:05:11 GMT):
I'm now thinking about the fabric-txn package structure

troyronda (Fri, 07 Jul 2017 20:08:06 GMT):
And a return value of type TransactionID is now provided (used to be a string type - this is now moved to the ID field along with nonce)

troyronda (Fri, 07 Jul 2017 20:09:49 GMT):
Getting closer... :)

troyronda (Fri, 07 Jul 2017 20:10:55 GMT):
Also test coverage is now increased. You can see the current status here: https://jira.hyperledger.org/browse/FAB-4694

troyronda (Fri, 07 Jul 2017 20:10:55 GMT):
Also unit test coverage is now increased. You can see the current status here: https://jira.hyperledger.org/browse/FAB-4694

troyronda (Fri, 07 Jul 2017 20:11:43 GMT):
@here ^^

paul.sitoh (Sat, 08 Jul 2017 18:34:45 GMT):
Has joined the channel.

passkit (Sun, 09 Jul 2017 07:59:51 GMT):
Is there any way to set the hosts (SANs) for a newly registered/enrolled ca user?

passkit (Sun, 09 Jul 2017 08:27:21 GMT):
@troyronda - any reason why the TransactionID is not returned from fabtictxn InvokeChaincode? When integrating with 3rd party systems, this would be useful info for audit purposes.

troyronda (Sun, 09 Jul 2017 11:06:04 GMT):
hi @passkit - no reason, just havent gotten into the package's refactoring

passkit (Sun, 09 Jul 2017 11:07:13 GMT):
Also just found that for CA Enrollment it is impossible to set the CSR. This makes it impossible to set an OU and means that the certificate cannot be used as fabric now validates the OU

troyronda (Sun, 09 Jul 2017 11:07:16 GMT):
ill put it on the list

passkit (Sun, 09 Jul 2017 11:08:10 GMT):
Thanks - (assume you are referring to the txID here, not the enrollemnt issue)

troyronda (Sun, 09 Jul 2017 11:09:40 GMT):
i was. the enrollmemt issue is interesting .. we will need to ensure that ou can be enrolled.

passkit (Sun, 09 Jul 2017 11:15:40 GMT):
For now, I'm getting by by modifying the function to accept a CSR. I can think of several reasons why I would like full control over the CSR, as the subject parameters can vary greatly.

passkit (Sun, 09 Jul 2017 11:18:54 GMT):
As a general rule, if the Hyperledger Fabric APIs allow a parameter, it should be accessible via the SDK. I keep stumbling across omissions which is making the SDK a little painful to use.

hhxiao (Mon, 10 Jul 2017 06:58:13 GMT):
Has joined the channel.

troyronda (Mon, 10 Jul 2017 20:17:55 GMT):
TransactionID is now returned

habpygo (Tue, 11 Jul 2017 05:58:27 GMT):
Hi @troyronda, you were right! There was a version problem with Go. Strange though, because running `go version` it gave me 1.8, but running `which go ` and then looking at the resulting directory `cat VERSION` gave me 1.7. Anyway, thanks. Here the problem + solution is spelled out https://stackoverflow.com/questions/42952979/go-version-command-shows-old-version-number-after-update-to-1-8

troyronda (Tue, 11 Jul 2017 12:02:03 GMT):
awesome.

AlexanderEx123 (Tue, 11 Jul 2017 13:32:54 GMT):
Hello! Does anybody know to get events from peers started from N block? And if it possible in current sdk ?

troyronda (Tue, 11 Jul 2017 19:32:47 GMT):
@here - the change to support 1.0.0 has been merged.

babedev (Wed, 12 Jul 2017 03:12:43 GMT):
Has joined the channel.

sai_ganesh (Wed, 12 Jul 2017 05:19:15 GMT):
Has joined the channel.

mavericklam (Thu, 13 Jul 2017 10:35:29 GMT):
Has joined the channel.

leoleo (Thu, 13 Jul 2017 16:01:23 GMT):
Has joined the channel.

aleksandar.likic (Thu, 13 Jul 2017 20:04:07 GMT):
Has joined the channel.

vishalgupta96 (Sat, 15 Jul 2017 11:39:43 GMT):
Has joined the channel.

vishalgupta96 (Sat, 15 Jul 2017 11:39:51 GMT):
Hello.... I am facing some issues in converting the byte array into Go object using json.Unmarshal([]byte(JSONInput), &GoObject).... but GoObject is showing null value is there any issue in the syntax? or anyone can help me with the resolution?

ziyuan (Sun, 16 Jul 2017 08:05:35 GMT):
Has joined the channel.

mastersingh24 (Sun, 16 Jul 2017 09:28:38 GMT):
@troyronda - Can someone have a look at https://jira.hyperledger.org/browse/FAB-3624?

passkit (Mon, 17 Jul 2017 03:10:44 GMT):
The `TransactionProposalError` error type is extremely verbose. Currently I need to implement a parser to get the raw response from fabric. These messages are great for debugging, but in a production environment, it is expected that not all transactions will be endorsed, and it should be easier to access the rejection reason.

passkit (Mon, 17 Jul 2017 03:13:47 GMT):
@mastersingh24 I think that it has already been implemented. I am using the SDK with multiple CAs and I can configure the individual CA name in the config file.

passkit (Mon, 17 Jul 2017 03:13:47 GMT):
@mastersingh24 I think that it has already been implemented. I am using the SDK with multiple CAs and I can specify the individual CA name in the config file.

passkit (Mon, 17 Jul 2017 04:17:01 GMT):
`InvokeChaincode` currently only returns a txID and an error. The proposal response is dropped. Is there a reason for this? Currently, I need to invoke chaincode, then query the chain to determine the new asset value. This is inefficient and not reliable since the block may not have yet propagated to the peer.

ranjan008 (Mon, 17 Jul 2017 07:12:03 GMT):
Has joined the channel.

mastersingh24 (Mon, 17 Jul 2017 07:57:39 GMT):
[That was my take as well ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gBEJSBtt3HuGMMK4G) @passkit

troyronda (Mon, 17 Jul 2017 12:43:57 GMT):
@passkit - that helper function needs some refactoring anyways, probably an oversight

troyronda (Mon, 17 Jul 2017 12:43:57 GMT):
@passkit - that helper function needs some refactoring anyways, maybe an oversight

passkit (Mon, 17 Jul 2017 13:14:48 GMT):
Have created a Jira issue https://jira.hyperledger.org/browse/FAB-5337

aleksandar.likic (Mon, 17 Jul 2017 15:27:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NLPJKwQSa49nLxF4P) @mastersingh24 It was done when we migrated to 1.0.0-alpha

troyronda (Mon, 17 Jul 2017 16:09:55 GMT):
welcome back to rocket chat :)

troyronda (Mon, 17 Jul 2017 16:09:55 GMT):
@aleksandar.likic welcome back to rocket chat :)

troyronda (Mon, 17 Jul 2017 18:00:28 GMT):
@passkit - i took a look - yes - refactoring is needed on the helpers.

troyronda (Mon, 17 Jul 2017 18:56:51 GMT):
@passkit - https://gerrit.hyperledger.org/r/#/c/11663/ is merged

troyronda (Mon, 17 Jul 2017 23:05:54 GMT):
Fabric CLI example has been updated for 1.0

troyronda (Mon, 17 Jul 2017 23:05:58 GMT):
https://github.com/securekey/fabric-examples/tree/master/fabric-cli

jrui (Tue, 18 Jul 2017 03:42:57 GMT):
@troyronda fabric-sdk-go can't support tls where the fabric v1.00 release have update to , the v1.0 relase cryptogen tools generate file can't use by fabric-sdk-go

jrui (Tue, 18 Jul 2017 03:44:36 GMT):
@troyronda how can we to solve it or where can we get cryptogen tools for fabric-sdk-go

TrucNguyen (Tue, 18 Jul 2017 07:38:19 GMT):
Has joined the channel.

habpygo (Tue, 18 Jul 2017 08:59:37 GMT):
Hi @antitoine, I went through your tutorial. In one word, fantastic! Thanks a lot.

antitoine (Tue, 18 Jul 2017 09:03:53 GMT):
@habpygo Thank you :grinning:

RanjanBanerjee (Tue, 18 Jul 2017 13:47:30 GMT):
Has joined the channel.

divyank (Tue, 18 Jul 2017 14:19:47 GMT):
@jrui I've used fabric's crytogen certs with the SDK. Is there something specific that goes wrong for you?

jrui (Wed, 19 Jul 2017 01:31:54 GMT):
@divyank we compare sdk-go version (left) and fabric V1.0 release (right) (see the picture) , the certs file name and directory have a lot of change , we meet ca error when we add org and peer which use the V1.0 release fabric's crytogen tool generate file

jrui (Wed, 19 Jul 2017 01:33:24 GMT):

Message Attachments

jrui (Wed, 19 Jul 2017 03:30:45 GMT):
@divyank i have solve it, just modify "fabric-sdk-go\test\integration\utils.go"

jrui (Wed, 19 Jul 2017 03:31:00 GMT):

Message Attachments

jrui (Wed, 19 Jul 2017 03:31:22 GMT):
left is new

noursaadallah (Wed, 19 Jul 2017 09:18:47 GMT):
@antitoine Thank you for the tutorial But when i run docker-compose up in the fixtures repository i get the following error : ERROR : The compose file './docker-compose.yaml' is invalid because : Additional propoerties are not allowed ('image' was not expected) Do you have any idea what did i do wrong?

antitoine (Wed, 19 Jul 2017 09:20:06 GMT):
@noursaadallah Strange, can you give me the docker-compose version : `docker-compose version`

noursaadallah (Wed, 19 Jul 2017 09:21:43 GMT):
docker-compose version 1.14.0, build c7bdf9e docker-py version: 2.3.0 CPython version: 2.7.13 OpenSSL version: OpenSSL 1.0.1t 3 May 2016

noursaadallah (Wed, 19 Jul 2017 09:21:43 GMT):
@antitoine docker-compose version 1.14.0, build c7bdf9e docker-py version: 2.3.0 CPython version: 2.7.13 OpenSSL version: OpenSSL 1.0.1t 3 May 2016

antitoine (Wed, 19 Jul 2017 09:24:01 GMT):
I have an older version, I will try to upgrade and tell you if this error come from there

noursaadallah (Wed, 19 Jul 2017 09:29:51 GMT):
@antitoine Thank you but i corrected the error : when copy paste the docker-compose.yaml file the last line (starts with image) was at the root and not under "builder", my bad

antitoine (Wed, 19 Jul 2017 09:30:57 GMT):
Cool, happy that you fix your issue ;)

rangak (Thu, 20 Jul 2017 14:17:53 GMT):
Has joined the channel.

rohitrocket (Fri, 21 Jul 2017 07:30:22 GMT):
Has joined the channel.

paul.sitoh (Fri, 21 Jul 2017 08:07:51 GMT):
Polling: Why develop in Go over other language?

paul.sitoh (Fri, 21 Jul 2017 08:07:51 GMT):
Polling: Why develop in fabric go sdk over other language?

habpygo (Fri, 21 Jul 2017 08:15:44 GMT):
Hi @paul.sitoh, I think you should turn the question around. Since Hyperledger Fabric uses the Go programming language for many of its components (https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html#go-programming-language) and Chaincode is written in Go as well, one wonders why one should develop in other languages than Go. I don’t have an answer for this other than guessing that more people are using, for example, Node.js instead of Golang.

habpygo (Fri, 21 Jul 2017 08:15:44 GMT):
Hi @paul.sitoh, I think you should turn the question around. Since Hyperledger Fabric uses the Go programming language for many of its components (https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html#go-programming-langua) and Chaincode is written in Go as well, one wonders why one should develop in other languages. I don’t have an answer for this other than guessing that more people are using, for example, Node.js instead of Golang.

paul.sitoh (Fri, 21 Jul 2017 10:02:29 GMT):
@habpygo Just trying to get a sense of why Go. The justification I hear so often is it is hard and therefore use others. Or Javascript has more user based so we should use that

paul.sitoh (Fri, 21 Jul 2017 10:02:29 GMT):
@habpygo Just getting a sense of why Go. The justification I hear so often is it is hard and therefore use others. Or Javascript has more user based so we should use that

paul.sitoh (Fri, 21 Jul 2017 10:04:18 GMT):
So far no one making argument on the lines of right tools for right job

paul.sitoh (Fri, 21 Jul 2017 10:05:33 GMT):
I stumbled on Go and recently test this and found it surprising faster than let's say others.

paul.sitoh (Fri, 21 Jul 2017 10:06:04 GMT):
Unfortunately not an approved kit for my org

indirajith (Fri, 21 Jul 2017 10:22:52 GMT):
Has joined the channel.

habpygo (Fri, 21 Jul 2017 10:38:13 GMT):
@paul.sitoh we’re entering the concept of subjectivity here, but I’ll give it a try … Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine or, otherwise stated, Node.js combined Google's V8 JavaScript engine, an event loop and a low-level I/O API. Golang was created by Google; I guess not because they were so madly in love with Node.js. Yes Go is super fast, and no as I stated before, I do not know why Golang is not pushed more in/by the Hyperledger Fabric community. I don’t think Golang is difficult to learn; however, if you search for an answer re- Go programming there is a little bit more effort involved since the user base is less. Having said this, if you go to the site https://forum.golangbridge.org/ your question will be answered quickly. If you want to try the Fabric-SDK-Go, why don’t you have a look at @antitoine ’s tutorial at https://github.com/chainHero/heroes-service and see for yourself how efficient it is doing all the work in just one Go (yeah, yeah pun intended).

paul.sitoh (Fri, 21 Jul 2017 10:52:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=eYmuwzq5oxmj8pXzt) @habpygo don't get me wrong. Having been exposed to Go I am appreciating it's merit. I am not an advance user but still can't understand why the complain.

paul.sitoh (Fri, 21 Jul 2017 10:52:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=eYmuwzq5oxmj8pXzt) @habpygo don't get me wrong. Having been exposed to Go I am appreciating it's merit.

enrico_zanardo (Fri, 21 Jul 2017 12:56:44 GMT):
Has joined the channel.

Elguana (Fri, 21 Jul 2017 21:01:42 GMT):
Hi. Is anyone familiair with the below error? $ go get github.com/hyperledger/fabric-sdk-go/pkg/fabric-client # github.com/hyperledger/fabric-sdk-go/vendor/github.com/miekg/pkcs11 C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lltdl C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lltdl collect2.exe: error: ld returned 1 exit status

Elguana (Fri, 21 Jul 2017 21:02:03 GMT):
And has any idea how to resolve it?

chifalcon (Sat, 22 Jul 2017 02:45:34 GMT):
Has joined the channel.

ptone (Sun, 23 Jul 2017 05:07:30 GMT):
Has joined the channel.

vdods (Sun, 23 Jul 2017 21:44:39 GMT):
Yes, you have to install libltdl

vdods (Sun, 23 Jul 2017 21:44:39 GMT):
@Elguana Yes, you have to install libltdl

vdods (Sun, 23 Jul 2017 21:51:37 GMT):
@paul.sitoh My sense is that the people who think "golang is hard" are javascript-only developers who aren't used to statically-typed languages. And because the JS ecosystem is so huge, it makes golang seem small, which it really isn't. In the grand scheme of things, golang is a very simple and easy language to use (compare to C, C++, Java, Haskell, etc), and is designed that way even at the expense of some programming language constructs that were deemed "too complicated for many people" (for example, exceptions and generics).

vdods (Sun, 23 Jul 2017 21:52:52 GMT):
Furthermore, the fact that golang is statically type checked means that the compiler is doing more work for you -- disallowing malformed operations, as well as producing faster code.

vdods (Sun, 23 Jul 2017 22:54:55 GMT):
I tried to follow the README directions from github.com/hyperledger/fabric-sdk-go to try out the latest version but got compile error(s): ```Starting fabric and fabric-ca docker images... Running tests... Creating network "fixtures_default" with the default driver Creating ca_peerOrg2 Creating ca_peerOrg1 Creating orderer.example.com Creating fixtures_builder_1 pkg/fabric-client/peer/peerendorser.go:10:2: cannot find package "context" in any of: /home/vdods/files/gopath/src/github.com/hyperledger/fabric-sdk-go/vendor/context (vendor tree) /usr/lib/go-1.6/src/context (from $GOROOT) /home/vdods/files/gopath/src/context (from $GOPATH) error: exit status 1 panic: EOF goroutine 1 [running]: panic(0x545960, 0xc82000a1e0) /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6 main.main() /home/vdods/files/gopath/src/github.com/AlekSi/gocov-xml/gocov-xml.go:60 +0x177 Makefile:48: recipe for target 'unit-test' failed make: *** [unit-test] Error 2 make: *** Waiting for unfinished jobs.... ```

vdods (Sun, 23 Jul 2017 22:57:27 GMT):
Ah, this appears to be a result of the differences between go 1.6 and 1.7.. in 1.7 "context" is a standard lib. Is it intentional that fabric-sdk-go requires go 1.7?

aberfou (Mon, 24 Jul 2017 07:31:55 GMT):
Has joined the channel.

rohitrocket (Mon, 24 Jul 2017 09:25:42 GMT):
Hi all I am planning to use fabric-sdk-go along with reactjs for front end....any pointer or tutorial for it ?

antitoine (Mon, 24 Jul 2017 09:55:42 GMT):
Check out this tutorial https://github.com/chainHero/heroes-service (at the end, there is an example using web interface)

rohitrocket (Mon, 24 Jul 2017 09:55:59 GMT):
I have downloaded it and ran it successfully @antitoine

rohitrocket (Mon, 24 Jul 2017 09:56:50 GMT):
:) but I am afraid to get many errors which may take a long time to get resolved since the user base of go sdk is small in comparison to node sdk.

rohitrocket (Mon, 24 Jul 2017 09:57:48 GMT):
by the way how to integrate react in your tutorial ? there are folders as assets controllers etc....

rohitrocket (Mon, 24 Jul 2017 09:58:05 GMT):
@antitoine Any idea ?

antitoine (Mon, 24 Jul 2017 10:02:35 GMT):
@rohitrocket Search for framework for the Web environment in Go (like Revel), but maybe in your case the Node SDK is more appropriate if you are not familiar using Go. For now, I have only build simple web application with Go, so I'm not an expert

rohitrocket (Mon, 24 Jul 2017 10:03:23 GMT):
Sure @antitoine :)

howardhou (Tue, 25 Jul 2017 01:41:25 GMT):
Has joined the channel.

zemtsov (Tue, 25 Jul 2017 15:36:21 GMT):
Has joined the channel.

paul.sitoh (Tue, 25 Jul 2017 17:55:26 GMT):
@antitoine a message to say you did a fantastic job your tutorial.

bmatsuo (Tue, 25 Jul 2017 18:41:36 GMT):
Do other people have as much trouble with `govendor` as my team?

bmatsuo (Tue, 25 Jul 2017 18:43:00 GMT):
We have been trying to update fabric-sdk-go to a newer commit and it has taken what feels to us like a large effort to actually do correctly

bmatsuo (Tue, 25 Jul 2017 18:46:08 GMT):
Even outside of fabric-sdk-go govendor has not been a good experience, but we are somewhat forced to used it because the fabric sdk requires that `vendor/` directories be flattened/merged afaik.

vinitesh (Tue, 25 Jul 2017 18:48:20 GMT):
Has joined the channel.

vinitesh (Tue, 25 Jul 2017 18:53:22 GMT):
Hello , Is there an example of creating api server using go sdk. Same as of balanceTransfer example for nodejs sdk?

howardhou (Wed, 26 Jul 2017 09:00:54 GMT):
Has left the channel.

AlexanderEx123 (Wed, 26 Jul 2017 11:59:02 GMT):
./main.go:142: cannot use func literal (type func(string, "github.com/hyperledger/fabric/protos/peer".TxValidationCode, error)) as type func(string, "github.com/hyperledger/fabric-sdk-go/vendor/github.com/hyperledger/fabric/protos/peer".TxValidationCode, error) in argument to eventHub.RegisterTxEvent why TxValidationCode is vendored in func RegisterTxEvent? How can I call it from my code?

bmatsuo (Wed, 26 Jul 2017 17:56:34 GMT):
@AlexanderEx123 this is related to what I was talking about yesterday when I posted about `govendor` in this channel

bmatsuo (Wed, 26 Jul 2017 17:56:41 GMT):
afaik

bmatsuo (Wed, 26 Jul 2017 17:57:08 GMT):
you need to use the `govendor` tool to vendor the fabric-sdk-go because it "flattens" all nested vendor directories

bmatsuo (Wed, 26 Jul 2017 17:57:39 GMT):
so the github.com/hyperledger/fabric/... packages your codes uses will become the same as the one used by fabric-sdk-go

bmatsuo (Wed, 26 Jul 2017 17:57:39 GMT):
so the github.com/hyperledger/fabric/protos/peer package your codes uses will become the same as the one used by fabric-sdk-go

bmatsuo (Wed, 26 Jul 2017 17:58:31 GMT):
govendor is the only dependency tool I have seen which attempts flattening to resolve these diamond dependency problems

mescoba1 (Wed, 26 Jul 2017 18:50:53 GMT):
Has joined the channel.

mescoba1 (Wed, 26 Jul 2017 18:51:42 GMT):
I'm having an issue when I `make`

mescoba1 (Wed, 26 Jul 2017 18:52:13 GMT):
In the `check_lint.sh` it says `golint command not found`

mescoba1 (Wed, 26 Jul 2017 18:52:32 GMT):
Is there a problem with my path?

bmatsuo (Wed, 26 Jul 2017 22:36:44 GMT):
I'm having trouble adapting the fabric-sdk-go integration test configuration (`test/fixtures/config/config_test.yaml`) to my own project. When I call the event hub `Connect()`method I get the following error back > Error from eventsClient.Start (rpc error: code = Unknown desc = event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1MSP, received peerorg1]]

bmatsuo (Wed, 26 Jul 2017 22:37:02 GMT):
I can't really figure out how my project gets this error when the integration tests do not

bmatsuo (Wed, 26 Jul 2017 22:37:39 GMT):
As far as I can tell the peer containers for the integration tests are configured to have MSP ID Org1MSP, but somehow they do not reject the event message on `Connect()`

bmatsuo (Wed, 26 Jul 2017 22:37:51 GMT):
Does anyone have any insight to this error?

divyank (Thu, 27 Jul 2017 00:00:46 GMT):
@bmatsuo `EventHub.Connect()` uses `client.UserContext.Identity` to sign requests. You can check to make sure that your `User.MSPID` is set to what the peer expects

troyronda (Thu, 27 Jul 2017 00:07:50 GMT):
@mescoba1 you need the gopath bin directory in your path

troyronda (Thu, 27 Jul 2017 00:08:13 GMT):
eg, export PATH=$GOPATH/bin:$PATH

rohitrocket (Thu, 27 Jul 2017 06:34:26 GMT):

Message Attachments

rohitrocket (Thu, 27 Jul 2017 06:34:41 GMT):
@divyank @antitoine anyone ?

AlexanderEx123 (Thu, 27 Jul 2017 07:27:07 GMT):
@rohitrocket use govendor, see my problem yesterday

rohitrocket (Thu, 27 Jul 2017 07:27:38 GMT):
Resolved :p using govendor

rohitrocket (Thu, 27 Jul 2017 07:27:41 GMT):
thanks

rohitrocket (Thu, 27 Jul 2017 07:32:59 GMT):

Message Attachments

rohitrocket (Thu, 27 Jul 2017 07:33:06 GMT):
@AlexanderEx123

AlexanderEx123 (Thu, 27 Jul 2017 07:34:38 GMT):
your key store is read only

antitoine (Thu, 27 Jul 2017 07:58:17 GMT):
@rohitrocket Read the error, in general this give you the problem that you can try to solve

rohitrocket (Thu, 27 Jul 2017 08:12:07 GMT):
@AlexanderEx123 so how do I change it from read only to something else ?

antitoine (Thu, 27 Jul 2017 08:16:03 GMT):
@rohitrocket `sudo chown -R rocket:rocket ` to own the directory/file

rohitrocket (Thu, 27 Jul 2017 08:16:33 GMT):
ok let me do it

rohitrocket (Thu, 27 Jul 2017 08:21:50 GMT):
@antitoine Actually I am using the API provided by fabric-sdk-go itself... unable to figure out the exact directory of keystore file they are using.

antitoine (Thu, 27 Jul 2017 08:24:55 GMT):
If you have used example provide in Fabric SDK Go, the KeyStore is in `/tmp/msp` see: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L23

antitoine (Thu, 27 Jul 2017 08:26:06 GMT):
You can also re-initialise your environment by removing the directory

rohitrocket (Thu, 27 Jul 2017 08:30:52 GMT):
I think its somewhere other than /tmp/msp place.

rohitrocket (Thu, 27 Jul 2017 08:31:00 GMT):
Still getiing the error @antitoine

rohitrocket (Thu, 27 Jul 2017 08:31:11 GMT):
even after removing the directory

rohitrocket (Thu, 27 Jul 2017 08:33:41 GMT):

Message Attachments

rohitrocket (Thu, 27 Jul 2017 09:03:05 GMT):
@antitoine do you know anyone here who is a part of fabric-sdk-go developers community ?

antitoine (Thu, 27 Jul 2017 09:06:26 GMT):
First, try to call `InitFactories()` like in test integration (https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/fabric_ca_test.go#L67) to avoid warning

rohitrocket (Thu, 27 Jul 2017 09:28:07 GMT):
Warning won't cause any problems. That can be ignored.

rohitrocket (Thu, 27 Jul 2017 09:28:44 GMT):
@here does anyone have any idea ?

zhasni (Thu, 27 Jul 2017 09:29:31 GMT):
yes ! stop using @ here ^^

antitoine (Thu, 27 Jul 2017 09:35:50 GMT):
@rohitrocket A good practice is to avoid any warning and error in your program. If you call `InitFactories()` you will maybe set correctly the KeyStore and avoid the next error. You also can post your issue on stackoverflow.

rohitrocket (Thu, 27 Jul 2017 10:50:54 GMT):
@antitoine how do I make sure that the myconfiguration is good enough to run initfactories().

rohitrocket (Thu, 27 Jul 2017 10:50:56 GMT):
?

rohitrocket (Thu, 27 Jul 2017 10:52:03 GMT):
I mean how do I set the proper keystore. The link which you provided there was a function.... CSPConfig() "what exactly should be returned by this function ?

rohitrocket (Thu, 27 Jul 2017 10:52:16 GMT):
Any idea or pointer to how you did this in your tutorial

AlexanderEx123 (Thu, 27 Jul 2017 11:02:30 GMT):
anybody have trouble with sending transaction in same time? Im trying to send 2 transaction via sdk in same time, and got this error: 2017/07/27 13:07:27 invoke Error received from eventhub for txid({a539c247cfec4dce140978c4dfbf6ca6b188909fee81cf25e429bc2fdb973cc1 �;��C�A#a ���]�\���2��}), error(Received invalid transaction from channel mychannel) In fabric logs i see this: peer0.org1.example.com | 2017-07-27 10:07:27.854 UTC [statevalidator] ValidateAndPrepareBatch -> WARN 4cac Block [34] Transaction index [1] TxId [a539c247cfec4dce140978c4dfbf6ca6b188909fee81cf25e429bc2fdb973cc1] marked as invalid by state validator. Reason code [11]

AlexanderEx123 (Thu, 27 Jul 2017 11:02:30 GMT):
anybody have trouble with sending more than one transaction in same time? Im trying to send 2 transaction via sdk in same time, and got this error: 2017/07/27 13:07:27 invoke Error received from eventhub for txid({a539c247cfec4dce140978c4dfbf6ca6b188909fee81cf25e429bc2fdb973cc1 �;��C�A#a ���]�\���2��}), error(Received invalid transaction from channel mychannel) In fabric logs i see this: peer0.org1.example.com | 2017-07-27 10:07:27.854 UTC [statevalidator] ValidateAndPrepareBatch -> WARN 4cac Block [34] Transaction index [1] TxId [a539c247cfec4dce140978c4dfbf6ca6b188909fee81cf25e429bc2fdb973cc1] marked as invalid by state validator. Reason code [11]

paul.sitoh (Thu, 27 Jul 2017 12:46:47 GMT):
@antitoine and others I am trying to get some feedback on how best to help people who are new to Go to quickly setup a workspace that they can do chaincode dev, test and the deploy easily. Kind of end to end. It should be easy to setup but not be so restricted to put off advanced users.

paul.sitoh (Thu, 27 Jul 2017 12:46:47 GMT):
I have cconsidered using docker or provide some scaffolding app. What would be your advised?

rohitrocket (Thu, 27 Jul 2017 12:54:15 GMT):
Using Docker @paul.sitoh

rohitrocket (Thu, 27 Jul 2017 13:14:35 GMT):
@antitoine the problem I was facing is resolved.

antitoine (Thu, 27 Jul 2017 13:22:09 GMT):
@paul.sitoh The easiest is Docker for now because Fabric use it to separate channels. @rohitrocket where the issue came from ?

rohitrocket (Thu, 27 Jul 2017 13:57:29 GMT):
@antitoine in the initialization of a struct from configuration file (yaml)

rohitrocket (Thu, 27 Jul 2017 13:57:44 GMT):
I haven't initialized it...just declared it !

rohitrocket (Thu, 27 Jul 2017 13:59:03 GMT):
@antitoine by the way man further I also want to write functions for creating channels and adding/removing organization to channel.....adding/removing peers to organization....

rohitrocket (Thu, 27 Jul 2017 13:59:44 GMT):
Do you have any pointers to online tutorial which I can use ? so that I can proceed accordingly without getting into errors.

antitoine (Thu, 27 Jul 2017 14:11:36 GMT):
@rohitrocket No I haven't seen something like that

rohitrocket (Thu, 27 Jul 2017 14:12:32 GMT):
okay cool !

rohitrocket (Thu, 27 Jul 2017 15:07:28 GMT):
@antitoine in your tutorial, where does this come from ?** fcutil "github.com/hyperledger/fabric-sdk-go/pkg/util" ***

rohitrocket (Thu, 27 Jul 2017 15:08:02 GMT):
in the fabric-sdk-go repo there is no such folder within pkg folder

antitoine (Thu, 27 Jul 2017 15:08:44 GMT):
@rohitrocket Maybe it's an old Fabric SDK Go package that doesn't exist anymore. See the installation part, I choose to checkout a specific commit level to avoid issue with update

antitoine (Thu, 27 Jul 2017 15:08:58 GMT):
I need to update the tutorial

rohitrocket (Thu, 27 Jul 2017 15:09:56 GMT):
yeah !

bmatsuo (Thu, 27 Jul 2017 16:50:48 GMT):
@divyank Thanks for the response to my question. After checking, and confirming that `client.UserContext().MspID()`is set to "peerorg1" as the error message I posted suggests. I am still confused. The only place "peerorg1" shows up in my project is in the sdk's yaml configuration as an item `network.organizations`. But, `network.organizations.peerorg1.mspID` is set to "Org1MSP". So why is the client using "peer1org" as its MspID?

bmatsuo (Thu, 27 Jul 2017 16:50:48 GMT):
@divyank Thanks for the response to my question. After checking, and confirming that `client.UserContext().MspID()`is set to "peerorg1" as the error message I posted suggests. I am still confused. The only place "peerorg1" shows up in my project is in the sdk's yaml configuration as an item `client.network.organizations`. But, `client.network.organizations.peerorg1.mspID` is set to "Org1MSP". So why is the client using "peer1org" as its MspID?

bmatsuo (Thu, 27 Jul 2017 16:51:16 GMT):
Here is the relevant piece of my yaml file...

bmatsuo (Thu, 27 Jul 2017 16:51:46 GMT):
peerorg1: # Membership Service Provider ID for this organization mspID: "Org1MSP" # CA config defines the fabric-ca instance that issues identities for this org ca: # TLS secured connections with the CA tlsEnabled: false # CA name name: "ca-org1" # CA URL. Note: https prefix required for TLS serverURL: "http://localhost:7054" # Configuration for mutual TLS with the CA tls: # Comma-Separated list of paths certfiles : "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/tls/fabricca/ca/ca_root.pem" client: keyfile: "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/tls/fabricca/client/client_client1-key.pem" certfile: "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/tls/fabricca/client/client_client1.pem"```

bmatsuo (Thu, 27 Jul 2017 16:51:46 GMT):
``` peerorg1: # Membership Service Provider ID for this organization mspID: "Org1MSP" # CA config defines the fabric-ca instance that issues identities for this org ca: # TLS secured connections with the CA tlsEnabled: false # CA name name: "ca-org1" # CA URL. Note: https prefix required for TLS serverURL: "http://localhost:7054" # Configuration for mutual TLS with the CA tls: # Comma-Separated list of paths certfiles : "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/tls/fabricca/ca/ca_root.pem" client: keyfile: "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/tls/fabricca/client/client_client1-key.pem" certfile: "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/tls/fabricca/client/client_client1.pem" ```

bmatsuo (Thu, 27 Jul 2017 16:51:46 GMT):
``` organizations: peerorg1: # Membership Service Provider ID for this organization mspID: "Org1MSP" # CA config defines the fabric-ca instance that issues identities for this org ca: # TLS secured connections with the CA tlsEnabled: false # CA name name: "ca-org1" # CA URL. Note: https prefix required for TLS serverURL: "http://localhost:7054" # Configuration for mutual TLS with the CA tls: # Comma-Separated list of paths certfiles : "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/tls/fabricca/ca/ca_root.pem" client: keyfile: "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/tls/fabricca/client/client_client1-key.pem" certfile: "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/tls/fabricca/client/client_client1.pem" ```

bmatsuo (Thu, 27 Jul 2017 16:51:46 GMT):
``` organizations: peerorg1: # Membership Service Provider ID for this organization mspID: "Org1MSP" ```

bmatsuo (Thu, 27 Jul 2017 16:55:57 GMT):
Again, there error is > Error from eventsClient.Start (rpc error: code = Unknown desc = event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1MSP, received peerorg1]])

bmatsuo (Thu, 27 Jul 2017 16:55:57 GMT):
Again, the error is > Error from eventsClient.Start (rpc error: code = Unknown desc = event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1MSP, received peerorg1]])

bmatsuo (Thu, 27 Jul 2017 17:18:50 GMT):
Ah, I see. It seems this is probably because I was trying to avoid the `GetAdmin()` and `GetUser()` functions implemented for the integration tests.

bmatsuo (Thu, 27 Jul 2017 17:19:14 GMT):
Why aren't those functions part of the SDK? They seem pretty hairy

bmatsuo (Thu, 27 Jul 2017 17:30:00 GMT):
Hrm, the templates used by those functions seem to correspond to a pre-v1.0.0 version of hyperledger fabric as well

bmatsuo (Thu, 27 Jul 2017 17:30:00 GMT):
Hrm, the path templates used by those functions seem to correspond to a pre-v1.0.0 version of hyperledger fabric as well

bmatsuo (Thu, 27 Jul 2017 17:32:09 GMT):
That is, `fmt.Sprintf("peerOrganizations/%s.example.com/users/Admin@%s.example.com/keystore", orgPath, orgPath)` should be `fmt.Sprintf("peerOrganizations/%s.example.com/users/Admin@%s.example.com/msp/keystore", orgPath, orgPath)` for fabric v1.0.0

bmatsuo (Thu, 27 Jul 2017 17:32:25 GMT):
missing `msp` intermediate directory

cotofei (Fri, 28 Jul 2017 07:19:12 GMT):
Has joined the channel.

passkit (Fri, 28 Jul 2017 08:58:45 GMT):
When using the SDK, it takes an inordinate amount of time to receive a response from the eventhub. If I use the CLI, I get a response in under a second - but the SDK can take over 15 seconds.

AlexanderEx123 (Fri, 28 Jul 2017 10:05:01 GMT):
I have a trouble when trying to send multiple transaction in same time, it starts when i increate RPS to 20 13:02:54.389 [grpc] DEBU : grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup localhost: too many open files"; Reconnecting to {localhost:7051 } Someone know how to increase open files limit in grpc ?

rohitrocket (Fri, 28 Jul 2017 10:30:30 GMT):
Could not broadcast to orderer localhost:7050: broadcast response is not success :

rohitrocket (Fri, 28 Jul 2017 10:30:53 GMT):
This is the error I am getting even though my orderer container is up and mapped to 7050 port !

rohitrocket (Fri, 28 Jul 2017 10:30:56 GMT):
Anyone ?

rohitrocket (Fri, 28 Jul 2017 12:43:22 GMT):
@antitoine How do I check if the channel is created or not after the whole function run successfully ?

bmatsuo (Fri, 28 Jul 2017 19:53:37 GMT):
@AlexanderEx123 afaik the open file limit affects your entire process. the way to increase the limit for a process is os dependent so you can probably google that info for your situation.

bmatsuo (Fri, 28 Jul 2017 19:54:59 GMT):
On linux the default limit on open files in one process is 1024, which is low

bmatsuo (Fri, 28 Jul 2017 19:56:27 GMT):
But without a lot of other open file or network connections I would say it sounds suspiciously like a resource leak

bmatsuo (Fri, 28 Jul 2017 19:56:27 GMT):
But without a lot of other open file or network connections (outside of fabric-sdk-go) I would say it sounds suspiciously like a resource leak

bmatsuo (Fri, 28 Jul 2017 19:56:49 GMT):
You may want to test that you don't run into the same problem if you run fewer concurrent request for a longer period of time

troyronda (Fri, 28 Jul 2017 20:40:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=toMavs7GSxTADhFJZ) the latest checkin updates to latest crypto-gen structure

troyronda (Fri, 28 Jul 2017 20:40:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=toMavs7GSxTADhFJZ) today's checkin has fixed this by updating to latest crypto-gen structure

bmatsuo (Fri, 28 Jul 2017 20:41:04 GMT):
Thanks @troyronda

troyronda (Fri, 28 Jul 2017 20:41:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=StWr6imr5b22hv3oh) I was also looking at this by introducing an identity provider whose default would correspond to loading the default directory structure (within the SDK)

troyronda (Fri, 28 Jul 2017 20:42:00 GMT):
This would be part of the def/fabapi code.

bmatsuo (Fri, 28 Jul 2017 20:42:08 GMT):
interesting

troyronda (Fri, 28 Jul 2017 20:42:32 GMT):
(slowly adding a higher-level API surface on top of the packages inside of pkg)

troyronda (Fri, 28 Jul 2017 20:43:17 GMT):
It would be generic rather than GetAdmin & GetUser that you see in the tests though

bmatsuo (Fri, 28 Jul 2017 20:43:26 GMT):
Sure

bmatsuo (Fri, 28 Jul 2017 20:43:35 GMT):
That makes sens

bmatsuo (Fri, 28 Jul 2017 20:43:35 GMT):
That makes sense

troyronda (Fri, 28 Jul 2017 20:44:01 GMT):
Effectively a factory for an org's user (for either PEM or PKCS11) -- under an OrgContext -- followed by NewUser

troyronda (Fri, 28 Jul 2017 20:45:10 GMT):
I want to get to the point that you just create an SDK, get an org context, get a session for a user and send transactions :P.

bmatsuo (Fri, 28 Jul 2017 20:46:46 GMT):
That sounds nice

bmatsuo (Fri, 28 Jul 2017 20:47:50 GMT):
A good amount of comments in my code right now saying effectively "I'm not entirely sure what is happening here"

bmatsuo (Fri, 28 Jul 2017 20:49:00 GMT):
Trying to pick apart the integration test code to make something minimal and working

troyronda (Fri, 28 Jul 2017 20:49:36 GMT):
btw - you can see the groundwork in fabapi.go

troyronda (Fri, 28 Jul 2017 20:49:50 GMT):
not much there yet, but can get an idea where it's heading

bmatsuo (Fri, 28 Jul 2017 20:50:31 GMT):
OK. I'm still not really sure how to interpret the directory structure

bmatsuo (Fri, 28 Jul 2017 20:50:51 GMT):
It seemed to change a lot during fabric v1.0.0 release cycle

bmatsuo (Fri, 28 Jul 2017 20:54:14 GMT):
Speaking of.. Is the directory structure still somewhat in flux @troyronda?

troyronda (Fri, 28 Jul 2017 20:55:14 GMT):
the code within fabric-txn and fabapi is still in flux.

troyronda (Fri, 28 Jul 2017 20:55:44 GMT):
directory structure is basically pkg/* low-level but mainly independent packages that could logically have been there own repo

troyronda (Fri, 28 Jul 2017 20:55:44 GMT):
directory structure is basically pkg/* low-level but mainly independent packages that could logically have been their own repo

troyronda (Fri, 28 Jul 2017 20:56:11 GMT):
def/* intended to be default implementations of pkg where the sdk user could swap out packages if they wish

troyronda (Fri, 28 Jul 2017 20:56:18 GMT):
and higher-level SDK functions

bmatsuo (Fri, 28 Jul 2017 20:56:44 GMT):
Ah. That helps a lot

troyronda (Fri, 28 Jul 2017 20:56:45 GMT):
api/* intended to be interfaces being used between the contents of pkg & def to keep things decoupled

troyronda (Fri, 28 Jul 2017 20:59:47 GMT):
The problem in the interim is that the examples mostly point out the code within pkg/* (which is okay since this is more stablized), but the intention is to eventually point people to def/*

troyronda (Fri, 28 Jul 2017 21:00:11 GMT):
def = default

bmatsuo (Fri, 28 Jul 2017 21:00:41 GMT):
Right. That makes sense

troyronda (Fri, 28 Jul 2017 21:00:41 GMT):
so expanded out: default/fabricapi (aka fabricsdk)

bmatsuo (Fri, 28 Jul 2017 21:01:20 GMT):
I was thinking that def was "definition" or something

troyronda (Fri, 28 Jul 2017 21:01:22 GMT):
We actually tried to find a recommend package structure for this :)

troyronda (Fri, 28 Jul 2017 21:01:29 GMT):
yeh sometimes I say definition or define

troyronda (Fri, 28 Jul 2017 21:01:34 GMT):
partly why I liked def heh.

bmatsuo (Fri, 28 Jul 2017 21:01:44 GMT):
Default makes a little more sense to me

troyronda (Fri, 28 Jul 2017 21:02:00 GMT):
so we saw the pkg/* convention somewhere and picked that up

troyronda (Fri, 28 Jul 2017 21:02:20 GMT):
normally these directory structure have a cmd/

troyronda (Fri, 28 Jul 2017 21:02:37 GMT):
but an SDK doesn't have that so you can basically see "def" as corresponding to "cmd"

troyronda (Fri, 28 Jul 2017 21:03:19 GMT):
and api is a bit of an oddity but didn't want folders at the same level depending on each other basically.

bmatsuo (Fri, 28 Jul 2017 21:03:41 GMT):
Yea. I supposed that makes enough sense :)

bmatsuo (Fri, 28 Jul 2017 21:04:43 GMT):
Thanks a lot for the explanation, @troyronda

bmatsuo (Fri, 28 Jul 2017 21:04:52 GMT):
Much appreciated

troyronda (Fri, 28 Jul 2017 21:05:08 GMT):
no worries!

bmatsuo (Sat, 29 Jul 2017 22:51:26 GMT):
Oh man, every day I touch govendor is a day that I hate life

bmatsuo (Sat, 29 Jul 2017 22:51:51 GMT):
Is there some way that the sdk could move away from it?

bmatsuo (Sat, 29 Jul 2017 22:52:45 GMT):
If it didn't force all my repos depending on the SDK to use it for flattening purposes that would be OK too.

bmatsuo (Sat, 29 Jul 2017 22:55:05 GMT):
grpc uses a magic variable to ensure API compatibility between generated code and the grpc library -- when the grpc library changes the magic variable has its name changed to break old clients. Could fabric and fabric-sdk-go do something similar to ensure that the fabric repo is checked out at a revision compatible with version of fabric-sdk-go that is in use?

passkit (Sun, 30 Jul 2017 09:46:28 GMT):
@bmatsuo have to agree with you there. With so many tiers of vendoring, it quickly becomes unmanageable. My application compiles today, but a pity the poor soul who has to upgrade it a year down the line.

passkit (Sun, 30 Jul 2017 09:46:28 GMT):
@bmatsuo have to agree with you there. With so many tiers of vendoring, it quickly becomes unmanageable. My application compiles today, but I pity the poor soul who has to upgrade it a year down the line.

7sigma (Mon, 31 Jul 2017 09:30:07 GMT):
Has joined the channel.

7sigma (Mon, 31 Jul 2017 09:30:56 GMT):
Hi, can someone guide me to start a dev mode using one orderer , one peer and one or more ca

7sigma (Mon, 31 Jul 2017 09:31:24 GMT):
When using the configx tool, not able to map the config file paramters

vinitesh (Mon, 31 Jul 2017 09:47:49 GMT):
Hello, I am working on writing API server using go sdk. I am calling setup.Channel.QueryTransaction(txID) to get the transaction but how to parse the payload into proper json string?

JanRzepecki (Mon, 31 Jul 2017 14:47:51 GMT):
Has joined the channel.

bmatsuo (Mon, 31 Jul 2017 15:51:06 GMT):
@passkit indeed. Tiered vendor directories could be more manageable if govendor behaved in a way that was a little easier to reason about and work with. At the same time, disregarding bugs and strange semantic differences between the various govendor commands, by flattening vendored dependencies govendor is trying to solve a problem that does not have a solution given the constraints Go development presents (that is, without required semantic versioning or forced backward compatibility you cannot correctly resolve the diamond dependency problem).

passkit (Mon, 31 Jul 2017 16:17:06 GMT):
Currently using the SDK with a reasonable amount of volume of a few hundred blocks an hour. However, I am having intermittent issues with events not being received.

passkit (Mon, 31 Jul 2017 16:17:06 GMT):
Currently using the SDK with a reasonable amount of volume of a few hundred blocks an hour. However, I am having intermittent issues with event broadcasts not being received.

passkit (Mon, 31 Jul 2017 16:21:29 GMT):
Can someone explain why the eventhub connection is disconnected after each invoke, and precisely what is happening in the eventHub.grpcClient.UnregisterAsync call?

passkit (Mon, 31 Jul 2017 16:31:21 GMT):
This call appears to be terminating the connection prematurely (I.e. before the event message has been received).

divyank (Mon, 31 Jul 2017 17:24:43 GMT):
@vinitesh that method returns a protobuf. You can use proto.Unmarshal()

divyank (Mon, 31 Jul 2017 17:28:47 GMT):
@passkit eventHub.Disconnect will unregister for all registered events and close the grpc stream. It should only be called after the expected event is received. Can you provide some more info on your usage?

passkit (Mon, 31 Jul 2017 17:30:33 GMT):
But in the SDK, during invoke, you check it eventhub is connected (and connect if not), then immediately defer a disconnect

passkit (Mon, 31 Jul 2017 17:30:50 GMT):
I fear that this disconnect is firing before the event is returnd

divyank (Mon, 31 Jul 2017 17:32:29 GMT):
Can you point me to the method you are using?

passkit (Mon, 31 Jul 2017 17:32:51 GMT):
`fabricTxn.InvokeChaincode`

passkit (Mon, 31 Jul 2017 17:33:21 GMT):
Contains this: ``` if eventHub.IsConnected() == false { err = eventHub.Connect() if err != nil { return nil, apitxn.TransactionID{}, fmt.Errorf("Error connecting to eventhub: %v", err) } defer eventHub.Disconnect() } ```

divyank (Mon, 31 Jul 2017 17:35:39 GMT):
That helper method blocks for 30 seconds before disconnecting. It is very unlikely that the commit event would take that long

passkit (Mon, 31 Jul 2017 17:36:34 GMT):
Agree - but if I remove `defer eventHub.Disconnect()` the method is rock solid. If I keep it, then it is intermittently failing

passkit (Mon, 31 Jul 2017 17:37:25 GMT):
``` invoke Didn't receive block event for txid({9b1e8f73bdd872f0fbfc4274f0ccbbf2367453d2c5afca4b39e4b5caeff751bf BAD+84BAD+2BAD+1FBAD+216\BAD+1F"uBAD+2ϰ/Zr`֞f0}) ```

passkit (Mon, 31 Jul 2017 17:38:04 GMT):
40-50% of transactions fail with `Didn't receive block event`

divyank (Mon, 31 Jul 2017 17:39:28 GMT):
That's timing out

passkit (Mon, 31 Jul 2017 17:40:15 GMT):
Yep - but the peer logs confirm that the event was broadcast moments after submission

passkit (Mon, 31 Jul 2017 17:40:35 GMT):
Seems as if the SDK was not listening for it

divyank (Mon, 31 Jul 2017 17:41:14 GMT):
I don't see a relation to disconnect. Deferred statements are only called after the method returns. So that would happen regardless of a timeout.

divyank (Mon, 31 Jul 2017 17:41:42 GMT):
First thing that stands out is that the txID in the error message above contains `BAD`

passkit (Mon, 31 Jul 2017 17:45:03 GMT):
That's not part of the TxID, that is being dumped after

divyank (Mon, 31 Jul 2017 17:45:15 GMT):
Ah, it's the nonce

passkit (Mon, 31 Jul 2017 17:45:20 GMT):
But agree it doesn't sound "GOOD"

divyank (Mon, 31 Jul 2017 17:48:01 GMT):
We have very detailed debug logs when it comes to events. You could try switching to debug to see if anything is coming back from the peer.

passkit (Mon, 31 Jul 2017 17:52:44 GMT):
How to put the SDK debug mode? My peer logs are in debug and everything looks normal.

divyank (Mon, 31 Jul 2017 17:54:28 GMT):
Set `client.logging.level` to 'debug' in the config.yaml

passkit (Mon, 31 Jul 2017 17:56:53 GMT):
Here's the issue though - it's timing out - I'm not getting anything back!

passkit (Mon, 31 Jul 2017 18:02:08 GMT):
In my use case my application submits transactions using multiple signing identities. I am instantiating a separate client for each transaction as if I use a singleton, then identity details would be overwritten.

passkit (Mon, 31 Jul 2017 18:02:48 GMT):
what could corrupt the nonce like this?

mrkiouak (Mon, 31 Jul 2017 18:06:24 GMT):
Has joined the channel.

mrkiouak (Mon, 31 Jul 2017 18:23:00 GMT):
quick question on go-sdk status: is there a release of the go-sdk that works with the fabric-v1 release, and if there is not yet a release that does, are there a set of jiras that constitute the work items needed prior to such a release?

passkit (Mon, 31 Jul 2017 18:34:43 GMT):
@divyank Everything is fine up until the response from the orderer ``` 2017-07-31T18:23:43.397469880Z 2017-07-31 18:23:43.397 UTC [fabric_sdk_go] InitConfigWithCmdRoot -> INFO 002 fabric_sdk_go Logging level: debug 2017-07-31T18:23:43.397719872Z 18:23:43.397 [bccsp_sw] DEBU : KeyStore path [/tmp/msp/keystore] missing [true]: [] 2017-07-31T18:23:43.398097458Z 18:23:43.397 [bccsp_sw] DEBU : Creating KeyStore at [/tmp/msp/keystore]... 2017-07-31T18:23:43.398989934Z 18:23:43.398 [bccsp_sw] DEBU : KeyStore created at [/tmp/msp/keystore]. 2017-07-31T18:23:43.399005055Z 18:23:43.398 [bccsp_sw] DEBU : KeyStore opened at [/tmp/msp/keystore]...done 2017-07-31T18:23:43.399010784Z 18:23:43.398 [bccsp] DEBU : Initialize BCCSP [SW] 2017-07-31T18:23:43.399228261Z 18:23:43.399 [fabric_sdk_go] INFO : KeyStore path [/tmp/msp/keystore] missing [true]: [%!s()] 2017-07-31T18:23:44.441853864Z 18:23:44.441 [fabric_sdk_go] INFO : Constructed channel instance: {loopyloyalty true map[] map[] 0xc42030e050 0xc42050e080 [] false} 2017-07-31T18:23:44.632055273Z 18:23:44.631 [fabric_sdk_go] DEBU : Processing proposal using endorser :us-east-2a.blockchain.passkit.com:7051 2017-07-31T18:23:44.864239497Z 18:23:44.864 [fabric_sdk_go] DEBU : invoke Endorser 'xxxx.yyyy.passkit.com:7051' returned ProposalResponse status:200 2017-07-31T18:23:44.864263840Z 18:23:44.864 [fabric_sdk_go] DEBU : reg txid b0627b8687205ecb92aa53efeb908129f274339035021ae600618d879b16496e 2017-07-31T18:23:44.864861018Z 18:23:44.864 [fabric_sdk_go] DEBU : Broadcasting envelope to orderer :us-east-2b.blockchain.passkit.com:7050 2017-07-31T18:23:45.303786131Z 18:23:45.303 [fabric_sdk_go] DEBU : Orderer.broadcastStream - response:status:SUCCESS , error: 2017-07-31T18:23:45.303811416Z 18:23:45.303 [fabric_sdk_go] DEBU : Receive Success Response from orderer ``` Then nothing else from the SDK is logged - I only see the error message.

passkit (Mon, 31 Jul 2017 18:34:43 GMT):
@divyank Everything is fine up until the response from the orderer ``` 2017-07-31T18:23:43.397469880Z 2017-07-31 18:23:43.397 UTC [fabric_sdk_go] InitConfigWithCmdRoot -> INFO 002 fabric_sdk_go Logging level: debug 2017-07-31T18:23:43.397719872Z 18:23:43.397 [bccsp_sw] DEBU : KeyStore path [/tmp/msp/keystore] missing [true]: [] 2017-07-31T18:23:43.398097458Z 18:23:43.397 [bccsp_sw] DEBU : Creating KeyStore at [/tmp/msp/keystore]... 2017-07-31T18:23:43.398989934Z 18:23:43.398 [bccsp_sw] DEBU : KeyStore created at [/tmp/msp/keystore]. 2017-07-31T18:23:43.399005055Z 18:23:43.398 [bccsp_sw] DEBU : KeyStore opened at [/tmp/msp/keystore]...done 2017-07-31T18:23:43.399010784Z 18:23:43.398 [bccsp] DEBU : Initialize BCCSP [SW] 2017-07-31T18:23:43.399228261Z 18:23:43.399 [fabric_sdk_go] INFO : KeyStore path [/tmp/msp/keystore] missing [true]: [%!s()] 2017-07-31T18:23:44.441853864Z 18:23:44.441 [fabric_sdk_go] INFO : Constructed channel instance: {loopyloyalty true map[] map[] 0xc42030e050 0xc42050e080 [] false} 2017-07-31T18:23:44.632055273Z 18:23:44.631 [fabric_sdk_go] DEBU : Processing proposal using endorser :us-east-2a.blockchain.passkit.com:7051 2017-07-31T18:23:44.864239497Z 18:23:44.864 [fabric_sdk_go] DEBU : invoke Endorser 'xxxx.yyyy.passkit.com:7051' returned ProposalResponse status:200 2017-07-31T18:23:44.864263840Z 18:23:44.864 [fabric_sdk_go] DEBU : reg txid b0627b8687205ecb92aa53efeb908129f274339035021ae600618d879b16496e 2017-07-31T18:23:44.864861018Z 18:23:44.864 [fabric_sdk_go] DEBU : Broadcasting envelope to orderer :xxxx.yyyy.passkit.com:7050 2017-07-31T18:23:45.303786131Z 18:23:45.303 [fabric_sdk_go] DEBU : Orderer.broadcastStream - response:status:SUCCESS , error: 2017-07-31T18:23:45.303811416Z 18:23:45.303 [fabric_sdk_go] DEBU : Receive Success Response from orderer ``` Then nothing else from the SDK is logged - I only see the error message.

passkit (Mon, 31 Jul 2017 18:37:10 GMT):
For a transaction submitted a few seconds earlier continued from this point with: ``` 2017-07-31T18:23:33.259843621Z proto: textWriter unindented too far 2017-07-31T18:23:33.259874303Z proto: textWriter unindented too far 2017-07-31T18:23:33.259880598Z proto: textWriter unindented too far 2017-07-31T18:23:33.260563041Z 18:23:33.259 [fabric_sdk_go] DEBU : Recv blockEvent:&{header:<6:72 0:"\x01\xf0" } 4:41 216947:"\x92\xf9×\xf3\xd8Op\x03z#u=\x984'\xfb\x17\x8a\x007\"Ay\xa9Ա" } 4:27214520408 } 19448197:15832581559049879930 11652904:148240659060676 89:/* unexpected EOF */ >data: ```

passkit (Mon, 31 Jul 2017 18:37:46 GMT):
These two transactions were initiated from separate pods in the same kubernetes application

passkit (Mon, 31 Jul 2017 18:39:48 GMT):
As mentioned - when removing the disconnect, all events are caught. However that gives me another problem in that my pods quickly run out of network resources.

passkit (Mon, 31 Jul 2017 18:55:50 GMT):
Would someone be able to explain the background (problem and how this change fixed it) to commit 1e9e2f0? Before this commit, events would arrive, but would take a very long time (~15 seconds), but would consistently arrive. After this commit, then events either arrive instantly, or not at all.

passkit (Mon, 31 Jul 2017 18:58:38 GMT):
The Jira issue and the commit message have literally no information

divyank (Mon, 31 Jul 2017 19:30:15 GMT):
@passkit This was done for consistency. We register and unregister asynchronously at all other places in the event hub. Additionally, this was more of a courtesy message to the peer to unregister events before closing the stream and it doesn't really make sense to synchronously wait for a response.

divyank (Mon, 31 Jul 2017 19:31:56 GMT):
Can you add a test case that demonstrates the issue you describe? We use the event hub is several of our test cases and have not noticed this behaviour

passkit (Mon, 31 Jul 2017 19:35:46 GMT):
I'm not sure that I can. As it sometimes works and sometimes fails. If it were consistently replicatable, then a test case would be possible.

passkit (Mon, 31 Jul 2017 19:37:10 GMT):
The problem (and relates to the main Fabric project also), is that these test cases all run locally - I've yet to see proper testing against a remote network.

aleksandar.likic (Mon, 31 Jul 2017 19:49:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fAzSSDymJ9Re9T5ct) @mrkiouak The latest go-sdk on https://github.com/hyperledger/fabric-sdk-go works with v1.0.0. Are you having issues using it?

aleksandar.likic (Mon, 31 Jul 2017 19:49:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fAzSSDymJ9Re9T5ct) @mrkiouak The latest go-sdk at https://github.com/hyperledger/fabric-sdk-go works with v1.0.0. Are you having issues using it?

mrkiouak (Mon, 31 Jul 2017 19:51:03 GMT):
@aleksandar.likic no, but I'm interested in evaluating it (have used the node sdk, some exposure to java sdk-- team wide go may be best fit) and wasn't sure of current status. thanks for the info!

divyank (Tue, 01 Aug 2017 00:53:21 GMT):
@passkit You're onto something. I was able to reproduce your issue in a test case. Created: https://jira.hyperledger.org/browse/FAB-5557

passkit (Tue, 01 Aug 2017 01:37:57 GMT):
@divyank it's a relief to learn I am not losing my sanity! I hope you are able to fix it, as the SDK really isn't ready for any sort of volume until this is addressed.

passkit (Tue, 01 Aug 2017 02:17:43 GMT):
Also, would it be possible to return the result from `fabricTxn.QueryChaincode` as a raw byte array (as with theInvoke function). When the result of a query contains JSON data, casting it as a string escapes the quotes which causes marshalling of the result string to fail. Are you modelling your data as JSON in your tests?

vinitesh (Tue, 01 Aug 2017 09:55:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NyyQvcvbhEYefwTtB) @divyank Thanks Divyank. I am able to unmarshal Payload but how to decode the actual data from it?

divyank (Tue, 01 Aug 2017 13:13:01 GMT):
@vinitesh The `ProcessedTransaction` contains an `Envelope` object which contains all the transaction information. You can take a look at the fabric transaction validation as an example on how to interpret these objects: https://github.com/hyperledger/fabric/blob/v1.0.0/core/common/validation/msgvalidation.go#L357

divyank (Tue, 01 Aug 2017 13:17:46 GMT):
@passkit You can use `channel.SendTransactionProposal` to access the raw byte response. The helper methods in the fabric-txn package are mostly for beginners or simple use cases and make a lot of assumptions about usage. We anticipate that most users will use the fabric-client interfaces which provide more control.

qqbxclboy (Tue, 01 Aug 2017 13:27:04 GMT):
Has joined the channel.

daygee (Tue, 01 Aug 2017 15:53:30 GMT):
Has joined the channel.

alexcrownus (Tue, 01 Aug 2017 16:28:45 GMT):
Has joined the channel.

passkit (Tue, 01 Aug 2017 18:25:07 GMT):
@divyank I'm also trying to extract the data from the Payload returned from `QueryTransaction(txID)`. The raw `ProcessedTransaction` payload contains the transaction data, but the envelope object inside does not. The validation method you refer too returns an invalid signature and empty payload when given a `ProcessedTransaction` protobuf.

passkit (Tue, 01 Aug 2017 18:25:07 GMT):
@divyank I'm also trying to extract the data from the Payload returned from `QueryTransaction(txID)`. The raw `ProcessedTransaction` payload contains the transaction data, but the envelope object inside does not. The validation method you refer to returns an invalid signature and empty payload when given a `ProcessedTransaction` protobuf.

7sigma (Wed, 02 Aug 2017 04:40:05 GMT):
how do we use the cryptogen generate to also generate the tls client key and certificate

rohitrocket (Wed, 02 Aug 2017 06:29:33 GMT):

Message Attachments

rohitrocket (Wed, 02 Aug 2017 07:13:37 GMT):
@divyank ?

ranjan008 (Wed, 02 Aug 2017 07:31:59 GMT):
Hi how do you generate the certificate and private key files which are present under fixture/tls/fabricca/client

daygee (Wed, 02 Aug 2017 08:01:37 GMT):
hello, please i there a sample application written in go that is built on fabric like fabcar or marbles?

rohitrocket (Wed, 02 Aug 2017 08:40:30 GMT):
@antitoine man can you help me to resolve my problem /

rohitrocket (Wed, 02 Aug 2017 08:40:31 GMT):
?

aleksandar.likic (Wed, 02 Aug 2017 11:51:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DcCpwboNyAYopquoS) @ranjan008 See http://hyperledger-fabric.readthedocs.io/en/latest/msp.html#how-to-generate-msp-certificates-and-their-signing-keys and http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#crypto-generator

aleksandar.likic (Wed, 02 Aug 2017 12:05:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=QmgWFcZLFqS8HrqvW) @rohitrocket Looks like you don't have orderer's root/intermediate CA cert (the one used to sign the orderer's cert) set up on the client side, so the client doesn't trust the orderer's TLS cert

rohitrocket (Wed, 02 Aug 2017 12:08:38 GMT):
@aleksandar.likic then how do I resolve it ?

aleksandar.likic (Wed, 02 Aug 2017 12:26:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=pso2XjoCPaycCvTC8) @rohitrocket you need to provide a path to the orderer's TLS CA cert in the client config file, under network.orderers..tls.certificate. Don't forget to set proper serverHostOverride

aleksandar.likic (Wed, 02 Aug 2017 12:27:25 GMT):

Message Attachments

aleksandar.likic (Wed, 02 Aug 2017 12:28:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gQoL8W3coRojRexrD) @aleksandar.likic [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oWfNzdJnyfpiRmPJi) @aleksandar.likic In this example, certificate points to "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/cacerts/example.com-cert.pem"

aleksandar.likic (Wed, 02 Aug 2017 12:31:29 GMT):
You can see the whole example client configuration at https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml

ranjan008 (Wed, 02 Aug 2017 12:51:03 GMT):
my test is trying to enroll the admin user using base_test_setup but I am getting this error Enroll failed: POST failure [Post https://localhost:7054/enroll: http: server gave HTTP response to HTTPS client]; not sending

aleksandar.likic (Wed, 02 Aug 2017 13:16:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PEpYrwznLy6aT4ciA) @ranjan008 You are hitting CA with HTTPS request, and CA doesn't have TLS enabled

ranjan008 (Thu, 03 Aug 2017 05:30:37 GMT):
Thanks @aleksandar.likic

ranjan008 (Thu, 03 Aug 2017 05:48:29 GMT):
I am getting below error when the code for checking whether primary peer joined the channel is being executed Error while checking if primary peer has already joined channel: Error querying channel for primary peer: QueryBySystemChaincodeByTarget return error: Error from QueryBySystemChaincode: Transaction processor (localhost:7051) returned error 'tls: first record does not look like a TLS handshake' for proposal what can be possibly wrong?

yeyc.linuxf (Thu, 03 Aug 2017 07:35:13 GMT):
Has joined the channel.

rohitrocket (Thu, 03 Aug 2017 08:56:39 GMT):

Message Attachments

rohitrocket (Thu, 03 Aug 2017 08:58:09 GMT):
@here is it something to do with network configuration or else ?

mychewcents (Thu, 03 Aug 2017 11:03:20 GMT):
Has joined the channel.

mychewcents (Thu, 03 Aug 2017 11:52:34 GMT):
I just checked the code in the test/integration/end_to_end_test.go. There are some errors, which are worth mentioning, to avoid any other going through the same issue: Line 21: it should be &BaseSetupImpl instead of BaseSetupImpl Line 49: it should be err = moveFunds(testSetup), there is an extra '&' before 'testSetup' in the original code.

aleksandar.likic (Thu, 03 Aug 2017 12:46:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fRKMhQ7NcfLyqYuWD) @ranjan008 Looks like the peer has TLS enabled and your client has TLS disabled. BTW, many of the recent TLS related questions (if not all) I just google up, as the errors come from the protocol layer, not our code. You can save yourself some time by googling yourself, as I am in many hours behind you (in Toronto). Cheers!

rohitrocket (Thu, 03 Aug 2017 12:47:07 GMT):
@aleksandar.likic look into my problem too

rohitrocket (Thu, 03 Aug 2017 12:47:12 GMT):
please

ranjan008 (Thu, 03 Aug 2017 12:48:39 GMT):
@aleksandar.likic thanks for the input and was able to figure out that

ranjan008 (Thu, 03 Aug 2017 12:49:11 GMT):
However I am trying to run my chaincode in dev mode and facing some issues

ranjan008 (Thu, 03 Aug 2017 12:50:12 GMT):
the chaincode is not able to connect to the peer through rpc and throwing error ERRO 003 Received error from server: rpc error: code = 13 desc = transport is closing, ending chaincode stream

rohitrocket (Thu, 03 Aug 2017 12:50:45 GMT):
@ranjan008 were you able to create and join channel successfully ?

ranjan008 (Thu, 03 Aug 2017 12:51:25 GMT):
yes I was

rohitrocket (Thu, 03 Aug 2017 12:51:35 GMT):
I am facing problem.

rohitrocket (Thu, 03 Aug 2017 12:51:44 GMT):
can you help me get through it ?

ranjan008 (Thu, 03 Aug 2017 12:52:24 GMT):
I guess there is some issue in interaction with the orderer

ranjan008 (Thu, 03 Aug 2017 12:53:21 GMT):
you have enabled your tls or you are using in disabled state

rohitrocket (Thu, 03 Aug 2017 12:53:40 GMT):
tls is enabled

aleksandar.likic (Thu, 03 Aug 2017 12:54:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=n6aYNJHmsdaWHDSsp) @rohitrocket Network config should be OK, your client has successfully connected to the orderer, but the orderer complains that something in your request is not correct. You have to figure out what exactly. Orderer won't tell you (it's a security feature)

rohitrocket (Thu, 03 Aug 2017 12:55:24 GMT):
@aleksandar.likic you will be active here for how much hours from now ?

rohitrocket (Thu, 03 Aug 2017 12:55:46 GMT):
because I need to resolve this issue as soon as possible in order to proceed so I may need your help from time to time.

aleksandar.likic (Thu, 03 Aug 2017 12:56:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4K88vyPxgGQfn2oEq) @aleksandar.likic ... orderer won't return to the client what's exactly wrong with the request, but you should be able to figure out from the orderer logs.

rohitrocket (Thu, 03 Aug 2017 13:16:52 GMT):

Message Attachments

rohitrocket (Thu, 03 Aug 2017 13:16:55 GMT):
@aleksandar.likic

rohitrocket (Thu, 03 Aug 2017 13:23:07 GMT):
2017-08-03 13:22:03.610 UTC [orderer/common/deliver] Handle -> WARN 96f Error reading from stream: rpc error: code = Canceled desc = context canceled

rohitrocket (Thu, 03 Aug 2017 13:23:20 GMT):
@aleksandar.likic even this error also appears at some places

rohitrocket (Thu, 03 Aug 2017 13:23:28 GMT):
what does this mean ? and how to resolve ?

jellevdp (Thu, 03 Aug 2017 17:56:27 GMT):
Has joined the channel.

jellevdp (Thu, 03 Aug 2017 18:19:17 GMT):
Does anybody have experience with setting up functionality to register new users with the fabric-go-sdk? All the example codes that I can find (and the ones that the repo refers to) use PreEnrolled users.. If anybody knows of any resource would be very happy to hear about it! :)

aleksandar.likic (Thu, 03 Aug 2017 22:26:06 GMT):
@rohitrocket .. at version 0, but got version 1 - this tells you that configuration changed (from version 0 to version 1) since you last read it, so you are not allowed to change it (as you would overwrite the changes that happened since your last read). What that exactly mean in your context is hard to tell without understanding what you want to do / what you are doing on the client side.

aleksandar.likic (Thu, 03 Aug 2017 22:26:06 GMT):
@rohitrocket .. at version 0, but got version 1 - this tells you that configuration changed (from version 0 to version 1) since you last read it, so you are not allowed to change it (as you would overwrite the changes that happened since your last read). What that exactly means in your context is hard to tell without understanding what you want to do / what you are doing on the client side.

aleksandar.likic (Thu, 03 Aug 2017 22:29:55 GMT):
@jellevdp go-sdk doesn't support registration, only enrollment. Users have to be registered out of band (from the sdk point of view). I think other sdks do the same.

jellevdp (Thu, 03 Aug 2017 22:30:53 GMT):
Ok, got it - thanks @aleksandar.likic

aneb (Fri, 04 Aug 2017 01:18:56 GMT):
@aleksandar.likic Isn't that what is happening in the unit test fabric_ca_test.go? Registering and enrolling a new user by sending a RegistrationRequest through the caClient? Or you mean it doesn't support registration in the sense that you need to store your user's details like password etc somewhere else?

aleksandar.likic (Fri, 04 Aug 2017 02:12:49 GMT):
@aneb @jellevdp My apologies, it seems that my mind wandered back in time when I was writing my answer:) Yes, dynamic registration is supported.

aneb (Fri, 04 Aug 2017 02:17:29 GMT):
@aleksandar.likic no problem. I am actually trying to implement that code as we speak so that's why I was a bit confused :)

aneb (Fri, 04 Aug 2017 02:41:14 GMT):
Speaking of which, should I be able to use the generated preEnrolled Admin certs for registering/enrolling new users when connecting to localhost:7054 but using a pem/cert CN of ca.org1.example.org... etc   I keep getting "certificate signed by unknown authority errors". The strange thing is that the cert is working for all other actions like installing chaincode etc. So it seems like the cert passes the fabric client authorization but not the fabric caClient. I noticed that the fabric-sdk-go unit tests are using the generated certs as well ,with a CN set to ca.org1.example instead of localhost and the only thing I need to do (like the unit tests) is to set the FABRIC_CA_SERVER_TLS_CERTFILE and FABRIC_CA_SERVER_TLS_KEYFILE vars to use the server_localhost certificate. But that only fixed the client authorization, not the caClient. Anyone else ran into this problem?

aneb (Fri, 04 Aug 2017 02:41:52 GMT):

Message Attachments

rohitrocket (Fri, 04 Aug 2017 05:19:34 GMT):
@aleksandar.likic I am trying to create a new channel and join it by one of the organizations.

rohitrocket (Fri, 04 Aug 2017 06:44:53 GMT):
@aneb I ran into this problem but I don't exactly remember how I resolved it.

rohitrocket (Fri, 04 Aug 2017 07:23:08 GMT):

Message Attachments

rohitrocket (Fri, 04 Aug 2017 07:24:43 GMT):
any info why its happening ?

rohitrocket (Fri, 04 Aug 2017 07:25:03 GMT):
@here

jyellick (Fri, 04 Aug 2017 14:00:20 GMT):
@jimthematrix @bretharrison For the log message `Failed to send transaction and get notifications within the timeout period.` out of Node. Does this mean either the orderer rejected, or the event hub didn't send? Or does it strictly mean that the event hum didn't send?

bretharrison (Fri, 04 Aug 2017 14:00:20 GMT):
Has joined the channel.

jyellick (Fri, 04 Aug 2017 14:00:49 GMT):
If it's both, I'd recommend splitting this error message into two to better isolate the problem.

jyellick (Fri, 04 Aug 2017 14:00:49 GMT):
~If it's both, I'd recommend splitting this error message into two to better isolate the problem.~

jyellick (Fri, 04 Aug 2017 14:01:16 GMT):
(And if it's just the one, I'd consider making that more obvious, maybe just `Failed to get notifications within the timeout period.`

jyellick (Fri, 04 Aug 2017 14:01:16 GMT):
~(And if it's just the one, I'd consider making that more obvious, maybe just `Failed to get notifications within the timeout period.`~

jyellick (Fri, 04 Aug 2017 14:01:16 GMT):
~(And if it's just the one, I'd consider making that more obvious, maybe just `Failed to get notifications within the timeout period.` ~

eacoeytaux (Fri, 04 Aug 2017 19:55:47 GMT):
Has joined the channel.

rohitrocket (Sat, 05 Aug 2017 04:59:05 GMT):
@jyellick was your message for me or someone else?

jyellick (Sat, 05 Aug 2017 05:00:34 GMT):
Ah, sorry @rohitrocket I realized I'd mistakenly posted this in #fabric-sdk-go when my intention was for #fabric-sdk-node . I thought I had deleted all of the references, but did not.

rohitrocket (Sat, 05 Aug 2017 05:01:29 GMT):
@jyellick do you any right person here #fabric-sdk-go ? who is as good as you in #fabric-sdk-node ?

jyellick (Sat, 05 Aug 2017 05:03:30 GMT):
I'm not an expert by any means with the #fabric-sdk-go, sorry @rohitrocket , I will have to let others in this channel respond to your questions

rohitrocket (Sat, 05 Aug 2017 11:57:26 GMT):
@aleksandar.likic ? I am stuck at this problem don't have any idea on how to proceed?

aleksandar.likic (Sat, 05 Aug 2017 13:03:51 GMT):
@rohitrocket Sorry, it's a holyday in Canada, everyone is off until Tuesday. Did you try to follow end_to_end_test.go? testSetup.InstallAndInstantiateExampleCC() does exactly what you are trying to do.

rohitrocket (Sat, 05 Aug 2017 13:04:21 GMT):
@aleksandar.likic yeah I am following them only...

rohitrocket (Sat, 05 Aug 2017 13:04:27 GMT):
still getting problems in between

rohitrocket (Sat, 05 Aug 2017 13:04:35 GMT):
I am not able to understand why ?

rohitrocket (Sat, 05 Aug 2017 13:04:59 GMT):
I mean I am following exactly the same procedures as in the different kind of test files.

rohitrocket (Sat, 05 Aug 2017 13:05:28 GMT):
but at the same time when I include integration package and then use the function the job is done !

rohitrocket (Sat, 05 Aug 2017 13:05:35 GMT):
@aleksandar.likic I need serious help :p

rohitrocket (Sat, 05 Aug 2017 13:05:52 GMT):
@aleksandar.likic I need some help.

aleksandar.likic (Sat, 05 Aug 2017 13:06:50 GMT):
The last thing you posted is about not being able to install chaincode. Are you able to create and join channel?

aleksandar.likic (Sat, 05 Aug 2017 13:06:50 GMT):
@rohitrocket The last thing you posted is about not being able to install chaincode. Are you able to create and join channel?

aleksandar.likic (Sat, 05 Aug 2017 13:17:12 GMT):
@rohitrocket Notice in the examples that different things (like channel creation / joining / chaincode installation) has to be done by users in different roles.

aleksandar.likic (Sat, 05 Aug 2017 13:17:12 GMT):
@rohitrocket Notice in the examples that different things (like channel creation / joining / chaincode installation) have to be done by users in different roles.

rohitrocket (Sat, 05 Aug 2017 13:17:51 GMT):
and how do I get to know the roles ?

rohitrocket (Sat, 05 Aug 2017 13:18:10 GMT):
@aleksandar.likic I think if you could spend some time here helping me out

rohitrocket (Sat, 05 Aug 2017 13:18:21 GMT):
it would really help me in procceding with my project

aleksandar.likic (Sat, 05 Aug 2017 13:26:25 GMT):
I think it is not SDK you need a help with, you need to get familiar with operational aspects first, by following https://hyperledger-fabric.readthedocs.io/en/latest/. The docs will tell you how to set up a network using fabric CLI tools. Once you understand all the concepts and how to do it using CLI, you can go back to SDK (node, go, ...) and ask "OK now, how do I do THIS with this SDK?" It seems to me you jumped into a bigger thing without covering the basics first. Maybe that's not true, just my feeling. Does this make sense?

rohitrocket (Sat, 05 Aug 2017 13:32:14 GMT):
No I covered the basics.

rohitrocket (Sat, 05 Aug 2017 13:32:28 GMT):
I spend a good amount of time exploring such functionalities using cli

rohitrocket (Sat, 05 Aug 2017 13:32:32 GMT):
@aleksandar.likic

aleksandar.likic (Sat, 05 Aug 2017 13:33:50 GMT):
@rohitrocket regarding the roles, our sdk example uses orderer user, org admin, and org user, all in different roles, who can do different things.

rohitrocket (Sat, 05 Aug 2017 13:34:22 GMT):
okay.

rohitrocket (Sat, 05 Aug 2017 13:34:34 GMT):
you will be active here today ?

rohitrocket (Sun, 06 Aug 2017 02:44:11 GMT):
@ranjan008 were you able to instantiate chaincode successfully ? Since I am stuck at this

chenshiok (Mon, 07 Aug 2017 04:01:47 GMT):
Has joined the channel.

smcambria22 (Mon, 07 Aug 2017 19:57:54 GMT):
Has joined the channel.

xiaoping378 (Tue, 08 Aug 2017 02:17:23 GMT):
Has joined the channel.

Maria (Wed, 09 Aug 2017 08:29:17 GMT):
Has joined the channel.

himansri (Wed, 09 Aug 2017 14:02:17 GMT):
Has joined the channel.

baoyangc (Thu, 10 Aug 2017 03:42:07 GMT):
Has joined the channel.

hangyuliu (Thu, 10 Aug 2017 07:08:55 GMT):
call eventHub.disconnect() , have problem,peer 1.0.0 log:

hangyuliu (Thu, 10 Aug 2017 07:08:56 GMT):
2017-08-10 07:05:33.470 UTC [eventhub_producer] Send -> DEBU 36dc85 Exit 2017-08-10 07:05:33.470 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 36dc86 Exit 2017-08-10 07:05:33.471 UTC [eventhub_producer] validateEventMessage -> DEBU 36dc87 ValidateEventMessage starts for signed event 0xc423155170 2017-08-10 07:05:33.471 UTC [eventhub_producer] Chat -> ERRO 36dc88 Error handling message: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1MSP, received ]] 2017-08-10 07:05:33.471 UTC [eventhub_producer] deRegisterHandler -> DEBU 36dc89 deregistering event type: BLOCK

hangyuliu (Thu, 10 Aug 2017 07:09:22 GMT):
failed deserializing event creator: [Expected MSP ID Org1MSP, received ] how I resolved it.

hangyuliu (Thu, 10 Aug 2017 07:10:05 GMT):
SDK code:

hangyuliu (Thu, 10 Aug 2017 07:10:05 GMT):
if testSetup.EventHub.IsConnected() { testSetup.EventHub.Disconnect() }

aleksandar.likic (Thu, 10 Aug 2017 10:47:03 GMT):
This is the server code:

aleksandar.likic (Thu, 10 Aug 2017 10:47:03 GMT):
This is the server code (running on the peer):

aleksandar.likic (Thu, 10 Aug 2017 10:47:05 GMT):
func (msp *bccspmsp) DeserializeIdentity(serializedID []byte) (Identity, error) { mspLogger.Infof("Obtaining identity") // We first deserialize to a SerializedIdentity to get the MSP ID sId := &m.SerializedIdentity{} err := proto.Unmarshal(serializedID, sId) if err != nil { return nil, fmt.Errorf("Could not deserialize a SerializedIdentity, err %s", err) } if sId.Mspid != msp.name { return nil, fmt.Errorf("Expected MSP ID %s, received %s", msp.name, sId.Mspid) } return msp.deserializeIdentityInternal(sId.IdBytes) }

aleksandar.likic (Thu, 10 Aug 2017 10:49:39 GMT):
You see that the peer complains about wrong MSP. You are probably making a client call with a wrong user.

aleksandar.likic (Thu, 10 Aug 2017 10:50:40 GMT):
The error is [Expected MSP ID Org1MSP, received ]

Dpkkmr (Thu, 10 Aug 2017 12:24:37 GMT):
Has joined the channel.

qqbxclboy (Fri, 11 Aug 2017 08:26:14 GMT):

Message Attachments

qqbxclboy (Fri, 11 Aug 2017 08:26:41 GMT):
2017-08-11 08:02:26.814 WARN 7 --- [ main] o.b.fly_client_spring.utils.SampleStore : Could not find the file "/tmp/users.properties"2017-08-11 08:02:26.832 WARN 7 --- [ main] o.b.fly_client_spring.utils.SampleStore : Could not find the file "/tmp/users.properties"2017-08-11 08:02:26.890 INFO 7 --- [ main] o.b.fly_client_spring.FlyNet : INIT SUCCESS 2017-08-11 08:02:26.899 INFO 7 --- [ main] o.b.fly_client_spring.FlyNet : peer: peer0.org1.example.com 2017-08-11 08:02:26.939 INFO 7 --- [ main] o.b.fly_client_spring.FlyNet : peer: peer0.org2.example.com 2017-08-11 08:02:28.487 ERROR 7 --- [ main] o.b.config.GrafanaConfig : {"message":"Not found"} 2017-08-11 08:02:31.116 INFO 7 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2017-08-11 08:02:31.148 INFO 7 --- [ main] org.blockchain_monitoring.Application : Started Application in 15.642 seconds (JVM running for 17.413) 2017-08-11 08:02:33.264 WARN 7 --- [ault-executor-0] io.netty.util.internal.MacAddressUtil : Failed to find a usable hardware address from the network inte rfaces; using random bytes: 32:e9:b4:23:4c:02:0d:6b 2017-08-11 08:02:33.501 ERROR 7 --- [pool-3-thread-1] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Channel closed while performing protocol negotiation, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2029) [fabric-sdk-java-1.0.0-rc1.jar!/:na] at org.hyperledger.fabric.sdk.Channel.queryInstalledChaincodes(Channel.java:1770) [fabric-sdk-java-1.0.0-rc1.jar!/:na] at org.hyperledger.fabric.sdk.HFClient.queryInstalledChaincodes(HFClient.java:427) [fabric-sdk-java-1.0.0-rc1.jar!/:na] at org.blockchain_monitoring.fly_client.FlyClient.queryInstalledChaincodes(FlyClient.java:309) [fly-client-2.0.25.jar!/:na] at org.blockchain_monitoring.scheduler.OrganisationMetricWriter.getPeerInfo(OrganisationMetricWriter.java:56) [classes!/:na] at org.blockchain_monitoring.scheduler.OrganisationMetricWriter.accept(OrganisationMetricWriter.java:40) [classes!/:na] at org.blockchain_monitoring.scheduler.OrganisationMetricWriter.accept(OrganisationMetricWriter.java:25) [classes!/:na] at java.util.ArrayList.forEach(ArrayList.java:1249) [na:1.8.0_121] at org.blockchain_monitoring.scheduler.ScheduledTasks.reportCurrentTime(ScheduledTasks.java:51) [classes!/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) [spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEAS E] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.3.7.RELEASE.ja r!/:4.3.7.RELEASE]

manu (Fri, 11 Aug 2017 12:20:47 GMT):
Has joined the channel.

aleksandar.likic (Fri, 11 Aug 2017 12:36:18 GMT):
@qqbxclboy looks like you are using sdk-java. This is sdk-go channel, cannot help you much. One thing I can say is that your client receives UNAVAILABLE from the peer (see gRPC status code).

jimthematrix (Fri, 11 Aug 2017 15:23:40 GMT):
@troyronda can you take a look at https://jira.hyperledger.org/browse/FAB-5675 for adding idmixer MSP to GO SDK? @manu will be contributing the code but would need your help with planning it out (hopefully this can be part of the 1.1 release), and if this is something you agree should be pursued for 1.1, how to plug it in

arjanvaneersel (Sat, 12 Aug 2017 08:57:13 GMT):
Has joined the channel.

habpygo (Sun, 13 Aug 2017 14:21:14 GMT):
Hi, I’m running my chain code successfully via de `Fabric-SDK-Go` and persist my data on `couchdb`; however, when I fiddle around in the chaincode (even as simple as just adding a comment) it gives me the error ``` Unable to install and instantiate the chaincode: SendInstantiateProposal Endorser localhost:7051 return error: Error calling endorser 'localhost:7051': rpc error: code = Unknown desc = chaincode error (status: 500, message: chaincode exists mychaincode) ``` The only way to get it back to work again is - to do a `git checkout mychaincode` and then everything runs as normal with my data intact, but without the changes in `mychaincode`. - or delete the `couchdb` directory, but then I lose all my data. Any one with an idea to upgrade the chaicode when using persistence with couchdb? Is there perhaps `Fabric-sdk-go` functionality to do a chaincode `upgrade` (I haven’t found it)? Thanks.

habpygo (Sun, 13 Aug 2017 14:21:14 GMT):
Hi, I’m running my chain code successfully via de `Fabric-SDK-Go` and persist my data on couchdb; however, when I fiddle around in the chaincode (even as simple as just adding a comment) it gives me the error ``` Unable to install and instantiate the chaincode: SendInstantiateProposal Endorser localhost:7051 return error: Error calling endorser 'localhost:7051': rpc error: code = Unknown desc = chaincode error (status: 500, message: chaincode exists mychaincode) ``` The only way to get it back to work again is - to do a `git checkout mychaincode` and then everything runs as normal with my data intact. - or delete the `couchdb` directory, but then I lose all my data. Any one with an idea to upgrade the chaicode when using persistence with couchdb? Is there perhaps `Fabric-sdk-go` functionality to do a chaincode `upgrade` (I haven’t found it)? Thanks.

habpygo (Sun, 13 Aug 2017 14:21:14 GMT):
Hi, I’m running my chain code successfully via de `Fabric-SDK-Go` and persist my data on couchdb; however, when I fiddle around in the chaincode (even as simple as just adding a comment) it gives me the error ``` Unable to install and instantiate the chaincode: SendInstantiateProposal Endorser localhost:7051 return error: Error calling endorser 'localhost:7051': rpc error: code = Unknown desc = chaincode error (status: 500, message: chaincode exists mychaincode) ``` The only way to get it back to work again is - to do a `git checkout mychaincode` and then everything runs as normal with my data intact. - or delete the `couchdb` directory, but then I lose all my data. Any one with an idea to upgrade the chaicode when using persistence with couchdb? Is there perhaps `Fabric-sdk-go` functionality to do a chaincode `upgrade` (I haven’t found it)? Thanks.

habpygo (Sun, 13 Aug 2017 14:21:14 GMT):
Hi, I’m running my chain code successfully via de `Fabric-SDK-Go` and persist my data on couchdb; however, when I fiddle around in the chaincode (even as simple as just adding a comment) it gives me the error ``` Unable to install and instantiate the chaincode: SendInstantiateProposal Endorser localhost:7051 return error: Error calling endorser 'localhost:7051': rpc error: code = Unknown desc = chaincode error (status: 500, message: chaincode exists mychaincode) ``` The only way to get it back to work again is - to do a `git checkout mychaincode` and then everything runs as normal with my data intact, but without the changes in `mychaincode`. - or delete the `couchdb` directory, but then I lose all my data. Any one with an idea to upgrade the chaicode when using persistence with couchdb? Is there perhaps `Fabric-sdk-go` functionality to do a chaincode `upgrade` (I haven’t found it)? Thanks.

real_2333 (Sun, 13 Aug 2017 14:33:20 GMT):
Has joined the channel.

antitoine (Mon, 14 Aug 2017 06:38:18 GMT):
Hi @habpygo when you update your chaincode, do you also upgrade the version of the chaincode ?

habpygo (Mon, 14 Aug 2017 10:48:33 GMT):
Hi @antitoine, yes but I also have to change the ChaincodeID — something that I don’t understand — and thus also change the CLEAN section of the `Makefile`. By the way, I forgot to comment out all the goodies in the `Init` function in the chaincode, as is mentioned in the docs, which resulted in my database from the old chaincode being wiped out. Any way, as usual, thanks for the pointers.

antitoine (Mon, 14 Aug 2017 14:00:21 GMT):
@habpygo I don't think that you need to change the chaincode ID, it is the only way for the SDK to know that there is already a chaincode installed with this ID. You have no issue when you don't use CouchDB ?

habpygo (Mon, 14 Aug 2017 15:49:05 GMT):
@antitoine no, without using CouchDB I don't have any issues at all except of course that I need to plug in the data for the `struct` every time I start. After that I can query the blockchain for all the keys or select the output for a specific key, or a range of keys. In any case for now I just leave the chaincode as is and focus on to transacting the struct (basically a personnel file instead of marbles) from a -> b -> c picking up attributes along the way.

habpygo (Mon, 14 Aug 2017 15:49:05 GMT):
@antitoine no, without using CouchDB I don't have any issues at all except of course that I need to plug in the data for the `struct` every time I start. After that I can query the blockchain for all the keys or select the output for a specific key, or a range of keys. In any case for now I just leave the chaincode as is and move on to transacting the struct (basically a personell file) from a -> b -> c picking up attributes along the way.

habpygo (Mon, 14 Aug 2017 15:49:05 GMT):
@antitoine no, without using CouchDB I don't have any issues at all except of course that I need to plug in the data for the `struct` every time I start. After that I can query the blockchain for all the keys or select the output for a specific key, or a range of keys. In any case for now I just leave the chaincode as is and move on to transacting the struct (basically a personnel file) from a -> b -> c picking up attributes along the way.

aneb (Tue, 15 Aug 2017 02:36:06 GMT):
I am actually running into the exact same problem. My chaincode installs,instantiates and runs fine through the SDK but I am also getting the same error when trying to update the chaincode. If I don't change any settings then I get the chaincode /var/hyperledger/production/chaincodes/myChaincode.v1.0.0 exists error which is normal. However if I update my version number and try to update(install) the chaincode I get the following error: chaincode exists myChaincode. For me the problem is not couchdb related though as I am not using couchdb at the moment. At first I thought it was just something that is wrong with my chaincode so I did the same with the marbles02 demo chaincode and the exact same thing is happening. I must be doing something wrong though as I am pretty sure at the very start of my project it worked a few times, although this problem started occurring pretty fast without any real change to the deploy/setup code. Using the fabric-txn/admin installCC and instantiateCC functions.

habpygo (Tue, 15 Aug 2017 07:23:40 GMT):
@aneb perhaps some food for thought, although I myself have not tried it as I focus on other things now. 1. Check if the containers are all gone when you start anew. With me I have the problem that one container remains even after the `make clean` command thus forcing me to manually get rid of it. 2. When updating, comment everything in the `Init` function. I forgot to do this (stupidly) and thus my data were gone. So try ``` func (t *YourChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { # # # return shim.Success(nil) // otherwise just nil ``` As I said I haven’t tried it but perhaps it will work, meaning that you can update the chaincode just giving it another version number without losing your data in the process.

habpygo (Tue, 15 Aug 2017 07:23:40 GMT):
@aneb perhaps some food for thought, although I myself have not tried it as I focus on other things now. 1. Check if the containers are all gone when you start anew. With me I have the problem that one container remains even after the `make clean` command thus forcing me to manually get rid of it. 2. When updating, comment everything in the `Init` function. I forgot to do this (stupidly) and thus my data were gone. So try ``` func (t *YourChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { fn, _ := stub.GetFunctionAndParameters() if fn != "init" { return shim.Error("Unknown function call") } # # # return shim.Success(nil) // otherwise just nil ``` As I said I haven’t tried it but perhaps it will work, meaning that you can update the chaincode just giving it another version number without losing your data in the process.

habpygo (Tue, 15 Aug 2017 07:23:40 GMT):
@aneb perhaps some food for thought, although I myself have not tried it as I focus on other things now. 1. Check if the containers are all gone when you start anew. With me I have the problem that one container remains even after the `make clean` command thus forcing me to manually get rid of it. 2. When updating, comment everything in the `Init` function. I forgot to do this (stupidly) and thus my data were gone. So try ``` func (t *YourChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { # # # return shim.Success(nil) // otherwise just nil ``` As I said I haven’t tried it but perhaps it will work, meaning that you can update the chaincode just giving it another version number without losing your data in the process.

habpygo (Tue, 15 Aug 2017 07:23:40 GMT):
@aneb perhaps some food for thought, although I myself have not tried it as I focus on other things now. 1. Check if the containers are all gone when you start anew. With me I have the problem that one container remains even after the `make clean` command thus forcing me to manually get rid of it. 2. When updating, comment everything in the `Init` function. I forgot to do this (stupidly) and thus my data were gone. So try ``` func (t *YourChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { fn, _ := stub.GetFunctionAndParameters() if function != "init" { return shim.Error("Unknown function call") } # # # return shim.Success(nil) // otherwise just nil ``` As I said I haven’t tried it but perhaps it will work, meaning that you can update the chaincode just giving it another version number without losing your data in the process.

aneb (Tue, 15 Aug 2017 08:48:22 GMT):
@habpygo Thank you for the feedback. Sadly I have already tried those suggestions with no luck. I will investigate more and retest everything with a new demo project using the default byfn network to filter out any problems that could arise by my code and network setup modifications.

troyronda (Tue, 15 Aug 2017 13:08:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NPipzg8HZJwmpKCQj) I wonder if the experimental golang dep tool helps (https://github.com/golang/dep)... although not (yet) an official tool, the status is now "safe for production use".

Jonny (Tue, 15 Aug 2017 13:28:30 GMT):
Has joined the channel.

daygee (Tue, 15 Aug 2017 14:48:54 GMT):
Hello guys

daygee (Tue, 15 Aug 2017 14:49:29 GMT):
so I'm trying to use the go sdk on Windows 10

daygee (Tue, 15 Aug 2017 14:50:21 GMT):
and trying to build a simple application round it

daygee (Tue, 15 Aug 2017 14:51:49 GMT):
but when I try to "go build" I get No such file or directory #include

daygee (Tue, 15 Aug 2017 14:53:17 GMT):
so i install libtool and get the file and move it to the include folder of mingw64

daygee (Tue, 15 Aug 2017 14:53:28 GMT):
also the lib files

daygee (Tue, 15 Aug 2017 14:57:14 GMT):
but now I'm getting ld.exe: cannot find -lltdl collect2.exe: error: ld returned 1 exit status

daygee (Tue, 15 Aug 2017 14:58:09 GMT):
can anyone help?

paul.sitoh (Tue, 15 Aug 2017 14:59:59 GMT):
@daygee try installing a C++ compiler

alexcrownus (Tue, 15 Aug 2017 20:59:09 GMT):
Hi

alexcrownus (Tue, 15 Aug 2017 21:00:50 GMT):
I ported fabric tutorial from nodejs to go

alexcrownus (Tue, 15 Aug 2017 21:00:54 GMT):
https://github.com/alexcrownus/fabcar

alexcrownus (Tue, 15 Aug 2017 21:03:17 GMT):
Beginners following the tutorial can check the equivalent go code. Feedbacks are welcome

troyronda (Wed, 16 Aug 2017 23:16:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=QDrKBurT9sEW4zarX) @passkit - this has been merged.

passkit (Wed, 16 Aug 2017 23:19:30 GMT):
Thanks. Do you have a Gerrit link? Could not see one in the Jira issue.

aleksandar.likic (Thu, 17 Aug 2017 02:45:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dK4bdSvLvkiRJyLs2) @passkit https://gerrit.hyperledger.org/r/#/c/12475/

BeierCai (Thu, 17 Aug 2017 05:04:41 GMT):
Has joined the channel.

fennelD7 (Thu, 17 Aug 2017 09:43:22 GMT):
Hi, I want to use the base_test_setup.go towards e2e_cli. In https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L77 and lines below, there are pem files: ca_root.pem, client_fabric_client-key.pem, client_fabric_client.pem. How can I find equivent files in fabric/examples/e2e_cli?

vladyslavmunin (Thu, 17 Aug 2017 11:15:42 GMT):
Has joined the channel.

vladyslavmunin (Thu, 17 Aug 2017 11:35:32 GMT):
@daygee use go build -tags nopksc

vladyslavmunin (Thu, 17 Aug 2017 11:35:32 GMT):
@daygee use go build -tags nopksc*

vladyslavmunin (Thu, 17 Aug 2017 11:35:32 GMT):
@daygee use *go build -tags nopksc*

vladyslavmunin (Thu, 17 Aug 2017 11:35:32 GMT):
@daygee use *go build -tags nopksc11*

vladyslavmunin (Thu, 17 Aug 2017 11:35:32 GMT):
@daygee use *go build -tags nopksc11*

vladyslavmunin (Thu, 17 Aug 2017 11:35:32 GMT):
@daygee use *go build -tags nopkcs11*

naumenkog (Thu, 17 Aug 2017 12:27:49 GMT):
Has joined the channel.

naumenkog (Thu, 17 Aug 2017 12:28:22 GMT):
Hi everyone. Do you have any estimate for this sdk to be ready?

antitoine (Thu, 17 Aug 2017 12:34:04 GMT):
Hi, basics features are already here. I already started to work with this SDK for my apps

vladyslavmunin (Thu, 17 Aug 2017 13:32:57 GMT):
anyone used this sdk on windows machine?

arjanvaneersel (Thu, 17 Aug 2017 13:51:35 GMT):
Does anyone know where I could start to help out developing this project? I looked for things to do regarding the fabric go SDK, but couldn't find anything on Jira. So I don't know if the project administration is done elsewhere, or if I'm just searching in the wrong way.

antitoine (Thu, 17 Aug 2017 13:56:24 GMT):
@arjanvaneersel I'm not a contributor, but I saw some functions with the "Not implemented yet" error. So, I think there is work to do. Nobody has talked about another project administration, except JIRA. Maybe open a JIRA to ask?

arjanvaneersel (Thu, 17 Aug 2017 14:00:12 GMT):
Must be doing something wrong in Jira then. Will browse there again.

antitoine (Thu, 17 Aug 2017 14:03:59 GMT):
Try with this search query: `project = FAB AND status = "To Do" AND text ~ "sdk go"`

arjanvaneersel (Thu, 17 Aug 2017 14:09:05 GMT):
@antitoine Yes, that actually returned some results. And at least enough of results to understand what I did wrong. Seems that fabric-sdk-go is the component. So I changed the query to: "project = FAB AND component = fabric-sdk-go" and now I get everything

e-nikolov (Thu, 17 Aug 2017 14:25:01 GMT):
Has joined the channel.

naumenkog (Thu, 17 Aug 2017 14:31:03 GMT):
@antitoine I can find the repo, but there is no examples to do simple things with golang sdk like just invoking tx for my own chaincode. Have you found something like that?

antitoine (Thu, 17 Aug 2017 14:48:21 GMT):
@naumenkog Try with the integration tests (https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/end_to_end_test.go) and the CLI example (https://github.com/securekey/fabric-examples/tree/master/fabric-cli/). But now, there are two tutorials: - This one: https://github.com/chainHero/heroes-service - And this one: https://github.com/alexcrownus/fabcar

antitoine (Thu, 17 Aug 2017 14:49:23 GMT):
But try with the tests, you will get the last version and all the code is ready

naumenkog (Thu, 17 Aug 2017 14:51:37 GMT):
@antitoine Thanks, last 2 tutorials seem very nice and helpful, I'll try to use them. Integration tests seem very abstract but complex for my purposes.

ivaylopivanov (Thu, 17 Aug 2017 19:06:04 GMT):
@antitoine although it's true that you can see how you can use the sdk, the current setup looks more than awful. If I'm not mistaken, in order to invoke chaincode to `func InvokeChaincode(client fab.FabricClient, channel fab.Channel, targets []apitxn.ProposalProcessor, eventHub fab.EventHub, chaincodeID string, fcn string, args []string, transientData map[string][]byte)`

ivaylopivanov (Thu, 17 Aug 2017 19:06:04 GMT):
@antitoine although it's true that you can see how you can use the sdk, the current setup looks more than awful. If I'm not mistaken, in order to invoke chaincode to I have to use `func InvokeChaincode(client fab.FabricClient, channel fab.Channel, targets []apitxn.ProposalProcessor, eventHub fab.EventHub, chaincodeID string, fcn string, args []string, transientData map[string][]byte)`

ivaylopivanov (Thu, 17 Aug 2017 19:06:59 GMT):
that makes it completely unusable an far from being a SDK

ivaylopivanov (Thu, 17 Aug 2017 19:07:07 GMT):
I really hope I'm missing something

e-nikolov (Thu, 17 Aug 2017 19:57:50 GMT):
I have a question about the tests/fixtures folder in the go sdk. inside the docker-compose.yaml, for the ca1 service, there are two volumes: - ./channel/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config - ./tls/fabricca/certs/server:/etc/hyperledger/fabric-ca-server-config And both of them map to the same path inside the container, but when I run docker-compose up, only one of those volumes gets copied inside the container. Additionally, both external paths contain a file with the name ca.org1.example.com-cert.pem, but the two of them have different contents. My question is, does anyone know what this is supposed to do?

fennelD7 (Fri, 18 Aug 2017 01:25:07 GMT):
@e-nikolov I had a similar question earlier. Compare https://github.com/alexcrownus/fabcar/blob/25034e8b52fa2826c826534117a515548498cac6/config_test.yaml#L75 and https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L77, I think the fixture/tls folder play same role as peerorg/ca, although I don't know why their contents are different.

fennelD7 (Fri, 18 Aug 2017 01:25:07 GMT):
@e-nikolov I had a similar question earlier. Compare https://github.com/alexcrownus/fabcar/blob/25034e8b52fa2826c826534117a515548498cac6/config_test.yaml#L75 and https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L77, I think the fixture/tls folder play same role as peerorg/ca, although I don't know why their contents are different.

fennelD7 (Fri, 18 Aug 2017 01:25:07 GMT):
@e-nikolov I had a similar question earlier. Compare https://github.com/alexcrownus/fabcar/blob/25034e8b52fa2826c826534117a515548498cac6/config_test.yaml#L75 and https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L77, I think the fixture/tls folder play same role as peerorg/ca in crypto-config, although I don't know why their contents are different.

antitoine (Fri, 18 Aug 2017 06:52:48 GMT):
@ivaylopivanov Yes, this is the one to use. I'm also surprise of the complexity. But it's really easy to abstract them if you use the same client, channel, peer... for every invokes.

ranjan008 (Fri, 18 Aug 2017 07:38:37 GMT):
I have created a new user using fabric-sdk-go and trying to access the chaincode methods but its giving error signed by unknown authority and also when creating users separately will it generate all the relevant user certificates required for interaction itself or will have to do it separately?

alexcrownus (Fri, 18 Aug 2017 07:59:49 GMT):
@ivaylopivanov I can understand your point. Please note that the SDK is still in development and not released yet. But I can assure you it is getting better and better

alexcrownus (Fri, 18 Aug 2017 08:03:45 GMT):
For example, there was no fabrictxn.InvokeChaincode abstraction. Also, fabric-txn/admin package has been added to simplify chaincode and channel administration

alexcrownus (Fri, 18 Aug 2017 08:09:29 GMT):
@antitoine You can actually have any number of channels, peers, orderers etc, just manage them in your application and then call the invoke function with the right combination

ivaylopivanov (Fri, 18 Aug 2017 18:01:19 GMT):
@antitoine @alexcrownus thank you for the clarification. I only hope it will become better over time. Fingers crossed. Is there any ETA btw?

kutenglaoshu (Sat, 19 Aug 2017 02:11:48 GMT):
Has joined the channel.

alexcrownus (Mon, 21 Aug 2017 08:06:03 GMT):
@ivaylopivanov I am not aware of any ETA as I am not a contributor yet but you can log in to Jira to see progress. I know the team tries to make sure the SDK is compatible with the current version of Fabric.

alexcrownus (Mon, 21 Aug 2017 08:08:04 GMT):
I have been using the SDK, it is very usable

ivaylopivanov (Mon, 21 Aug 2017 19:18:57 GMT):
@alexcrownus thank you!

habpygo (Wed, 23 Aug 2017 07:23:46 GMT):
Hi, I’m trying to configure the network for two organizations, `peerorg1` and `peerorg2` making use of the `config_test.yaml` file of the `Fabric-SDK-Go` but I keep getting the error: ``` 18:53:55.807 [bccsp_sw] DEBU : KeyStore created at [keystore]. 18:53:55.807 [bccsp_sw] DEBU : KeyStore opened at [keystore]...done Unable to initialize the Fabric SDK: Failed getting ephemeral software-based BCCSP [Failed initializing SW.BCCSP [Could not initialize BCCSP SW [CSP:500 - Failed initializing configuration at [256,] /vendor/github.com/hyperledger/fabric/bccsp/sw/impl.go:59 github.com/dapp_blockchain_development/dapp-lims/vendor/github.com/hyperledger/fabric/bccsp/sw.New ``` and all ends with: ``` Could not find default `SW` BCCSP] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x45e2d2a] ``` Do you have any idea where to look to solve this problem?

AlexanderEx123 (Wed, 23 Aug 2017 11:24:25 GMT):
Hello everyone, i have problem with method QueryInstantiatedChaincodes(), system chaincode LSCC throw error "Authorization for GETINSTALLEDCHAINCODES on channel getinstalledchaincodes has been denied with error Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])"

AlexanderEx123 (Wed, 23 Aug 2017 11:25:08 GMT):
but i used admin:adminpw identity, and invoking my own chaincodes is okay

AlexanderEx123 (Wed, 23 Aug 2017 11:25:35 GMT):
someone else faced with this error?

biljana_lukovic (Wed, 23 Aug 2017 15:43:35 GMT):
Has joined the channel.

biljana_lukovic (Wed, 23 Aug 2017 16:13:55 GMT):
Try using config-test.yaml as is without changing provider type

nimtiazm (Thu, 24 Aug 2017 00:27:25 GMT):
Has joined the channel.

aneb (Thu, 24 Aug 2017 08:19:27 GMT):
Hi, Is it currently actually possible to upgrade chaincode through the SDK by way of only updating the version number? I am a bit confused as I still keep running into the same problem of not being able to successfully do this. Then it hit me though that currently all I am doing is running the install/instantiate code while the upgrade mechanism is supposed to be done via "peer chaincode upgrade". Currently in the sdk source code I can't find any trace of an "upgrade" proptype being sent and he fabric source file proputils function CreateUpgradeProposalFromCDS doesn't have any usages. Are other people just updating their chaincode by CLI and is this a WIP item or is it really supposed to work with install/instantiate and am I just looking at deprecated code? Thanks for any feedback or confirmation.

aneb (Thu, 24 Aug 2017 08:19:27 GMT):
Quoting this unanswered question as I am running into the exact same problem. After I successfully register a new user, save user to the client state store, retrieve the user again from the state store, set the client user context to that retrieved user ,I invoke the chaincode and the "signed by unknown authority" is thrown. Just feels like I am missing a step or should this supposed to be all the required steps for registering a new user to invoke chaincode with? [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=r8ysDrnf9eoBiopAQ)

aneb (Thu, 24 Aug 2017 08:19:27 GMT):
Quoting this unanswered question as I am running into the exact same problem. After I successfully register a new user, save user to the client state store, retrieve the user again from the state store, set the client user context to that retrieved user ,I invoke the chaincode and the "signed by unknown authority" is thrown. Just feels like I am missing a step or should this supposed to be all the required steps for registering a new user to invoke chaincode with?

aneb (Thu, 24 Aug 2017 08:38:00 GMT):
just saw this todo item so might already answer my question :) https://jira.hyperledger.org/browse/FAB-3783?jql=project%20%3D%20FAB%20AND%20component%20%3D%20fabric-sdk-go

jmcnevin (Thu, 24 Aug 2017 14:06:56 GMT):
Looking through the example config.yaml files... what exactly does it mean to have BCCSP security enabled or disabled?

jmcnevin (Thu, 24 Aug 2017 14:08:09 GMT):
wondering where "softhsm" comes into this, and if it's needed for creating a simple client program

josip (Thu, 24 Aug 2017 18:30:47 GMT):
Has joined the channel.

josip (Thu, 24 Aug 2017 18:30:59 GMT):
Has left the channel.

biljana_lukovic (Thu, 24 Aug 2017 18:38:48 GMT):
client.BCCSP.security.enabled is not used at all. It will be deleted in next submission.

troyronda (Thu, 24 Aug 2017 23:05:33 GMT):
@jmcnevin - you don't need to use softhsm in a simple client program

troyronda (Thu, 24 Aug 2017 23:06:23 GMT):
in an upcoming submission, there should be example fixtures for both the simpler sw mode and hw modes like softhsm...

troyronda (Thu, 24 Aug 2017 23:26:06 GMT):
@here Upcoming CR to leverage the dep tool rather than govendor: https://gerrit.hyperledger.org/r/#/c/12725/

troyronda (Thu, 24 Aug 2017 23:26:06 GMT):
@here Upcoming CR to leverage the dep tool: https://gerrit.hyperledger.org/r/#/c/12725/

troyronda (Thu, 24 Aug 2017 23:26:06 GMT):
@here Upcoming CS to leverage the dep tool for vendoring: https://gerrit.hyperledger.org/r/#/c/12725/

troyronda (Thu, 24 Aug 2017 23:27:00 GMT):
Dep has better support for transitive dependencies (which is handy as an SDK)

troyronda (Thu, 24 Aug 2017 23:27:00 GMT):
dep has better support for transitive dependencies (which is handy as an SDK)

troyronda (Thu, 24 Aug 2017 23:27:23 GMT):
dep can be found at https://github.com/golang/dep

habpygo (Fri, 25 Aug 2017 09:31:54 GMT):
Hi, I have a problem initializing the Fabric SDK. After creating and opening the KeyStore I get the following error message: ``` … … 10:57:44.926 [bccsp_sw] DEBU : KeyStore created at [/tmp/msp/keystore]. 10:57:44.926 [bccsp_sw] DEBU : KeyStore opened at [/tmp/msp/keystore]...done 10:57:44.926 [bccsp_p11] DEBU : Loading pkcs11 library [] Unable to initialize the Fabric SDK: Error initializing SDK: Failed to initialize crypto suite [Could not initialize BCCSP PKCS11 [Failed initializing PKCS11 library ForFabric [No PKCS11 library default]]] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x98 pc=0x45e8d00] ``` I’ve tried to comment out the `BCCSP` part in the `config.yaml` file, but that gives this error message: ``` Environnement up Start app ... 2017-08-25 11:28:15.504 CEST [fabric_sdk_go] InitConfigWithCmdRoot -> INFO 001 Using config file: config.yaml 2017-08-25 11:28:15.504 CEST [fabric_sdk_go] InitConfigWithCmdRoot -> INFO 002 fabric_sdk_go Logging level: info panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x44157e7] ``` I’m using OS X and I see that I do not have the `/usr/local/Cellar/softhsm/2.1.0/lib/softhsm/libsofthsm2.so` file (or path for that matter; it stops after the `Cellar` dir). Any suggestions? Thanks.

aleksandar.likic (Fri, 25 Aug 2017 11:11:45 GMT):
@habpygo Try changing client.BCCSP.security.default.provider in your client configuration file from "PKCS11" to "SW"

troyronda (Fri, 25 Aug 2017 12:44:03 GMT):
@here The proposed upcoming CS (https://gerrit.hyperledger.org/r/#/c/12773/) removes the vendor folder from git. The SDK's vendor folder can be populated on your system by installing dep and running the make populate target in (https://gerrit.hyperledger.org/r/#/c/12725).

troyronda (Fri, 25 Aug 2017 12:44:03 GMT):
@here The proposed upcoming CS (https://gerrit.hyperledger.org/r/#/c/12773/) removes the vendor folder from git. The SDK's vendor folder can be populated on your system by installing dep and running the make populate target that is in the companion CS (https://gerrit.hyperledger.org/r/#/c/12725).

troyronda (Fri, 25 Aug 2017 12:46:36 GMT):
Note: you don't explicitly need the vendor folder in the SDK unless you are running the SDK's tests or you are using a vendoring solution that flattens transitive depenendencies. In the latter case, if your project uses dep then you don't need to populate the SDK's vendor.

troyronda (Fri, 25 Aug 2017 12:46:36 GMT):
Note: you don't explicitly need the vendor folder in the SDK unless you are running the SDK's tests or you are using a vendoring solution that flattens transitive depenendencies from the GOPATH. In the latter case, if your project uses dep then you don't need to populate the SDK's vendor.

troyronda (Fri, 25 Aug 2017 12:46:36 GMT):
Note: you don't explicitly need the vendor folder in the SDK unless you are running the SDK's tests or you are using certain vendoring solutions that flattens transitive dependencies. In the latter case, if your project uses dep then you don't need to populate the SDK's vendor.

habpygo (Fri, 25 Aug 2017 17:01:13 GMT):
@aleksandar.likic hi, I'm not sure what the problem is, but I'm reinstalling everything from scratch and see what happens. Thanks in any case!

habpygo (Fri, 25 Aug 2017 17:01:13 GMT):
@aleksandar.likic hi, I'm not sure what the problem is, but I'm reinstalling reinstalling everything from scratch and see what happens. Thanks in any case!

troyronda (Fri, 25 Aug 2017 17:22:04 GMT):
fyi: fix for linting that works with the new dep scripts is coming shortly (https://gerrit.hyperledger.org/r/#/c/12791/)

troyronda (Fri, 25 Aug 2017 19:07:32 GMT):
the fix has been merged along with dep files

merrickread (Fri, 25 Aug 2017 22:38:16 GMT):
Has joined the channel.

alexcrownus (Sat, 26 Aug 2017 13:46:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3n68xecsBHmZciC3m) @troyronda Cool

vdods (Sat, 26 Aug 2017 18:50:18 GMT):
Hi all, are cert attributes supported in the golang SDK?

vdods (Sat, 26 Aug 2017 18:50:38 GMT):
E.g. I want to be able to determine the transactor's roles, check their common name, etc.

vdods (Sat, 26 Aug 2017 18:50:38 GMT):
E.g. I want to be able to determine the transactor's roles, etc.

hangyuliu (Mon, 28 Aug 2017 12:51:56 GMT):
Fabric go sdk how to enroll cert to do invoke ....

hangyuliu (Mon, 28 Aug 2017 12:53:19 GMT):
sdk := baseSetup.FabricSDK client, nil := sdk.NewSystemClient(nil) user, err := client.LoadUserFromStateStore(appid) if err != nil { log.Println(appid, "LoadUserFromStateStore ERROR:",err.Error()) } else { log.Println("success load user appid:", appid,user) } channel, err := baseSetup.GetChannel(client, channelid, []string{baseSetup.OrgID}) if err != nil { return fmt.Sprintf("Create channel %s failed: %v", channelid, err), err } //client := baseSetup.Client //channel := baseSetup.Channel txID, err = baseSetup.InvokeFunc(client, channel, []apitxn.ProposalProcessor{channel.PrimaryPeer()}, baseSetup.EventHub, chaincode, fcn, args, transientDataMap) if err != nil { return "", err } So use a lot of memory leaks found, how can I solve, thank you

jmcnevin (Mon, 28 Aug 2017 13:22:36 GMT):
In the interests of building a non-gigantic docker container, I've been attempting to do some static-linked builds of my app using the go SDK, but I'm not sure if I should be worried about some of the messages I'm seeing: ``` CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo . # $PROJECT_ROOT/vendor/github.com/hyperledger/fabric-sdk-go/vendor/github.com/hyperledger/fabric/bccsp/pkcs11 vendor/github.com/hyperledger/fabric-sdk-go/vendor/github.com/hyperledger/fabric/bccsp/pkcs11/impl.go:82: undefined: pkcs11.Ctx vendor/github.com/hyperledger/fabric-sdk-go/vendor/github.com/hyperledger/fabric/bccsp/pkcs11/impl.go:83: undefined: pkcs11.SessionHandle # $PROJECT_ROOT/vendor/github.com/hyperledger/fabric-sdk-go/vendor/github.com/mattn/go-sqlite3 vendor/github.com/hyperledger/fabric-sdk-go/vendor/github.com/mattn/go-sqlite3/tracecallback_noimpl.go:7: undefined: SQLiteConn ```

mescoba1 (Mon, 28 Aug 2017 23:02:14 GMT):
Has left the channel.

aneb (Tue, 29 Aug 2017 01:06:45 GMT):
Is there currently any way to retrieve the Attributes send with a CA Registration request from the local state store or are these attributes not meant to be retrievable once sent?

baoyangc (Tue, 29 Aug 2017 05:47:57 GMT):
@hangyuliu what's the transientDataMap?

biljana_lukovic (Tue, 29 Aug 2017 13:16:48 GMT):
The transient data field of a proposal is a key-value store (Map). It allows the client side to set various fields in it, and the chaincode side to easily retrieve one or more fields. The transient data map is not saved in the ledger.

vdods (Tue, 29 Aug 2017 20:23:45 GMT):
Hi all, three questions: 1) are there SDK docs for fabric-sdk-go? 2) does fabric-sdk-go support cert attributes? 3) does fabric-sdk-go support TCerts?

troyronda (Tue, 29 Aug 2017 20:37:42 GMT):
On 3 - There are no tcerts

troyronda (Tue, 29 Aug 2017 20:37:53 GMT):
(it's not supported by fabric either)

troyronda (Tue, 29 Aug 2017 20:37:53 GMT):
(it's not supported by fabric in current releases)

troyronda (Tue, 29 Aug 2017 20:44:03 GMT):
(i'm not aware that any fabric sdk supports tcerts)

habpygo (Wed, 30 Aug 2017 06:45:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=epipyaxYZpBkdgpYr) @aleksandar.likic Hi, thanks for the solution; “SW” indeed did the job!

habpygo (Wed, 30 Aug 2017 06:45:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=epipyaxYZpBkdgpYr) @aleksandar.likic Hi, thanks for the solution; “SW” indeed did the job! I have another problem that I can’t figure out. When I try to install the chaincode it gives me the error. ``` SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (peer0.org1.example.com:7051) returned error 'context deadline exceeded' for txID '16314a6d5d6bb6becb145adad395a39a7e77beb08ca46b386878788cff2b8c0e' Unable to install and instantiate the chaincode: SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (peer0.org1.example.com:7051) returned error 'context deadline exceeded' for txID '16314a6d5d6bb6becb145adad395a39a7e77beb08ca46b386878788cff2b8c0e' ``` I think the error can be traced back to the function ``` func SendInstallCC(client fab.FabricClient, chainCodeID string, chainCodePath string, chainCodeVersion string, chaincodePackage []byte, targets []fab.Peer, deployPath string) error { … … for _, v := range transactionProposalResponse { if v.Err != nil { fmt.Println(“Error is probably here in line 47; endorser is: ", v.Endorser) // This returns an empty string return fmt.Errorf("InstallChaincode Endorser %s returned error: %v", v.Endorser, v.Err) } ``` Do you have any idea where I should look to resolve this? The tests all worked fine — exited with 0 Thanks

habpygo (Wed, 30 Aug 2017 06:45:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=epipyaxYZpBkdgpYr) @aleksandar.likic Hi, thanks for the solution; “SW” indeed did the job! I have another problem that I can’t figure out. When I try to install the chaincode it gives me the error. ``` SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (peer0.org1.example.com:7051) returned error 'context deadline exceeded' for txID '16314a6d5d6bb6becb145adad395a39a7e77beb08ca46b386878788cff2b8c0e' Unable to install and instantiate the chaincode: SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (peer0.org1.example.com:7051) returned error 'context deadline exceeded' for txID '16314a6d5d6bb6becb145adad395a39a7e77beb08ca46b386878788cff2b8c0e' ``` I think the error can be traced back to the function ``` func SendInstallCC(client fab.FabricClient, chainCodeID string, chainCodePath string, chainCodeVersion string, chaincodePackage []byte, targets []fab.Peer, deployPath string) error { … … for _, v := range transactionProposalResponse { if v.Err != nil { fmt.Println(“Error is probably here in line 47; endorser is: ", v.Endorser) // This returns an empty string return fmt.Errorf("InstallChaincode Endorser %s returned error: %v", v.Endorser, v.Err) } ``` Do you have any idea where I should look to resolve this? The tests all worked fine — exited with 0 Thanks By the way, the docker containers are running and the only warning I see that could be pertinent is ``` 2017-08-30 06:02:34.441 UTC [gossip/gossip] NewGossipService -> WARN 043 External endpoint is empty, peer will not be accessible outside of its organization ```

habpygo (Wed, 30 Aug 2017 08:56:17 GMT):
Hi, when I try to install the chaincode it gives me the error. ``` SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = illegal file detected in payload: "chaincode/main.go"' for txID '7b8047cbde62ad870a5591a69f263220845625ed9d5a6ba8d8e99a82d5319029' Unable to install and instantiate the chaincode: SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = illegal file detected in payload: "chaincode/main.go"' for txID '7b8047cbde62ad870a5591a69f263220845625ed9d5a6ba8d8e99a82d5319029' ``` `main.go` is the chaincode in the folder `chaincode` Looking at the function `func SendInstallCC( … )` in the file `transactionconfig.go` from `for _, v := range transactionProposalResponse {…` I can see that the Endorser is an empty string! Any suggestions where to look for the solution of this problem? Is it the Endorser that does not exist or the payload, or both? Thanks

habpygo (Wed, 30 Aug 2017 08:56:17 GMT):
Hi, when I try to install the chaincode it gives me the error. ``` SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = illegal file detected in payload: "chaincode/main.go"' for txID '7b8047cbde62ad870a5591a69f263220845625ed9d5a6ba8d8e99a82d5319029' Unable to install and instantiate the chaincode: SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = illegal file detected in payload: "chaincode/main.go"' for txID '7b8047cbde62ad870a5591a69f263220845625ed9d5a6ba8d8e99a82d5319029' ``` `main.go` is the chaincode in the folder `chain code` Looking at the function `func SendInstallCC( … )` in the file `transactionconfig.go` from `for _, v := range transactionProposalResponse {…` I can see that the Endorser is an empty string! Any suggestions where to look for the solution of this problem? Is it the Endorser that does not exist or the payload? Thanks

habpygo (Wed, 30 Aug 2017 08:56:17 GMT):
Hi, when I try to install the chaincode it gives me the error. ``` SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = illegal file detected in payload: "chaincode/main.go"' for txID '7b8047cbde62ad870a5591a69f263220845625ed9d5a6ba8d8e99a82d5319029' Unable to install and instantiate the chaincode: SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = illegal file detected in payload: "chaincode/main.go"' for txID '7b8047cbde62ad870a5591a69f263220845625ed9d5a6ba8d8e99a82d5319029' ``` `main.go` is the chaincode in the folder `chaincode` Looking at the function `func SendInstallCC( … )` in the file `transactionconfig.go` from `for _, v := range transactionProposalResponse {…` I can see that the Endorser is an empty string! Any suggestions where to look for the solution of this problem? Is it the Endorser that does not exist or the payload? Thanks

dolanor (Wed, 30 Aug 2017 15:22:12 GMT):
Hi, is there a way to set a timeout for a chaincode call?

greg.haskins (Wed, 30 Aug 2017 20:12:54 GMT):
Has left the channel.

aneb (Thu, 31 Aug 2017 04:46:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=r8ysDrnf9eoBiopAQ)

aneb (Thu, 31 Aug 2017 04:46:07 GMT):
Quoting this unanswered question as I am running into the exact same problem. I can register and enroll new users without any issues whatsoever. However if I set this user as client context before invoke the chaincode the signed by unknown authority error is thrown. Just feels like I am missing a step or should this work with no additional steps?

aneb (Thu, 31 Aug 2017 04:46:07 GMT):
Quoting this unanswered question as I am running into the exact same problem. I can register and enroll new users without any issues whatsoever. However if I set this user as client context before invoking the chaincode the signed by unknown authority error is thrown. Just feels like I am missing a step or should this work with no additional steps?

aneb (Thu, 31 Aug 2017 05:34:56 GMT):
after going through the issue list, i guess this is related to https://jira.hyperledger.org/browse/FAB-5314?jql=project%20%3D%20FAB%20AND%20issuetype%20%3D%20Bug%20AND%20text%20~%20OU

leogzl (Thu, 31 Aug 2017 06:17:55 GMT):
Has joined the channel.

nimtiazm (Sat, 02 Sep 2017 04:59:32 GMT):
Hi. i'm trying to follow this tutorial (https://www.ibm.com/developerworks/cloud/library/cl-ibm-blockchain-chaincode-development-using-golang/index.html) is there any similar step by step tutorial for fabric v1.0 ?

Xeriou (Sat, 02 Sep 2017 12:16:05 GMT):
Has joined the channel.

habpygo (Sun, 03 Sep 2017 14:20:31 GMT):
Hi, when I try to install the chaincode it gives me the error: ``` SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (localhost:7051) returned error 'rpc error: code = ResourceExhausted desc = grpc: trying to send message larger than max (5035506 vs. 4194304)' for txID '6492e437113035a5b988d44ab9b072785d82fdfcd660136ad4778bafcbf9d51a' ``` The problem is that I can’t see any other ERROR messages, for example, in the docker logs. Any idea what could be the problem? Thanks.

aneb (Mon, 04 Sep 2017 01:07:19 GMT):
@habpygo I ran into the same problem a while ago. Are you vendoring in external packages by any chance into your chaincode that are quite large? The chaincode gets packaged and sent to the orderer and there is a size limit.

baoyangc (Mon, 04 Sep 2017 03:23:56 GMT):
why there is no release v1.0.0 ?

baoyangc (Mon, 04 Sep 2017 03:25:47 GMT):
compared with fabric-sdk-java,is there any feature not completed in fabric-sdk-go ?

aneb (Mon, 04 Sep 2017 04:19:01 GMT):
@baoyangc From my experience so far only one I know of is not being able to upgrade chain code with the sdk out of the box.

baoyangc (Mon, 04 Sep 2017 06:10:40 GMT):
you mean: with fabric-sdk-java ,we can upgrade chaincode ?

aneb (Mon, 04 Sep 2017 06:25:22 GMT):
I haven't used the java sdk yet but it does have the UpgradeProposalRequest request class so I assume its possible. Also, the jira ticket for "sdk java upgrade chaincode support" is closed/completed. https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/UpgradeProposalRequest.java

habpygo (Mon, 04 Sep 2017 06:30:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CdLgCS5CTygyxTvpr) @aneb Yes @aneb I do a `govendor add +external`. Any suggestions what to do?

habpygo (Mon, 04 Sep 2017 06:30:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CdLgCS5CTygyxTvpr) @aneb Yes @aneb I do a `govendor add +external`. Any suggestions what to do? Without `+external` I get the error message ``` can't load package: package github.com/dapp_blockchain_development: no Go files in ```

aneb (Mon, 04 Sep 2017 07:28:49 GMT):
@habpygo I am not sure if the actual message size limit can be altered. Probably its possible but would have to look into that. What exactly are you adding to the chaincode? For example I ran into the same problems when I moved my chaincode to a standalone project and had to do govendor add +external to make my chaincode unit tests work. However this created a big sized vendor folder because of the hyperledger/fabric dependencies. The sdk basically just tars your chaincode src folder and sends it so for me that was a no no. For now I just moved my chaincode back into my main project (the one that uses the sdk) and I use the deployPath setting when installing the chaincode. By doing that my unit tests just use the vendor folder of my main project and for the actual chaincode external packages I have a separate vendor folder inside my chaincode src folder. So when installing the chaincode only the vendor folder in the chaincode src folder is included and all the rest is ignored. For example to include ffjson. Of course that was my situation. If you actually have a really big vendor folder with non related fabric stuff then there is not much you can do except for changing the message size limit or try to make your vendor folder small.

habpygo (Mon, 04 Sep 2017 08:01:14 GMT):
@aneb, yes that ''…when I moved my chaincode to a standalone project and had to do govendor add +external to make my chaincode unit tests work. However this created a big sized vendor folder because of the hyperledger/fabric dependencies.'' is exactly my problem! The size of the `vendor` folder is about 18MB, almost four times the allowed size. I’ll try some of your suggestions and see if it works. Thanks a million so far @aneb; this whole issue was driving me nuts! ... and it still is!

habpygo (Mon, 04 Sep 2017 08:01:14 GMT):
@aneb, yes that ‘’…when I moved my chaincode to a standalone project and had to do govendor add +external to make my chaincode unit tests work. However this created a big sized vendor folder because of the hyperledger/fabric dependencies.’’ is exactly my problem! The size of the `vendor` folder is about 18MB, almost four times the allowed size. I’ll try some of your suggestions and see if it works. Thanks a million so far @aneb; this whole issue was driving me nuts!

habpygo (Mon, 04 Sep 2017 08:01:14 GMT):
@aneb, yes that ''…when I moved my chaincode to a standalone project and had to do govendor add +external to make my chaincode unit tests work. However this created a big sized vendor folder because of the hyperledger/fabric dependencies.'' is exactly my problem! The size of the `vendor` folder is about 18MB, almost four times the allowed size. I’ll try some of your suggestions and see if it works. Thanks a million so far @aneb; this whole issue was driving me nuts!

habpygo (Mon, 04 Sep 2017 08:24:26 GMT):
Hi @aneb, sorry to bother you again, but just for me to clarify. I have a dir structure as follows `$GOPATH/src/github.com/hyperledger` in the `hyperledger folder` reside the `fabric` , `fabric-ca` and `fabric-sdk-go` folders. Would you suggest to move `myproject` in the `hyperledger` folder without `govendor`ing?

aneb (Mon, 04 Sep 2017 09:13:24 GMT):
My dir structure is actually as follows $GOPATH/src/local-gitbucket-ip/myProject/server inside myProject/server i have my go server code that uses the sdk. so inside this folder I do govendor add +external to prepare for fabric sdk usage. This fills up the vendor folder for my server project so I can use the sdk. Inside my myProject root folder I have a sub folder fixtures/src/myProject/chaincode. Inside this folder I put my chaincode and unit tests and a vendor folder with in my case ffjson only. When you use the sdk helper functions to install chaincode you can use the "deployPath" setting. Basically what this does is set a new ,temporary, GOPATH setting. So my new deployPath setting is ./fixtures which makes the sdk copy and install the path ./fixtures/src/myProject/chaincode folder. I actually prefer a separate folder/project for my chaincode but because of the dependency misery I put that on hold for a while and just do it like this. I am pretty sure there is a better way to handle this.

aneb (Mon, 04 Sep 2017 09:13:24 GMT):
My dir structure is actually as follows $GOPATH/src/local-gitbucket-ip/myProject/server inside myProject/server i have my go server code that uses the sdk. so inside this folder I do govendor add +external to prepare for fabric sdk usage. This fills up the vendor folder for my server project so I can use the sdk. Inside my myProject/server root folder I have a sub folder fixtures/src/myProject/chaincode. Inside this folder I put my chaincode and unit tests and a vendor folder with in my case ffjson only. When you use the sdk helper functions to install chaincode you can use the "deployPath" setting. Basically what this does is set a new ,temporary, GOPATH setting. So my new deployPath setting is ./fixtures which makes the sdk copy and install the path ./fixtures/src/myProject/chaincode folder. I actually prefer a separate folder/project for my chaincode but because of the dependency misery I put that on hold for a while and just do it like this. I am pretty sure there is a better way to handle this.

habpygo (Mon, 04 Sep 2017 10:37:07 GMT):
So, this would mean that you have a file structure like this, right? ``` └── local-gitbucket-ip └── myProject ├── fixtures │   └── src │   └── myProject │   └── chaincode │   ├── myProjectChainCode.go │   └── vendor └── server ├── gofile1.go ├── gofile2.go └── vendor ``` Two questions: 1. I assume that you have all the other `fixtures` stuff (like the `channel` folder and the `docker-compose.yaml` file in the fixtures folder as depicted above as well? 2. You would then run the `go build` command from the `myProject` root folder just below the `local-gitbucket-ip` folder right?

aneb (Mon, 04 Sep 2017 13:18:38 GMT):
actually in my project the fixtures folder is inside the server folder.

habpygo (Mon, 04 Sep 2017 14:15:38 GMT):
Ok @aneb let me try to sort this out. So far, thanks a lot!

habpygo (Mon, 04 Sep 2017 14:15:38 GMT):
Ok thanks, @aneb let me try to sort this out. So far, thanks a lot!

AnilOner (Mon, 04 Sep 2017 17:00:09 GMT):
Has joined the channel.

sai_ganesh (Tue, 05 Sep 2017 12:29:08 GMT):

Message Attachments

tskzh (Wed, 06 Sep 2017 05:49:58 GMT):
Has joined the channel.

zemtsov (Wed, 06 Sep 2017 06:33:53 GMT):
Has left the channel.

ranjan008 (Wed, 06 Sep 2017 08:57:39 GMT):
How to update a instantiated chaincode in fabric doe we have to install and instantiate again or just installing the chaincode will work ?

aneb (Wed, 06 Sep 2017 11:46:09 GMT):
@ranjan008 you update chaincode by running the peer chaincode upgrade command. Currently not supported by the go sdk though. Need to do this manually with the CLI or use the java or node sdk.

ranjan008 (Wed, 06 Sep 2017 11:55:49 GMT):
thanks @aneb

ranjan008 (Wed, 06 Sep 2017 12:13:18 GMT):
By the way any idea when that feature will be updated in go sdk

aneb (Wed, 06 Sep 2017 12:23:24 GMT):
not sure, this is the open ticket https://jira.hyperledger.org/browse/FAB-3783?jql=project%20%3D%20FAB%20AND%20component%20%3D%20fabric-sdk-go

aneb (Wed, 06 Sep 2017 12:25:05 GMT):
I might take a shot at it myself though because while there isn't really a helper function for it right now in the sdk, you can sort of follow the install and instantiate request and just copy/modify it to create the upgrade request. Haven't gotten around it yet though.

aneb (Wed, 06 Sep 2017 12:25:05 GMT):
I might take a shot at it myself though because while there isn't really a helper function for it right now in the sdk, you can sort of follow the install and instantiate request code and just copy/modify it to create the upgrade request. Haven't gotten around it yet though.

TsuWeiQuan (Wed, 06 Sep 2017 15:39:07 GMT):
Has joined the channel.

TsuWeiQuan (Wed, 06 Sep 2017 15:42:09 GMT):
Hello, can i use the go sdk with the blockchain i setup in v1.0.0 first-network ./byfn -m up -c mycc

TsuWeiQuan (Wed, 06 Sep 2017 15:42:11 GMT):
https://github.com/hyperledger/fabric-sdk-go

TsuWeiQuan (Wed, 06 Sep 2017 15:42:17 GMT):
i am following this guide

rcnewman (Wed, 06 Sep 2017 17:49:11 GMT):
Has joined the channel.

steveruckdashel (Wed, 06 Sep 2017 21:17:17 GMT):
Has joined the channel.

aneb (Thu, 07 Sep 2017 04:51:58 GMT):
@ranjan008 I take back what I said about not being able to send upgrade cc request with the go sdk. Like I said the helper functions aren't there but fixing this only requires a bit of copy pasting. In txsender.go (fabric-sdk-go code) you just copy the SendInstantiateProposal function and rename it to SendUpgradeProposal function. Inside this function you call protos_utils.CreateUpgradeProposalFromCDS instead of protos_utils.CreateDeployUpgradeProposalFromCDS and that is it. You just have to have to work your way up to transactionconfig.go to provide all the necessary helper/wrapper functions to the top. Of course you are editing your vendoring in package this way. You might also be able to just copy all this code to your own project.

aneb (Thu, 07 Sep 2017 04:51:58 GMT):
@ranjan008 I take back what I said about not being able to send upgrade cc request with the go sdk. Like I said the helper functions aren't there but fixing this only requires a bit of copy pasting. In txsender.go (fabric-sdk-go code) you just copy the SendInstantiateProposal function and rename it to SendUpgradeProposal function. Inside this function you call protos_utils.CreateUpgradeProposalFromCDS instead of protos_utils.CreateDeployUpgradeProposalFromCDS and that is it. You just have to work your way up to transactionconfig.go to provide all the necessary helper/wrapper functions to the top. Of course you are editing your vendoring in package this way. You might also be able to just copy all this code to your own project.

ranjan008 (Thu, 07 Sep 2017 05:21:52 GMT):
thanks @aneb will try that and come back if I face some issues

ylsGit (Thu, 07 Sep 2017 06:21:14 GMT):
Is there a go-sdk v1.0.0 and v1.0.1 branch?

sokhomoliyuth (Thu, 07 Sep 2017 08:23:14 GMT):
Has joined the channel.

flome (Thu, 07 Sep 2017 09:18:02 GMT):
Has joined the channel.

jmcnevin (Thu, 07 Sep 2017 16:24:48 GMT):
Anyone seen this before? ``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x4796d12] goroutine 38 [running]: .../vendor/github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/internal/txnproc.SendTransactionProposalToProcessors.func1(0xc4201b5680, 0xc4201bb980, 0xc4201b5668, 0xc4201b9a60, 0x0, 0x0) $GOPATH/.../vendor/github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/internal/txnproc/txnproc.go:40 +0x72 created by .../vendor/github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/internal/txnproc.SendTransactionProposalToProcessors $GOPATH/.../vendor/github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/internal/txnproc/txnproc.go:52 +0x15f ```

jmcnevin (Thu, 07 Sep 2017 16:25:13 GMT):
I'm trying to use `channel.QueryInstantiatedChaincodes()`

biljana_lukovic (Thu, 07 Sep 2017 17:05:46 GMT):
@sai_ganesh - Message says that ca_peerOrg1 is not available. Run docker-compose to configure network. The integration tests require configured network with 2 orgs, peer, orderer...

troyronda (Thu, 07 Sep 2017 17:32:41 GMT):
@ylsGit the readme file lists known compatibility against fabric versions (https://github.com/hyperledger/fabric-sdk-go/blob/master/README.md)

ylsGit (Fri, 08 Sep 2017 03:15:30 GMT):
thx @troyronda

sai_ganesh (Fri, 08 Sep 2017 05:38:58 GMT):
Hi @biljana_lukovic. I ran docker-compose to configure the network. In the test/fixtures folder, ran *docker-compose up --force-recreate*. Checked if the containers are running with *docker ps* command. Still I am getting the same. The error persists with or without running the docker-compose. That's confusing me.

sai_ganesh (Fri, 08 Sep 2017 06:44:56 GMT):
Hi all. We are trying to create users and get them enrolled using the facric-ca module of the sdk, but are unable to use the users that we created in the chaincode that we install and instantiate. Only the default users are available. How to enable the newly created users to participate in the network as well?

aneb (Fri, 08 Sep 2017 09:22:11 GMT):
@sai_ganesh I am also experiencing the same problem. I think it is related to this open issue https://jira.hyperledger.org/browse/FAB-5314?jql=project%20%3D%20FAB%20AND%20issuetype%20%3D%20Bug%20AND%20text%20~%20OU . I have already tried to modify the code and include the CSR with an OU value but with no luck. It is not entirely clear to me just exactly what OU value needs to be set.

aneb (Fri, 08 Sep 2017 09:22:11 GMT):
@sai_ganesh I am also experiencing the same problem. I think it is related to this open issue https://jira.hyperledger.org/browse/FAB-5314?jql=project%20%3D%20FAB%20AND%20issuetype%20%3D%20Bug%20AND%20text%20~%20OU . I have already tried to modify the code and include the CSR with an OU value but with no luck. It is not entirely clear to me just exactly what OU value needs to be set or if the OU actually has anything to do with the problem.

troyronda (Fri, 08 Sep 2017 15:20:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=AbFY5kMWT9bF7xADN) gentle reminder

troyronda (Fri, 08 Sep 2017 15:21:23 GMT):
(also https://gerrit.hyperledger.org/r/#/c/13259/)

habpygo (Fri, 08 Sep 2017 15:59:46 GMT):
Hi @aneb, coming back to the discussion on the ERROR message below: ``` SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (localhost:7051) returned error 'rpc error: code = ResourceExhausted desc = grpc: trying to send message larger than max (5035506 vs. 4194304)' for txID '6492e437113035a5b988d44ab9b072785d82fdfcd660136ad4778bafcbf9d51a' ``` The size of the file didn’t matter in the end! The problem is the `PATH` to the chaincode. I was having problems with finding the right path to the `chaincode.go` file due to the code snippet `deployPath` which plunks a `src` dir at the end of the path. So it had nothing to do with the size of the chaincode or `vendor` dir. How on earth does a developer debug his code when error messages set him/her on the wrong path (pun intended), you may ask. Answer: I can’t remember, but there was a whole lot of #!*(%$# going on behind my desk I can assure you that.

habpygo (Fri, 08 Sep 2017 15:59:46 GMT):
Hi @aneb, coming back to the discussion on the ERROR message below: ``` SendInstallProposal return error: InstallChaincode Endorser returned error: Transaction processor (localhost:7051) returned error 'rpc error: code = ResourceExhausted desc = grpc: trying to send message larger than max (5035506 vs. 4194304)' for txID '6492e437113035a5b988d44ab9b072785d82fdfcd660136ad4778bafcbf9d51a' ``` The size of the file didn’t matter in the end! The problem is the `PATH` to the chaincode. I was having problems with finding the right path to the `chaincode.go` file due to the code snippet `deployPath` which plunks a `src` dir at the end of the path. How on earth does a developer debug his code when error messages set him/her on the wrong path (pun intended), you may ask. Answer: I can’t remember, but there was a whole lot of #!*(%$# going on behind my desk I can assure you that.

biljana_lukovic (Fri, 08 Sep 2017 19:35:51 GMT):
@sai_ganesh try adding this to etc/hosts (127.0.0.1 orderer.example.com peer0.org1.example.com peer0.org2.example.com ca_peerOrg1 ca_peerOrg2 )

Antonio_M (Sat, 09 Sep 2017 12:01:11 GMT):
Has joined the channel.

Antonio_M (Sun, 10 Sep 2017 20:00:35 GMT):
Hi guys, I've been trying out the sdk, but I'm getting confused by the config.yaml file and the certificates it's pointing to and how they correlate to the ones created by the cryptogen tool. Are these configs explained anywhere a bit more in depth? Thank you

aneb (Mon, 11 Sep 2017 02:04:05 GMT):
@habpygo I am glad you were able to fix the problem. I finally moved my chaincode to a separate project/folder as well. In my case the message larger than max ... error was correct though. A too big vendor folder because of the fabric dependencies. Now I just do go/src/myproject/chaincode-go/vendor -> contains fabric hyperledger and go/src/myproject/chaincode-go/src/chaincode is where the actual code resides (including another vendor folder for dependencies like ffjson or basically anything). When deploying I then just set my gopath temporarily to go/src/myproject/chaincode-go so the main vendor folder will be skipped. Another solution would be to just move all my unit test code to a separate project folder like src/myproject/chaincode-go-test to avoid all of these dependency issues. However soon you will be required to vendor in the shim package as well, was in 1.0.2 release notes, so from then I think you will see a "recommended" way of doing it because I can guarantee that will cause the same dependency issues.  It is also possible I am just doing something wrong and you just need to find the correct directory structure/paths to avoid any dependency issues as you mentioned.

aneb (Mon, 11 Sep 2017 02:04:05 GMT):
@habpygo I am glad you were able to fix the problem. I finally moved my chaincode to a separate project/folder as well. In my case the message larger than max ... error was correct though. A too big vendor folder because of the fabric dependencies. Now I just do go/src/myproject/chaincode-go/vendor -> contains fabric hyperledger and go/src/myproject/chaincode-go/src/chaincode is where the actual code resides (including another vendor folder for dependencies like ffjson or basically anything). When deploying I then just set my gopath temporarily to go/src/myproject/chaincode-go so the main vendor folder will be skipped. Another solution would be to just move all my unit test code to a separate project folder like src/myproject/chaincode-go-test to avoid all of these dependency issues. However soon you will be required to vendor in the shim package as well, was in 1.0.2 release notes, so from then I think you will see a "recommended" way of doing it because I can guarantee that will cause the same dependency issues.

codestone (Mon, 11 Sep 2017 02:23:39 GMT):
Has joined the channel.

codestone (Mon, 11 Sep 2017 02:24:59 GMT):
The fabric- SDK -go is not going to be updated?

aneb (Mon, 11 Sep 2017 07:06:29 GMT):
@biljana_lukovic (sorry to hijack the question but I am having the same problem) I added everything to my hosts file but still no luck with getting CA enrolled users to execute chaincode.

habpygo (Mon, 11 Sep 2017 09:59:12 GMT):
Hi @aneb, I’m not sure which is the right answer to this problem. Both solutions seem to work; however, I’m still a bit confused by this particular error message and it was by debugging line by line (with `fmt.Println(—)` statements) that I saw that the `PATH` to the `chaincode` contained a `src/src` directory. By pruning one of them it finally worked. In any case let’s keep ourselves, and this channel of course, informed on this issue as we move on. Anyway, as always, thanks for your help. Much appreciated!

sai_ganesh (Mon, 11 Sep 2017 10:02:37 GMT):
Thank you @biljana_lukovic. That worked for me.

ArvsIndrarys (Mon, 11 Sep 2017 11:54:41 GMT):
Hi guys ! I'm wondering if a transaction storage has been implemented, let me explain : The client tries to send data to a peer. Unfortunately, it has some connection problem so these transaction haven't been sent until the timeout expires. A week later, the connection problem is resolved and I would like all transaction that failed within the week to be sent again (the transactions are automated). Is there currently an easy way in that sdk that enables me to do that, or should I have to find some other way?

aleksandar.likic (Mon, 11 Sep 2017 15:24:26 GMT):
@ArvsIndrarys Sorry, the SDK cannot queue and retry transactions later. For this scenario, you would normally use some messaging provider and configure a persistent queue that would hold the messages and redeliver (to a consumer that transacts with fabric) periodically until messages are consumed.

ArvsIndrarys (Mon, 11 Sep 2017 16:29:00 GMT):
Too bad, that would have avoided me some code. Thanks @aleksandar.likic !

skbodwell (Mon, 11 Sep 2017 20:43:57 GMT):
Has joined the channel.

luckydogchina (Tue, 12 Sep 2017 09:04:45 GMT):
Has joined the channel.

luckydogchina (Tue, 12 Sep 2017 09:05:52 GMT):
Can the fabric-sdk-go be used in chaincodes?

enigma (Tue, 12 Sep 2017 12:56:32 GMT):
Has joined the channel.

enigma (Tue, 12 Sep 2017 13:16:14 GMT):
why you want to do that luckydog?

enigma (Tue, 12 Sep 2017 13:17:29 GMT):
I have another question, trying to run integration tests of the sdk with latest sources results in: transient_data_test.go:27: NewUser returned error: Enroll returned error: Enroll failed: POST failure [Post https://ca_peerOrg1:7054/enroll: dial tcp: lookup ca_peerOrg1 on 127.0.1.1:53: read udp 127.0.0.1:52039->127.0.1.1:53: i/o timeout]; not sending

enigma (Tue, 12 Sep 2017 13:18:35 GMT):
with docker-compose --force-recreate bringing up all containers fine: Attaching to fixtures_builder_1, ca_peerOrg2, ca_peerOrg1, orderer.example.com, peer0.org2.example.com, peer0.org1.example.com

enigma (Tue, 12 Sep 2017 13:19:37 GMT):
I tried the same setup on a different machine to validate if sth with my docker setup is wrong but that gives me same error

fred0071 (Tue, 12 Sep 2017 17:47:00 GMT):
Has joined the channel.

luckydogchina (Wed, 13 Sep 2017 01:53:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9JRDZQqEDMkWgWHyZ) @enigma send a tx in chaincodes.

aneb (Wed, 13 Sep 2017 07:23:50 GMT):
After making progress and understanding the whole TLS setup more I am still unable to get newly enrolled users to invoke chaincode. and the following error is thrown : 'rpc error: code = Unknown desc = Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority' for proposal:` I must note that I am not working with the default peerOrg1 ... example.com setup anymore and created my own network. Especially for trying to figure out all of the different CA and TLS settings. Steps I have taken: ``` - created my own ca_root.pem and ca_root-key.pem - created my wildcard CA(for localhost testing) and client-fabric-client(-key).pem signed with my own ca_root.pem - use this wildcard CA in docker-compose as the FABRIC_CA_SERVER_TLS_CERT(KEY)FILE settings - have all the necessary /etc/host mappings to 127.0.0.1 - until this part everything works fine. I can register, enroll, revoke users when using the CA connection URL"https://ca_Peer###:7054" - before invoking chaincode I run `setup.Client.SetUserContext(user)` with user being the enrolledUser - after sender.SendTransaction(tx) is called the earlier metioned error is thrown. ``` It really feels that I am missing something here. When using pre enrolled peer users everything works fine (admin and normal user) so I decided to check what is different between the two. The Issuer for the pregenerated certs is set to ca...com while the generated issuer is set to fabric-ca-user (because of the ca server config CSR settings). Shouldn't these generated certs contain an ORG reference? Anyone that has any idea what I might be missing here or what might be going wrong? It is the only remaining issue I need to figure out before I can start with AWS/Bluemix. Thank you.

Redscarfs (Wed, 13 Sep 2017 08:09:35 GMT):
Has joined the channel.

karankb8 (Wed, 13 Sep 2017 10:34:09 GMT):
Has joined the channel.

enigma (Wed, 13 Sep 2017 10:45:34 GMT):
Not sure why nobody answers after all your sdk does not currently even run through its own integration test, such a shame

bryanhuang (Wed, 13 Sep 2017 12:47:56 GMT):
Has joined the channel.

bryanhuang (Wed, 13 Sep 2017 12:51:58 GMT):
Hi, I found the chaincode upgrade support wasn't implemented, so I would like to work on "FAB-3783 SDK Go - Upgrade CC support".

aneb (Wed, 13 Sep 2017 13:14:32 GMT):
@enigma did you add 127.0.0.1 ca_peerOrg1 to your host file? Before this wasn't necessary as the used localhost:7054 as a connection string including a server certifcate with a DNS for localhost. However now they use ca_peerOrg1 in the connection url so you need to redirect it.

aneb (Wed, 13 Sep 2017 13:14:32 GMT):
@enigma did you add 127.0.0.1 ca_peerOrg1 to your host file? Before this wasn't necessary as they used localhost:7054 as a connection string including a server certifcate with a CN for localhost. However now they use ca_peerOrg1 in the connection url so you need to redirect it.

enigma (Wed, 13 Sep 2017 13:25:14 GMT):
thanks for your answer aneb! I will try this

biljana_lukovic (Wed, 13 Sep 2017 14:55:09 GMT):
@enigma Try running 'make' or 'make all' target from the 'fabric-sdk-go' folder. Reported error implies that you do not have proper configuration

enigma (Wed, 13 Sep 2017 14:55:38 GMT):
yeah the make script doesnt solve anything

enigma (Wed, 13 Sep 2017 14:56:10 GMT):
anebs suggestion though did solve my problems, just personally not really satisfied with this /etc/hosts redirect

enigma (Wed, 13 Sep 2017 14:59:07 GMT):
would I also have to make a redirect for each chaincode container that gets deployed as one of the few tests that still fails on the integration test calls **Channel: channel_id:"mychannel" ****QueryInstalledChaincodes for peer0.org1.example.com:7051 **InstalledCC: name:"3h575vuqfw" version:"v0" path:"github.com/example_cc" INFO[0019] grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup test on 127.0.1.1:53: no such host"; Reconnecting to {test:1111 } module=grpc

enigma (Wed, 13 Sep 2017 14:59:38 GMT):
here is my hosts file

enigma (Wed, 13 Sep 2017 14:59:49 GMT):
127.0.0.1 localhost 127.0.0.1 ca_peerOrg1 127.0.0.1 ca_peerOrg2 127.0.1.1 peer0.org1.example.com 127.0.1.1 orderer.example.com

enigma (Wed, 13 Sep 2017 15:01:34 GMT):
running it through my own script does not give me a similar error however: ******* EventHub connect to peer (peer0.org1.example.com:7053) ******* **InstalledCC: name:"2zmc6z08mm" version:"v0" path:"github.com/events_cc" ...etc

enigma (Wed, 13 Sep 2017 15:01:45 GMT):
and the integration test itself is able to invoke the chaincode

enigma (Wed, 13 Sep 2017 15:02:38 GMT):
just fine with my hosts file ******* EventHub connect to peer (peer0.org1.example.com:7053) ******* *** QueryValue before invoke 200 *** QueryValue after invoke 201

enigma (Wed, 13 Sep 2017 15:11:38 GMT):
the only difference I can see between my own script and the integration test is the port being wrong

enigma (Wed, 13 Sep 2017 15:11:38 GMT):
the only difference I can see between my own script and the integration test is the port

enigma (Wed, 13 Sep 2017 15:11:39 GMT):
peer0.org1.example.com:7051

enigma (Wed, 13 Sep 2017 15:11:47 GMT):
vs

enigma (Wed, 13 Sep 2017 15:11:50 GMT):
peer0.org1.example.com:7053

enigma (Wed, 13 Sep 2017 15:12:01 GMT):
for that specific call

enigma (Wed, 13 Sep 2017 15:14:20 GMT):
probably because the one is called docker internally and the other is called outside as the port mapping suggests 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com

troyronda (Wed, 13 Sep 2017 15:20:54 GMT):
@bryanhuang cool - the project takes contributions

enigma (Wed, 13 Sep 2017 15:21:37 GMT):
but anyway for now my script works again thank you very much aneb

enigma (Wed, 13 Sep 2017 16:28:43 GMT):
If I create a user like so: // Register a user registerRequest := ca.RegistrationRequest{ Name: userName, Type: "user", Affiliation: "org1.department1", CAName: caConfig.Name, } enrolmentSecret, err := caClient.Register(adminUser, ®isterRequest) if err != nil { fmt.Errorf("Error from Register: %s", err) } fmt.Printf("Registered User: %s, Secret: %s\n", userName, enrolmentSecret) and if I set and load it to/from statestore subsequently and try to invoke the example_cc chaincode on mychannel with that user it fails silently (no error but also no invocation) I assume that my user does not have the appriate role/policy to invoke the chaincode on that channel or do anything else on the peer. How can I add a role to this type user so it will be able to interact with the channel and chaincode?

enigma (Wed, 13 Sep 2017 16:33:48 GMT):
it works with the utils.go user1 getDefaultImplPreEnrolledUser org1User, err := GetUser(sc, "org1", setup.OrgID) if err != nil { return fmt.Errorf("Error getting org user: %v", err) } sc.SetUserContext(org1User) fetching the signcerts from the pre-enrolled user test/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com but why not with my created user?

aneb (Wed, 13 Sep 2017 16:35:03 GMT):
@enigma if there really is no error or it fails silently then something else must be wrong. I am actually running into the exact same problem at the moment but in my case it clearly throws an error saying that the identity couldn't be validated.

enigma (Wed, 13 Sep 2017 16:35:29 GMT):
interesting

aneb (Wed, 13 Sep 2017 16:35:30 GMT):
you can see the error in my previous,long, post

enigma (Wed, 13 Sep 2017 16:35:45 GMT):
maybe my memory betrayed me here, I will take look

enigma (Wed, 13 Sep 2017 16:37:48 GMT):
yes I am running into the same issue aneb just with the default deployment configuration nothing changed

enigma (Wed, 13 Sep 2017 16:39:47 GMT):
but when you look at this function here // GetUser returns a pre-enrolled org user func GetUser(c fab.FabricClient, orgPath string, orgName string) (ca.User, error) { keyDir := fmt.Sprintf("peerOrganizations/%s.example.com/users/User1@%s.example.com/msp/keystore", orgPath, orgPath) certDir := fmt.Sprintf("peerOrganizations/%s.example.com/users/User1@%s.example.com/msp/signcerts", orgPath, orgPath) username := fmt.Sprintf("peer%sUser1", orgPath) return getDefaultImplPreEnrolledUser(c, keyDir, certDir, username, orgName) } it clearly consumes a signcert next ti the msp/keystore aka tmp/enrolled_user (I guess)

enigma (Wed, 13 Sep 2017 16:39:47 GMT):
but when you look at this function here // GetUser returns a pre-enrolled org user func GetUser(c fab.FabricClient, orgPath string, orgName string) (ca.User, error) { keyDir := fmt.Sprintf("peerOrganizations/%s.example.com/users/User1@%s.example.com/msp/keystore", orgPath, orgPath) certDir := fmt.Sprintf("peerOrganizations/%s.example.com/users/User1@%s.example.com/msp/signcerts", orgPath, orgPath) username := fmt.Sprintf("peer%sUser1", orgPath) return getDefaultImplPreEnrolledUser(c, keyDir, certDir, username, orgName) } it clearly consumes a signcert next to the msp/keystore aka tmp/enrolled_user (I guess)

enigma (Wed, 13 Sep 2017 16:41:54 GMT):
nothing like that in the /tmp/enrolled_user/{user}.json

enigma (Wed, 13 Sep 2017 16:42:03 GMT):
{"MspID":"Org1MSP","Roles":null,"PrivateKeySKI":"ImlEBd6C5FvyaV0bvmkdfSLK/WuctrR5ljMjBa+xzU0=","EnrollmentCertificate":... }

enigma (Wed, 13 Sep 2017 16:42:09 GMT):
and roles null of course

troyronda (Wed, 13 Sep 2017 16:52:48 GMT):
@here - Currently investigating how best to remove fabric & fabric-ca (and their transitive dependencies) from vendor

troyronda (Wed, 13 Sep 2017 16:52:48 GMT):
@here - Currently investigating how best to remove fabric & fabric-ca (and some of their transitive dependencies that are not necessary for the SDK) from vendor

troyronda (Wed, 13 Sep 2017 16:54:14 GMT):
Thinking about copying Fabric's protos & bccsp in the SDK namespace and other common code under an internal path...

troyronda (Wed, 13 Sep 2017 16:54:14 GMT):
Thinking about copying Fabric's protos & bccsp into the SDK namespace and other common code under an internal path...

troyronda (Wed, 13 Sep 2017 16:54:34 GMT):
Other dependencies would remain vendored, of course.

troyronda (Wed, 13 Sep 2017 16:55:24 GMT):
In a POC of this effort, this is the resulting removal of dependencies: https://gerrit.hyperledger.org/r/#/c/13385/3/Gopkg.lock

troyronda (Wed, 13 Sep 2017 16:56:25 GMT):
(btw - ideally the code wouldn't need to be copied but would have been a seperate git repo)

cbf (Wed, 13 Sep 2017 16:56:31 GMT):
@troyronda it would be useful to apply this learning to decompose fabric repo itself so we could have a repo just for vendoring

enigma (Wed, 13 Sep 2017 16:56:47 GMT):
cool

troyronda (Wed, 13 Sep 2017 16:56:50 GMT):
@cbf - yup

troyronda (Wed, 13 Sep 2017 16:57:23 GMT):
I have meetings tomorrow, but plan to update the POC hopefully on friday

troyronda (Wed, 13 Sep 2017 16:57:34 GMT):
this should show the real dependent code

troyronda (Wed, 13 Sep 2017 16:58:13 GMT):
If a seperate git repo becomes created, I could remove the copied code from the Go SDK :)

troyronda (Wed, 13 Sep 2017 16:58:13 GMT):
If a separate git repo becomes created, I could remove the copied code from the Go SDK :)

troyronda (Wed, 13 Sep 2017 16:59:35 GMT):
btw - if anyone puts test CC into their repo, suggest putting under a testdata folder so tools like dep don't pick it up :) https://github.com/hyperledger/fabric-sdk-go/commit/dab5a982f0987d55a196434036364e9e5191f0c5

troyronda (Wed, 13 Sep 2017 16:59:35 GMT):
btw - if anyone puts test CC into their repo, suggest putting under a testdata folder so tools like dep don't pick it up ... eg, https://github.com/hyperledger/fabric-sdk-go/commit/dab5a982f0987d55a196434036364e9e5191f0c5

aneb (Wed, 13 Sep 2017 17:23:16 GMT):
@enigma yeah, i have the same feeling. It just feels like there is a missing link. Will take a look at it more tomorrow. It is the sole remaining problem that is driving me up the wall :)

vdods (Wed, 13 Sep 2017 23:23:42 GMT):
Where are the API docs for the golang SDK?

vdods (Wed, 13 Sep 2017 23:25:15 GMT):
Example code for using the fabric-ca-client module would also be acceptable, but I can't find any example code or relevant documentation, and I'm getting a segfault while calling NewFabricCAClient: ```2017-09-13 16:15:41.252 PDT [fabric_sdk_go] InitConfigWithCmdRoot -> INFO 001 Using config file: client/config.yaml 2017-09-13 16:15:41.252 PDT [fabric_sdk_go] InitConfigWithCmdRoot -> INFO 002 fabric_sdk_go Logging level is finally set to: INFO 2017/09/13 16:15:41 fabric_ca_config.InitConfig succeeded; client_config = &config.Config{tlsCertPool:(*x509.CertPool)(0xc420129b90), networkConfig:(*apiconfig.NetworkConfig)(nil), networkConfigCached:false} panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x8868bc] goroutine 1 [running]: github.com/hyperledger/fabric-sdk-go/pkg/config.(*Config).CAConfig(0xc42014ec40, 0xa2d82a, 0x4, 0xd0, 0xf01800, 0xbc) /home/vdods/files/gopath/src/github.com/hyperledger/fabric-sdk-go/pkg/config/config.go:94 +0x7c github.com/hyperledger/fabric-sdk-go/pkg/fabric-ca-client.NewFabricCAClient(0xed4240, 0xc42014ec40, 0xa2d82a, 0x4, 0x1, 0x0, 0xc420125f38) /home/vdods/files/gopath/src/github.com/hyperledger/fabric-sdk-go/pkg/fabric-ca-client/fabricca.go:43 +0x135 main.main() /home/vdods/files/gopath/src/github.com/LedgerDomain/playground/woebegone/13-go-fabric-ca/client/main.go:24 +0x22d exit status 2 ```

aneb (Thu, 14 Sep 2017 01:37:47 GMT):
@vdods I don't think there is any at the moment. The code is commented pretty well so for example you could run `godoc -http=:6060` , access localhost:6060 and go through the docs like that. Although to be honest you might as well just go through the code as it will feel exactly the same. Example code on how to use the Fabric CA client can be found here though https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/fabric_ca_test.go.

vdods (Thu, 14 Sep 2017 03:24:40 GMT):
Looks like I have to use fabric-sdk-go/def/fabapi.. though I'm not sure how to get the default options values.

vdods (Thu, 14 Sep 2017 03:24:41 GMT):
Is there any example of an options config file? It's super unclear what config options are necessary.

aneb (Thu, 14 Sep 2017 03:56:54 GMT):
You mean this config file that is used by the sdk https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml ?

vdods (Thu, 14 Sep 2017 05:27:17 GMT):
@aneb thanks!

vdods (Thu, 14 Sep 2017 05:44:56 GMT):
Is it reasonable to use the fabric-ca-client portion of fabric-sdk-go alone? Or is that not possible?

smallX (Thu, 14 Sep 2017 07:02:56 GMT):
Has joined the channel.

Kyroy (Thu, 14 Sep 2017 09:38:14 GMT):
Has joined the channel.

enigma (Thu, 14 Sep 2017 15:59:06 GMT):
@aneb did you have any luck figuring out how to use a created user to make cc invocations on the peer channel

aneb (Thu, 14 Sep 2017 22:58:36 GMT):
@enigma not yet. Have already spent a lot of time on this but needed to focus on other parts of my project now. Will spend more time on this next week because obviously this is a mayor problem for me as without this I can't secure my chaincode really well because I need to keep using the peer admin or same pregenerated users.

aneb (Thu, 14 Sep 2017 22:58:36 GMT):
@enigma not yet. Have already spent a lot of time on this but needed to focus on other parts of my project now. Will spend more time on this next week because obviously this is a major problem for me as without this I can't secure my chaincode really well. Now just keep using the same pregenerated peerAdmin or users.

WangRM88 (Fri, 15 Sep 2017 02:37:35 GMT):
Has joined the channel.

jimthematrix (Fri, 15 Sep 2017 14:40:22 GMT):
Has left the channel.

nchangfong (Fri, 15 Sep 2017 16:01:50 GMT):
Has joined the channel.

ganbold (Sat, 16 Sep 2017 16:00:17 GMT):
Has joined the channel.

ganbold (Sat, 16 Sep 2017 16:00:26 GMT):
getting errors when running make inside fabric-sdk-go dir: ``` 00:36:15.895 [fabric_sdk_go] INFO : ***** Creating and Joining channel: mychannel ***** --- FAIL: TestChannelQueries (0.10s) channel_queries_test.go:28: CreateAndJoinChannel return error: CreateChannel returned error``` and in orderer: ```2017-09-17 00:36:15.904 ULAST [orderer/common/broadcast] Handle -> WARN 0d6 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Existing config does not contain element for [Groups] /Channel/Application/Org1MSP but was in the read set```

wanghhao (Sat, 16 Sep 2017 16:18:01 GMT):
Has joined the channel.

luke16 (Mon, 18 Sep 2017 01:23:31 GMT):
Has joined the channel.

deferred (Mon, 18 Sep 2017 03:44:08 GMT):
Has joined the channel.

aleksandar.likic (Mon, 18 Sep 2017 19:52:30 GMT):
@ganbold I just tried with the latest and it worked. I started fresh, to avoid problems with environment: go get -u github.com/hyperledger/fabric-sdk-go, then cd $GOPATH/src/github.com/hyperledger/fabric-sdk-go/, then make depend-install, then make - and it all worked fine. I am using mac with go version go1.8.3 darwin/amd64

elewis787 (Mon, 18 Sep 2017 20:55:55 GMT):
Has joined the channel.

baoyangc (Tue, 19 Sep 2017 00:19:36 GMT):
when I executing `make checks`,the error apeared: ```make checks All files have SPDX-License-Identifier headers Populating vendor ... grouped write of manifest, lock and vendor: error while writing out vendor tree: error while exporting github.com/coreos/etcd: no valid source could be created: failed to set up "https://github.com/coreos/etcd", error remote repository at https://github.com/coreos/etcd does not exist, or is inaccessible failed to set up "ssh://git@github.com/coreos/etcd", error remote repository at ssh://git@github.com/coreos/etcd does not exist, or is inaccessible failed to set up "git://github.com/coreos/etcd", error remote repository at git://github.com/coreos/etcd does not exist, or is inaccessible failed to set up "http://github.com/coreos/etcd", error remote repository at http://github.com/coreos/etcd does not exist, or is inaccessible make: *** [populate-vendor] Error 1```

baoyangc (Tue, 19 Sep 2017 00:19:55 GMT):
does anyone meet this error?

csoubeyrat (Tue, 19 Sep 2017 08:19:07 GMT):
Has joined the channel.

Kyroy (Tue, 19 Sep 2017 13:55:15 GMT):
Could you please remove the fabric "master" dependency in the toml and use a version tag?

Kyroy (Tue, 19 Sep 2017 14:16:01 GMT):
When executing this, I get an error and I cannot figure out the reson: https://gist.github.com/Kyroy/1c471a45456f6b39d18b5db405fe58d3 Error in the gist. I am using the config.yaml from https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml with other names

Kyroy (Tue, 19 Sep 2017 14:16:01 GMT):
When executing this, I get an error and I cannot figure out the reason: https://gist.github.com/Kyroy/1c471a45456f6b39d18b5db405fe58d3 Error in the gist. I am using the config.yaml from https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml with other names

Kyroy (Tue, 19 Sep 2017 14:16:50 GMT):
Anyone has seen this error before? `Enroll returned error: Enroll failed: POST failure [Post http:///enroll: http: no Host in request URL]; not sending\nPOST http:///enroll\nAuthorization: Basic YWRtaW46YWRtaW5wdw== ......`

Kyroy (Tue, 19 Sep 2017 14:19:09 GMT):
code from: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/base_test_setup.go#L49-L70

troyronda (Tue, 19 Sep 2017 14:21:11 GMT):
There is active work to remove fabric from vendoring... fabric-ca has already been removed.

troyronda (Tue, 19 Sep 2017 14:21:15 GMT):
(WIP at https://gerrit.hyperledger.org/r/#/c/13595/)

troyronda (Tue, 19 Sep 2017 14:21:29 GMT):
https://gerrit.hyperledger.org/r/#/c/13595/6/Gopkg.toml

troyronda (Tue, 19 Sep 2017 14:21:40 GMT):
https://gerrit.hyperledger.org/r/#/c/13595/6/Gopkg.lock

troyronda (Tue, 19 Sep 2017 14:22:57 GMT):
(instead the required packages or files from fabric & fabric-ca are imported under internal or third_party depending on whether the SDK needs to expose them)

troyronda (Tue, 19 Sep 2017 14:23:22 GMT):
normal libraries continue to be under vendor, as you would expected

troyronda (Tue, 19 Sep 2017 14:23:22 GMT):
normal libraries continue to be under vendor, as you would expect

kesavannb (Tue, 19 Sep 2017 14:54:44 GMT):
Hi Folks, I have created a blog for Emerging Technology for Beginners , Also i added the setting up for Hyperledger fabric V 0.6 and V 1.0 on that. Kindly review and let me know your queries. Blog name : kesavannb.wordpress.com

Kyroy (Tue, 19 Sep 2017 19:59:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=f4AHXpkbwr3RNJhua) any ideas?

Kyroy (Wed, 20 Sep 2017 08:31:10 GMT):
The Problem is that the `context, err := sdk.NewContext("org1msp")` call has to use a lower case key `org1msp`. I used `Org1MSP` as in my yaml file, but after a lot of debugging, the map only contains lower case keys

vpetryk (Wed, 20 Sep 2017 12:45:34 GMT):
Has joined the channel.

troyronda (Wed, 20 Sep 2017 13:51:55 GMT):
@here fabric has been removed from vendoring in the latest commit (https://github.com/hyperledger/fabric-sdk-go/commit/e60551cfffcdf7ce84a0f98b25cd162023c36472)

troyronda (Wed, 20 Sep 2017 13:53:47 GMT):
If your application imported protos exposed by the SDK, please update the import path to the SDK namespace (github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/...)

troyronda (Wed, 20 Sep 2017 13:53:47 GMT):
If your application *directly* imported protos exposed by the SDK, please update the import path to the SDK namespace (github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/...)

troyronda (Wed, 20 Sep 2017 13:54:24 GMT):
Specifically some packages under protos/common & protos/peer

troyronda (Wed, 20 Sep 2017 13:55:15 GMT):
If your application is also *directly* embedding BCCSP, please update the import path to the SDK namespace (github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/bccsp)

troyronda (Wed, 20 Sep 2017 13:55:15 GMT):
If your application is *directly* importing BCCSP (and the SDK, of course), please update the import path to the SDK namespace (github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/bccsp)

troyronda (Wed, 20 Sep 2017 13:57:07 GMT):
The next two items on the vendoring improvement list is github.com/op/go-logging & cffsl

troyronda (Wed, 20 Sep 2017 13:57:07 GMT):
The next two items on the vendoring improvement list is github.com/op/go-logging & cfssl

troyronda (Wed, 20 Sep 2017 13:57:59 GMT):
(github.com/op/go-logging needs upstream patching due to data races - so either the SDK switches to a new logging solution or needs to internalize this library)

troyronda (Wed, 20 Sep 2017 13:58:36 GMT):
cfssl isn't expected to be vendoring by downstream applications, so it might be better to internalize than vendor

troyronda (Wed, 20 Sep 2017 13:58:36 GMT):
cfssl isn't expected to be vendored by downstream applications, so it might be better to internalize than vendor

troyronda (Wed, 20 Sep 2017 13:58:58 GMT):
The remaining vendor list is here: https://github.com/hyperledger/fabric-sdk-go/blob/master/Gopkg.lock

troyronda (Wed, 20 Sep 2017 13:59:22 GMT):
(with constraints for downstream applications set here: https://github.com/hyperledger/fabric-sdk-go/blob/master/Gopkg.toml)

troyronda (Wed, 20 Sep 2017 13:59:48 GMT):
@Kyroy happy you found the solution!

habpygo (Wed, 20 Sep 2017 15:08:20 GMT):
Hi guys do you have any suggestions how to solve this. I want to iterate over all the transaction id’s (TxID) on the blockchain and extract the Key/Value pairs belonging to the different TxID’s. I can iterate over all the Keys and get the Value and TxID for each Key, but that’s not what I want. Looking at the marbles example, we can query “a” and extract the Value; so if “a” starts out at 100, buys 100 and then sells 50, we only see the Value for “a” (150) and the TxID for the last transaction, while I would like to see this: ``` TxID Key Value 1607f… a 100 967f2… a 200 e03bc… a 150 ``` Any idea which function/method to use?

antitoine (Wed, 20 Sep 2017 15:27:59 GMT):
@habpygo try with the history function in the chaincode: https://stackoverflow.com/a/46153686/7185435

habpygo (Wed, 20 Sep 2017 15:36:31 GMT):
Thanks @antitoine will have a look at that. Yes, I already see it. I can get it out via `response.TxId` Again thanks

habpygo (Wed, 20 Sep 2017 15:36:31 GMT):
Thanks @antitoine will have a look at that.

troyronda (Wed, 20 Sep 2017 18:23:13 GMT):
@here The Go SDK configuration has been updated to use the common connection profile - see https://jira.hyperledger.org/browse/FAB-5363 for background

troyronda (Wed, 20 Sep 2017 18:23:43 GMT):
Configuration example in the test fixtures: https://gerrit.hyperledger.org/r/#/c/13209/5/test/fixtures/config/config_test.yaml

troyronda (Wed, 20 Sep 2017 18:23:43 GMT):
Configuration example in the test fixtures: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml

chrisg (Wed, 20 Sep 2017 18:29:30 GMT):
Has joined the channel.

baoyangc (Wed, 20 Sep 2017 19:13:56 GMT):
:thumbsup:

qingsongGuo (Thu, 21 Sep 2017 05:02:04 GMT):
Has joined the channel.

ranjan008 (Thu, 21 Sep 2017 11:08:56 GMT):
In recent update a lot of files has been put in internal package so when using sdk in separate project its not giving access to these files. How to resolve this?

troyronda (Thu, 21 Sep 2017 14:02:30 GMT):
What files are you trying to use?

StephHuynh (Thu, 21 Sep 2017 15:03:16 GMT):
Has joined the channel.

alexcrownus (Thu, 21 Sep 2017 19:06:10 GMT):
https://github.com/alexcrownus/fabcar has been upgraded to use the new common connection profile

guruce (Fri, 22 Sep 2017 01:13:50 GMT):
Hi, Is it posible to get error payload set like `shim.Error("Blah! Blah!!")` for specific logic ? (Fabric v1.0.0) ?

Hundredwz (Fri, 22 Sep 2017 01:44:19 GMT):
Has joined the channel.

Hundredwz (Fri, 22 Sep 2017 01:46:21 GMT):
I am a new beginner of fabric.When I'm trying to use the go sdk of fabric,I tried to execute the command `make depend-install`,but always get the error

Hundredwz (Fri, 22 Sep 2017 01:47:13 GMT):
```Installing dependencies ... Installing dep@v0.3.0 to /opt/gopath/bin ... HEAD 现在位于 7a91b79 Merge pull request #489 from sdboyer/new-ensure gocov is not installed (go get -u github.com/axw/gocov/...) gocov-xml is not installed (go get -u github.com/AlekSi/gocov-xml) misspell is not installed (go get -u github.com/client9/misspell/cmd/misspell) golint is not installed (go get -u github.com/golang/lint/golint) goimports is not installed (go get -u golang.org/x/tools/cmd/goimports) mockgen is not installed (go get -u github.com/golang/mock/mockgen) dep is not installed (go get -u github.com/golang/dep/cmd/dep) Missing dependency. Aborting. You can fix by installing the tool listed above or running make depend-install. Makefile:53: recipe for target 'depend-install' failed make: *** [depend-install] Error 1``` can anyone help me? ps,I also tried the `go get` cmd

itmoss (Fri, 22 Sep 2017 07:04:32 GMT):
Has joined the channel.

jarvis26 (Fri, 22 Sep 2017 10:28:49 GMT):
Has joined the channel.

alexcrownus (Fri, 22 Sep 2017 10:57:22 GMT):
seems you are using Visual Studio Code with vscode-go

alexcrownus (Fri, 22 Sep 2017 10:57:42 GMT):
the error you are getting has nothing to do with hyperledger fabric

alexcrownus (Fri, 22 Sep 2017 10:58:53 GMT):
I take all that back, apologies

alexcrownus (Fri, 22 Sep 2017 10:59:36 GMT):
the errors look similar from whenever vscode-go is trying to download dependencies

alexcrownus (Fri, 22 Sep 2017 11:00:18 GMT):
As suggested in the error log You can fix by installing the tool listed above or running make depend-install.

alexcrownus (Fri, 22 Sep 2017 11:00:54 GMT):
that is run go get -u github.com/axw/gocov/... for example to install gocov

jarvis26 (Fri, 22 Sep 2017 11:33:39 GMT):
I am a beginner. Wanted to setup go sdk to interact with my hyperledger network. Should I be installing it on all the peers on the network or on any client outside the network?

ifelyx (Fri, 22 Sep 2017 12:02:39 GMT):
Has joined the channel.

paul.sitoh (Fri, 22 Sep 2017 13:34:16 GMT):
@jarvis26 check this out https://github.com/hlf-go/writing-chaincode/blob/master/README.md

troyronda (Fri, 22 Sep 2017 13:43:59 GMT):
@alexcrownus @Hundredwz I'm guessing the issue is that the SDK is currently assuming $GOPATH/bin is in your path

troyronda (Fri, 22 Sep 2017 13:44:20 GMT):
make depend-install does attempt to install the tools, and then checks if it can find them

troyronda (Fri, 22 Sep 2017 13:44:26 GMT):
make depend only does the check

chifalcon (Fri, 22 Sep 2017 15:25:47 GMT):
Dear all, I am working on fabric1.0 release version in the corporate proxy network, may I know if it is possible to run the fabric-sdk-go inside a container instead of the host machine? This is because my corporate network does not allow me to successfully configure the fabric environment in the host machine. So I plan to use an official docker container (eg., hyperledger/fabric-peer) from fabric to accommodate the sdk. Thanks for any hints provided !

guruce (Fri, 22 Sep 2017 17:02:19 GMT):
Has left the channel.

guruce (Fri, 22 Sep 2017 17:03:15 GMT):
Has joined the channel.

baoyangc (Sat, 23 Sep 2017 14:04:02 GMT):
when will the api of fabric-sdk-go be stable?

Hundredwz (Mon, 25 Sep 2017 02:01:37 GMT):
@alexcrownus I am sorry but I didn't use vscode.And I had also run `go get -u` too.It didn't work.But today it worked amazingly.I don't know why.But it's enough to work.Thank you

Hundredwz (Mon, 25 Sep 2017 02:02:41 GMT):
@troyronda Yeah.`make depend-install` didn't work.But after downloading it by `go get -u`,it worked amazingly two days later.

alexcrownus (Mon, 25 Sep 2017 09:38:02 GMT):
@Hundredwz happy that you got it resolved

bryanhuang (Mon, 25 Sep 2017 13:17:20 GMT):
Hi, would you guys help to review https://gerrit.hyperledger.org/r/#/c/13669/, thanks a lot.

troyronda (Mon, 25 Sep 2017 15:04:16 GMT):
hi @bryanhuang - @firas.qutishat has done so

troyronda (Mon, 25 Sep 2017 15:04:16 GMT):
hi @bryanhuang - @firas.qutishat has just done so

enigma (Mon, 25 Sep 2017 17:09:23 GMT):
would anybody know how I can forward requests to my peer and orderer hostnames as defined in config-test.yaml if it is running on the docker host of a remote ip address: it defines the hostnames like so: host: "orderer.example.com" port: 7050 I asked in the chat why I initially got a bad tls handshake and somebody told me I have to put this into the /etc/hosts file 127.0.0.1 ca_peerOrg1 127.0.0.1 ca_peerOrg2 127.0.1.1 peer0.org1.example.com 127.0.1.1 orderer.example.com now the config.yaml can digest those, however my follow-up situation seems different now as I have the ares server ip in that sdk-go config.yaml file to reach the remote hfc from my local go-sdk I define it like so: orderer0: host: "78.162.115.298" port: 7050 but that gives me bad tls handshake on like in this example: ca_peerOrg1 | 2017/09/25 16:02:28 http: TLS handshake error from 78.162.115.298:51724: remote error: tls: bad certificate which is from the coreos machine. Would you potentially know how I can call that ip and have it interpreted as done with the /etc/hosts file locally or any suggestions of the same? how to have the hostname match the common name of the certificate that is signed to orderer.example.com and not 78.162.115.298

enigma (Mon, 25 Sep 2017 17:09:23 GMT):
would anybody know how I can forward requests to my peer and orderer hostnames as defined in config-test.yaml if it is running on the docker host of a remote ip address: it defines the hostnames like so: host: "orderer.example.com" port: 7050 I asked in the chat why I initially got a bad tls handshake and somebody told me I have to put this into the /etc/hosts file 127.0.0.1 ca_peerOrg1 127.0.0.1 ca_peerOrg2 127.0.1.1 peer0.org1.example.com 127.0.1.1 orderer.example.com now the config.yaml can digest those, however my follow-up situation seems different now as I need the hyperledger docker host ip in that fabric-sdk-go config-test.yaml file to be reachable from my local go-sdk : sth like: orderer0: host: "78.162.115.298" port: 7050 but that gives me bad tls handshake on like in this example: ca_peerOrg1 | 2017/09/25 16:02:28 http: TLS handshake error from 78.162.115.298:51724: remote error: tls: bad certificate. Would anybody potentially know how I can call that ip and have it interpreted as done with the /etc/hosts file locally or any suggestions of the same? how to have the hostname match the common name of the certificate that is signed to orderer.example.com and not 78.162.115.298.

enigma (Mon, 25 Sep 2017 17:09:23 GMT):
would anybody know how I can forward requests to my peer and orderer hostnames as defined in config-test.yaml if it is running on the docker host of a remote ip address: it defines the hostnames like so: host: "orderer.example.com" port: 7050 I asked in the chat why I initially got a bad tls handshake and somebody told me I have to put this into the /etc/hosts file 127.0.0.1 ca_peerOrg1 127.0.0.1 ca_peerOrg2 127.0.1.1 peer0.org1.example.com 127.0.1.1 orderer.example.com now the config.yaml can digest those, however my follow-up situation seems different now as I need the hyperledger docker host ip to be reachable from my local go-sdk : sth like: orderer0: host: "78.162.115.298" port: 7050 but that gives me bad tls handshake on like in this example: ca_peerOrg1 | 2017/09/25 16:02:28 http: TLS handshake error from 78.162.115.298:51724: remote error: tls: bad certificate. Would anybody potentially know how I can call that ip and have it interpreted as done with the /etc/hosts file locally or any suggestions of the same? how to have the hostname match the common name of the certificate that is signed to orderer.example.com and not 78.162.115.298.

enigma (Mon, 25 Sep 2017 17:09:23 GMT):
would anybody know how I can forward requests to my peer and orderer hostnames as defined in config-test.yaml if it is running on the docker host of a remote ip address: it defines the hostnames like so: host: "orderer.example.com" port: 7050 I asked in the chat why I initially got a bad tls handshake running everything locally and somebody told me I have to put this into the /etc/hosts file 127.0.0.1 ca_peerOrg1 127.0.0.1 ca_peerOrg2 127.0.1.1 peer0.org1.example.com 127.0.1.1 orderer.example.com now the config.yaml can digest those, however my follow-up situation seems different now as I need the hyperledger docker host ip to be reachable from my local go-sdk : sth like: orderer0: host: "78.162.115.298" port: 7050 but that gives me bad tls handshake on like in this example: ca_peerOrg1 | 2017/09/25 16:02:28 http: TLS handshake error from 78.162.115.298:51724: remote error: tls: bad certificate. Would anybody potentially know how I can call that ip and have it interpreted as done with the /etc/hosts file locally or any suggestions of the same? how to have the hostname match the common name of the certificate that is signed to orderer.example.com and not 78.162.115.298.

enigma (Mon, 25 Sep 2017 17:09:23 GMT):
would anybody know how I can forward requests to my peer and orderer hostnames as defined in config-test.yaml if it is running on the docker host of a remote ip address: it defines the hostnames like so: host: "orderer.example.com" port: 7050 I asked in the chat why I initially got a bad tls handshake running everything locally and somebody told me I have to put this into the /etc/hosts file 127.0.0.1 ca_peerOrg1 127.0.0.1 ca_peerOrg2 127.0.1.1 peer0.org1.example.com 127.0.1.1 orderer.example.com now the config.yaml can digest those, however my follow-up situation seems different now as I need the docker host ip where I deployed the hyperledger network to be reachable from my local go-sdk : I tried sth like: orderer0: host: "78.162.115.298" port: 7050 but that gives me bad tls handshake on like in this example: ca_peerOrg1 | 2017/09/25 16:02:28 http: TLS handshake error from 78.162.115.298:51724: remote error: tls: bad certificate. Would anybody potentially know how I can call that ip and have it interpreted as done with the /etc/hosts file locally or any suggestions of the same? how to have the hostname match the common name of the certificate that is signed to orderer.example.com and not 78.162.115.298.

AlexanderEx123 (Mon, 25 Sep 2017 17:13:10 GMT):
Hello guys, in case of latest update and vendoring fabric packages I have a problem with using function called IsConfigBlock() from fabric/protos/utils/commonutils.go Because it placed in "internal" folder I cant import it, and i can't use utils package without vendoring because Block struct is vendored Any advices? Thanks

troyronda (Mon, 25 Sep 2017 23:16:37 GMT):
@AlexanderEx123 - @bstasyszyn was looking into a similar issue today - let me check with him tomorrow

troyronda (Mon, 25 Sep 2017 23:17:58 GMT):
(he is updating the CLI example to use the updated SDK and was making a list of what needs to be outside internal)

aneb (Tue, 26 Sep 2017 01:07:12 GMT):
@enigma Maybe it is a tls mismatch for your CA server. Which FABRIC_CA_SERVER_TLS_CERTFILE setting are you using at the moment?

jrezwan (Tue, 26 Sep 2017 03:47:55 GMT):
Has joined the channel.

GiorgiBlockchain (Tue, 26 Sep 2017 05:38:58 GMT):
Has joined the channel.

GiorgiBlockchain (Tue, 26 Sep 2017 05:56:22 GMT):
Hi guys, I'm testing the balance-transfer example on ubuntu machine. I docerized node.js API in order to interact with fabric from remote app. I have exposed port 4000 on node.js and made a bridge with outside port to access node. Node.js uses JWS tokens for security. Yesterday I could execute sample REST API requests (https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer#sample-rest-apis-requests) locally from command line. For example I could register/enroll user in the network, create channel, etc. However with the Postman toll I was getting errors like: Error: ECONNREFUSED localhost:8054, ECONNREFUSED localhost:7054, depends what user token I was using for request. That is my first problem. The second problem came today, when jwt token was expired and it is normal, since it is configured that way (https://github.com/hyperledger/fabric-samples/blob/master/balance-transfer/config.json). But what I couldn't understand is that I even can not authenticate new user from localhost with cli. For instance, this login request doesn't return anything, it's not executing: curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=org1' If any of you already faced the same issue please guide me. Thank you in advance!

AlexanderEx123 (Tue, 26 Sep 2017 09:54:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=a2oC3zk298kx3u7FJ) @troyronda thx!

vu3mmg (Tue, 26 Sep 2017 10:13:44 GMT):
Has joined the channel.

bryanhuang (Tue, 26 Sep 2017 13:23:52 GMT):
@troyronda thank you :-)

AlexanderEx123 (Tue, 26 Sep 2017 18:07:17 GMT):
Is there are any way to get "channel.tx" (that created by configtx tool) content from channel via SDK from already created channel?

troyronda (Tue, 26 Sep 2017 19:19:15 GMT):
@AlexanderEx123 @ranjan008 we have moved some of the protos from internal to third_party (based on what the CLI example needed)

troyronda (Tue, 26 Sep 2017 19:19:52 GMT):
Non-proto utils still needs thought

troyronda (Tue, 26 Sep 2017 19:20:14 GMT):
Hopefully these are the missing files that you were looking for?

wyanglau (Tue, 26 Sep 2017 19:35:46 GMT):
Hi guys, I was trying to run `go test` under `test/integration` to see the end-to-end test especially; but then I got ```--- FAIL: TestTransient (3.29s) transient_data_test.go:27: Error while checking if primary peer has already joined channel: Error querying channel for primary peer: QueryBySystemChaincodeByTarget return error: Error from QueryBySystemChaincode: Transaction processor (peer0.org1.example.com:7051) returned error 'context deadline exceeded' for txID 'd1b3590056303e13e98430bce729765e0e1ef74d9c43fe8976285593bde0d97f'```

wyanglau (Tue, 26 Sep 2017 19:36:17 GMT):
I am using the latest branch from github. Anyone happens to know what is the problem did I hit?

wyanglau (Tue, 26 Sep 2017 19:36:59 GMT):
Basically I could create a channel, but it hits timeout when trying to join the channel

wyanglau (Tue, 26 Sep 2017 19:36:59 GMT):
Basically I am able to create a channel, but it hits timeout when trying to join the channel

wyanglau (Tue, 26 Sep 2017 19:40:34 GMT):
and I can see that from orderer's log, it stops at ```2017-09-26 19:38:53.966 UTC [orderer/common/sigfilter] Apply -> DEBU 1338 Forwarding validly signed message for policy &{%!s(*common.ImplicitMetaPolicy=&{Readers 0}) %!s(int=1) [%!s(*policies.implicitMetaPolicy=&{0xc4209412c0 1 [0xc42011c450]}) %!s(*policies.implicitMetaPolicy=&{0xc420941ba0 1 [0xc42011c548 0xc42011c590]})]} 2017-09-26 19:38:53.966 UTC [orderer/common/deliver] Handle -> DEBU 1339 [channel: orgchannel] Received seekInfo (0xc420940300) start: > stop: > 2017-09-26 19:38:53.966 UTC [fsblkstorage] retrieveBlockByNumber -> DEBU 133a retrieveBlockByNumber() - blockNum = [0] 2017-09-26 19:38:53.966 UTC [fsblkstorage] newBlockfileStream -> DEBU 133b newBlockfileStream(): filePath=[/var/hyperledger/production/orderer/chains/orgchannel/blockfile_000000], startOffset=[0] 2017-09-26 19:38:53.966 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 133c Remaining bytes=[12014], Going to peek [8] bytes 2017-09-26 19:38:53.966 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 133d Returning blockbytes - length=[12012], placementInfo={fileNum=[0], startOffset=[0], bytesOffset=[2]} 2017-09-26 19:38:53.966 UTC [orderer/common/deliver] Handle -> DEBU 133e [channel: orgchannel] Delivering block for (0xc420940300) 2017-09-26 19:38:53.966 UTC [orderer/common/deliver] Handle -> DEBU 133f [channel: orgchannel] Done delivering for (0xc420940300), waiting for new SeekInfo 2017-09-26 19:38:53.966 UTC [orderer/common/deliver] Handle -> DEBU 1340 Attempting to read seek info message 2017-09-26 19:38:53.969 UTC [orderer/common/deliver] Handle -> WARN 1341 Error reading from stream: rpc error: code = Canceled desc = context canceled ```

wyanglau (Tue, 26 Sep 2017 19:40:55 GMT):
Thanks in advance

troyronda (Tue, 26 Sep 2017 19:44:04 GMT):
does make test-integration work for you?

troyronda (Tue, 26 Sep 2017 19:44:04 GMT):
does make integration-test work for you?

wyanglau (Tue, 26 Sep 2017 19:45:20 GMT):
it works

troyronda (Tue, 26 Sep 2017 19:45:53 GMT):
I haven't run go test without docker for awhile

troyronda (Tue, 26 Sep 2017 19:45:53 GMT):
I haven't run go test under test/integration without docker for awhile

troyronda (Tue, 26 Sep 2017 19:46:42 GMT):
(make integration-test is running the client in a docker image)

wyanglau (Tue, 26 Sep 2017 19:47:07 GMT):
Oh..Then probably it is because of calling the peer from outside of the container...

troyronda (Tue, 26 Sep 2017 19:47:13 GMT):
that image is not doing anything special, so it is surprising that it doesn't work

troyronda (Tue, 26 Sep 2017 19:47:37 GMT):
(other than hostnames maybe)

troyronda (Tue, 26 Sep 2017 19:47:37 GMT):
(other than hostnames from docker-compose maybe)

wyanglau (Tue, 26 Sep 2017 19:47:47 GMT):
true

troyronda (Tue, 26 Sep 2017 19:48:08 GMT):
i'm guessing it's peer0.org1.example.com

wyanglau (Tue, 26 Sep 2017 19:48:22 GMT):
no wonder it couldn't reach the peers in my case...( which explains the timeout

troyronda (Tue, 26 Sep 2017 19:48:22 GMT):
not having a hostname outside docker

wyanglau (Tue, 26 Sep 2017 19:48:31 GMT):
Let me give it a go

troyronda (Tue, 26 Sep 2017 19:48:38 GMT):
so you could probably setup the hostnames in your local env

troyronda (Tue, 26 Sep 2017 19:49:02 GMT):
(if you look at docker-compose, you can see which hostnames are being used)

wyanglau (Tue, 26 Sep 2017 19:55:47 GMT):
@paul.sitoh it is working now. Thanks a lot!

wyanglau (Tue, 26 Sep 2017 19:55:47 GMT):
@troyronda it is working now. Thanks a lot!

troyronda (Tue, 26 Sep 2017 20:13:58 GMT):
awesome - np

AlexanderEx123 (Tue, 26 Sep 2017 20:53:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3bo4ERuGQxmGLZT5B) @troyronda yep, check it a hour ago, awesome, thx

Kyroy (Wed, 27 Sep 2017 11:08:33 GMT):
`fabric-sdk-go/def/fabapi/fabapi.go` ``` func NewSDK(options Options) (*FabricSDK, error) { // Construct SDK opts from the quick access options in setup sdkOpts := opt.SDKOpts{ ConfigFile: options.ConfigFile, } ``` The `NewSDK` function ALWAYS includes a config File. Previously it was possible to configure it by implementing the `apiconfig.Config` interface and not using the configFile. How to do this in the current master version?

Kyroy (Wed, 27 Sep 2017 11:08:33 GMT):
`fabric-sdk-go/def/fabapi/fabapi.go` ```func NewSDK(options Options) (*FabricSDK, error) { // Construct SDK opts from the quick access options in setup sdkOpts := opt.SDKOpts{ ConfigFile: options.ConfigFile, } ``` The `NewSDK` function ALWAYS includes a config File. Previously it was possible to configure it by implementing the `apiconfig.Config` interface and not using the configFile. How to do this in the current master version?

troyronda (Wed, 27 Sep 2017 13:58:15 GMT):
@here hi all - we are planning to bump the CI version of Go from 1.7.x to 1.9 - we have already been using the SDK on 1.9 locally

Kyroy (Wed, 27 Sep 2017 14:15:59 GMT):
Is there an open issue on adapting the sdk so that `golint ./...` does not fail?

troyronda (Wed, 27 Sep 2017 15:02:27 GMT):
@Kyroy yes - I pushed the update here: https://gerrit.hyperledger.org/r/#/c/13881/ ... waiting for review

troyronda (Wed, 27 Sep 2017 15:02:27 GMT):
@Kyroy yes - I pushed the update here: https://gerrit.hyperledger.org/r/#/c/13881/ ... waiting for verification / +2

Kyroy (Wed, 27 Sep 2017 15:17:24 GMT):
@troyronda I am getting this linter error: `struct field EnrollId should be EnrollID` Because I am using this struct: ```type CAConfig struct { Url string HttpOptions map[string]interface{} TlsCACerts MutualTLSConfig Registrar struct { EnrollId string EnrollSecret string } CaName string }```

Kyroy (Wed, 27 Sep 2017 15:17:49 GMT):
`vendor/github.com/hyperledger/fabric-sdk-go/api/apiconfig/network.go`

Kyroy (Wed, 27 Sep 2017 15:17:49 GMT):
`fabric-sdk-go/api/apiconfig/network.go`

baoyangc (Thu, 28 Sep 2017 06:07:30 GMT):
it's not an error of compile

baoyangc (Thu, 28 Sep 2017 06:09:41 GMT):
does this sdk have version compatible

Kyroy (Thu, 28 Sep 2017 07:40:13 GMT):
I know this is not a compile error :zipper_mouth: This is why I asked before if they plan to make the code lint error free

troyronda (Thu, 28 Sep 2017 11:47:53 GMT):
@Kyroy @baoyangc https://gerrit.hyperledger.org/r/#/c/13923/

Kyroy (Thu, 28 Sep 2017 11:48:44 GMT):
@troyronda thank you :)

baoyangc (Thu, 28 Sep 2017 12:12:39 GMT):
@troyronda , you misunderstand my meaning. does current fabric-sdk-go work norm with fabric v1.0?

baoyangc (Thu, 28 Sep 2017 12:13:15 GMT):
I think it should work with fabric v1.0 and v1.0.1

baoyangc (Thu, 28 Sep 2017 12:13:24 GMT):
but i'm not sure

Kyroy (Thu, 28 Sep 2017 12:35:00 GMT):
@troyronda https://github.com/hyperledger/fabric-sdk-go/blob/master/api/apiconfig/network.go#L94 should be `EnrollID`

troyronda (Thu, 28 Sep 2017 14:43:35 GMT):
@Kyroy - the change hasn't been merged yet - i'm working on a rebase

troyronda (Thu, 28 Sep 2017 20:55:36 GMT):
@Kyroy the change is merged

enigma (Fri, 29 Sep 2017 13:32:44 GMT):
how can a chaincode be deleted or updated with the fabric-sdk-go. I cant seem any references in the existing codebase for this

enigma (Fri, 29 Sep 2017 13:32:44 GMT):
how can a chaincode be updated with the fabric-sdk-go. I cant seem any references in the existing codebase for this

enigma (Fri, 29 Sep 2017 13:33:33 GMT):
I make changes to the chaincode but it does not apply the new chaincode on deployment

enigma (Fri, 29 Sep 2017 13:34:00 GMT):
trying to change the version gives Error returned from build: 1 "can't load package: package /github.com/example_cc: import "/github.com/example_cc": cannot import absolute path

enigma (Fri, 29 Sep 2017 13:34:17 GMT):
next thing I tried is remove the cc package from this prefered fixtures/src location the sdk uses

enigma (Fri, 29 Sep 2017 13:34:46 GMT):
to see if it takes it from somewhere else but thats not the case it really wants to consume the new and updated cc file or it will throw

enigma (Fri, 29 Sep 2017 13:34:58 GMT):
InstallChaincode returned error: PackageCC return error: lstat /home/enigma/unchain/unchain-go/src/bitbucket.org/unchain/hfc-chaincode/fixtures/src/github.com/example_cc: no such file or directory

enigma (Fri, 29 Sep 2017 13:36:12 GMT):
but giving it the proper location of the changed file with version v0 results in deployment of an older chaincode I even tore down the network now and force-recreated it so as not to maybe have cached version of

enigma (Fri, 29 Sep 2017 13:36:45 GMT):
that chaincode.

enigma (Fri, 29 Sep 2017 13:37:54 GMT):
forgot to mention changing the name and path of the chaincode still does not deploy the updated cc but takes some older version of it **InstalledCC: name:"cc1" version:"v0" path:"github.com/example_cc" **InstalledCC: name:"cc2" version:"v0" path:"/github.com/ex2"

enigma (Fri, 29 Sep 2017 13:39:06 GMT):
trying to install the same chaincode twice with first v0 and then try again with v1 on the same name (kinda like an upgrade) does not work either

enigma (Fri, 29 Sep 2017 13:39:41 GMT):
from checking I also could not find an exposed method that might run an upgrade on an existing chaincode exposed inside the fabric-go-sdk or a delete of chaincode

enigma (Fri, 29 Sep 2017 13:41:21 GMT):
I assume its not supported by this sdk?

enigma (Fri, 29 Sep 2017 15:38:46 GMT):
nvm I saw the commit of last week now with UpgradeCC function

enigma (Fri, 29 Sep 2017 15:39:01 GMT):
but I would not have expected an answer anyway in this community

enigma (Fri, 29 Sep 2017 16:15:14 GMT):
what is transientData?

aleksandar.likic (Fri, 29 Sep 2017 17:37:12 GMT):
@enigma Transient data is data that your chaincode needs for endorsement (e.g. as computational parameters), but you don't want it to end up in the ledger. Unlike non-transient data, it's seen only by the endorsers of that transaction - it's not saved anywhere by fabric.

aleksandar.likic (Fri, 29 Sep 2017 18:02:42 GMT):
@baoyangc See the compatibility section in README: https://github.com/hyperledger/fabric-sdk-go#compatibility

enigma (Fri, 29 Sep 2017 18:08:31 GMT):
thank you aleksandar

AlexanderEx123 (Fri, 29 Sep 2017 21:33:42 GMT):
Hello everyone I have trouble then trying to update channel config (adding a new org) When i send ConfigEnvelope message to orderer with ConfigUpdate block, orderer reject update with this reason: Handle -> WARN a37 Rejecting CONFIG_UPDATE because: Error authorizing update: proto: can't skip unknown wire type 6 for common.ConfigUpdate Does anybody know what the problem is it?

LeoKotschenreuther (Fri, 29 Sep 2017 21:59:12 GMT):
Has joined the channel.

LeoKotschenreuther (Fri, 29 Sep 2017 22:05:53 GMT):
@AlexanderEx123 I had similar error messages in the past (even though I wasn't using the fabric-sdk-go). In my case it meant that I didn't send a properly setup update transaction to the Orderer. Did you send the whole Envelope object or just the actual Config? If you sent the whole Envelope as the Config field of the `CreateChannelRequest`, that could explain your problem.

AlexanderEx123 (Fri, 29 Sep 2017 22:08:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xZ3br3ZYccL4NudjE) @LeoKotschenreuther no, i send just diff config what i get from configtxlator by compare old and new config

AlexanderEx123 (Fri, 29 Sep 2017 22:09:37 GMT):
form := url.Values{} form.Add("original", oldBlock) form.Add("updated", newBlock) form.Add("channel", channel) req, err := http.NewRequest( "POST", "http://localhost:7059/configtxlator/compute/update-from-configs", strings.NewReader(form.Encode())) if err != nil { return []byte{}, err }

AlexanderEx123 (Fri, 29 Sep 2017 22:09:55 GMT):
this is how i get ConfigUpdate

LeoKotschenreuther (Fri, 29 Sep 2017 22:11:43 GMT):
@AlexanderEx123 yes, I just realized that asking about the `CreateChannelRequest` doesn't make much sense :D Are you getting that error when you try to get the ConfigUpdate or when you send the ConfigUpdate to the Orderer?

AlexanderEx123 (Fri, 29 Sep 2017 22:12:36 GMT):
after calling CreateChannel method

AlexanderEx123 (Fri, 29 Sep 2017 22:12:55 GMT):
getting ConfigUpdate seems ok

LeoKotschenreuther (Fri, 29 Sep 2017 22:14:58 GMT):
Since you're trying to update a channel, is calling the CreateChannel method really the right one to call? Again, I haven't used the go-sdk much.

AlexanderEx123 (Fri, 29 Sep 2017 22:17:59 GMT):
yep, inside method if Config is passed where is no create, but update action perfom

LeoKotschenreuther (Fri, 29 Sep 2017 22:18:19 GMT):
Hi everybody, I have a question about creating channels: In the [definition of the `CreateChannelStruct`](https://github.com/hyperledger/fabric-sdk-go/blob/2fb94846c7d69325ab682c7568bb8bcad69b94d8/api/apifabclient/fabricclient.go#L56) there is a comment about the `Config` attribute that says that one could also use a `buildChannelConfig()` method which is supposedly in the same package. I couldn't find that method at all in the fabric-go-sdk with the Github Search, does this method exist?

AlexanderEx123 (Fri, 29 Sep 2017 22:19:06 GMT):
no

AlexanderEx123 (Fri, 29 Sep 2017 22:19:18 GMT):
i think it was copy paste from node sdk

LeoKotschenreuther (Fri, 29 Sep 2017 22:26:32 GMT):
@AlexanderEx123 So far I have only used the configtxlator and the cli to perform channel updates (following [these instructions](http://hyperledger-fabric.readthedocs.io/en/latest/configtxlator.html). One thing you could try is to make sure that your ConfigUpdate looks good. After you get it back from the Configtxlator, you could decode the ConfigUpdate to a JSON with the Configtxlator again.

LeoKotschenreuther (Fri, 29 Sep 2017 22:26:56 GMT):
You will see the difference between a proper ConfigUpdate and one that didn't work out.

LeoKotschenreuther (Fri, 29 Sep 2017 22:27:52 GMT):
Unfortunatley the Configtxlator doesn't tell you right away if the ConfigUpdate didn't work. It only encodes an error message in the ConfigUpdate which you will only see if you decode the ConfigUpdate to JSON again.

AlexanderEx123 (Fri, 29 Sep 2017 22:46:48 GMT):
thanks, so configtxlator can not decode my ConfigUpdate

AlexanderEx123 (Fri, 29 Sep 2017 23:38:00 GMT):
okay, i fix my problem, but now i see this:

AlexanderEx123 (Fri, 29 Sep 2017 23:38:01 GMT):
Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 2 sub-policies, required 1 remaining

AlexanderEx123 (Fri, 29 Sep 2017 23:38:37 GMT):
as i understand i need to sign envelope via 2 peers admin, not only one?

AlexanderEx123 (Fri, 29 Sep 2017 23:38:37 GMT):
as i understand i need to sign this envelope via 2 peers admin, not only one?

baoyangc (Sat, 30 Sep 2017 01:47:44 GMT):
@aleksandar.likic I have read that. if I have one v1.0.0 fabric network and one v1.0.2 fabric network. could I set a version in code, such that I can switch in v1.0.0 and v1.0.2

enigma (Sat, 30 Sep 2017 10:46:10 GMT):
fabric-sdk uses an internal package in its integration base-setup.go for defining chaincodePolicy ( "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/cauthdsl" ) passing it as argument to admin.SendInstantiateCC(setup.Channel, chainCodeID, args, chainCodePath, chainCodeVersion, chaincodePolicy, []apitxn.ProposalProcessor{setup.Channel.PrimaryPeer()}, setup.EventHub). How am I supposed to make use of internal package to call SendInstantiateCC???

enigma (Sat, 30 Sep 2017 11:47:38 GMT):
could you please move this dependency to third-party as well ''??

troyronda (Sat, 30 Sep 2017 11:55:06 GMT):
@enigma looking into it

enigma (Sat, 30 Sep 2017 11:55:21 GMT):
wow thanks troy!

enigma (Sat, 30 Sep 2017 14:44:27 GMT):
How come if I try to connect to the eventHub with a created user from stateStore it errors that it has no signing authority? user, err := fClient.LoadUserFromStateStore(cfg.User.UserName) if err != nil { return fmt.Errorf("client.LoadUserFromStateStore return error: %v", err) } if user == nil { return fmt.Errorf("user not found: %v", err) ...... session, err := sdk.NewSession(context, user) if err != nil { return fmt.Errorf("NewSession returned error: %v", err) } sc, err := sdk.NewSystemClient(session) if err != nil { return fmt.Errorf("NewSystemClient returned error: %v", err) } setup.Client = sc setup.NormalUser = session.Identity() ...... if err := setup.setupEventHub(sc); err != nil { return err ********************************************************************************** ******* EventHub connect to peer (peer0.org1.example.com:7051) ******* Initialize return error: Failed eventHub.Connect() [Error from eventsClient.Start (rpc error: code = Unknown desc = event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority]])]

enigma (Sat, 30 Sep 2017 14:44:27 GMT):
How come if I try to connect to the eventHub with a created user from stateStore it errors that it has no signing authority? user, err := fClient.LoadUserFromStateStore(cfg.User.UserName) if err != nil { return fmt.Errorf("client.LoadUserFromStateStore return error: %v", err) } if user == nil { return fmt.Errorf("user not found: %v", err) ...... session, err := sdk.NewSession(context, user) if err != nil { return fmt.Errorf("NewSession returned error: %v", err) } sc, err := sdk.NewSystemClient(session) if err != nil { return fmt.Errorf("NewSystemClient returned error: %v", err) } setup.Client = sc setup.NormalUser = session.Identity() sc.SetUserContext(setup.NormalUser) ...... if err := setup.setupEventHub(sc); err != nil { return err ********************************************************************************** ******* EventHub connect to peer (peer0.org1.example.com:7051) ******* Initialize return error: Failed eventHub.Connect() [Error from eventsClient.Start (rpc error: code = Unknown desc = event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority]])]

aleksandar.likic (Sat, 30 Sep 2017 22:58:26 GMT):
@baoyangc Out of the box, you cannot do it.

habpygo (Sun, 01 Oct 2017 14:16:25 GMT):
Hi, I’m trying to retrieve transaction information from the channel using fabric-sdk-go, but I’m getting unreadable output. Below the code snippet: ``` myPayload, err := setup.Channel.QueryTransaction(transactionID) bytesliceToReturn := myPayload.TransactionEnvelope.Payload payloadToReturn := string(bytesliceToReturn[:]) fmt.Println("the payload is: ", payloadToReturn) ``` Output: ``` the payload is: � l ������Ӗ" mychannel*@61d3f2b607b3eea2deeb7021a505f1ad1f1ac79e99a3d330a4ba364058273be2: blocklims� � Org1MSP�-----BEGIN CERTIFICATE----- MIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ MBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS+hdftwDg8+02y1aV5pOnCO9tIn f60wZMbrt/5N0J8PFZgylBjEuUTxWRsTMpYPAJi8NlEwoJB+/YSs29ujTTBLMA4G A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIIeR0TY+iVFf mvoEKwaToscEu43ZXSj5fTVJornjxDUtMAoGCCqGSM49BAMCA0cAMEQCID+dZ7H5 AiaiI2BjxnL3/TetJ8iFJYZyWvK//an13WV/AiARBJd/pI5A7KZgQxJhXmmR8bie XdsmTcdRvJ3TS/6HCA== -----END CERTIFICATE----- �� ��B�Ys*'H�sQ��=������ � � � Org1MSP�-----BEGIN CERTIFICATE----- MIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHD ETC ETC …. ``` Anyone knows what is wrong?

habpygo (Sun, 01 Oct 2017 14:16:25 GMT):
Hi, I’m trying to retrieve transaction information from the channel using fabric-sdk-go, but I’m getting unreadable output. Below the code snippet: ``` myPayload, err := setup.Channel.QueryTransaction(transactionID) bytesliceToReturn := myPayload.TransactionEnvelope.Payload payloadToReturn := string(bytesliceToReturn[:]) fmt.Println("the payload is: ", payloadToReturn) ``` Output: ‘’’ the payload is: � l ������Ӗ" mychannel*@61d3f2b607b3eea2deeb7021a505f1ad1f1ac79e99a3d330a4ba364058273be2: blocklims� � Org1MSP�-----BEGIN CERTIFICATE----- MIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ MBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS+hdftwDg8+02y1aV5pOnCO9tIn f60wZMbrt/5N0J8PFZgylBjEuUTxWRsTMpYPAJi8NlEwoJB+/YSs29ujTTBLMA4G A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIIeR0TY+iVFf mvoEKwaToscEu43ZXSj5fTVJornjxDUtMAoGCCqGSM49BAMCA0cAMEQCID+dZ7H5 AiaiI2BjxnL3/TetJ8iFJYZyWvK//an13WV/AiARBJd/pI5A7KZgQxJhXmmR8bie XdsmTcdRvJ3TS/6HCA== -----END CERTIFICATE----- �� ��B�Ys*'H�sQ��=������ � � � Org1MSP�-----BEGIN CERTIFICATE----- MIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHD ETC ETC …. ``` Anyone knows what is wrong?

BernardLin (Sun, 01 Oct 2017 18:29:15 GMT):
Has joined the channel.

jellevdp (Mon, 02 Oct 2017 13:03:57 GMT):
Hi @troyronda @aleksandar.likic - we're using the sdk to register and enroll new users and consequently invoking transactions with these newly generated users. However, we experience issues with the validity of the new identities when connecting to the eventHub with these new users. ```Initialize return error: Failed eventHub.Connect() [Error from eventsClient.Start (rpc error: code = Unknown desc = event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority]])]``` Any idea where we should be looking? Invocations with the pre-enrolled user work fine against the same peer.

ascatox (Mon, 02 Oct 2017 13:42:53 GMT):
Has joined the channel.

troyronda (Mon, 02 Oct 2017 13:59:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=m8ZXC4Bk5ZTuHZkMR) done & merged

troyronda (Mon, 02 Oct 2017 13:59:20 GMT):
(@enigma ^^^)

enigma (Mon, 02 Oct 2017 14:00:09 GMT):
uhuhuh

troyronda (Mon, 02 Oct 2017 17:42:57 GMT):
@here https://gerrit.hyperledger.org/r/#/c/14081/ shows usage of the updated transactional API (e.g., https://gerrit.hyperledger.org/r/#/c/14081/1/test/integration/end_to_end_test.go)

troyronda (Mon, 02 Oct 2017 17:42:57 GMT):
@here (wip) https://gerrit.hyperledger.org/r/#/c/14081/ shows usage of the updated transactional API (e.g., https://gerrit.hyperledger.org/r/#/c/14081/1/test/integration/end_to_end_test.go)

bretharrison (Mon, 02 Oct 2017 17:43:23 GMT):
Has left the channel.

jellevdp (Mon, 02 Oct 2017 18:34:59 GMT):
@troyronda from the example you just posted, the user1 is hardcoded in. If I would want to replace that with a user that I register and enroll and put in the StateStore, it should work right? (cq, that functionality is currently supported in the SDK?)

troyronda (Mon, 02 Oct 2017 18:35:27 GMT):
the example is part of the e2e tests - you can use whatever usernames you need.

jellevdp (Mon, 02 Oct 2017 18:37:10 GMT):
Ok, we're trying this for some time now but must not get something right with the certs and the signing of them because we get the following error: ```Initialize return error: Failed eventHub.Connect() [Error from eventsClient.Start (rpc error: code = Unknown desc = event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority]])]```

jellevdp (Mon, 02 Oct 2017 18:40:05 GMT):
this is best interpreted then as a mismatch in certs from our implementation? Or are we still dependent on development of functionality in the SDK for this?

habpygo (Mon, 02 Oct 2017 19:01:35 GMT):
@troyronda thanks, but what I am missing is the output of the methods, i.e. you call the methods but don’t use the return. Could you please let me know how to get readable/usable output. I can query for the Height of the blockchain, but the data gives me gibberish. For example could you show me how I can use ``` // Test Query Block - retrieve block by number block, err = channel.QueryBlock(1) if err != nil { t.Fatalf("QueryBlock return error: %v", err) } // show block.data if possible or show me how to do that. ``` ``` The Blockchain height is: 5 The data shown are: data:"\n\300\035\n\260\007\nl\010\003\032\014\010\207\241\311\316\005\020\343\254\256\226\001\"\tmychannel*@825c2f408a2fe5555e5b4834167d671291d66d2fa53bc42976ee77e8450c0291:\r\022\013\022\tblocklims\022\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS+hdftwDg8+02y1aV5pOnCO9tIn\nf60wZMbrt/5N0J8PFZgylBjEuUTxWRsTMpYPAJi8NlEwoJB+/YSs29ujTTBLMA4G\nA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIIeR0TY+iVFf\nmvoEKwaToscEu43ZXSj5fTVJornjxDUtMAoGCCqGSM49BAMCA0cAMEQCID+dZ7H5\nAiaiI2BjxnL3/TetJ8iFJYZyWvK//an13WV/AiARBJd/pI5A7KZgQxJhXmmR8bie\nXdsmTcdRvJ3TS/6HCA==\n-----END CERTIFICATE-----\n\022\030\027\373\310h\n\273\251\201t9\373\262K\340T\242\220\315\301\207\033_\301\240\022\212\026\n\207\026\n\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS ``` Output is created with ``` myBlockChainInfo, err := setup.Channel.QueryInfo() mysecondBlockChainInfo, _ := setup.Channel.QueryBlock(2) theData := mysecondBlockChainInfo.Data fmt.Println("The Blockchain height is: ", myBlockChainInfo.Height) fmt.Println("The data are: ", theData.String()) ```

habpygo (Mon, 02 Oct 2017 19:01:35 GMT):
@troyronda thanks, but what I am missing is the output of the methods, i.e. you call the methods but don’t use the return. Could you please let me know how to get readable/usable output. I can query for the Height of the blockchain, but the data gives me gibberish. For example could you show me how I can use ``` // Test Query Block - retrieve block by number block, err = channel.QueryBlock(1) if err != nil { t.Fatalf("QueryBlock return error: %v", err) } // show block.data if possible or show me how to do that. ``` ``` The Blockchain height is: 5 The data shown are: data:"\n\300\035\n\260\007\nl\010\003\032\014\010\207\241\311\316\005\020\343\254\256\226\001\"\tmychannel*@825c2f408a2fe5555e5b4834167d671291d66d2fa53bc42976ee77e8450c0291:\r\022\013\022\tblocklims\022\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS+hdftwDg8+02y1aV5pOnCO9tIn\nf60wZMbrt/5N0J8PFZgylBjEuUTxWRsTMpYPAJi8NlEwoJB+/YSs29ujTTBLMA4G\nA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIIeR0TY+iVFf\nmvoEKwaToscEu43ZXSj5fTVJornjxDUtMAoGCCqGSM49BAMCA0cAMEQCID+dZ7H5\nAiaiI2BjxnL3/TetJ8iFJYZyWvK//an13WV/AiARBJd/pI5A7KZgQxJhXmmR8bie\nXdsmTcdRvJ3TS/6HCA==\n-----END CERTIFICATE-----\n\022\030\027\373\310h\n\273\251\201t9\373\262K\340T\242\220\315\301\207\033_\301\240\022\212\026\n\207\026\n\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS ```

habpygo (Mon, 02 Oct 2017 19:01:35 GMT):
@troyronda thanks, but what I am missing is the output of the methods, i.e. you call the methods but don’t use the return. Could you please let me know how to get readable/usable output. I can query for the Height of the blockchain, but the data gives me gibberish. For example could you show me how I can use ``` // Test Query Block - retrieve block by number block, err = channel.QueryBlock(1) if err != nil { t.Fatalf("QueryBlock return error: %v", err) } // show block.data if possible or show me how to do that. ``` ``` The Blockchain height is: 5 The data shown are: data:"\n\300\035\n\260\007\nl\010\003\032\014\010\207\241\311\316\005\020\343\254\256\226\001\"\tmychannel*@825c2f408a2fe5555e5b4834167d671291d66d2fa53bc42976ee77e8450c0291:\r\022\013\022\tblocklims\022\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS+hdftwDg8+02y1aV5pOnCO9tIn\nf60wZMbrt/5N0J8PFZgylBjEuUTxWRsTMpYPAJi8NlEwoJB+/YSs29ujTTBLMA4G\nA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIIeR0TY+iVFf\nmvoEKwaToscEu43ZXSj5fTVJornjxDUtMAoGCCqGSM49BAMCA0cAMEQCID+dZ7H5\nAiaiI2BjxnL3/TetJ8iFJYZyWvK//an13WV/AiARBJd/pI5A7KZgQxJhXmmR8bie\nXdsmTcdRvJ3TS/6HCA==\n-----END CERTIFICATE-----\n\022\030\027\373\310h\n\273\251\201t9\373\262K\340T\242\220\315\301\207\033_\301\240\022\212\026\n\207\026\n\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS ``` Output is created with block.data.String()

habpygo (Mon, 02 Oct 2017 19:01:35 GMT):
@troyronda thanks, but what I am missing is the output of the methods, i.e. you call the methods but don’t use the return. Could you please let me know how to get readable/usable output. I can query for the Height of the blockchain, but the data gives me gibberish. For example could you show me how I can use ``` // Test Query Block - retrieve block by number block, err = channel.QueryBlock(1) if err != nil { t.Fatalf("QueryBlock return error: %v", err) } // show block.data if possible or show me how to do that. ``` ``` The Blockchain height is: 5 The data shown are: data:"\n\300\035\n\260\007\nl\010\003\032\014\010\207\241\311\316\005\020\343\254\256\226\001\"\tmychannel*@825c2f408a2fe5555e5b4834167d671291d66d2fa53bc42976ee77e8450c0291:\r\022\013\022\tblocklims\022\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS+hdftwDg8+02y1aV5pOnCO9tIn\nf60wZMbrt/5N0J8PFZgylBjEuUTxWRsTMpYPAJi8NlEwoJB+/YSs29ujTTBLMA4G\nA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIIeR0TY+iVFf\nmvoEKwaToscEu43ZXSj5fTVJornjxDUtMAoGCCqGSM49BAMCA0cAMEQCID+dZ7H5\nAiaiI2BjxnL3/TetJ8iFJYZyWvK//an13WV/AiARBJd/pI5A7KZgQxJhXmmR8bie\nXdsmTcdRvJ3TS/6HCA==\n-----END CERTIFICATE-----\n\022\030\027\373\310h\n\273\251\201t9\373\262K\340T\242\220\315\301\207\033_\301\240\022\212\026\n\207\026\n\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS ``` Output is created with block.data.String()

habpygo (Mon, 02 Oct 2017 19:01:35 GMT):
@troyronda thanks, but what I am missing is the output of the methods, i.e. you call the methods but don’t use the return. Could you please let me know how to get readable/usable output. I can query for the Height of the blockchain, but the data gives me gibberish. For example could you show me how I can use ``` // Test Query Block - retrieve block by number block, err = channel.QueryBlock(1) if err != nil { t.Fatalf("QueryBlock return error: %v", err) } // show block.data if possible or show me how to do that. ``` ``` The Blockchain height is: 5 The data shown are: data:"\n\300\035\n\260\007\nl\010\003\032\014\010\207\241\311\316\005\020\343\254\256\226\001\"\tmychannel*@825c2f408a2fe5555e5b4834167d671291d66d2fa53bc42976ee77e8450c0291:\r\022\013\022\tblocklims\022\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS+hdftwDg8+02y1aV5pOnCO9tIn\nf60wZMbrt/5N0J8PFZgylBjEuUTxWRsTMpYPAJi8NlEwoJB+/YSs29ujTTBLMA4G\nA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIIeR0TY+iVFf\nmvoEKwaToscEu43ZXSj5fTVJornjxDUtMAoGCCqGSM49BAMCA0cAMEQCID+dZ7H5\nAiaiI2BjxnL3/TetJ8iFJYZyWvK//an13WV/AiARBJd/pI5A7KZgQxJhXmmR8bie\nXdsmTcdRvJ3TS/6HCA==\n-----END CERTIFICATE-----\n\022\030\027\373\310h\n\273\251\201t9\373\262K\340T\242\220\315\301\207\033_\301\240\022\212\026\n\207\026\n\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS ``` Output is created with ``` mysecondBlockChainInfo, _ := setup.Channel.QueryBlock(2) theData := mysecondBlockChainInfo.Data fmt.Println("The Blockchain height is: ", myBlockChainInfo.Height) fmt.Println("The data are: ", theData.String()) ```

habpygo (Mon, 02 Oct 2017 19:01:35 GMT):
@troyronda thanks, but what I am missing is the output of the methods, i.e. you call the methods but don’t use the return. Could you please let me know how to get readable/usable output. I can query for the Height of the blockchain, but the data gives me gibberish. For example could you show me how I can use ``` // Test Query Block - retrieve block by number block, err = channel.QueryBlock(1) if err != nil { t.Fatalf("QueryBlock return error: %v", err) } // show block.data if possible or show me how to do that. ``` ``` The Blockchain height is: 5 The data shown are: data:"\n\300\035\n\260\007\nl\010\003\032\014\010\207\241\311\316\005\020\343\254\256\226\001\"\tmychannel*@825c2f408a2fe5555e5b4834167d671291d66d2fa53bc42976ee77e8450c0291:\r\022\013\022\tblocklims\022\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS+hdftwDg8+02y1aV5pOnCO9tIn\nf60wZMbrt/5N0J8PFZgylBjEuUTxWRsTMpYPAJi8NlEwoJB+/YSs29ujTTBLMA4G\nA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIIeR0TY+iVFf\nmvoEKwaToscEu43ZXSj5fTVJornjxDUtMAoGCCqGSM49BAMCA0cAMEQCID+dZ7H5\nAiaiI2BjxnL3/TetJ8iFJYZyWvK//an13WV/AiARBJd/pI5A7KZgQxJhXmmR8bie\nXdsmTcdRvJ3TS/6HCA==\n-----END CERTIFICATE-----\n\022\030\027\373\310h\n\273\251\201t9\373\262K\340T\242\220\315\301\207\033_\301\240\022\212\026\n\207\026\n\277\006\n\242\006\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRALR/1GXtEud5GQL2CZykkOkwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI4MTQyNzIwWhcNMjcwNzI2MTQyNzIw\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPIVPS ``` Output is created with ``` mysecondBlockChainInfo, _ := setup.Channel.QueryBlock(2) theData := mysecondBlockChainInfo.Data fmt.Println("The Blockchain height is: ", myBlockChainInfo.Height) fmt.Println("The data are: ", theData.String()) ```

bstasyszyn (Mon, 02 Oct 2017 19:53:19 GMT):
@habpygo @troyronda Take a look the example fabric-cli: https://github.com/securekey/fabric-examples/tree/master/fabric-cli/. There are query commands that print out the block in a readable way (or in JSON format). For example: $ ./fabric-events-cli query block --num 2

bstasyszyn (Mon, 02 Oct 2017 19:54:12 GMT):
.. gives you output that looks like this:

bstasyszyn (Mon, 02 Oct 2017 19:54:23 GMT):
********************************** ***** Header: ***** | Number: 2 ***** | PreviousHash: BpK6hjvUix004hkDu4Q3alPhhjb8ccIMH6qdK7R04Uc ***** | DataHash: -z2FXrSDhFyu-GiGpDijosYgRhN1IttJXgbuzAdomFM ***** Metadata: ***** | Signatures: ***** | | Metadata Signature[0]: ***** | | | Nonce: 9FjTrtboUa8ljN3OQYJ4WfBNM684c7uL . . .

troyronda (Mon, 02 Oct 2017 19:57:45 GMT):
thanks bob

troyronda (Tue, 03 Oct 2017 00:09:05 GMT):
https://github.com/securekey/fabric-examples/blob/master/fabric-cli/cmd/fabric-cli/common/printer.go#L84

habpygo (Tue, 03 Oct 2017 07:13:54 GMT):
@bstasyszyn @troyronda thanks for the help!

AlekNS (Wed, 04 Oct 2017 05:13:44 GMT):
Has joined the channel.

KevinLeyssens (Wed, 04 Oct 2017 10:48:06 GMT):
Has joined the channel.

habpygo (Thu, 05 Oct 2017 07:40:16 GMT):
@bstasyszyn @troyronda I have been trying to fiddle around with the packages from the https://github.com/securekey/fabric-examples/tree/master/fabric-cli link, but I’m getting errors during building like “can’t use three variables for two parameters…” or something along those lines — can’t remember exactly what it was. This smells like version differences. Just to make sure, what versions are you guys using. I’m using: ``` Fabric v1.0.1 Fabric-ca v1.0.0 Fabric-sdk-go (latest clone — master) go version go1.9 darwin/amd64 ``` Could this be a problem? By the way @bstasyszyn , the packages in your repository are awesome! Is there a possibility that @troyronda is going/allowed to incorporate this in the sdk as well?

bstasyszyn (Thu, 05 Oct 2017 15:31:08 GMT):
@habpygo The example is currently compatible fabric 1.0.0, fabric-ca 1.0.0 and fabric-sdk-go at master:110bf21bf3ab0a9a084f46d9698e1daeeda68a59. I'm actively working on making it compatible with the latest SDK - should be done in a few days.

habpygo (Thu, 05 Oct 2017 15:56:00 GMT):
@bstasyszyn super! By the way, perhaps you could immediately fix it for the latest commit, because I see that @troyronda has changed the `args` from `[]string` to `[][]byte` Again, thanks a lot.

ranjan008 (Fri, 06 Oct 2017 07:44:11 GMT):
@troyronda I am able to create new users using sdk and the keys files are being generated inside msp directory which is again under tmp directory of the system. the problem is whenever I am restarting my system the msp directory is getting deleted and the setup throws ski error where can i change the location for the msp directory.

lclclc (Mon, 09 Oct 2017 11:11:07 GMT):
Has joined the channel.

Kyroy (Mon, 09 Oct 2017 13:22:40 GMT):
Hey, one question. when using the cryptogen tool. How to set the ca client key and certificate in the go sdk?

samwood (Wed, 11 Oct 2017 00:44:55 GMT):
is it possible to retrieve all the peers via the go sdk? I imagine this requires interfacing with the gossip protocol ?

jayhe (Wed, 11 Oct 2017 05:28:35 GMT):
Has joined the channel.

mastersingh24 (Wed, 11 Oct 2017 11:04:38 GMT):
@troyronda - can we close https://jira.hyperledger.org/browse/FAB-5917 ?

ranjan008 (Thu, 12 Oct 2017 06:43:55 GMT):
@troyronda is there any method in sdk which is being called everytime a block is inserted into the network?

Kyroy (Thu, 12 Oct 2017 09:41:22 GMT):
how to invoke a special chaincode by its version?

Kyroy (Thu, 12 Oct 2017 10:29:06 GMT):
As far as I can see, The Version field is not used in ```// create invocation spec to target a chaincode with arguments ccis := &pb.ChaincodeInvocationSpec{ChaincodeSpec: &pb.ChaincodeSpec{ Type: pb.ChaincodeSpec_GOLANG, ChaincodeId: &pb.ChaincodeID{Name: request.ChaincodeID}, Input: &pb.ChaincodeInput{Args: argsArray}}}``` (`ChaincodeId: &pb.ChaincodeID{Name: request.ChaincodeID},`) Is there an open Pull Request or is this planned in the near future?

Kyroy (Fri, 13 Oct 2017 13:15:03 GMT):
```channel.QueryInstantiatedChaincodes()``` in peer, i get something like this: ```2017-10-13 13:12:22.248 UTC [shim] handleGetStateByRange -> DEBU 6d1 [559a7512]Sending GET_STATE_BY_RANGE 2017-10-13 13:12:22.248 UTC [chaincode] processStream -> DEBU 6d2 [559a7512]Received message GET_STATE_BY_RANGE from shim 2017-10-13 13:12:22.248 UTC [chaincode] HandleMessage -> DEBU 6d3 [559a7512]Fabric side Handling ChaincodeMessage of type: GET_STATE_BY_RANGE in state ready 2017-10-13 13:12:22.248 UTC [chaincode] afterGetStateByRange -> DEBU 6d4 Received GET_STATE_BY_RANGE, invoking get state from ledger 2017-10-13 13:12:22.249 UTC [chaincode] afterGetStateByRange -> DEBU 6d5 Exiting GET_STATE_BY_RANGE 2017-10-13 13:12:22.249 UTC [chaincode] filterError -> DEBU 6d6 Ignoring NoTransitionError: no transition 2017-10-13 13:12:22.249 UTC [chaincode] isValidTxSim -> ERRO 6d7 [559a7512]No ledger context for GetStateByRange. Sending ERROR 2017-10-13 13:12:22.250 UTC [chaincode] 1 -> DEBU 6d8 [559a7512]handleGetStateByRange serial send ERROR 2017-10-13 13:12:22.250 UTC [shim] func1 -> DEBU 6d9 [559a7512]Received message ERROR from shim 2017-10-13 13:12:22.250 UTC [shim] handleMessage -> DEBU 6da [559a7512]Handling ChaincodeMessage of type: ERROR(state:ready) 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6db [559a7512]before send 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6dc [559a7512]after send 2017-10-13 13:12:22.250 UTC [shim] afterError -> DEBU 6dd [559a7512]Error received from validator ERROR, communicated(state:ready) 2017-10-13 13:12:22.250 UTC [shim] handleGetStateByRange -> ERRO 6de [559a7512]Received ERROR``` and the go error looks like this: ```lscc.getchaincodes failed: QueryBySystemChaincode should have one result only, actual result is 0, error Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = chaincode error (status: 500, message: [559a7512]No ledger context for GetStateByRange. Sending ERROR)' for txID '559a7512e6b7bb3e572857b7c89074c014844aa829c0f64cc1ea9fddef8d3145'\n"``` (Added the "err" to the error message in "queryBySystemChaincodeByTarget") Is this function working with the go sdk?

Kyroy (Fri, 13 Oct 2017 13:15:03 GMT):
```channel.QueryInstantiatedChaincodes()``` in peer, i get something like this: ```2017-10-13 13:12:22.248 UTC [shim] handleGetStateByRange -> DEBU 6d1 [559a7512]Sending GET_STATE_BY_RANGE 2017-10-13 13:12:22.248 UTC [chaincode] processStream -> DEBU 6d2 [559a7512]Received message GET_STATE_BY_RANGE from shim 2017-10-13 13:12:22.248 UTC [chaincode] HandleMessage -> DEBU 6d3 [559a7512]Fabric side Handling ChaincodeMessage of type: GET_STATE_BY_RANGE in state ready 2017-10-13 13:12:22.248 UTC [chaincode] afterGetStateByRange -> DEBU 6d4 Received GET_STATE_BY_RANGE, invoking get state from ledger 2017-10-13 13:12:22.249 UTC [chaincode] afterGetStateByRange -> DEBU 6d5 Exiting GET_STATE_BY_RANGE 2017-10-13 13:12:22.249 UTC [chaincode] filterError -> DEBU 6d6 Ignoring NoTransitionError: no transition 2017-10-13 13:12:22.249 UTC [chaincode] isValidTxSim -> ERRO 6d7 [559a7512]No ledger context for GetStateByRange. Sending ERROR 2017-10-13 13:12:22.250 UTC [chaincode] 1 -> DEBU 6d8 [559a7512]handleGetStateByRange serial send ERROR 2017-10-13 13:12:22.250 UTC [shim] func1 -> DEBU 6d9 [559a7512]Received message ERROR from shim 2017-10-13 13:12:22.250 UTC [shim] handleMessage -> DEBU 6da [559a7512]Handling ChaincodeMessage of type: ERROR(state:ready) 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6db [559a7512]before send 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6dc [559a7512]after send 2017-10-13 13:12:22.250 UTC [shim] afterError -> DEBU 6dd [559a7512]Error received from validator ERROR, communicated(state:ready) 2017-10-13 13:12:22.250 UTC [shim] handleGetStateByRange -> ERRO 6de [559a7512]Received ERROR``` and the go error looks like this: ```lscc.getchaincodes failed: QueryBySystemChaincode should have one result only, actual result is 0, error Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = chaincode error (status: 500, message: [559a7512]No ledger context for GetStateByRange. Sending ERROR)' for txID '559a7512e6b7bb3e572857b7c89074c014844aa829c0f64cc1ea9fddef8d3145'\n"``` (Added the "err" to the error message in "queryBySystemChaincodeByTarget") Is this function working with the go sdk?

Kyroy (Fri, 13 Oct 2017 13:15:03 GMT):
```channel.QueryInstantiatedChaincodes()``` in peer, i get something like this: ```2017-10-13 13:12:22.248 UTC [shim] handleGetStateByRange -> DEBU 6d1 [559a7512]Sending GET_STATE_BY_RANGE 2017-10-13 13:12:22.248 UTC [chaincode] processStream -> DEBU 6d2 [559a7512]Received message GET_STATE_BY_RANGE from shim 2017-10-13 13:12:22.248 UTC [chaincode] HandleMessage -> DEBU 6d3 [559a7512]Fabric side Handling ChaincodeMessage of type: GET_STATE_BY_RANGE in state ready 2017-10-13 13:12:22.248 UTC [chaincode] afterGetStateByRange -> DEBU 6d4 Received GET_STATE_BY_RANGE, invoking get state from ledger 2017-10-13 13:12:22.249 UTC [chaincode] afterGetStateByRange -> DEBU 6d5 Exiting GET_STATE_BY_RANGE 2017-10-13 13:12:22.249 UTC [chaincode] filterError -> DEBU 6d6 Ignoring NoTransitionError: no transition 2017-10-13 13:12:22.249 UTC [chaincode] isValidTxSim -> ERRO 6d7 [559a7512]No ledger context for GetStateByRange. Sending ERROR 2017-10-13 13:12:22.250 UTC [chaincode] 1 -> DEBU 6d8 [559a7512]handleGetStateByRange serial send ERROR 2017-10-13 13:12:22.250 UTC [shim] func1 -> DEBU 6d9 [559a7512]Received message ERROR from shim 2017-10-13 13:12:22.250 UTC [shim] handleMessage -> DEBU 6da [559a7512]Handling ChaincodeMessage of type: ERROR(state:ready) 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6db [559a7512]before send 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6dc [559a7512]after send 2017-10-13 13:12:22.250 UTC [shim] afterError -> DEBU 6dd [559a7512]Error received from validator ERROR, communicated(state:ready) 2017-10-13 13:12:22.250 UTC [shim] handleGetStateByRange -> ERRO 6de [559a7512]Received ERROR``` and the go error looks like this: ```lscc.getchaincodes failed: QueryBySystemChaincode should have one result only, actual result is 0, error Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = chaincode error (status: 500, message: [559a7512]No ledger context for GetStateByRange. Sending ERROR)' for txID '559a7512e6b7bb3e572857b7c89074c014844aa829c0f64cc1ea9fddef8d3145'\n"``` (Added the "err" to the error message in "queryBySystemChaincodeByTarget") Is this function working with the go sdk?

Kyroy (Fri, 13 Oct 2017 13:15:03 GMT):
```channel.QueryInstantiatedChaincodes()``` in peer, i get something like this: ```2017-10-13 13:12:22.248 UTC [shim] handleGetStateByRange -> DEBU 6d1 [559a7512]Sending GET_STATE_BY_RANGE 2017-10-13 13:12:22.248 UTC [chaincode] processStream -> DEBU 6d2 [559a7512]Received message GET_STATE_BY_RANGE from shim 2017-10-13 13:12:22.248 UTC [chaincode] HandleMessage -> DEBU 6d3 [559a7512]Fabric side Handling ChaincodeMessage of type: GET_STATE_BY_RANGE in state ready 2017-10-13 13:12:22.248 UTC [chaincode] afterGetStateByRange -> DEBU 6d4 Received GET_STATE_BY_RANGE, invoking get state from ledger 2017-10-13 13:12:22.249 UTC [chaincode] afterGetStateByRange -> DEBU 6d5 Exiting GET_STATE_BY_RANGE 2017-10-13 13:12:22.249 UTC [chaincode] filterError -> DEBU 6d6 Ignoring NoTransitionError: no transition 2017-10-13 13:12:22.249 UTC [chaincode] isValidTxSim -> ERRO 6d7 [559a7512]No ledger context for GetStateByRange. Sending ERROR 2017-10-13 13:12:22.250 UTC [chaincode] 1 -> DEBU 6d8 [559a7512]handleGetStateByRange serial send ERROR 2017-10-13 13:12:22.250 UTC [shim] func1 -> DEBU 6d9 [559a7512]Received message ERROR from shim 2017-10-13 13:12:22.250 UTC [shim] handleMessage -> DEBU 6da [559a7512]Handling ChaincodeMessage of type: ERROR(state:ready) 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6db [559a7512]before send 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6dc [559a7512]after send 2017-10-13 13:12:22.250 UTC [shim] afterError -> DEBU 6dd [559a7512]Error received from validator ERROR, communicated(state:ready) 2017-10-13 13:12:22.250 UTC [shim] handleGetStateByRange -> ERRO 6de [559a7512]Received ERROR``` and the go error looks like this: ```lscc.getchaincodes failed: QueryBySystemChaincode should have one result only, actual result is 0, error Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = chaincode error (status: 500, message: [559a7512]No ledger context for GetStateByRange. Sending ERROR)' for txID '559a7512e6b7bb3e572857b7c89074c014844aa829c0f64cc1ea9fddef8d3145'\n"``` (Added the "err" to the error message in "queryBySystemChaincodeByTarget") Is this function working with the go sdk?

Kyroy (Fri, 13 Oct 2017 13:15:03 GMT):
```channel.QueryInstantiatedChaincodes()``` in peer, i get something like this: ```2017-10-13 13:12:22.248 UTC [shim] handleGetStateByRange -> DEBU 6d1 [559a7512]Sending GET_STATE_BY_RANGE 2017-10-13 13:12:22.248 UTC [chaincode] processStream -> DEBU 6d2 [559a7512]Received message GET_STATE_BY_RANGE from shim 2017-10-13 13:12:22.248 UTC [chaincode] HandleMessage -> DEBU 6d3 [559a7512]Fabric side Handling ChaincodeMessage of type: GET_STATE_BY_RANGE in state ready 2017-10-13 13:12:22.248 UTC [chaincode] afterGetStateByRange -> DEBU 6d4 Received GET_STATE_BY_RANGE, invoking get state from ledger 2017-10-13 13:12:22.249 UTC [chaincode] afterGetStateByRange -> DEBU 6d5 Exiting GET_STATE_BY_RANGE 2017-10-13 13:12:22.249 UTC [chaincode] filterError -> DEBU 6d6 Ignoring NoTransitionError: no transition 2017-10-13 13:12:22.249 UTC [chaincode] isValidTxSim -> ERRO 6d7 [559a7512]No ledger context for GetStateByRange. Sending ERROR 2017-10-13 13:12:22.250 UTC [chaincode] 1 -> DEBU 6d8 [559a7512]handleGetStateByRange serial send ERROR 2017-10-13 13:12:22.250 UTC [shim] func1 -> DEBU 6d9 [559a7512]Received message ERROR from shim 2017-10-13 13:12:22.250 UTC [shim] handleMessage -> DEBU 6da [559a7512]Handling ChaincodeMessage of type: ERROR(state:ready) 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6db [559a7512]before send 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6dc [559a7512]after send 2017-10-13 13:12:22.250 UTC [shim] afterError -> DEBU 6dd [559a7512]Error received from validator ERROR, communicated(state:ready) 2017-10-13 13:12:22.250 UTC [shim] handleGetStateByRange -> ERRO 6de [559a7512]Received ERROR``` and the go error looks like this: ```lscc.getchaincodes failed: QueryBySystemChaincode should have one result only, actual result is 0, error Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = chaincode error (status: 500, message: [559a7512]No ledger context for GetStateByRange. Sending ERROR)' for txID '559a7512e6b7bb3e572857b7c89074c014844aa829c0f64cc1ea9fddef8d3145'\n"``` (Added the "err" to the error message in "queryBySystemChaincodeByTarget") Is this function working with the go sdk?

Kyroy (Fri, 13 Oct 2017 13:15:03 GMT):
```channel.QueryInstantiatedChaincodes() ``` in peer, i get something like this: ```2017-10-13 13:12:22.248 UTC [shim] handleGetStateByRange -> DEBU 6d1 [559a7512]Sending GET_STATE_BY_RANGE 2017-10-13 13:12:22.248 UTC [chaincode] processStream -> DEBU 6d2 [559a7512]Received message GET_STATE_BY_RANGE from shim 2017-10-13 13:12:22.248 UTC [chaincode] HandleMessage -> DEBU 6d3 [559a7512]Fabric side Handling ChaincodeMessage of type: GET_STATE_BY_RANGE in state ready 2017-10-13 13:12:22.248 UTC [chaincode] afterGetStateByRange -> DEBU 6d4 Received GET_STATE_BY_RANGE, invoking get state from ledger 2017-10-13 13:12:22.249 UTC [chaincode] afterGetStateByRange -> DEBU 6d5 Exiting GET_STATE_BY_RANGE 2017-10-13 13:12:22.249 UTC [chaincode] filterError -> DEBU 6d6 Ignoring NoTransitionError: no transition 2017-10-13 13:12:22.249 UTC [chaincode] isValidTxSim -> ERRO 6d7 [559a7512]No ledger context for GetStateByRange. Sending ERROR 2017-10-13 13:12:22.250 UTC [chaincode] 1 -> DEBU 6d8 [559a7512]handleGetStateByRange serial send ERROR 2017-10-13 13:12:22.250 UTC [shim] func1 -> DEBU 6d9 [559a7512]Received message ERROR from shim 2017-10-13 13:12:22.250 UTC [shim] handleMessage -> DEBU 6da [559a7512]Handling ChaincodeMessage of type: ERROR(state:ready) 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6db [559a7512]before send 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6dc [559a7512]after send 2017-10-13 13:12:22.250 UTC [shim] afterError -> DEBU 6dd [559a7512]Error received from validator ERROR, communicated(state:ready) 2017-10-13 13:12:22.250 UTC [shim] handleGetStateByRange -> ERRO 6de [559a7512]Received ERROR``` and the go error looks like this: ```lscc.getchaincodes failed: QueryBySystemChaincode should have one result only, actual result is 0, error Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = chaincode error (status: 500, message: [559a7512]No ledger context for GetStateByRange. Sending ERROR)' for txID '559a7512e6b7bb3e572857b7c89074c014844aa829c0f64cc1ea9fddef8d3145'\n"``` (Added the "err" to the error message in "queryBySystemChaincodeByTarget") Is this function working with the go sdk?

Kyroy (Fri, 13 Oct 2017 13:15:03 GMT):
```channel.QueryInstantiatedChaincodes() ``` in peer, i get something like this: ```2017-10-13 13:12:22.248 UTC [shim] handleGetStateByRange -> DEBU 6d1 [559a7512]Sending GET_STATE_BY_RANGE 2017-10-13 13:12:22.248 UTC [chaincode] processStream -> DEBU 6d2 [559a7512]Received message GET_STATE_BY_RANGE from shim 2017-10-13 13:12:22.248 UTC [chaincode] HandleMessage -> DEBU 6d3 [559a7512]Fabric side Handling ChaincodeMessage of type: GET_STATE_BY_RANGE in state ready 2017-10-13 13:12:22.248 UTC [chaincode] afterGetStateByRange -> DEBU 6d4 Received GET_STATE_BY_RANGE, invoking get state from ledger 2017-10-13 13:12:22.249 UTC [chaincode] afterGetStateByRange -> DEBU 6d5 Exiting GET_STATE_BY_RANGE 2017-10-13 13:12:22.249 UTC [chaincode] filterError -> DEBU 6d6 Ignoring NoTransitionError: no transition 2017-10-13 13:12:22.249 UTC [chaincode] isValidTxSim -> ERRO 6d7 [559a7512]No ledger context for GetStateByRange. Sending ERROR 2017-10-13 13:12:22.250 UTC [chaincode] 1 -> DEBU 6d8 [559a7512]handleGetStateByRange serial send ERROR 2017-10-13 13:12:22.250 UTC [shim] func1 -> DEBU 6d9 [559a7512]Received message ERROR from shim 2017-10-13 13:12:22.250 UTC [shim] handleMessage -> DEBU 6da [559a7512]Handling ChaincodeMessage of type: ERROR(state:ready) 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6db [559a7512]before send 2017-10-13 13:12:22.250 UTC [shim] sendChannel -> DEBU 6dc [559a7512]after send 2017-10-13 13:12:22.250 UTC [shim] afterError -> DEBU 6dd [559a7512]Error received from validator ERROR, communicated(state:ready) 2017-10-13 13:12:22.250 UTC [shim] handleGetStateByRange -> ERRO 6de [559a7512]Received ERROR ``` and the go error looks like this: ```lscc.getchaincodes failed: QueryBySystemChaincode should have one result only, actual result is 0, error Transaction processor (localhost:7051) returned error 'rpc error: code = Unknown desc = chaincode error (status: 500, message: [559a7512]No ledger context for GetStateByRange. Sending ERROR)' for txID '559a7512e6b7bb3e572857b7c89074c014844aa829c0f64cc1ea9fddef8d3145'\n" ``` (Added the "err" to the error message in "queryBySystemChaincodeByTarget") Is this function working with the go sdk?

waterlord (Mon, 16 Oct 2017 06:21:58 GMT):
Has joined the channel.

ScottMoynes (Tue, 17 Oct 2017 16:53:58 GMT):
Has joined the channel.

troyronda (Tue, 17 Oct 2017 23:41:14 GMT):
@here our fabric-cli demo has been updated to the latest Go SDK (https://github.com/securekey/fabric-examples) - thanks @bstasyszyn

habpygo (Wed, 18 Oct 2017 07:26:23 GMT):
Thanks guys!

biljana_lukovic (Wed, 18 Oct 2017 15:05:21 GMT):
cd ..

steigensonne (Thu, 19 Oct 2017 07:13:49 GMT):
Has joined the channel.

Kyroy (Thu, 19 Oct 2017 13:25:30 GMT):
Could someone take a look at my 3 questions above? (ca cert, chaincode version, QueryBySystemChaincode)

ScottMoynes (Thu, 19 Oct 2017 21:08:40 GMT):
I wonder if it is possible to get the chaincode error from a client of the SDK, ie. if a chaincode calls `shim.Error("CHAINCODE ERROR)` can a caller of, say, `ChannelClient.QueryWithOpts()` retrieve the error message? unwrapping the error gives a `TransactionProposalError` with an go error field `Err` and a value of type `status.statusError`. calling `Error()` on that gives something like "rpc error: code = Unknown desc = chaincode error (status: 500, message: CHAINCODE ERROR)". but `gprc/status` package is vendored and that type is not exported so i'm a bit stuck. if it isnt possible, is it an enhancement that would be considered if i volunteered the effort? Thanks! :smiley_cat:

ScottMoynes (Thu, 19 Oct 2017 21:08:40 GMT):
I wonder if it is possible to get the chaincode error from a client of the SDK, ie. if a chaincode calls `shim.Error("CHAINCODE ERROR")` can a caller of, say, `ChannelClient.QueryWithOpts()` retrieve the error message? unwrapping the error gives a `TransactionProposalError` with an go error field `Err` and a value of type `status.statusError`. calling `Error()` on that gives something like "rpc error: code = Unknown desc = chaincode error (status: 500, message: CHAINCODE ERROR)". but `gprc/status` package is vendored and that type is not exported so i'm a bit stuck. if it isnt possible, is it an enhancement that would be considered if i volunteered the effort? Thanks! :smiley_cat:

tixu (Thu, 19 Oct 2017 21:53:05 GMT):
Has joined the channel.

troyronda (Fri, 20 Oct 2017 14:11:18 GMT):
@ScottMoynes - this is a great idea

troyronda (Fri, 20 Oct 2017 14:18:09 GMT):
(and, yes, is an enhancement that would be considered)

troyronda (Fri, 20 Oct 2017 14:21:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ogmCBnXq3TTZpSCTL) Suggest taking a look at the sample config and also the crypto-config in the fixtures directory (https://github.com/hyperledger/fabric-sdk-go/tree/master/test/fixtures/channel/crypto-config)

troyronda (Fri, 20 Oct 2017 14:22:06 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml

troyronda (Fri, 20 Oct 2017 14:35:05 GMT):
@Kyroy - there isn't an open pull request right now, but I do see that Version isn't being used in ChaincodeId and this should be investigated.

troyronda (Fri, 20 Oct 2017 14:37:49 GMT):
@Kyroy - I do see channel.QueryInstantiatedChaincodes in the integration test suite - https://github.com/hyperledger/fabric-sdk-go/blob/4c04c1c85e31db88a35f8e7d37e7622a67137835/test/integration/channel_queries_test.go#L209

troyronda (Fri, 20 Oct 2017 14:37:49 GMT):
@Kyroy - Yes: channel.QueryInstantiatedChaincodes is part of the integration test suite - https://github.com/hyperledger/fabric-sdk-go/blob/4c04c1c85e31db88a35f8e7d37e7622a67137835/test/integration/channel_queries_test.go#L209

mogamboizer (Sat, 21 Oct 2017 15:13:15 GMT):
Has joined the channel.

Fontinalis (Sun, 22 Oct 2017 17:02:57 GMT):
Has joined the channel.

agiledeveloper (Sun, 22 Oct 2017 17:21:35 GMT):
Has joined the channel.

Amjadnz (Mon, 23 Oct 2017 08:12:25 GMT):
Has joined the channel.

Amjadnz (Mon, 23 Oct 2017 08:13:10 GMT):
New @ fabric-go-sdk - currently while running running the steps from the README.md the following errors happen on `make depend`

Amjadnz (Mon, 23 Oct 2017 08:13:16 GMT):
```gocov is not installed (go get -u github.com/axw/gocov/...) gocov-xml is not installed (go get -u github.com/AlekSi/gocov-xml) misspell is not installed (go get -u github.com/client9/misspell/cmd/misspell) golint is not installed (go get -u github.com/golang/lint/golint) goimports is not installed (go get -u golang.org/x/tools/cmd/goimports) mockgen is not installed (go get -u github.com/golang/mock/mockgen) dep is not installed (go get -u github.com/golang/dep/cmd/dep) Missing dependency. Aborting. You can fix by installing the tool listed above or running make depend-install. make: *** [depend] Error 1 ```

Amjadnz (Mon, 23 Oct 2017 08:13:26 GMT):
this is my go config

Amjadnz (Mon, 23 Oct 2017 08:13:39 GMT):
go version go1.8 darwin/amd64

Amjadnz (Mon, 23 Oct 2017 08:13:39 GMT):
`go version go1.8 darwin/amd64`

antitoine (Mon, 23 Oct 2017 08:16:32 GMT):
Look at your error message `Missing dependency. Aborting. You can fix by installing the tool listed above or running make depend-install.` Just run `make depend-install` I guess

Amjadnz (Mon, 23 Oct 2017 08:17:32 GMT):
Almost all packages are installed in the list. ``` drwxr-xr-x 3 amjad wheel 102 Oct 23 12:05 axw drwxr-xr-x 3 amjad wheel 102 Oct 23 12:06 AlekSi drwxr-xr-x 3 amjad wheel 102 Oct 23 12:06 client9 drwxr-xr-x 7 amjad wheel 238 Oct 23 12:07 golang ```

Amjadnz (Mon, 23 Oct 2017 08:18:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=e4d9egGAy7SAjdtMo) @antitoine Ok thanks - would try that

Amjadnz (Mon, 23 Oct 2017 08:22:32 GMT):
```Installing dependencies ... Installing dep@v0.3.1 to /tts/official/bin ... HEAD is now at 83789e2 Prep CHANGELOG for release gocov is not installed (go get -u github.com/axw/gocov/...) gocov-xml is not installed (go get -u github.com/AlekSi/gocov-xml) misspell is not installed (go get -u github.com/client9/misspell/cmd/misspell) golint is not installed (go get -u github.com/golang/lint/golint) goimports is not installed (go get -u golang.org/x/tools/cmd/goimports) mockgen is not installed (go get -u github.com/golang/mock/mockgen) dep is not installed (go get -u github.com/golang/dep/cmd/dep) Missing dependency. Aborting. You can fix by installing the tool listed above or running make depend-install. make: *** [depend-install] Error 1 ```

Amjadnz (Mon, 23 Oct 2017 08:28:07 GMT):
Individually installed each package (using go get ...) too and I can see them in golang.org or github.com/golang properly.

Amjadnz (Mon, 23 Oct 2017 08:33:45 GMT):
So - I changed my path variable to look into the default bin directory of $GOPATH in my case /tts/official/bin then atleast the `make depend-install` completed without errors.

Amjadnz (Mon, 23 Oct 2017 09:32:55 GMT):
So - another change i had to do was to map my fabric-go-sdk directory in the docker prefereces - shared folders.

Amjadnz (Mon, 23 Oct 2017 09:33:03 GMT):
After that all tests passed successfully.

Amjadnz (Mon, 23 Oct 2017 09:33:31 GMT):
So minor change in documentation can make this process more smooth for Mac Users.

KevinBai (Mon, 23 Oct 2017 09:42:54 GMT):
@here hello, Can latest version support fabric 1.0.3?

Kyroy (Mon, 23 Oct 2017 09:48:00 GMT):
@troyronda do you have any idea why my `channel.QueryInstantiatedChaincodes` returns `lscc.getchaincodes failed: QueryBySystemChaincode should have one result only, actual result is 0`?

Kyroy (Mon, 23 Oct 2017 11:23:17 GMT):
@KevinBai For me, the current sdk version is working with fabric 1.0.3, but haven't tested all functionalities :D

warm3snow (Mon, 23 Oct 2017 11:37:43 GMT):
When i run `make integration-test`, the following errors happened. ``` Populating vendor ... The following issues were found in Gopkg.toml: ✗ unable to deduce repository and source type for "golang.org/x/sync": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/sync?go-get=1": Get http://golang.org/x/sync?go-get=1: dial tcp 216.239.37.1:80: i/o timeout ✗ unable to deduce repository and source type for "golang.org/x/net": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net?go-get=1": Get http://golang.org/x/net?go-get=1: dial tcp 216.239.37.1:80: i/o timeout ✗ unable to deduce repository and source type for "google.golang.org/grpc": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://google.golang.org/grpc?go-get=1": Get http://google.golang.org/grpc?go-get=1: dial tcp 216.239.37.1:80: i/o timeout ✗ unable to deduce repository and source type for "golang.org/x/crypto": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/crypto?go-get=1": Get http://golang.org/x/crypto?go-get=1: dial tcp 216.239.37.1:80: i/o timeout ProjectRoot name validation failed make: *** [populate-vendor] Error 1 ``` Go version: 1.9. The pkgs have been download. ``` hanMacBook-Pro:fabric-sdk-go han$ echo $GOPATH /Users/hanxueyang/gopath hanMacBook-Pro:fabric-sdk-go han$ ls $GOPATH/src/golang.org/x/ crypto image net sync sys text tools ```

troyronda (Mon, 23 Oct 2017 12:30:56 GMT):
@KevinBai yes

troyronda (Mon, 23 Oct 2017 12:31:44 GMT):
@kyroy sorry - I haven’t seen that issue before.

troyronda (Mon, 23 Oct 2017 12:33:15 GMT):
@warm3snow - maybe internet connection issue? Did you try again?

Kyroy (Mon, 23 Oct 2017 13:48:32 GMT):
@troyronda Thanks :D Another question, is there an example on how to get a `FabricClient` with an Orderer Admin? For example to sign network updates

warm3snow (Mon, 23 Oct 2017 15:29:43 GMT):
@troyronda I have tried many times. It is annoying. Did the `dep` always scratch pkgs from Internet even if the pkg is already in GOPATH?

troyronda (Mon, 23 Oct 2017 15:32:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YtZ4Z8XX9FvkThLzb) this one needs investigation

troyronda (Mon, 23 Oct 2017 15:32:22 GMT):
@warm3snow I belive so

troyronda (Mon, 23 Oct 2017 15:32:22 GMT):
@warm3snow I believe so

warm3snow (Mon, 23 Oct 2017 15:35:07 GMT):
:sob: If so, it is a problem if someone is in China. :-(

troyronda (Mon, 23 Oct 2017 15:45:45 GMT):
@warm3snow btw, the build scripts have a way to skip populating vendor

troyronda (Mon, 23 Oct 2017 15:45:54 GMT):
FABRIC_SDK_POPULATE_VENDOR=false make

warm3snow (Mon, 23 Oct 2017 15:47:25 GMT):
@troyronda thanks a lot, i'll try that.

Kyroy (Tue, 24 Oct 2017 12:12:19 GMT):
I want to execute this command with the SDK: `peer channel fetch config config_block.pb -o 127.0.0.1:7050 -c testchainid` (from http://hyperledger-fabric.readthedocs.io/en/latest/configtxlator.html) How do I do it? Which command? Because `channel.QueryBlock` for "testchainid" does not work

jgiron (Tue, 24 Oct 2017 14:00:41 GMT):
Has joined the channel.

kostas (Tue, 24 Oct 2017 16:49:44 GMT):
Has joined the channel.

AlexanderEx123 (Tue, 24 Oct 2017 20:42:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NpYYYSoW6jX5KfXcJ) @Kyroy Use cscc and method GetConfigBlock (somethink like this, dont remeber exactly)

KevinBai (Wed, 25 Oct 2017 03:37:28 GMT):
hello, why didn't receive block event sometime?

KevinBai (Wed, 25 Oct 2017 03:37:54 GMT):
my fabric version is 1.0.3

ericb 7 (Wed, 25 Oct 2017 22:56:10 GMT):
Has joined the channel.

steigensonne (Thu, 26 Oct 2017 03:56:42 GMT):
I have a simple questions on "UpdateChannel()". Actually, it has not been implemented yet. When can we test the code of UpdateChannel()?

troyronda (Fri, 27 Oct 2017 00:40:01 GMT):
@steigensonne i'm not aware that anyone has picked up this implementation item yet (sorry). it would be good to get into the SDK, of course.

AlexanderEx123 (Fri, 27 Oct 2017 07:36:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=N7pgeBkbQZb9k39dT) @steigensonne you could use CreateChannel method, it doing update if channel already exists

jeffprestes (Fri, 27 Oct 2017 10:56:31 GMT):
Has joined the channel.

vpetryk (Fri, 27 Oct 2017 23:23:04 GMT):
Hello, I can not create channel with `apifabclient.FabricClient`, always receive an error `error: failed broadcast to orderer: NewAtomicBroadcastClient failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable` Does anybody know how properly initialize orderer?

vpetryk (Fri, 27 Oct 2017 23:23:04 GMT):
Hello, I can not create channel with `apifabclient.FabricClient`, always receive an error `error: failed broadcast to orderer: NewAtomicBroadcastClient failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable` or `error: channel configuration retrieval from orderer failed: error returned from orderer service: NewAtomicBroadcastClient failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable ` Does anybody know how properly initialize orderer?

vpetryk (Fri, 27 Oct 2017 23:23:04 GMT):
Hello, I can not create channel with `apifabclient.FabricClient`, always receive an error `error: failed broadcast to orderer: NewAtomicBroadcastClient failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable` or `error: channel configuration retrieval from orderer failed: error returned from orderer service: NewAtomicBroadcastClient failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable ` Does anybody know how properly initialize orderer?

kenmazsyma (Sun, 29 Oct 2017 11:07:26 GMT):
Has joined the channel.

kostas (Sun, 29 Oct 2017 16:41:27 GMT):
Has left the channel.

simbar (Sun, 29 Oct 2017 17:34:30 GMT):
Has joined the channel.

warm3snow (Mon, 30 Oct 2017 08:43:12 GMT):
Could someone help me? I got an error when test SDK. ``` === RUN TestEnrollOrg2 [fabric_sdk_go] 2017/10/30 08:38:36 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled [fabric_sdk_go] 2017/10/30 08:38:36 UTC - util.BCCSPKeyRequestGenerate -> INFO generating key: &{A:ecdsa S:256} [fabric_sdk_go] 2017/10/30 08:38:36 UTC - log.print -> INFO encoded CSR --- FAIL: TestEnrollOrg2 (0.18s) fabric_ca_test.go:162: Enroll returned error: enroll failed: Response from server: Error Code: 0 - CA 'ca-org2' does not exist ``` Also, I got nothing from the server. My only operation is `go test -v` in `test/integration` after setting up fabric nodes using `docker-compose`

warm3snow (Mon, 30 Oct 2017 08:44:53 GMT):
The server just seems stuck there. ``` Creating network "fixtures_default" with the default driver Creating ca_peerOrg1 ... Creating ca_peerOrg2 ... Creating fixtures_builder_1 ... Creating orderer.example.com ... Creating ca_peerOrg1 Creating fixtures_builder_1 Creating orderer.example.com Creating orderer.example.com ... done Creating peer0.org1.example.com ... Creating peer0.org2.example.com ... Creating peer0.org1.example.com Creating peer0.org1.example.com ... done Attaching to fixtures_builder_1, ca_peerOrg2, orderer.example.com, peer0.org2.example.com, ca_peerOrg1, peer0.org1.example.com builder_1 | tail: cannot open 'anything' for reading: No such file or directory ca_peerOrg2 | WARNING: no logs are available with the 'none' log driver orderer.example.com | WARNING: no logs are available with the 'none' log driver peer0.org2.example.com | WARNING: no logs are available with the 'none' log driver ca_peerOrg1 | WARNING: no logs are available with the 'none' log driver peer0.org1.example.com | WARNING: no logs are available with the 'none' log driver ```

warm3snow (Mon, 30 Oct 2017 08:45:14 GMT):
``` Creating network "fixtures_default" with the default driver Creating ca_peerOrg1 ... Creating ca_peerOrg2 ... Creating fixtures_builder_1 ... Creating orderer.example.com ... Creating ca_peerOrg1 Creating fixtures_builder_1 Creating orderer.example.com Creating orderer.example.com ... done Creating peer0.org1.example.com ... Creating peer0.org2.example.com ... Creating peer0.org1.example.com Creating peer0.org1.example.com ... done Attaching to fixtures_builder_1, ca_peerOrg2, orderer.example.com, peer0.org2.example.com, ca_peerOrg1, peer0.org1.example.com builder_1 | tail: cannot open 'anything' for reading: No such file or directory ca_peerOrg2 | WARNING: no logs are available with the 'none' log driver orderer.example.com | WARNING: no logs are available with the 'none' log driver peer0.org2.example.com | WARNING: no logs are available with the 'none' log driver ca_peerOrg1 | WARNING: no logs are available with the 'none' log driver peer0.org1.example.com | WARNING: no logs are available with the 'none' log driver ```

indirajith (Mon, 30 Oct 2017 10:14:19 GMT):
@here, I am trying to implement a chaincode as instructed here https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html but, I think the fabric sdk-go shim package has moved in the repository. Can someone shed some light on this?

iamdm (Mon, 30 Oct 2017 13:07:59 GMT):
Has joined the channel.

troyronda (Mon, 30 Oct 2017 16:16:27 GMT):
@warm3snow - if you are running integration tests outside of docker then you need to setup hosts entries. It's simpler to run make integration-test...

troyronda (Mon, 30 Oct 2017 16:16:27 GMT):
@warm3snow - if you are running integration tests outside of docker then you need to setup hosts entries. It's simpler to run "make integration-test"

troyronda (Mon, 30 Oct 2017 16:16:27 GMT):
@warm3snow - if you are running integration tests outside of docker then you need to setup hosts entries on your box. It's simpler to run "make integration-test"

troyronda (Mon, 30 Oct 2017 16:17:13 GMT):
@indirajith the shim package is not part of the Go SDK, but rather part of fabric itself

biljana_lukovic (Mon, 30 Oct 2017 20:29:56 GMT):
@Kyroy Version field in the ChainCodeInvocationSpec is not set because fabric does not use it.

warm3snow (Tue, 31 Oct 2017 01:00:49 GMT):
@troyronda I have set the hosts entries. The strange thing is that all tests passed except `TestEnrollOrg2`. When running `make integration-test`, i got ``` fabric-sdk-integration-test | opt/gopath/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib/client.go:38:2: cannot find package "github.com/cloudflare/cfssl/api" in any of: fabric-sdk-integration-test | /opt/gopath/src/github.com/hyperledger/fabric-sdk-go/vendor/github.com/cloudflare/cfssl/api (vendor tree) fabric-sdk-integration-test | /opt/go/src/github.com/cloudflare/cfssl/api (from $GOROOT) fabric-sdk-integration-test | /opt/gopath/src/github.com/cloudflare/cfssl/api (from $GOPATH) fabric-sdk-integration-test | opt/gopath/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/api/client.go:26:2: cannot find package "github.com/cloudflare/cfssl/csr" in any of: fabric-sdk-integration-test | /opt/gopath/src/github.com/hyperledger/fabric-sdk-go/vendor/github.com/cloudflare/cfssl/csr (vendor tree) fabric-sdk-integration-test | /opt/go/src/github.com/cloudflare/cfssl/csr (from $GOROOT) fabric-sdk-integration-test | /opt/gopath/src/github.com/cloudflare/cfssl/csr (from $GOPATH) fabric-sdk-integration-test | opt/gopath/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util/csp.go:38:2: cannot find package "github.com/cloudflare/cfssl/helpers" in any of: …… …… ``` It seems missing a lot of packages.

baohua (Tue, 31 Oct 2017 01:27:40 GMT):
Has joined the channel.

baohua (Tue, 31 Oct 2017 01:28:14 GMT):
hi, anyone know what version of fabric is the sdk-go supporting now? from the doc, master branch already supports fabric 1.0.1?

troyronda (Tue, 31 Oct 2017 01:38:44 GMT):
@baohua the CI is testing against 1.0.3.

baohua (Tue, 31 Oct 2017 01:39:06 GMT):
so the master branch should support 1.0.3 now?

troyronda (Tue, 31 Oct 2017 01:39:12 GMT):
Yes

baohua (Tue, 31 Oct 2017 01:39:20 GMT):
thanks, troyronda!

troyronda (Tue, 31 Oct 2017 01:39:33 GMT):
No problem :)

baohua (Tue, 31 Oct 2017 01:40:18 GMT):
And do u think it should work with 1.0.2, too?

troyronda (Tue, 31 Oct 2017 01:40:29 GMT):
It should

baohua (Tue, 31 Oct 2017 01:40:37 GMT):
great, thanks

troyronda (Tue, 31 Oct 2017 01:41:34 GMT):
@warm3snow make populate will populate the vendor folder

troyronda (Tue, 31 Oct 2017 01:42:05 GMT):
make integration-test should have automatically done that though

troyronda (Tue, 31 Oct 2017 01:42:41 GMT):
You will need dep installed

warm3snow (Tue, 31 Oct 2017 02:26:32 GMT):
@troyronda I think `dep` can't import packages from GOPATH. Why change `govendor` to `dep`?

troyronda (Tue, 31 Oct 2017 02:27:55 GMT):
Dep downloads packages and places them into vendor

warm3snow (Tue, 31 Oct 2017 02:28:09 GMT):
I have all the necessary pkgs locally, but the `dep` still fetch from the Internet. Actually, i can not visit some pkg sites.

troyronda (Tue, 31 Oct 2017 02:28:56 GMT):
https://github.com/golang/dep

troyronda (Tue, 31 Oct 2017 02:32:26 GMT):
Discussion of offline issue is here: https://github.com/golang/dep/issues/945

troyronda (Tue, 31 Oct 2017 02:37:23 GMT):
The SDK is using vendor as normal so as long as the packages are in gopath or vendor folder, it should work

warm3snow (Tue, 31 Oct 2017 02:40:35 GMT):
@troyronda ok, thanks a lot.

jgiron (Tue, 31 Oct 2017 09:49:13 GMT):
Hi everyone! I have a question, in the file config.yaml in BCCSP: library: .What path should I put? Thanks!

biljana_lukovic (Tue, 31 Oct 2017 13:22:48 GMT):
Depends on library and architecture; ‘Fabric-sdk-go’ was tested with ‘softhsm2’. The library path was set as: library: "/usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so, /usr/lib/softhsm/libsofthsm2.so ,/usr/lib/s390x-linux-gnu/softhsm/libsofthsm2.so, /usr/lib/powerpc64le-linux-gnu/softhsm/libsofthsm2.so, /usr/local/Cellar/softhsm/2.1.0/lib/softhsm/libsofthsm2.so"

iamdm (Tue, 31 Oct 2017 14:06:41 GMT):
Hi all! Is there chance to modify genesis block on orderer via SDK?

troyronda (Tue, 31 Oct 2017 20:12:00 GMT):
@jgiron This is only needed if you are using a PKCS11 provider - see https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_pkcs11_test.yaml#L92 for the example that @biljana_lukovic mentioned. An example of a SW configuration is here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml

troyronda (Wed, 01 Nov 2017 00:11:29 GMT):
@steigensonne see https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabric-txn/admin/transactionconfig.go#L127 for an example of what @AlexanderEx123 mentioned

Kyroy (Wed, 01 Nov 2017 13:39:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8J9RcKn7LugoepzYp) @AlexanderEx123 cscc is returning a correct one for channels, EXCEPT for testchainid: `(status: 500, message: \"GetConfigBlock\" request failed authorization check for channel [testchainid]: [Failed to get policy manager for channel [testchainid]])`

antitoine (Fri, 03 Nov 2017 08:50:46 GMT):
Hi, the Fabric SDK Go is compatible with Fabric v1.0.4 ? I saw above that it should work against the v1.0.3

rbraniste (Fri, 03 Nov 2017 13:12:48 GMT):
Has joined the channel.

Kyroy (Fri, 03 Nov 2017 18:11:18 GMT):
@troyronda Regarding the vendor/thrid_party topic. Why do you copy fabric code in your repo and not use fabric as a dep? Currently it is not possible to include the fabric-sdk-go and fabric at the same time because of diplicate initialize issues of protobuf Additionally there would be a lot of type problems because you "redefine" them (by copy&paste)

troyronda (Fri, 03 Nov 2017 18:25:00 GMT):
Fabric cannot be directly vendored in an SDK because it brings in too many dependencies

troyronda (Fri, 03 Nov 2017 18:25:46 GMT):
The SDK is intended to be used at the same time of fabric - the proto inits were modified in a previous commit btw

troyronda (Fri, 03 Nov 2017 18:26:04 GMT):
(For that reason)

troyronda (Fri, 03 Nov 2017 18:27:00 GMT):
@Kyroy @divyank @bstasyszyn ^^^^^

divyank (Fri, 03 Nov 2017 18:31:18 GMT):
Hi @Kyroy, the duplicate protos issue is fixed by: https://github.com/hyperledger/fabric-sdk-go/commit/22e666e7dcc59ad690c6d2fb72a008bfb97dc35e

divyank (Fri, 03 Nov 2017 18:37:35 GMT):
Types returned by the SDK are distinct from fabric types and must be treated as such by applications.

olegvg (Fri, 03 Nov 2017 23:01:52 GMT):
Has joined the channel.

aleksandar.likic (Sat, 04 Nov 2017 11:46:35 GMT):
@Kyroy The core issue is current structure of the Fabric code, which doesn't have separation between the server code and the client API/libs. So if a client SDK wants to re-use zillions of lines of tested code from Fabric, straightforward vendoring brings in server packages that could conflict with the dependencies of the app using the SDK. See also https://jira.hyperledger.org/browse/FAB-6317

KeshavLute (Sat, 04 Nov 2017 12:26:15 GMT):
Has joined the channel.

KeshavLute (Sat, 04 Nov 2017 12:28:41 GMT):
HI All, Can anyone help me with steps which I can follow to install Fabric-GO-SDK on my Linux machine ? The Linux machine is not connected the internet and hence I cannot connect to github repository and fetch the SDK.. I can download the installable on my laptop and after that I can upload it to the Linux machine. Please help .. This will sound bit silly as I am begineer to Fabric

KeshavLute (Sun, 05 Nov 2017 07:02:29 GMT):
Will some one help please ? My Linux box has no Internet Connection and I want to install all the GO dependencies !! how is it possible ?

KeshavLute (Sun, 05 Nov 2017 07:03:02 GMT):
I get following error

KeshavLute (Sun, 05 Nov 2017 07:03:05 GMT):
[niabmdd01@bld11262005 fabric-sdk-go]$ make gocov is not installed (go get -u github.com/axw/gocov/...) gocov-xml is not installed (go get -u github.com/AlekSi/gocov-xml) misspell is not installed (go get -u github.com/client9/misspell/cmd/misspell) golint is not installed (go get -u github.com/golang/lint/golint) goimports is not installed (go get -u golang.org/x/tools/cmd/goimports) mockgen is not installed (go get -u github.com/golang/mock/mockgen) dep is not installed (go get -u github.com/golang/dep/cmd/dep) Missing dependency. Aborting. You can fix by installing the tool listed above or running make depend-install. make: *** [depend] Error 1

KeshavLute (Sun, 05 Nov 2017 07:04:51 GMT):
I have downloaded the fabric SDK GO from GITHub on my laptop and I have uploaded the "fabric-sdk-go-master.zip" to my Linux box using hard-drive....

KeshavLute (Sun, 05 Nov 2017 07:06:00 GMT):
after uploading it I have unzipped it in "$GOPATH/github.com/hyperledger/fabric/fabric-sdk-go"

KeshavLute (Sun, 05 Nov 2017 07:06:34 GMT):
and I tried to "make" it

knagware9 (Mon, 06 Nov 2017 18:32:15 GMT):
Has joined the channel.

knagware9 (Mon, 06 Nov 2017 18:33:10 GMT):
Hi

knagware9 (Mon, 06 Nov 2017 18:34:06 GMT):
anybody have GO SDK example code for chaincode install & Instantiate code

zdmob (Tue, 07 Nov 2017 01:48:47 GMT):
Has joined the channel.

fennelD7 (Tue, 07 Nov 2017 07:31:55 GMT):
@KeshavLute Hi, I think you can get the codes elsewhere then copy them into GOPATH accordingly, then try "make" again.

fennelD7 (Tue, 07 Nov 2017 07:38:01 GMT):
@knagware9 Hi, I think in this folder you can find the code you need, https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration

knagware9 (Tue, 07 Nov 2017 07:39:02 GMT):
yes...These I got it but I was looking if someone is using for their application..

fennelD7 (Tue, 07 Nov 2017 07:53:21 GMT):
@knagware9 Well this I don't know yet, but for the relevant code fragments, I don't think there would be much difference with the examples :)

knagware9 (Tue, 07 Nov 2017 07:53:38 GMT):
yes..Thanks

Kyroy (Tue, 07 Nov 2017 09:17:48 GMT):
Is it possible to get the error status and message from a chaincode invoke? I see the `error` struct, but I dont know how to unfold it (or if it is possible)

yoheiueda (Tue, 07 Nov 2017 12:12:39 GMT):
Has joined the channel.

troyronda (Tue, 07 Nov 2017 12:17:17 GMT):
@knagware9 another example is here: https://github.com/securekey/fabric-examples/blob/master/fabric-cli/cmd/fabric-cli/chaincode/instantiatecmd.go

troyronda (Tue, 07 Nov 2017 12:17:34 GMT):
https://github.com/securekey/fabric-examples/blob/master/fabric-cli/cmd/fabric-cli/chaincode/installcmd.go

knagware9 (Tue, 07 Nov 2017 13:35:13 GMT):
@troyronda ..Thanks

LemonMinp (Wed, 08 Nov 2017 11:34:01 GMT):
Has joined the channel.

ranjan008 (Wed, 08 Nov 2017 12:57:47 GMT):
HI @troyronda I am trying to interact with the chaincode but getting below error from the peer 2017-11-08 12:52:27.775 UTC [eventhub_producer] Chat -> ERRO 466 Error handling message: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid]]

ArvsIndrarys (Wed, 08 Nov 2017 13:40:19 GMT):
@ranjan008 Are you sure you are using the right certificate on the client? It seems that it is missing or not part of the ones you created with cryptogen...

antitoine (Wed, 08 Nov 2017 16:09:06 GMT):
Hi! I would like to interact with a Fabric network only for queries. The goal is to initialize the SDK without administrator rights and get the channel information. For now I'm stuck because the QueryChannelInfo (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabric-client/client.go#L88) is not implemented yet. There is another way to do it?

KeshavLute (Wed, 08 Nov 2017 20:32:12 GMT):
@fennelD7 As i was facing issues on Linux offline box hence i have now installed GO(1.9), Docker with Composer, Python and GIT on Windows 8.1. I want to install and test Fabric on this laptop will you provide a link where i can get step by step process to install Fabric, Fabric-CA and Fabric-SDK-GO ? Also some sample fabric program which i can go through

KeshavLute (Wed, 08 Nov 2017 20:32:21 GMT):
Thanks for you help .....

sukritVisa (Wed, 08 Nov 2017 21:41:21 GMT):
Has joined the channel.

e-nikolov (Thu, 09 Nov 2017 04:02:56 GMT):
When executing a transaction via ChannelClient.ExecuteTx(apitxn.ExecuteTxRequest{ChaincodeID: setup.ChainCodeID, Fcn: fcn, Args: args}), on 2 of my development machines it always succeeds even if I dramatically limit the memory of the docker container that contains the program. But if I run this on our hosting provider, only 10% of the transactions go through, while the other 90% fail with the following error: rpc error: code = Unavailable desc = grpc: the connection is unavailable NewAtomicBroadcastClient failed Does anyone have any idea what this means or why it is happening? @vpetryk You mentioned a similar error a few days ago, did you figure out what was going wrong?

ranjan008 (Thu, 09 Nov 2017 04:58:28 GMT):
@ArvsIndrarys the initial setup worked fine was able to login as admin and also was able to create user in the fabric ca however when i was trying to interact with the chaincode through peers then this is happening.

ranjan008 (Thu, 09 Nov 2017 06:53:25 GMT):
@troyronda I am running a setup of single organization containing multiple peers in dev mode of which only one peer is endorsing peer but when I am trying to call the chaincode method using sdk it is hitting the non-endorsing peers where exactly I should configure this so that it should only hit the endorsing peers and not the other peers.

bjwswang (Thu, 09 Nov 2017 08:36:15 GMT):
Has joined the channel.

ranjan008 (Thu, 09 Nov 2017 09:26:33 GMT):
Also when I am trying to instantiate the chaincode I am getting the below error {"Status":false,"Msg":"SendInstantiateProposal Endorser returned error: rpc error: code = Unknown desc = Error starting container: no such image"}

shiyj93 (Thu, 09 Nov 2017 12:03:14 GMT):
Has joined the channel.

troyronda (Thu, 09 Nov 2017 23:26:14 GMT):
@ranjan008 not automatically yet, but this is an open item on the backlog

fennelD7 (Fri, 10 Nov 2017 02:07:15 GMT):
Hi @KeshavLute Here are the step by step processes, http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html. if you are very new, I think byfn is a good start point, https://github.com/hyperledger/fabric-samples/tree/release/first-network

robert.feng (Fri, 10 Nov 2017 04:00:37 GMT):
Has joined the channel.

ranjan008 (Fri, 10 Nov 2017 06:24:45 GMT):
thanks @troyronda

vpetryk (Fri, 10 Nov 2017 11:54:26 GMT):
@e-nikolov In my case it was a configuration issue. I had to update grpcs URLs, so it didn't work at all. I think it is not related to your issue.

udaykhambadkone (Fri, 10 Nov 2017 15:05:45 GMT):
Has joined the channel.

Kyroy (Fri, 10 Nov 2017 15:44:32 GMT):
I asked this before but did not get a proper answer: How to get the genesis.block from the network (also references as network config)? I know how to get the genesis block from a channel, but I need the one from the system channel! Because I want to do a reconfiguration based on this block http://hyperledger-fabric.readthedocs.io/en/latest/configtxlator.html `peer channel fetch config config_block.pb -o 127.0.0.1:7050 -c testchainid`

knagware9 (Fri, 10 Nov 2017 16:55:02 GMT):
Has left the channel.

john.d.sheehan (Fri, 10 Nov 2017 17:23:59 GMT):
Has joined the channel.

john.d.sheehan (Fri, 10 Nov 2017 17:24:54 GMT):
what's the difference between the `fabric-sdk-go/api` and `fabric-sdk-go/pkg` directories?

Mrsteven (Mon, 13 Nov 2017 07:08:37 GMT):
Has joined the channel.

Glen (Mon, 13 Nov 2017 08:12:51 GMT):
Has joined the channel.

firas.qutishat (Mon, 13 Nov 2017 17:40:44 GMT):
@john.d.sheehan api include the interfaces and pkg include the implementation

HoangLong (Mon, 13 Nov 2017 17:47:12 GMT):
Has joined the channel.

Mrsteven (Tue, 14 Nov 2017 03:55:58 GMT):
@KeshavLute It is unable to connect ip 173.194.75.141

JudyLiu (Tue, 14 Nov 2017 09:30:42 GMT):
Has joined the channel.

ranjan008 (Tue, 14 Nov 2017 10:15:25 GMT):
@troyronda I was able to successfully install and instantiate the chiancode on peer 1 of organization 1 but when I am trying to do the same for peer in organization 2 I am getting below error {"Status":false,"Msg":"SendInstantiateProposal Endorser returned error: rpc error: code = Unknown desc = chaincode error (status: 500, message: chaincode exists ledger)"}

ranjan008 (Tue, 14 Nov 2017 10:15:41 GMT):
Any idea what could be going wrong?

ranjan008 (Tue, 14 Nov 2017 10:20:20 GMT):
Below is the peer error log 2017-11-14 10:18:32.424 UTC [endorser] ProcessProposal -> ERRO 7e9 simulateProposal() resulted in chaincode response status 500 for txid: 3de56b389b022705eeada489d77175cc200b77c772542612f8f082557fe3bb4d 2017-11-14 10:18:32.424 UTC [lockbasedtxmgr] Done -> DEBU 7ea Done with transaction simulation / query execution [dec2b8d0-ce20-4b01-ba2e-0b0d7a74809e]

ynkumar143 (Tue, 14 Nov 2017 10:29:50 GMT):
Has joined the channel.

aleksandar.likic (Tue, 14 Nov 2017 12:35:22 GMT):
@ranjan008 Looks like you have already installed a chaincode called 'ledger' on some channel, and you are trying again. The error is telling you that the chaincode has been already installed (on that channel).

aleksandar.likic (Tue, 14 Nov 2017 12:40:14 GMT):
Org2 shares the channel with Org1 (I assume), no need to do it again for Org2 on the same channel

ranjan008 (Tue, 14 Nov 2017 12:40:46 GMT):
this error I am getting when I am trying to initialize it on the peer for a channel

ranjan008 (Tue, 14 Nov 2017 12:41:51 GMT):
but then how I will be able to interact with the chaincode on a peer from org2 if that is not initialized there

ranjan008 (Tue, 14 Nov 2017 12:43:34 GMT):
I guess If I have to do an invoke call to chaincode from org2 on the same channel then I will need my chaincode ?

aleksandar.likic (Tue, 14 Nov 2017 12:48:44 GMT):
Sorry, I should have said 'instantiate' instead of 'install'. See http://hyperledger-fabric.readthedocs.io/en/release/install_instantiate.html - you need to install to each peer but instantiate only once on any peer

ranjan008 (Tue, 14 Nov 2017 12:52:01 GMT):
I initialized the chaincode for a peer in organization 1 and got the chaincode container up but I am not able to get the data when I am initializing my application for another peer in another organization.

ranjan008 (Tue, 14 Nov 2017 12:53:05 GMT):
and also the chaincode container is running in only single peer not others.

aleksandar.likic (Tue, 14 Nov 2017 12:55:00 GMT):
Instantiation goes against the ledger, and you do it only once on some peer that is on the channel you are targeting. To have it working on another peer (on the same channel), just install the chaincode on the second peer and you'll be able to invoke it

ranjan008 (Tue, 14 Nov 2017 12:55:58 GMT):
I will try again and will check

ranjan008 (Tue, 14 Nov 2017 12:57:27 GMT):
Actually this worked for me for single organization and multiple peer configuration but facing issue for the configuration of multiple organization

aleksandar.likic (Tue, 14 Nov 2017 12:57:47 GMT):
You cannot have one peer belonging to one org

aleksandar.likic (Tue, 14 Nov 2017 12:57:47 GMT):
You cannot have one peer belonging to multiple orgs

ranjan008 (Tue, 14 Nov 2017 12:59:56 GMT):
No I am having multiple organizations with single peers each

KeshavLute (Tue, 14 Nov 2017 20:57:38 GMT):
@Mrsteven Thanks for looking into it. I aborted the steps which I was following and made a fresh start with steps provided at location http://hyperledger-fabric.readthedocs.io/en/release/build_network.html . Upto this page I was able to successfully load/configure most of the details on my Windows machine. Now when I tried to setup/test the sample network as mentioned in the link. I get following error

KeshavLute (Tue, 14 Nov 2017 20:58:35 GMT):
606027586@BTP159448 MINGW64 ~/eclipse-workspace/src/github.com/hyperledger/fabri c/fabric-samples/fabric-samples/first-network (release) $ ./byfn.sh -m generate Generating certs and genesis block for with channel 'mychannel' and CLI timeout of '10000' Continue (y/n)? y proceeding ... /c/Users/606027586/eclipse-workspace/src/github.com/hyperledger/fabric/fabric-sa mples/fabric-samples/bin/cryptogen ########################################################## ##### Generate certificates using cryptogen tool ######### ########################################################## org1.example.com 2017-11-14 20:51:11.174 GMT [bccsp_sw] storePrivateKey -> ERRO 001 Failed storin g private key [4b4a6044366fa60a120ab1c158ea61c32497b72b08a45a4c6106139bf9bd91ae] : [open crypto-config\peerOrganizations\org1.example.com\peers\peer0.org1.exampl e.com\msp\keystore\4b4a6044366fa60a120ab1c158ea61c32497b72b08a45a4c6106139bf9bd9 1ae_sk: The system cannot find the path specified.] Error generating local MSP for {peer0 peer0.org1.example.com [peer0.org1.example .com peer0]}: CSP:500 - Failed storing key [ECDSAP256]. [Failed storing ECDSA private key [ope n crypto-config\peerOrganizations\org1.example.com\peers\peer0.org1.example.com\ msp\keystore\4b4a6044366fa60a120ab1c158ea61c32497b72b08a45a4c6106139bf9bd91ae_sk : The system cannot find the path specified.]] /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/bcc sp/sw/impl.go:179 github.com/hyperledger/fabric/bccsp/sw.(*impl).KeyGen /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/com mon/tools/cryptogen/csp/csp.go:50 github.com/hyperledger/fabric/common/tools/cry ptogen/csp.GeneratePrivateKey /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/com mon/tools/cryptogen/msp/generator.go:56 github.com/hyperledger/fabric/common/too ls/cryptogen/msp.GenerateLocalMSP /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/com mon/tools/cryptogen/main.go:475 main.generateNodes /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/com mon/tools/cryptogen/main.go:383 main.generatePeerOrg /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/com mon/tools/cryptogen/main.go:257 main.generate /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/com mon/tools/cryptogen/main.go:224 main.main /opt/go/go1.7.linux.amd64/src/runtime/proc.go:192 runtime.main /opt/go/go1.7.linux.amd64/src/runtime/asm_amd64.s:2087 runtime.goexit Failed to generate certificates...

KeshavLute (Tue, 14 Nov 2017 20:59:18 GMT):
its failing to generate the certificate

KeshavLute (Tue, 14 Nov 2017 20:59:40 GMT):
will you please help me to resolve this ?

KeshavLute (Tue, 14 Nov 2017 20:59:40 GMT):
@BrechtDerwael The mentioned directory is already present on the system with specified path. PFB details.

krishna_jangid (Wed, 15 Nov 2017 04:29:43 GMT):
Has joined the channel.

BrechtDerwael (Wed, 15 Nov 2017 12:10:52 GMT):
Has joined the channel.

BrechtDerwael (Wed, 15 Nov 2017 12:11:35 GMT):
Hey Keshav, look like your folder structure is missing some folders. Can you check if the `crypto-config\peerOrganizations\org1.example.com\peers\peer0.org1.example.com\ msp\keystore\` exists?

BrechtDerwael (Wed, 15 Nov 2017 12:16:18 GMT):
Hey guys, I'm trying to build my go chaincode, but the pluginfactory.go keeps giving me this error: ``` $ go test # github.com/hyperledger/fabric/bccsp/factory /opt/gopath/src/github.com/hyperledger/fabric/bccsp/factory/pluginfactory.go:56: undefined: plugin in plugin.Open /opt/gopath/src/github.com/hyperledger/fabric/bccsp/factory/pluginfactory.go:73: not enough arguments to return ``` Go versions 1.7.5 and 1.8 generate this error and I downloaded the SDK some weeks ago. Anyone got any pointers? Thank you in advance!

BrechtDerwael (Wed, 15 Nov 2017 12:17:33 GMT):
Oh the code causing the error is: ``` // attempt to load the library as a plugin plug, err := plugin.Open(config.PluginOpts.Library) ``` and ``` return new(config.PluginOpts.Config) ```

BrechtDerwael (Wed, 15 Nov 2017 12:30:31 GMT):
1.8.5 won't cut it either

BrechtDerwael (Wed, 15 Nov 2017 12:39:08 GMT):
Solved by upgrading to 1.8.5 which ad more descriptive error messages and setting my $GOROOT to the new directory, thanks for being my rubber duck :)

LeoKotschenreuther (Wed, 15 Nov 2017 17:25:36 GMT):
Has left the channel.

Raje (Wed, 15 Nov 2017 18:18:53 GMT):
Has joined the channel.

KeshavLute (Wed, 15 Nov 2017 21:24:04 GMT):
$ pwd /c/Users/606027586/eclipse-workspace/src/github.com/hyperledger/fabric/fabric-sa mples/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example. com/peers/peer0.org1.example.com/msp/keystore

KeshavLute (Wed, 15 Nov 2017 21:24:29 GMT):
The directory is already present

KeshavLute (Wed, 15 Nov 2017 21:25:25 GMT):
within the first-sample directory 606027586@BTP159448 MINGW64 ~/eclipse-workspace/src/github.com/hyperledger/fabri c/fabric-samples/fabric-samples/first-network (release) $ ls base/ crypto-config/ docker-compose-e2e-template.yaml byfn.sh* crypto-config.yaml README.md channel-artifacts/ docker-compose-cli.yaml scripts/ configtx.yaml docker-compose-couch.yaml

KeshavLute (Wed, 15 Nov 2017 21:26:37 GMT):
still the script is unable to write to specified path

KeshavLute (Wed, 15 Nov 2017 21:26:39 GMT):
606027586@BTP159448 MINGW64 ~/eclipse-workspace/src/github.com/hyperledger/fabri c/fabric-samples/fabric-samples/first-network (release) $ ./byfn.sh -m generate Generating certs and genesis block for with channel 'mychannel' and CLI timeout of '10000' Continue (y/n)? y proceeding ... /c/Users/606027586/eclipse-workspace/src/github.com/hyperledger/fabric/fabric-sa mples/fabric-samples/bin/cryptogen ########################################################## ##### Generate certificates using cryptogen tool ######### ########################################################## org1.example.com 2017-11-15 21:18:51.044 GMT [bccsp_sw] storePrivateKey -> ERRO 001 Failed storin g private key [5345096eebf856503703193017d2a72720a5512e370c4c08958536649c0d4bb0] : [open crypto-config\peerOrganizations\org1.example.com\peers\peer0.org1.exampl e.com\msp\keystore\5345096eebf856503703193017d2a72720a5512e370c4c08958536649c0d4 bb0_sk: The system cannot find the path specified.] Error generating local MSP for {peer0 peer0.org1.example.com [peer0.org1.example .com peer0]}: CSP:500 - Failed storing key [ECDSAP256]. [Failed storing ECDSA private key [ope n crypto-config\peerOrganizations\org1.example.com\peers\peer0.org1.example.com\ msp\keystore\5345096eebf856503703193017d2a72720a5512e370c4c08958536649c0d4bb0_sk : The system cannot find the path specified.]] /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/bcc sp/sw/impl.go:179 github.com/hyperledger/fabric/bccsp/sw.(*impl).KeyGen /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/com

KeshavLute (Wed, 15 Nov 2017 21:27:22 GMT):
Any suggestions what could be the issue ?

vdods (Fri, 17 Nov 2017 02:29:26 GMT):
Hi all, is it known which git commit was intended to work against fabric and fabric-ca v1.0.3? There are no tags in the repo past the alpha tags :-/

vdods (Fri, 17 Nov 2017 03:38:33 GMT):
Also, will there ever be SDK docs? There's no explicit explanation of which APIs are public/meant to be used by app developers.

vdods (Fri, 17 Nov 2017 03:39:25 GMT):
Reading the unit test source code and figuring it out works, but it's making everyone do that work redundantly

vdods (Fri, 17 Nov 2017 03:44:00 GMT):
In particular, I'd like to understand the high-level relationships between all the publicly-visible interfaces and structs.

aleksandar.likic (Fri, 17 Nov 2017 15:37:00 GMT):
@vdods The latest *should* work with 1.0.3, but we test against 1.0.4 so we cannot say for sure. Commit 5c79a681e479b69105b88c67313f180f7ee9a2ef was the last before we moved CI to 1.0.4, so that one works for sure.

aleksandar.likic (Fri, 17 Nov 2017 15:46:12 GMT):
As fort the Client API, all interfaces are under the api directory, and factories that create default implementations of the interfaces are under def/fabapi. SDK allows supplying custom implementation of many interfaces defined under api.

aleksandar.likic (Fri, 17 Nov 2017 15:50:05 GMT):
Agree, we need better docs. Still, the definitive reference to the relationships among interfaces and structs is the code under /api and /def/fabapi.

aleksandar.likic (Fri, 17 Nov 2017 15:59:14 GMT):
You can also check https://github.com/securekey/fabric-examples/tree/master/fabric-cli

vdods (Sat, 18 Nov 2017 01:23:58 GMT):
@aleksandar.likic Thanks

bta (Sat, 18 Nov 2017 16:56:46 GMT):
Has joined the channel.

nikitakhade (Sun, 19 Nov 2017 03:30:04 GMT):
Has joined the channel.

Riussi (Mon, 20 Nov 2017 08:51:12 GMT):
Has joined the channel.

Kyroy (Mon, 20 Nov 2017 15:47:28 GMT):
Why do you make the `channel.channelConfig` method private? You need this to get the configuration of the `testchainid` channel from the orderer. Or is there another way?

nchangfong (Mon, 20 Nov 2017 20:58:27 GMT):
is there a roadmap for future development of `fabric-sdk-go`?

stephh 1 (Mon, 20 Nov 2017 21:06:12 GMT):
Has joined the channel.

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working on: completing the higher level API set in pkg/fabric-txn & def/fabapi; finishing plugability (e.g., cryptosuite module is the latest item); cleaning up/deprecating unused APIs; docs; next tag; 1.1; performance

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working on: completing the higher level API set in pkg/fabric-txn & def/fabapi; finishing plugability (e.g., cryptosuite module is the latest item); cleaning up/deprecating unused APIs; docs; next tag; 1.1; performance

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working on: completing the higher level API set in pkg/fabric-txn & def/fabapi; finishing plugability (e.g., cryptosuite module is the latest item); sidedb phase 3 policy support; cleaning up/deprecating unused APIs; enhancements such as endorser response checks; docs; next tag; fabric 1.1; performance testing; help is appreciated!

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working towards: completing the higher level API set in pkg/fabric-txn & def/fabapi; finishing plugability (e.g., cryptosuite module is the latest item); sidedb phase 3 policy support; cleaning up/deprecating unused APIs; enhancements such as endorser response checks; docs; next tag; fabric 1.1; performance testing; help is appreciated!

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working towards: completing the higher level API set in pkg/fabric-txn & def/fabapi; finishing plugability (e.g., cryptosuite adapter module is the latest item); sidedb phase 3 policy support; cleaning up/deprecating unused APIs; enhancements such as endorser response checks; docs; next tag; fabric 1.1; performance testing; help is appreciated!

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working towards: completing the higher level API set in pkg/fabric-txn & def/fabapi; finishing plugability (e.g., cryptosuite adapter module is the latest item); sidedb phase 3 policy support; cleaning up/deprecating unused APIs; enhancements such as endorser response checks; docs; modular events & supporting new event mechanism (see delivery service proposal) next tag; fabric 1.1; performance testing; help is appreciated!

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working towards: completing the higher level API set in pkg/fabric-txn & def/fabapi; finishing plugability (e.g., cryptosuite adapter module is the latest item); sidedb phase 3 policy support; cleaning up/deprecating unused APIs; enhancements such as endorser response checks; docs; modular events & supporting new event mechanism (see delivery service proposal); next tag; fabric 1.1; performance testing; help is appreciated!

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working towards: completing the higher level API set in pkg/fabric-txn & def/fabapi; finishing plugability (e.g., cryptosuite adapter module is the latest item); sidedb phase 3 policy support; cleaning up/deprecating unused APIs (and more oriented to immutability where it makes sense); enhancements such as endorser response checks; docs; modular events & supporting new event mechanism (see delivery service proposal); next tag; fabric 1.1; performance testing; help is appreciated!

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working towards: completing the higher level API set in pkg/fabric-txn & def/fabap (e.g., currently the resource client to more easily manage chaincode); finishing plugability (e.g., cryptosuite adapter module is the latest item); sidedb phase 3 policy support; cleaning up/deprecating unused APIs; enhancements such as endorser response checks; docs; modular events & supporting new event mechanism (see delivery service proposal); next tag; fabric 1.1; performance testing; help is appreciated!

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working towards: completing the higher level API set in pkg/fabric-txn & def/fabap (e.g., currently the resource management client to more easily manage chaincode); finishing plugability (e.g., cryptosuite adapter module is the latest item); sidedb phase 3 policy support; cleaning up/deprecating unused APIs; enhancements such as endorser response checks; docs; modular events & supporting new event mechanism (see delivery service proposal); next tag; fabric 1.1; performance testing; help is appreciated!

troyronda (Tue, 21 Nov 2017 12:44:21 GMT):
@nchangfong currently we are working towards: completing the higher level API set in pkg/fabric-txn & def/fabapi (e.g., currently the resource management client to more easily manage chaincode); finishing plugability (e.g., cryptosuite adapter module is the latest item); sidedb phase 3 policy support; cleaning up/deprecating unused APIs and enhance to better match the def/fabapi style; enhancements such as endorser response checks; docs; modular events & supporting new event mechanism (see delivery service proposal); test coverage improvements; next tag; fabric 1.1; performance testing; help is appreciated!

troyronda (Tue, 21 Nov 2017 12:47:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Xw4nRXrS6twFmdY5R) thanks for your submission on making this method public - it's now merged

ysim (Tue, 21 Nov 2017 16:37:16 GMT):
Has joined the channel.

mydavidbrown (Wed, 22 Nov 2017 14:38:34 GMT):
Has joined the channel.

LinfengLiang (Thu, 23 Nov 2017 06:11:18 GMT):
Has joined the channel.

jackeyliliang (Fri, 24 Nov 2017 03:01:53 GMT):
Has joined the channel.

MuhammadSalah (Fri, 24 Nov 2017 16:23:21 GMT):
Has joined the channel.

WalkerLiu (Sat, 25 Nov 2017 02:33:38 GMT):
Has joined the channel.

KeshavLute (Sat, 25 Nov 2017 21:30:29 GMT):
@ALL @fennelD7 I tried to build a hyperledger dev-env on my windows-machine as per stated in the link

KeshavLute (Sat, 25 Nov 2017 21:30:32 GMT):
ubuntu@hyperledger-devenv:03d1479:/opt/gopath/src/github.com/hyperledger/fabric $ ls bccsp CONTRIBUTING.md examples Makefile README.md test bddtests core gossip msp release unit-test build devenv gotools orderer release_notes vendor CHANGELOG.md docker-env.mk idemix peer sampleconfig ci.properties docs images proposals scripts common events LICENSE protos settings.gradle ubuntu@hyperledger-devenv:03d1479:/opt/gopath/src/github.com/hyperledger/fabric $ cd build/image/ccenv/payload/ ubuntu@hyperledger-devenv:03d1479:/opt/gopath/src/github.com/hyperledger/fabric /build/image/ccenv/payload$ ls chaintool goshim.tar.bz2 ubuntu@hyperledger-devenv:03d1479:/opt/gopath/src/github.com/hyperledger/fabric /build/image/ccenv/payload$ cd ../../../ ubuntu@hyperledger-devenv:03d1479:/opt/gopath/src/github.com/hyperledger/fabric /build$ cd ../ ubuntu@hyperledger-devenv:03d1479:/opt/gopath/src/github.com/hyperledger/fabric $ make dist-clean all mkdir -p build/image/ccenv/payload cp build/docker/gotools/bin/protoc-gen-go build/bin/chaintool build/goshim.tar.b z2 build/image/ccenv/payload cp: cannot stat 'build/docker/gotools/bin/protoc-gen-go': No such file or direct ory Makefile:275: recipe for target 'build/image/ccenv/payload' failed make: *** [build/image/ccenv/payload] Error 1 ubuntu@hyperledger-devenv:03d1479:/opt/gopath/src/github.com/hyperledger/fabric

KeshavLute (Sat, 25 Nov 2017 21:31:37 GMT):
============= I am unable to make/build the dev-env.. I face above issue

KeshavLute (Sat, 25 Nov 2017 21:32:36 GMT):
when checked in detail I could see that make file tries to find a directory "build/docker/ccenv/payload" but its unable to find

KeshavLute (Sat, 25 Nov 2017 21:32:46 GMT):
will some one help ?

diorahman (Sun, 26 Nov 2017 12:24:11 GMT):
Has joined the channel.

arjanvaneersel (Mon, 27 Nov 2017 17:08:03 GMT):
@troyronda I'm very interested to help and develop the go-sdk, however it's unclear to me where to start. I know this is a common problem with open source projects and newcomers that want to become a developer on the project. However I hope that someone can at least put me on the right track.

troyronda (Mon, 27 Nov 2017 20:54:20 GMT):
hi @arjanvaneersel - we welcome contributions and are currently focusing on https://chat.hyperledger.org/channel/fabric-sdk-go?msg=me2G2eprPGCEQJbtw.

troyronda (Mon, 27 Nov 2017 20:55:35 GMT):
We haven't created a label for newcomers on easy-to-get-started tasks but docs & test coverage is always a good way to get your hands dirty

troyronda (Mon, 27 Nov 2017 20:56:30 GMT):
if you see something you can pickup, feel free to discuss on this chatroom for opinion

troyronda (Mon, 27 Nov 2017 21:05:23 GMT):
@aleksandar.likic thoughts? ^^^

aleksandar.likic (Mon, 27 Nov 2017 23:15:17 GMT):
Perhaps increasing the test coverage would be the easiest way to get familiar with the internals of the SDK. It looks like we don't have a JIRA ticket for this task. I'll create one, and split it into many sub-tasks (by packages?) so anyone interested can pick them up. We need to increase the coverage to over 85%.

aleksandar.likic (Tue, 28 Nov 2017 22:36:41 GMT):
@arjanvaneersel I created a bunch of subtasks under https://jira.hyperledger.org/browse/FAB-4694, which is a blanket ticket for test coverage. I created one subtask for every package that has coverage below 85% (the Fabric standard). You can take a look and pick some package you are comfortable with. This ticket is very important, as we cannot declare 1.0 without bringing the coverage above 85%.

arjanvaneersel (Wed, 29 Nov 2017 06:50:14 GMT):
@aleksandar.likic I can definitely help out with writing tests. I'll take a look at it.

jarias (Wed, 29 Nov 2017 16:37:54 GMT):
Has joined the channel.

aaron_z7 (Thu, 30 Nov 2017 05:43:24 GMT):
Has joined the channel.

ysim (Thu, 30 Nov 2017 19:32:13 GMT):
is the ChannelClient meant to be persisted?

jojialex2 (Fri, 01 Dec 2017 05:58:14 GMT):
Hi I am not able to deploy chain code getting following error ... FROM hyperledger/fabric-baseos:x86_64-0.4.2 ADD binpackage.tar /usr/local/bin LABEL org.hyperledger.fabric.chaincode.id.name="mycc" \ org.hyperledger.fabric.chaincode.id.version="1.0" \ org.hyperledger.fabric.chaincode.type="GOLANG" \ org.hyperledger.fabric.version="1.1.0-preview" \ org.hyperledger.fabric.base.version="0.4.2" ENV CORE_CHAINCODE_BUILDLEVEL=1.1.0-preview ENV CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer.crt COPY peer.crt /etc/hyperledger/fabric/peer.crt [395 12-01 05:53:09.27 UTC] [github.com/hyperledger/fabric/core/chaincode/platforms/golang] generateDockerBuild.GenerateDockerBuild -> INFO building chaincode with ldfl agsOpt: '-ldflags "-linkmode external -extldflags '-static'"' [396 12-01 05:53:09.27 UTC] [github.com/hyperledger/fabric/core/chaincode/platforms/golang] generateDockerBuild.GenerateDockerBuild -> INFO building chaincode with tags : [397 12-01 05:53:09.27 UTC] [github.com/hyperledger/fabric/core/chaincode/platforms/util] generateDockerBuild.GenerateDockerBuild.DockerBuild -> DEBU Attempting build w ith image hyperledger/fabric-ccenv:x86_64-1.1.0-preview [398 12-01 05:53:29.01 UTC] [github.com/hyperledger/fabric/core/container/dockercontroller] do.do.Start.deployImage -> DEBU Created image: dev-peer0.org1.example.com-my cc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9 [399 12-01 05:53:29.01 UTC] [github.com/hyperledger/fabric/core/container/dockercontroller] do.do.Start -> DEBU start-recreated image successfully [39a 12-01 05:53:29.01 UTC] [github.com/hyperledger/fabric/core/container/dockercontroller] do.do.Start.createContainer -> DEBU Create container: dev-peer0.org1.example .com-mycc-1.0 [39b 12-01 05:53:29.04 UTC] [github.com/hyperledger/fabric/core/container/dockercontroller] do.do.Start -> ERRO start-could not recreate container post recreate image: no such image [39c 12-01 05:53:29.04 UTC] [github.com/hyperledger/fabric/core/container] unlockContainer -> DEBU container lock deleted(dev-peer0.org1.example.com-mycc-1.0) [39d 12-01 05:53:29.04 UTC] [github.com/hyperledger/fabric/core/chaincode] handleStream.processUnaryRPC._Endorser_ProcessProposal_Handler.ProcessProposal.ProcessProposa l.simulateProposal.callChaincode.Execute.Launch.launchAndWaitForRegister -> DEBU stopping due to error while launching: no such image error starting container

jojialex2 (Fri, 01 Dec 2017 05:58:30 GMT):
Any once got this error ?

jojialex2 (Fri, 01 Dec 2017 05:58:30 GMT):
Any once know solution for this error ?

C0rnelius (Fri, 01 Dec 2017 09:57:52 GMT):
Has joined the channel.

troyronda (Fri, 01 Dec 2017 15:19:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=K3fHSJPsj3BpBC7ih) Could you please clarify what you mean by persisted?

ysim (Fri, 01 Dec 2017 17:10:40 GMT):
Oops, sorry, could have been clearer. We're building out an API that makes use of fabric-sdk-go. Right now we're keeping track of the various fabric clients (resource management client, channel management client) in our own manager. Since a separate instance of the ChannelClient has to be created for each channel, do you suggest that we keep track of the various ChannelClient instantiations or to re-instantiate every time?

yatechie (Sat, 02 Dec 2017 00:57:00 GMT):
Has joined the channel.

yatechie (Sat, 02 Dec 2017 00:59:43 GMT):
make integration-test succeeds while manual running of ```# Start fabric cd $GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/ docker-compose up --force-recreate --abort-on-container-exit``` aborts with org1ca container dying

bizhenchao1201 (Sun, 03 Dec 2017 09:33:21 GMT):
Has joined the channel.

KeshavLute (Sun, 03 Dec 2017 15:15:47 GMT):
@fennelD7 While trying to create my own network using hyperledger fabric I tried to create a network with name MYFIRSTNETWORK and while trying to start the network it gave me following error. The steps followed by me are exactly same as what is listed under "Start the network" in below link. http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html ================================================== ubuntu@hyperledger-devenv:03d1479:/opt/gopath/src/github.com/hyperledger/fabric /fabric-samples/first-network$ CHANNEL_NAME=$CHANNEL_NAME docker-compose -f doc ker-compose-MYFIRSTNETWORK-cli.yaml up ERROR: readlink /var/lib/docker/overlay2/l/JVKOEH3DFEIJE7NPVECEMWRT7V: no such f ile or directory ubuntu@hyperledger-devenv:03d1479:/opt/gopath/src/github.com/hyperledger/fabric /fabric-samples/first-network$ ========================================================================

KeshavLute (Sun, 03 Dec 2017 17:33:06 GMT):
and when I actually checked the directory " /var/lib/docker/overlay2/l/" I could see that the directrory has only execute permissions to non-root users

troyronda (Mon, 04 Dec 2017 16:43:21 GMT):
@ysim We intended the new SDK clients to be relatively cheap to create (so that you could have a different client for each channel / config / opt that was needed). We also have placeholder contexts to be useable to share some more expensive data (eg. dynamic discovery information) - contexts are still TBD/TODO though. That said, not sure that we considered recreating every time ourselves. ( @bstasyszyn / @aleksandar.likic - thoughts?)

nchangfong (Tue, 05 Dec 2017 19:28:42 GMT):
hey all, just submitted a small PR with an update to ResourceMgmtClient. If someone could take a look it would be really appreciated :slight_smile: https://gerrit.hyperledger.org/r/#/c/15965/

nchangfong (Tue, 05 Dec 2017 20:38:59 GMT):
what's the process/etiquette for requesting reviews on PRs?

troyronda (Wed, 06 Dec 2017 14:34:33 GMT):
@nchangfong posting / discussing in this chat room is great, thanks!

troyronda (Wed, 06 Dec 2017 18:16:52 GMT):
@nchangfong - from the discussion on the gerrit patch set & chats I've had: the package name should be fixed as you suggested the IsChaincodeInstalled shouldn't have been exported in its current form, as it doesn't match the style in the rest of the package

troyronda (Wed, 06 Dec 2017 18:16:52 GMT):
@nchangfong - from the discussion on the gerrit patch set & chats I've had: the package name should be fixed as you suggested the IsChaincodeInstalled shouldn't have been exported in its current form, as it doesn't match the style in the rest of the package

troyronda (Wed, 06 Dec 2017 18:16:52 GMT):
@nchangfong - from the discussion on the gerrit patch set & chats I've had: the package name should be fixed as you suggested the IsChaincodeInstalled shouldn't have been exported in its current form even from the package, as it doesn't match the style in the rest of the package

troyronda (Wed, 06 Dec 2017 18:17:31 GMT):
The current style is that peer shouldn't be in the signature of functions

troyronda (Wed, 06 Dec 2017 18:17:56 GMT):
rather the peer list should be determined from config/discovery

troyronda (Wed, 06 Dec 2017 18:18:19 GMT):
and a WithOpts fn should be provided that allows override of the target peer

troyronda (Wed, 06 Dec 2017 18:18:46 GMT):
(of course, this isn't due to your change but a previous change that should be enhanced to match the style)

nchangfong (Wed, 06 Dec 2017 18:39:47 GMT):
@troyronda sounds good. should I update the PR by limiting the changes to the package name and create a different one to make the function private?

troyronda (Wed, 06 Dec 2017 18:40:22 GMT):
@nchangfong that would be great, thanks

nchangfong (Wed, 06 Dec 2017 19:24:20 GMT):
@troyronda updated!

nchangfong (Wed, 06 Dec 2017 20:35:21 GMT):
@troyronda made method private in following change https://gerrit.hyperledger.org/r/c/16003/

troyronda (Wed, 06 Dec 2017 20:39:24 GMT):
awesome - thanks

KeshavLute (Wed, 06 Dec 2017 20:47:28 GMT):

ErrorBuildingFirstFabricNetwork.png

KeshavLute (Wed, 06 Dec 2017 20:47:58 GMT):
I am following guidelines as per below link http://hyperledger-fabric.readthedocs.io/en/latest/samples.html

tiue (Thu, 07 Dec 2017 08:44:36 GMT):
Has joined the channel.

ashablyg (Thu, 07 Dec 2017 15:16:52 GMT):
Has joined the channel.

ashablyg (Thu, 07 Dec 2017 15:18:02 GMT):
Hey guys! Does anyone know how to install go cc that comes with packages? I'm trying to deploy some code like that but fabric gives me this ```error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package github.com/example_cc/go: found packages part1 (part1.go) and part2 (part2.go) in /chaincode/input/src/github.com/example_cc/go```

rjones (Thu, 07 Dec 2017 16:11:34 GMT):
Has joined the channel.

rjones (Thu, 07 Dec 2017 16:11:51 GMT):
https://gerrit.hyperledger.org/r/#/c/16013/ this needs code review

habpygo (Thu, 07 Dec 2017 16:47:10 GMT):
Hi, Just upgraded to HLF v1.1-preview and fabric-sdk-go (I assume latest). When running my app that was doing fine before the upgrades, I now get the error message: ``` [fabric_sdk_go] 2017/12/07 16:39:41 UTC - config.InitConfigWithCmdRoot -> INFO fabric_sdk_go logging level is set to: INFO panic: Unsupported BCCSP Provider: ``` When running the test though there are no errors at al ``` fabsdkgo_integration-tests_1 exited with code 0 fabsdkgo_pkcs11-integration-tests_1 exited with code 0 ``` Any idea where I should be looking? Thanks.

jarias (Thu, 07 Dec 2017 17:08:22 GMT):
What's the process for vendoring packages to import in chaincode? I did govendor add [package name] but when i do govendor list its listed as unused and im still getting build errors when i try to instantiate

troyronda (Thu, 07 Dec 2017 17:10:29 GMT):
@habpygo the tests are currently running against stable by default. I am rerunning tests of sdk head against 1.1-preview here: https://gerrit.hyperledger.org/r/c/15095 (just kicked it off)

troyronda (Thu, 07 Dec 2017 17:11:42 GMT):
@habpygo are you using def/fabapi or the lower level packages directly?

habpygo (Thu, 07 Dec 2017 17:29:48 GMT):
@troyronda I'm using `deffab "github.com/hyperledger/fabric-sdk-go/def/fabapi"` ,i.e. via de Go sdk and not fabric sdk. I was running the test with the 1.1-preview and didn't have any problems.

habpygo (Thu, 07 Dec 2017 17:31:06 GMT):
Often it's a `path` issue, but this time I don't know.

troyronda (Thu, 07 Dec 2017 17:31:45 GMT):
Maybe it's a config issue

troyronda (Thu, 07 Dec 2017 17:32:01 GMT):
i'll ping someone

troyronda (Thu, 07 Dec 2017 17:35:12 GMT):
looks like people are at lunch :P

troyronda (Thu, 07 Dec 2017 17:35:20 GMT):
anyways - i see the error here: https://github.com/hyperledger/fabric-sdk-go/blob/2cd5c089a3a17631f946d4e7ae02d3841b10a3aa/pkg/cryptosuite/bccsp/cryptosuiteimpl.go#L80

troyronda (Thu, 07 Dec 2017 17:35:43 GMT):
Which looks like the provider isn't set in config

troyronda (Thu, 07 Dec 2017 17:36:26 GMT):
see here: https://github.com/hyperledger/fabric-sdk-go/blob/2cd5c089a3a17631f946d4e7ae02d3841b10a3aa/test/fixtures/config/config_test.yaml#L87

troyronda (Thu, 07 Dec 2017 17:37:18 GMT):
(& pkcs11 version here: https://github.com/hyperledger/fabric-sdk-go/blob/2cd5c089a3a17631f946d4e7ae02d3841b10a3aa/test/fixtures/config/config_pkcs11_test.yaml#L85)

habpygo (Thu, 07 Dec 2017 17:39:43 GMT):
Hmm, dunno. My config looks like this: ``` BCCSP: security: enabled: true default: provider: "SW" hashAlgorithm: "SHA2" softVerify: true ephemeral: false level: 256 ``` OK, thans so far. Let me have a look at your suggestions; I'm at drinks; it's CET here ;-)

jarias (Thu, 07 Dec 2017 18:34:32 GMT):
Hello all, I'm trying to use the balance-transfers sample with some chaincode I wrote, but the chaincode contains packages I wrote and am trying to import, but when I try to instantiate, I get errors saying it can't find the packages. Where do I need to mount these packages so it can build correctly?

eecszhu2 (Fri, 08 Dec 2017 07:27:51 GMT):
Has joined the channel.

eecszhu2 (Fri, 08 Dec 2017 07:29:07 GMT):
Hello all, did anyone know when T-cert api will be provided in go-sdk?

troyronda (Fri, 08 Dec 2017 22:25:45 GMT):
FYI - I have run the integration tests of HEAD against v1.0.0, v1.0.5, v1.1.0-preview, and latest devstable in this gerrit: https://gerrit.hyperledger.org/r/c/16039

troyronda (Fri, 08 Dec 2017 22:25:45 GMT):
FYI - I have successfully run the integration tests of SDK HEAD against Fabric v1.0.0, v1.0.5, v1.1.0-preview, and latest devstable in this gerrit: https://gerrit.hyperledger.org/r/c/16039

habpygo (Sat, 09 Dec 2017 10:41:37 GMT):
? Can't get to the page even when I'm logged in: ``` Not Found The page you requested was not found, or you do not have permission to view this page. ```

habpygo (Sat, 09 Dec 2017 10:41:37 GMT):
@troyronda Can't get to the page even when I'm logged in: ``` Not Found The page you requested was not found, or you do not have permission to view this page. ```

troyronda (Sat, 09 Dec 2017 12:59:49 GMT):
Click new UI at bottom

habpygo (Sun, 10 Dec 2017 09:55:33 GMT):
:thumbsup:

Antonio_M (Sun, 10 Dec 2017 10:27:35 GMT):
hi, I'm trying to register a user with this code ``` caClient, err := fabricca.NewFabricCAClient(organization, fc.Client.Config(), fc.Client.CryptoSuite()) if err != nil { render.Render(w, r, u.ErrRender(fmt.Errorf("error creating CA client: %s", err))) return } request := &apifabca.RegistrationRequest{ Name: username, Type: "user", Affiliation: organization, CAName: caClient.CAName(), } secret, err := caClient.Register(session.Session.Identity(), request) if err != nil { render.Render(w, r, u.ErrRender(fmt.Errorf("error registering user: %s", err))) return } ``` but I'm getting: ```"error registering user: failed to register user: POST failure of request: POST https://ca.org1.example.com:7054/register\n{\"id\":\"test\",\"type\":\"user\",\"affiliation\":\"Org1\",\"caname\":\"ca-org1\"}: Post https://ca.org1.example.com:7054/register: x509: certificate is valid for tlsca.org1.example.com, not ca.org1.example.com"``` I understand the error, but I can't find how or where to fix it, I've generated certificates with cryptogen tool

Antonio_M (Sun, 10 Dec 2017 10:27:35 GMT):
hi, I'm trying to register a user with this code ``` caClient, err := fabricca.NewFabricCAClient(organization, fc.Client.Config(), fc.Client.CryptoSuite()) if err != nil { render.Render(w, r, u.ErrRender(fmt.Errorf("error creating CA client: %s", err))) return } request := &apifabca.RegistrationRequest{ Name: username, Type: "user", Affiliation: organization, CAName: caClient.CAName(), } secret, err := caClient.Register(session.Session.Identity(), request) if err != nil { render.Render(w, r, u.ErrRender(fmt.Errorf("error registering user: %s", err))) return } ``` but I'm getting: ```"error registering user: failed to register user: POST failure of request: POST https://ca.org1.example.com:7054/register\n{\"id\":\"test\",\"type\":\"user\",\"affiliation\":\"Org1\",\"caname\":\"ca-org1\"}: Post https://ca.org1.example.com:7054/register: x509: certificate is valid for tlsca.org1.example.com, not ca.org1.example.com"``` I understand the error, but I can't find how or where to fix it, I've generated certificates with cryptogen tool

aleksandar.likic (Sun, 10 Dec 2017 15:50:30 GMT):
@Antonio_M The error is not about ecert, it's about tls cert. It seems that the CA tls cert doesn't match the CA host name.

Antonio_M (Sun, 10 Dec 2017 17:45:22 GMT):
@aleksandar.likic you are right, I fixed the name and now I'm getting signed by unknown authority issues. So I should have signed all the CA certs with a common root cert? If so, where do I specify the location of the root cert?

jackieliu (Mon, 11 Dec 2017 04:00:02 GMT):
Has joined the channel.

vu3mmg (Mon, 11 Dec 2017 04:09:08 GMT):
Do we have a nodesdk function which will help to do peer channel signconfigtx and submit a configtx to orderer

vu3mmg (Mon, 11 Dec 2017 04:09:35 GMT):
this will help to automate the changes in config txn

ranjan008 (Mon, 11 Dec 2017 12:39:09 GMT):
@troyronda is block explorer parser implemented in the fabric-sdk

ranjan008 (Mon, 11 Dec 2017 12:39:11 GMT):
?

troyronda (Mon, 11 Dec 2017 14:32:27 GMT):
i'm not sure which block explorer parser you mean, but there isn't a block explorer in the SDK right now

troyronda (Mon, 11 Dec 2017 14:32:27 GMT):
i'm not sure which block explorer parser you mean, but there isn't a block explorer parser in the SDK right now

e-nikolov (Tue, 12 Dec 2017 03:45:26 GMT):
This commit https://github.com/hyperledger/fabric-sdk-go/commit/f853354e1f4d3b4dc17169596425f66ad6f7fcbe from last week refers to file test/fixtures/config/config_test_pem.yaml, which doesn't seem to be committed. Is that still work in progress or was the file forgotten?

guolidong (Tue, 12 Dec 2017 05:56:25 GMT):
Has joined the channel.

aleksandar.likic (Tue, 12 Dec 2017 06:15:26 GMT):
@e-nikolov there was another commit that changed the api - instead of ...certFiles we now hare ...certPaths which is more correct.

aleksandar.likic (Tue, 12 Dec 2017 06:15:26 GMT):
@e-nikolov there was another commit that changed the api - instead of ...certFiles we now have ...certPaths which is more correct.

ranjan008 (Tue, 12 Dec 2017 09:56:17 GMT):
@troyronda A parser implementation for parsing the block data which is comming right now in byte array.

ranjan008 (Tue, 12 Dec 2017 09:56:26 GMT):
And also In bccsp the pluginfactory is there is it for implementing any other keystore if yes how to configure or any format initialization is there for that?

habpygo (Tue, 12 Dec 2017 10:38:42 GMT):
Indeed SDK-Go runs with HLF-v1.1.0-preview. :thumbsup: For CouchDB users, note that they have removed/forgotten(?) the tag `latest`. So you may have to set this to the preview tag like `x86_64-1.1.0-preview` as in my case. You can check for the existing tags here https://hub.docker.com/r/hyperledger/fabric-couchdb/tags/

ranjan008 (Tue, 12 Dec 2017 11:27:27 GMT):
@troyronda the file key value store you guys have tried to implement in keyvaluestore package is it working or totally implemented because you guys are trying to create a json file as per the code however I am seeing the core fabric file formats under the folder

vu3mmg (Tue, 12 Dec 2017 11:50:56 GMT):
@yacovm I have a query regarding signconfigtx . Do we have node APIs for the same and update the config . I searched was not able to find that . IF we have to write node APIs could you please let me know which GRPC interfaces to be used . I have a use case to create an app to reconfigure the network .

yacovm (Tue, 12 Dec 2017 11:50:56 GMT):
Has joined the channel.

e-nikolov (Tue, 12 Dec 2017 15:26:31 GMT):
@aleksandar.likic I don't understand your comment. What does the API have to do with a missing config file?

e-nikolov (Tue, 12 Dec 2017 15:58:26 GMT):
I think I found it at a different location - https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/config/testdata/config_test_pem.yaml

yacovm (Tue, 12 Dec 2017 16:45:17 GMT):
@vu3mmg not sure why you're tagging me in #fabric-sdk-go and asking about this. This isn't related to #fabric-sdk-go .

troyronda (Tue, 12 Dec 2017 18:08:05 GMT):
@habpygo - the patchset that tests multiple versions is now merged.

troyronda (Tue, 12 Dec 2017 18:08:05 GMT):
@habpygo - the patchset that tests multiple fabric versions is now merged.

troyronda (Tue, 12 Dec 2017 18:08:25 GMT):
and the readme is updated

e-nikolov (Wed, 13 Dec 2017 04:46:52 GMT):
I feel that being able to load the config from bytes and having support for embedded pem files rather than paths is great, but it would be even more useful if those could be passed in as a golang structure to the sdk. This way people (such as myself) could have their own config file format that they use for the rest of their application, which then embeds the sdk config. Right now in order to achieve this, I would have to either write my own provider factory with a custom config provider, or read my own config, then serialize the fabric sdk relevant parts to a byte array and then pass it on to the sdk.

muasif80 (Wed, 13 Dec 2017 05:22:14 GMT):
Has joined the channel.

e-nikolov (Wed, 13 Dec 2017 07:36:32 GMT):
Additionally, does anyone know if the client crypto config path is also embeddable?

e-nikolov (Wed, 13 Dec 2017 07:45:01 GMT):
Also the same question for organization cryptoPaths

e-nikolov (Wed, 13 Dec 2017 08:21:40 GMT):
@Baha-sk I saw that you worked on the embeddable pems, do you plan on extending this?

Baha-sk (Wed, 13 Dec 2017 08:21:40 GMT):
Has joined the channel.

jellevdp (Wed, 13 Dec 2017 11:13:35 GMT):
@troyronda @aleksandar.likic @Baha-sk we're considering writing a PR for having more files embedded in a config struct as @e-nikolov outlines above, but before we jump into this we'd like to discuss it with you to make sure it can be merged with fabric-sdk-go over time as successfully as possible.

jellevdp (Wed, 13 Dec 2017 11:15:43 GMT):
so basically, the common connection profile as golang struct with files embedded. How can we best approach this in such a way that the chance of it being merged in with the fabric-sdk-go as high as possible? (considering impact on API etc)

jellevdp (Wed, 13 Dec 2017 11:57:43 GMT):
I've checked the contribution manual, but there's no separate JIRA board for fabric-sdk-go it seems. We'd be more than willing to open an issue around it, but question is where is the appropriate place

novusopt (Wed, 13 Dec 2017 13:44:05 GMT):
Has joined the channel.

troyronda (Wed, 13 Dec 2017 16:56:50 GMT):
@jellevdp we set the component to fabric-sdk-go

troyronda (Wed, 13 Dec 2017 16:56:50 GMT):
@jellevdp we set the component to fabric-sdk-go in the jira ticket

troyronda (Wed, 13 Dec 2017 16:57:20 GMT):
@jellevdp here is a board that uses the component field as a filter: https://jira.hyperledger.org/secure/RapidBoard.jspa?rapidView=127&view=planning

troyronda (Wed, 13 Dec 2017 18:57:30 GMT):
@e-nikolov did you seen this option: https://github.com/hyperledger/fabric-sdk-go/blob/master/def/fabapi/fabapi.go#L32

troyronda (Wed, 13 Dec 2017 18:57:55 GMT):
@Baha-sk - anything to add? ^^^

troyronda (Wed, 13 Dec 2017 19:02:10 GMT):
@e-nikolov @jellevdp yes we recently added config bytes capability as you noticed (https://github.com/hyperledger/fabric-sdk-go/blob/master/def/fabapi/fabapi.go#L32), but haven't put much thought into a golang struct version. It seems like a reasonable idea. @Baha-sk @aleksandar.likic any thoughts?

troyronda (Wed, 13 Dec 2017 19:02:10 GMT):
@e-nikolov @jellevdp yes we recently added config bytes capability as you noticed (https://github.com/hyperledger/fabric-sdk-go/blob/master/def/fabapi/fabapi.go#L32), but haven't put much thought into a golang struct version. It seems like a reasonable idea if you are thinking of working on it. @Baha-sk @aleksandar.likic any thoughts?

Baha-sk (Wed, 13 Dec 2017 19:34:35 GMT):
currently we're following Fabric's config setup which is loading the configs from a file and as Troy said, we added the loading configs from a byte array well.. wrapping the config maintenance around an API is a good idea, but not sure if it's worth the effort.. usually the fabric client loads the config once, any change requires a client restart, just like the peers

Baha-sk (Wed, 13 Dec 2017 19:34:35 GMT):
currently we're following Fabric's config setup which is loading the configs from a file and as Troy said, we added the loading configs from a byte array as well.. wrapping the config maintenance around an API is a good idea, but not sure if it's worth the effort.. usually the fabric client loads the config once, any change requires a client restart, just like the peers

Baha-sk (Wed, 13 Dec 2017 19:39:16 GMT):
@e-nikolov as for embedding the pems in the config, it was added to support configs without having to access files from the mapped volumes (ie: no access file access rights).. if there's a need to embed other files, it can be done the same way

e-nikolov (Wed, 13 Dec 2017 20:11:07 GMT):
@Baha-sk the cryptoconfig path still needs a volume to be mapped

e-nikolov (Wed, 13 Dec 2017 20:20:09 GMT):
which is what we are trying to find a way around

e-nikolov (Wed, 13 Dec 2017 20:20:23 GMT):
I'll have a deeper look to see how this can be changed

e-nikolov (Wed, 13 Dec 2017 20:23:32 GMT):
It seems that there is one config inside the client section, which sets the path to the cryptoconfig and then each organization has its own cryptoPath config which is relative to the cryptoconfig path

Baha-sk (Wed, 13 Dec 2017 20:48:55 GMT):
cryptoConfig isn't a mapped volume in the configs, it's a local path to the cryptoConfig generated folder by the cryptogen tool

Baha-sk (Wed, 13 Dec 2017 20:50:00 GMT):
if you look at the path in the sample config.yaml, it is as follows: path: $GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/channel/crypto-config assuming the one using the sdk go has the dev environment properly setup

Baha-sk (Wed, 13 Dec 2017 20:50:15 GMT):
this can be changed to any local path for the client

Baha-sk (Wed, 13 Dec 2017 20:51:03 GMT):
as long as they have the proper certs structure under their crypto-config folder

e-nikolov (Wed, 13 Dec 2017 21:44:35 GMT):
@Baha-sk I don't think I understand the difference in the need for embedding the pems into the config and embedding the cryptoconfig. To me it seems that they should both support the same mechanisms

e-nikolov (Wed, 13 Dec 2017 21:53:21 GMT):
Maybe you have a different use case to us. In our case, we are building a sort of a blockchain connectivity application, which should be able to connect to any hyperledger fabric based on a provided config. And it would make our lives much easier if we could upload a single config file that contains all the necessary information (e.g. pems and cryptoconfig), rather than having to supply multiple files and then having to match the paths in the config file to the path where we save the referred files.

troyronda (Wed, 13 Dec 2017 21:53:31 GMT):
@aleksandar.likic - @e-nikolov raises a good point about cryptoconfig

Baha-sk (Wed, 13 Dec 2017 22:33:30 GMT):
probably makes sense..

troyronda (Wed, 13 Dec 2017 23:56:18 GMT):
Yes

troyronda (Wed, 13 Dec 2017 23:56:18 GMT):
Yes makes sense @e-nikolov

e-nikolov (Thu, 14 Dec 2017 00:42:34 GMT):
@troyronda Ok, I'll work on a proposal and post it to Jira once I'm done

e-nikolov (Thu, 14 Dec 2017 01:14:58 GMT):
As a side question, what would be the expected way for someone who controls a hyperledger fabric blockhain to provide access to someone else to their blockchain? At present, would they have to provide the config.yaml file and all pem files + crypto config?

e-nikolov (Thu, 14 Dec 2017 01:14:58 GMT):
As a side question, what would be the expected way for someone who controls a hyperledger fabric blockhain to provide access to someone else to their blockchain? At present, would they have to provide the config.yaml file and all pem files + crypto config? All in one archive with relative paths in the config.yaml? Or would the user be expected to compile the config.yaml themselves after they are given information about the addresses of the peers and their certificates?

e-nikolov (Thu, 14 Dec 2017 01:14:58 GMT):
As a side question, what would be the expected way for someone who controls a hyperledger fabric blockhain to provide access to a third party to their blockchain? At present, would they have to provide the config.yaml file and all pem files + crypto config? All in one archive with relative paths in the config.yaml? Or would the user be expected to compile the config.yaml themselves after they are given information about the addresses of the peers and their certificates?

yingmsky (Thu, 14 Dec 2017 07:50:40 GMT):
Has joined the channel.

jellevdp (Thu, 14 Dec 2017 09:33:05 GMT):
@e-nikolov will repost this question in #general as well

muasif80 (Thu, 14 Dec 2017 13:53:19 GMT):
Can we return a full object in shim.success or a json object for example

Glen (Fri, 15 Dec 2017 03:18:17 GMT):
Hi, does fabric-sdk-go support channel reconfiguration?

Chalex (Fri, 15 Dec 2017 06:20:59 GMT):
Has joined the channel.

Chalex (Fri, 15 Dec 2017 07:17:42 GMT):
Hi. I want to use the fabric-sdk-go in my chaincode. Is it possible?

asuchit (Fri, 15 Dec 2017 10:07:52 GMT):
Has joined the channel.

novusopt (Fri, 15 Dec 2017 12:17:41 GMT):
Hi, how can I update the cannel in order to add the update anchor peers tx's by using the sdk?

muasif80 (Fri, 15 Dec 2017 12:31:57 GMT):
There is not much activity in sdk rooms

novusopt (Fri, 15 Dec 2017 12:36:59 GMT):
hmm ok

novusopt (Fri, 15 Dec 2017 12:37:26 GMT):
thats sad

troyronda (Fri, 15 Dec 2017 13:57:28 GMT):
@Glen @novusopt Does ChannelMgmtClient.SaveChannel help? (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabric-txn/chmgmtclient/chmgmt.go#L37)

troyronda (Fri, 15 Dec 2017 13:58:36 GMT):
example: https://github.com/hyperledger/fabric-sdk-go/blob/3651028a078a1dfa8028866ea37cd0648e95599d/test/integration/orgs/multiple_orgs_test.go#L70

novusopt (Fri, 15 Dec 2017 18:43:04 GMT):
@troyronda I don't see where I can modify the channel in order to define anchor peers...

holocron (Fri, 15 Dec 2017 18:48:38 GMT):
@novusopt the fabric e2e example does this: https://github.com/hyperledger/fabric/blob/release/examples/e2e_cli/generateArtifacts.sh#L90

novusopt (Fri, 15 Dec 2017 18:49:21 GMT):
@holocron yes via the script I am asking if this is also possible by using the sdk...?

holocron (Fri, 15 Dec 2017 18:50:33 GMT):
ah, hmm

asaningmaxchain (Sat, 16 Dec 2017 01:17:22 GMT):
Has joined the channel.

asaningmaxchain (Sat, 16 Dec 2017 01:22:41 GMT):
hi,everyone, i see the https://github.com/CognitionFoundry/gohfc the last section tell me the TPM ,so who can tell me how to calculate the tps?

asaningmaxchain (Sat, 16 Dec 2017 01:22:41 GMT):
hi,everyone, i see the https://github.com/CognitionFoundry/gohfc the last section tell me the TPM ,so who can tell me how to calculate the tps?the sdk send the transaction in async way

asaningmaxchain (Sat, 16 Dec 2017 01:22:41 GMT):
hi,everyone, i see the https://github.com/CognitionFoundry/gohfc the last section tell me the TPM ,so who can tell me how to calculate the tps?the sdk send the transaction in async way,or who can provide the tool to get the tps

bruteforced (Sun, 17 Dec 2017 15:01:31 GMT):
Has joined the channel.

troyronda (Sun, 17 Dec 2017 20:37:17 GMT):
FYI - the latest commit restores the capability to run integration.sh outside docker with updated instructions in the README

Glen (Sun, 17 Dec 2017 23:55:12 GMT):
Hi@troyronda [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3LYFeioLhk8xfssQz) , is this test runable now, is there any test involving it?

troyronda (Mon, 18 Dec 2017 01:05:50 GMT):
for SaveChannel? e.g., https://github.com/hyperledger/fabric-sdk-go/blob/3651028a078a1dfa8028866ea37cd0648e95599d/test/integration/orgs/multiple_orgs_test.go#L70

troyronda (Mon, 18 Dec 2017 01:06:08 GMT):
the comment I posted above is unrelated.

troyronda (Mon, 18 Dec 2017 01:06:08 GMT):
the FYI comment I posted above is unrelated.

troyronda (Mon, 18 Dec 2017 01:06:53 GMT):
there was an issue that prevented running the integration test client outside of a container that is now fixed.

aneb (Mon, 18 Dec 2017 01:09:47 GMT):
Has left the channel.

wanghhao (Mon, 18 Dec 2017 10:07:00 GMT):
Has left the channel.

vdods (Mon, 18 Dec 2017 20:18:27 GMT):
Hey guys, I've got a question about how the SDK handles the different kinds of events to listen for. The protos define 4 types -- Register (notification of registration of interest in event), Block (notification that a block has been committed), Chaincode (presumably for when a transaction is committed in which stub.SetEvent is called), and Rejection (presumably when a transaction is rejected -- but in what context?). I'm writing my own event-listening code (not using fabric-sdk-go), and even though I'm registering my interest in getting Chaincode and Rejection events, I'm not seeing any. I am seeing Block events. Is there some fact I'm missing?

vdods (Mon, 18 Dec 2017 20:18:58 GMT):
I've heard that Fabric 1.1 will only have Block events and no others -- is this maybe already true of Fabric 1.0.3 (or 1.0.x)?

troyronda (Mon, 18 Dec 2017 20:22:16 GMT):
Another FYI - the better current example of SDK usage is the multi org e2e test: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/orgs/multiple_orgs_test.go ... We haven't yet cleaned up the e2e in the parent folder.

troyronda (Mon, 18 Dec 2017 20:22:16 GMT):
Another FYI - the better current example of SDK usage is the multi org e2e test: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/orgs/multiple_orgs_test.go ... We haven't yet cleaned up the e2e in the parent folder that is referenced in the README (it's on the TODO list though).

troyronda (Mon, 18 Dec 2017 20:23:58 GMT):
This example should highlight the improvements in the SDK where we are trying to hide details when possible for easier usage.

troyronda (Mon, 18 Dec 2017 20:23:58 GMT):
This example should highlight the improvements in the SDK where we are trying to hide details when possible for easier usage, and also showing where we are going with more automated selection of peers (and eventually discovery too).

troyronda (Mon, 18 Dec 2017 20:23:58 GMT):
This example should highlight the improvements in fabric-sdk-go where we are trying to hide details when possible for easier usage, and also showing where we are going with more automated selection of peers (and eventually discovery too).

Chalex (Tue, 19 Dec 2017 08:18:05 GMT):
Hi. I want to develop apps on fabric interacting with the blockchain with fabric-sdk-go. Is there any easier tutorial compared to reading the official examples of fabric-sdk-go? Thank you.

habpygo (Tue, 19 Dec 2017 17:03:08 GMT):
Hi @Chalex , try out the tutorial from @antitoine. It will build a simple web-app that communicates with the HLF via the fabric-sdk-go. I find it a good start. You will find it here https://github.com/chainHero/heroes-service

habpygo (Tue, 19 Dec 2017 17:03:08 GMT):
Hi @Chalex , try out the tutorial from @antitoine . It will build a simple web-app that communicates with the HLF via the fabric-sdk-go. I find it a good start. You will find it here https://github.com/chainHero/heroes-service

Chalex (Wed, 20 Dec 2017 02:35:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FhK3TTi3BR6uYs9qC) @habpygo Thank you. I tried it. Though it's a bit outdated and the fabric-sdk-go APIs used by it already changed a lot, it's still very helpful.

troyronda (Wed, 20 Dec 2017 02:42:40 GMT):
@Chalex hopefully the example/test in https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/orgs/multiple_orgs_test.go is more understandable now?

Chalex (Wed, 20 Dec 2017 02:46:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PT5tiSDK9hobrYdmM) @troyronda Thank you. I saw these examples before and read a few examples. I think the example from @antitoine is easier to understand. But maybe I have to refer the official examples now.

Chalex (Wed, 20 Dec 2017 03:21:20 GMT):
Is there any tutorial about how to edit and configure the fabric-sdk-go config.yaml besides of the comments in the template?

ranjan008 (Wed, 20 Dec 2017 06:14:58 GMT):
@troyronda when I am sending a transaction to the network the response takes almost 2 seconds to revert back is it normal?

hongker (Wed, 20 Dec 2017 10:34:14 GMT):
Has joined the channel.

wpr (Wed, 20 Dec 2017 11:29:41 GMT):
Has joined the channel.

ranjan008 (Wed, 20 Dec 2017 12:32:52 GMT):
This happens in cases when I am updating a key in the chaincode

MR (Wed, 20 Dec 2017 13:20:48 GMT):
Has joined the channel.

troyronda (Wed, 20 Dec 2017 14:10:21 GMT):
@ranjan008 the ordering service creates blocks from transactions. Blocks are created based on receiving sufficient transactions for a block or timeout. I think ~2 seconds was the default on the ordering service so your number isn't too surprising.

troyronda (Wed, 20 Dec 2017 14:10:21 GMT):
@ranjan008 the ordering service creates blocks from transactions. Blocks are created based on receiving sufficient transactions for a block or timeout. I think ~2 seconds was the default timeout on the ordering service so your number isn't too surprising.

troyronda (Wed, 20 Dec 2017 14:10:21 GMT):
@ranjan008 Fabric creates blocks from transactions. Blocks are created based on receiving sufficient transactions for a block or timeout. I think ~2 seconds was the default timeout so your number isn't too surprising.

Glen (Thu, 21 Dec 2017 09:50:58 GMT):
Hi @troyronda does fabric-sdk-go supports chaincode upgrade? where is the API, thanks

Chalex (Thu, 21 Dec 2017 10:01:56 GMT):
I used fabric-sdk-go in my golang code. But then I compiled my go gode, it reported multiple definition of many functions.

Chalex (Thu, 21 Dec 2017 10:02:24 GMT):
Does anyone have any idea about this error?

Chalex (Thu, 21 Dec 2017 10:03:13 GMT):

捕获.PNG

Chalex (Thu, 21 Dec 2017 11:37:30 GMT):
I found the reason. It's because i imported fabric-sdk-go and fabric source together like bellow:

Chalex (Thu, 21 Dec 2017 11:37:32 GMT):
ca "github.com/hyperledger/fabric-sdk-go/api/apifabca" fab "github.com/hyperledger/fabric-sdk-go/api/apifabclient" "github.com/hyperledger/fabric-sdk-go/api/apitxn" "github.com/hyperledger/fabric-sdk-go/def/fabapi" "github.com/hyperledger/fabric-sdk-go/pkg/errors" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/protos/peer

Chalex (Thu, 21 Dec 2017 11:37:51 GMT):
and then if i compile with `go build`

Chalex (Thu, 21 Dec 2017 11:38:09 GMT):
it will report errors like above

troyronda (Thu, 21 Dec 2017 12:06:49 GMT):
@Glen https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/orgs/multiple_orgs_test.go#L182

troyronda (Thu, 21 Dec 2017 12:07:09 GMT):
@Chalex I'm guessing you need to flatten your vendor folders

Glen (Fri, 22 Dec 2017 00:04:37 GMT):
ok @troyronda thank you?!

Glen (Fri, 22 Dec 2017 00:04:37 GMT):
ok @troyronda thank you!

Chalex (Fri, 22 Dec 2017 02:19:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GP5edXAvYbYa7rn2r) @troyronda What does that mean? So remove the vendor folder in vendor projects?

Chalex (Fri, 22 Dec 2017 02:47:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GP5edXAvYbYa7rn2r) @troyronda Thank you. I solved this problem.

didianV5 (Sun, 24 Dec 2017 03:32:50 GMT):
Has joined the channel.

e-nikolov (Sun, 24 Dec 2017 10:47:30 GMT):
Why is it necessary to use the substPathVars function on many paths coming from the config? Doesn't whatever go function is used for loading the file from the path already support dealing with environment variables?

e-nikolov (Sun, 24 Dec 2017 10:52:21 GMT):
I think os.ExpandEnv does this

troyronda (Sun, 24 Dec 2017 13:01:08 GMT):
@e-nikolov probably should have been os.Expand with a custom mapping function

troyronda (Sun, 24 Dec 2017 13:01:56 GMT):
re: ExpandEnv: GOPATH is no longer required to be an environment variable so need to use the GoPath from the build package

troyronda (Sun, 24 Dec 2017 13:03:05 GMT):
Also it is desired to have defaults when env isn't set for test cases (so go test can work without ENV variable being required)

troyronda (Sun, 24 Dec 2017 13:03:38 GMT):
probably would make sense to have os.Expand custom mapping function try the environment first and then fall back to defaults for the above

troyronda (Sun, 24 Dec 2017 13:03:38 GMT):
probably would make sense to have os.Expand custom mapping function try the environment (os.GetEnv) first and then fall back to defaults for the above

troyronda (Sun, 24 Dec 2017 13:03:38 GMT):
probably would make sense to have os.Expand custom mapping function try the environment (os.GetEnv) first and then fall back to defaults for the above... similar to os.ExpandEnv but with defaults.

troyronda (Sun, 24 Dec 2017 13:03:38 GMT):
probably would make sense to have os.Expand custom mapping function try the environment (os.LookupEnv) first and then fall back to defaults for the above... similar to os.ExpandEnv but with defaults.

troyronda (Sun, 24 Dec 2017 13:06:46 GMT):
existing mapping func: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/config/subst.go#L84

mp (Sun, 24 Dec 2017 22:08:12 GMT):
Has joined the channel.

hongker (Mon, 25 Dec 2017 16:22:30 GMT):
what's wrong with "cscc.GetChannels failed" when checks whether the primary peer of a channel has already joined the channel??

Cavan2477 (Tue, 26 Dec 2017 01:57:34 GMT):
Has joined the channel.

Glen (Tue, 26 Dec 2017 08:36:22 GMT):
Hi @troyronda as channel configuration update needs to fetch the configuration block first, does fabric-sdk-go support channel fetch?

troyronda (Tue, 26 Dec 2017 15:04:10 GMT):
@Glen https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabric-client/channel/config.go

jnichols181912 (Tue, 26 Dec 2017 19:36:45 GMT):
Has joined the channel.

Glen (Wed, 27 Dec 2017 00:18:28 GMT):
yes, all work!

manxiaqu (Wed, 27 Dec 2017 06:59:05 GMT):
Has joined the channel.

manxiaqu (Wed, 27 Dec 2017 07:06:57 GMT):
Hi, I test follows end_to_end_test.go and change some code(use e2e example to start fabric), every thing works fine except receiving registered chaincode event. i log the event and find that the msg is unregistered. not quite sure what's wrong with it.

manxiaqu (Wed, 27 Dec 2017 07:08:34 GMT):

event.png

manxiaqu (Wed, 27 Dec 2017 07:10:20 GMT):
but ubregister msg will not be handlered. anyone know how this occur。 use `rec = chClient.RegisterChaincodeEvent(notifier, ccID, eventID)` to register chaincode event

manxiaqu (Wed, 27 Dec 2017 07:10:20 GMT):
but unregister msg will not be handlered. anyone know how this occur。 use `rec = chClient.RegisterChaincodeEvent(notifier, ccID, eventID)` to register chaincode event

manxiaqu (Wed, 27 Dec 2017 07:18:08 GMT):
check the code building chaincode event but not find calling. it chaincode event not support yet?

manxiaqu (Wed, 27 Dec 2017 07:19:40 GMT):

chaincode.png

manxiaqu (Wed, 27 Dec 2017 07:20:04 GMT):
not find method call this.

Glen (Wed, 27 Dec 2017 09:48:54 GMT):
@troyronda one more question, how can I edit the channel config block, as fabric-sdk-java utilizes configtxlator server?

jrosmith (Wed, 27 Dec 2017 18:54:10 GMT):
Has joined the channel.

Glen (Fri, 29 Dec 2017 08:08:22 GMT):
anybody knows why the ordererAdmin is fetched through setup.OrgID, that's peer1org in fact? ordererAdmin, err := GetOrdererAdmin(sdk.SystemClient, setup.OrgID) if err != nil { return fmt.Errorf("Error getting orderer admin user: %v", err) }

Glen (Fri, 29 Dec 2017 08:08:22 GMT):
anybody knows why the ordererAdmin is fetched through setup.OrgID, that's peer1org in fact? ordererAdmin, err := GetOrdererAdmin(sdk.SystemClient, setup.OrgID) if err != nil { return fmt.Errorf("Error getting orderer admin user: %v", err) }

Glen (Fri, 29 Dec 2017 08:08:22 GMT):
```anybody knows why the ordererAdmin is fetched through setup.OrgID, that's peer1org in fact?``` ordererAdmin, err := GetOrdererAdmin(sdk.SystemClient, setup.OrgID) if err != nil { return fmt.Errorf("Error getting orderer admin user: %v", err) }

Glen (Fri, 29 Dec 2017 08:26:26 GMT):
I'm useing fabric-sdk-go to update the channel configuration but met the following errror on orderer:```Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Values] /Channel/Orderer/BatchTimeout not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining```

Glen (Fri, 29 Dec 2017 08:26:26 GMT):
I'm using fabric-sdk-go for fabric-1.0.0 to update the channel configuration but met the following errror on orderer:```Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Values] /Channel/Orderer/BatchTimeout not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining```

Glen (Fri, 29 Dec 2017 08:26:53 GMT):
I used the ordererAdmin context before sending the request

Abhijeet.K (Sun, 31 Dec 2017 13:58:41 GMT):
Has joined the channel.

Abhijeet.K (Sun, 31 Dec 2017 14:00:52 GMT):
Hi,

Abhijeet.K (Sun, 31 Dec 2017 14:01:06 GMT):
I ran make command in fabric-sdk-go

Abhijeet.K (Sun, 31 Dec 2017 14:01:13 GMT):
got this error " github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/channel "

Abhijeet.K (Sun, 31 Dec 2017 14:01:25 GMT):
error: exit status 1 panic: EOF goroutine 1 [running]: panic(0x4daca0, 0xc42000a160) /usr/local/go/src/runtime/panic.go:500 +0x1a1 main.main() /home/oracle/gopath/src/github.com/AlekSi/gocov-xml/gocov-xml.go:60 +0x15fd Makefile:38: recipe for target 'unit-test' failed make: *** [unit-test] Error 2

Abhijeet.K (Sun, 31 Dec 2017 14:01:55 GMT):
how to fix this?

Norberthu (Tue, 02 Jan 2018 02:48:05 GMT):
Has joined the channel.

WalkerLiu (Tue, 02 Jan 2018 04:47:46 GMT):
does anyone know how to fix this : # github.com/miekg/pkcs11 ..\..\miekg\pkcs11\pkcs11.go:26:18: fatal error: ltdl.h: No such file or directory

WalkerLiu (Tue, 02 Jan 2018 04:49:31 GMT):
on windows ? I tried `go build --tags nopkcs11` but it did not work , my platform is windows by the way

ws8634 (Tue, 02 Jan 2018 10:17:43 GMT):
Has joined the channel.

troyronda (Tue, 02 Jan 2018 15:34:13 GMT):
@WalkerLiu go build --tags nopkcs11 is for fabric fabric itself

troyronda (Tue, 02 Jan 2018 15:34:35 GMT):
currently you will need to install libltdl

troyronda (Tue, 02 Jan 2018 15:37:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BGFAjFGTt4rsis7L6) currently the sdk uses the output from configtxgen

troyronda (Tue, 02 Jan 2018 15:37:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BGFAjFGTt4rsis7L6) currently the sdk uses the output from the configtxgen tool. e.g., https://github.com/hyperledger/fabric-sdk-go/blob/70060735b3dc41c404fa5254b921d74fbcfe2687/pkg/fabric-txn/chmgmtclient/chmgmt.go#L62

troyronda (Tue, 02 Jan 2018 15:37:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BGFAjFGTt4rsis7L6) @Glen currently the sdk uses the output from the configtxgen tool. e.g., https://github.com/hyperledger/fabric-sdk-go/blob/70060735b3dc41c404fa5254b921d74fbcfe2687/pkg/fabric-txn/chmgmtclient/chmgmt.go#L62

troyronda (Tue, 02 Jan 2018 15:37:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BGFAjFGTt4rsis7L6) @Glen currently the sdk uses the output from the configtxgen tool. See SaveChannel. e.g., https://github.com/hyperledger/fabric-sdk-go/blob/70060735b3dc41c404fa5254b921d74fbcfe2687/pkg/fabric-txn/chmgmtclient/chmgmt.go#L62

troyronda (Tue, 02 Jan 2018 15:41:28 GMT):
(it would be a nice improvement to have more API options for channel config within the SDK, of course)

troyronda (Tue, 02 Jan 2018 18:01:25 GMT):
@WalkerLiu created two tickets to make pkcs11 optional: https://jira.hyperledger.org/browse/FAB-7576, https://jira.hyperledger.org/browse/FAB-7577

troyronda (Tue, 02 Jan 2018 20:53:54 GMT):
@WalkerLiu the latest SDK no longer requires ltdl.h if you don't need PKCS11

troyronda (Tue, 02 Jan 2018 20:53:54 GMT):
@WalkerLiu the latest SDK (today's commit) no longer requires ltdl.h if you don't need PKCS11

WalkerLiu (Wed, 03 Jan 2018 02:50:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gvfnJfYCaMGQyQbAS) @troyronda Thanks

Glen (Wed, 03 Jan 2018 03:21:09 GMT):
Hi@troyronda How to solve the go test file dependency problem when i run *go test fabapi_test.go * under def/fabapi/? below is the problem:```./fabapi_test.go:18:11: undefined: Options ./fabapi_test.go:26:12: undefined: NewSDK ./fabapi_test.go:33:14: undefined: NewSDK ./fabapi_test.go:45:63: undefined: ChannelClientOpts ./fabapi_test.go:51:64: undefined: ChannelClientOpts ./fabapi_test.go:60:11: undefined: Options ./fabapi_test.go:65:14: undefined: NewSDK ./fabapi_test.go:83:54: undefined: ChannelMgmtClientOpts ./fabapi_test.go:89:54: undefined: ChannelMgmtClientOpts ./fabapi_test.go:98:11: undefined: Options ./fabapi_test.go:98:11: too many errors```

troyronda (Wed, 03 Jan 2018 03:24:25 GMT):
you should run go test against packages rather than files

Glen (Wed, 03 Jan 2018 03:25:00 GMT):
under root directory? what if I only want to test this?

troyronda (Wed, 03 Jan 2018 03:25:14 GMT):
go test github.com/hyperledger/fabric-sdk-go/def/fabapi

Glen (Wed, 03 Jan 2018 03:29:34 GMT):
yes

Glen (Wed, 03 Jan 2018 03:47:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nGCHwtmhED9Qis4cN) @troyronda Yes, I think fabric-sdk-go can include the configtxlator code to compute the config_update directly, this will be more convenient!

gurel (Wed, 03 Jan 2018 17:39:53 GMT):
Has joined the channel.

troyronda (Wed, 03 Jan 2018 21:56:17 GMT):
FYI - for those using PKCS11, you must pass in a cryptosuite impl supporting PKCS11 in the SDK options. E.g., https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkcs11/e2e_test.go

troyronda (Wed, 03 Jan 2018 21:57:12 GMT):
included impls are: https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/cryptosuite/bccsp/pkcs11 & https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/cryptosuite/bccsp/multisuite

allonblocks21 (Thu, 04 Jan 2018 11:08:20 GMT):
Has joined the channel.

sh777 (Fri, 05 Jan 2018 07:13:17 GMT):
Has joined the channel.

vdods (Sat, 06 Jan 2018 09:20:43 GMT):
Has left the channel.

hongker (Sat, 06 Jan 2018 15:21:35 GMT):
When I want to register some user from fabric ca,the program return error:x509: certificate is valid for ca.org1.example.com, not ca_peerOrg1 . What's wrong with sdk config options?

PetarAtanasov (Sun, 07 Jan 2018 19:18:53 GMT):
Has joined the channel.

PetarAtanasov (Sun, 07 Jan 2018 19:19:00 GMT):
hello

PetarAtanasov (Sun, 07 Jan 2018 19:19:24 GMT):
i am trying to follow the fabric golang tutorial

PetarAtanasov (Sun, 07 Jan 2018 19:19:31 GMT):
some errors pop up on MAKE

PetarAtanasov (Sun, 07 Jan 2018 19:19:45 GMT):
golint and goimport errors

PetarAtanasov (Sun, 07 Jan 2018 19:20:14 GMT):
check_lint bash script

xuchenhao001 (Mon, 08 Jan 2018 13:21:29 GMT):
Has joined the channel.

xuchenhao001 (Mon, 08 Jan 2018 13:21:48 GMT):
Hi, every one.

xuchenhao001 (Mon, 08 Jan 2018 13:23:13 GMT):
I'm trying to start an application for Hyperledger fabric v1.0.5, but I don't know which commit I should use of `fabric-sdk-go`. Anyone can help me?

troyronda (Mon, 08 Jan 2018 14:49:56 GMT):
@xuchenhao001 latest is fine

xuchenhao001 (Mon, 08 Jan 2018 15:12:44 GMT):
@troyronda Thanks! Do you know when will this project get to the first release version?

troyronda (Mon, 08 Jan 2018 15:13:55 GMT):
We are trying to get the next tag out soon - wanted to add some additional resilience logic & split code logic out of fabapi into an SDK package first

troyronda (Mon, 08 Jan 2018 15:14:45 GMT):
(this work is happening as we speak)

xuchenhao001 (Mon, 08 Jan 2018 15:15:26 GMT):
great. I am wondering if I should use master to develop my project

troyronda (Mon, 08 Jan 2018 15:15:43 GMT):
fyi: we are using master for our applications

troyronda (Mon, 08 Jan 2018 15:16:51 GMT):
the last tag is quite out-of-date unfortunately

troyronda (Mon, 08 Jan 2018 15:16:51 GMT):
the last SDK tag is quite out-of-date unfortunately

troyronda (Mon, 08 Jan 2018 15:17:03 GMT):
so we are pushing to get a tag out

troyronda (Mon, 08 Jan 2018 15:17:03 GMT):
so we are pushing to get a new SDK tag out

xuchenhao001 (Mon, 08 Jan 2018 15:18:09 GMT):
Thanks! I notice that too. one more question, can I just put fabric-sdk-go project into `vendor` folder in my project and calling `fabapi`?

troyronda (Mon, 08 Jan 2018 15:18:31 GMT):
fabric-sdk-go has its own vendor dependencies

troyronda (Mon, 08 Jan 2018 15:18:39 GMT):
so you need to make sure those dependencies are also in your vendor

troyronda (Mon, 08 Jan 2018 15:18:52 GMT):
then you call fabapi, yes

troyronda (Mon, 08 Jan 2018 15:19:26 GMT):
soon we will split fabapi into two packages and I'll post an update about that

troyronda (Mon, 08 Jan 2018 15:19:42 GMT):
with the hope that it will be less confusing and more flexible

troyronda (Mon, 08 Jan 2018 15:20:07 GMT):
(def/fabapi is planned to split into pkg/fabsdk and def/fabapi)

xuchenhao001 (Mon, 08 Jan 2018 15:20:50 GMT):
:sweat_smile: OK, then how to install that? Can I simply do `go get fabric-sdk-go`?

troyronda (Mon, 08 Jan 2018 15:21:17 GMT):
if you use dep then you can just use dep to setup your vendoring - the SDK supports dep the best

troyronda (Mon, 08 Jan 2018 15:21:30 GMT):
https://github.com/golang/dep

xuchenhao001 (Mon, 08 Jan 2018 15:22:10 GMT):
ok! I just finished `go get -u github.com/golang/dep/cmd/dep`, what should I do then?

troyronda (Mon, 08 Jan 2018 15:22:17 GMT):
(SDK includes the constraint definitions for dep)

troyronda (Mon, 08 Jan 2018 15:22:32 GMT):
in your application, run dep init

troyronda (Mon, 08 Jan 2018 15:22:58 GMT):
it should generate you a .toml and .lock file

troyronda (Mon, 08 Jan 2018 15:23:04 GMT):
and populate your vendor directory

xuchenhao001 (Mon, 08 Jan 2018 15:23:58 GMT):
ok I'll try!

xuchenhao001 (Mon, 08 Jan 2018 15:24:34 GMT):
before `dep init` should I put `fabric-sdk-go` into `vendor` dir?

troyronda (Mon, 08 Jan 2018 18:23:45 GMT):
@xuchenhao001 the dep tool analyzes your code to figure out what should be in vendor

troyronda (Mon, 08 Jan 2018 18:24:07 GMT):
so no need to manually put sdk in vendor if you are using dep

xuchenhao001 (Tue, 09 Jan 2018 01:21:46 GMT):
@troyronda yes, but I just want to install `fabric-sdk-go` package first, and then write down my code based on that. Any idea about that?

troyronda (Tue, 09 Jan 2018 01:23:32 GMT):
sure .. you can run dep init

troyronda (Tue, 09 Jan 2018 01:25:06 GMT):
and then dep ensure -add github.com/hyperledger/fabric-sdk-go

xuchenhao001 (Tue, 09 Jan 2018 01:26:03 GMT):
ok! I'll try it. thanks again!

xuchenhao001 (Tue, 09 Jan 2018 01:28:24 GMT):
``` dep ensure -add github.com/hyperledger/fabric-sdk-go no dirs contained any Go code ```

xuchenhao001 (Tue, 09 Jan 2018 01:28:59 GMT):
:worried: I run this in an empty dir

troyronda (Tue, 09 Jan 2018 01:29:02 GMT):
you need at least one go file in your dir :)

xuchenhao001 (Tue, 09 Jan 2018 01:29:09 GMT):
ok

xuchenhao001 (Tue, 09 Jan 2018 01:31:24 GMT):
```# dep ensure -add github.com/hyperledger/fabric-sdk-go Fetching sources... "github.com/hyperledger/fabric-sdk-go" is not imported by your project, and has been temporarily added to Gopkg.lock and vendor/. If you run "dep ensure" again before actually importing it, it will disappear from Gopkg.lock and vendor/. ```

xuchenhao001 (Tue, 09 Jan 2018 01:31:55 GMT):
I checked my vendor dir and the `fabric-sdk-go` is in there!

xuchenhao001 (Tue, 09 Jan 2018 01:33:01 GMT):
So I can write my code now? after that, can i simply build my project by `go build`?

troyronda (Tue, 09 Jan 2018 01:34:51 GMT):
once you have some real code, you should run dep ensure to pull down depenencies

troyronda (Tue, 09 Jan 2018 01:34:56 GMT):
and then go build

troyronda (Tue, 09 Jan 2018 01:35:15 GMT):
real code meaning code that imports SDK

xuchenhao001 (Tue, 09 Jan 2018 01:35:37 GMT):
I mean, I don't need to build any dependencies of `fabric-sdk-go`?

xuchenhao001 (Tue, 09 Jan 2018 01:35:46 GMT):
Yes, I got it.

xuchenhao001 (Tue, 09 Jan 2018 12:30:58 GMT):
:sob: Any one can help me? I got an error when I run `dep init -v`: ```No versions of golang.org/x/exp met constraints: master: Could not introduce golang.org/x/exp@master, as its subpackage golang.org/x/exp/inotify does not contain usable Go code (*build.NoGoError).. (Package is required by github.com/google/cadvisor@release-v0.28.)```

xuchenhao001 (Tue, 09 Jan 2018 12:32:30 GMT):
Oh it seems an error from `cadvisor`, sorry.

ThomasYuan (Tue, 09 Jan 2018 15:12:25 GMT):
Has joined the channel.

troyronda (Tue, 09 Jan 2018 15:27:11 GMT):
FYI: @bstasyszyn has updated the example CLI to the latest SDK: https://github.com/securekey/fabric-examples/tree/master/fabric-cli

dockeryounger (Wed, 10 Jan 2018 03:50:08 GMT):
Has joined the channel.

dockeryounger (Wed, 10 Jan 2018 03:50:42 GMT):
Hi team, how can I get the Block number and transaction ID though SDK? I sincerely appreciate your help!

troyronda (Wed, 10 Jan 2018 14:20:08 GMT):
@dockeryounger - the example CLI has an example of a block printer: https://github.com/securekey/fabric-examples/blob/master/fabric-cli/cmd/fabric-cli/printer/blockprinter.go

praveentalari (Wed, 10 Jan 2018 18:04:19 GMT):
Has joined the channel.

e-nikolov (Wed, 10 Jan 2018 21:32:41 GMT):
In https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabric-client/orderer/orderer.go#L34 Does the orderer.NewOrderer(url string, certificate string, serverHostOverride string, config apiconfig.Config) work with the new embedded Pems or does it only work with paths? Judging by the NewOrdererFromConfig below it, ordererCfg.TLSCACerts.Path is passed into the `certificate` parameter.

e-nikolov (Wed, 10 Jan 2018 21:32:41 GMT):
In https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabric-client/orderer/orderer.go#L34 Does the orderer.NewOrderer(url string, certificate string, serverHostOverride string, config apiconfig.Config) work with the new embedded Pems or does it only work with paths? Judging by the NewOrdererFromConfig() below it, ordererCfg.TLSCACerts.Path is passed into the `certificate` parameter.

e-nikolov (Wed, 10 Jan 2018 21:32:41 GMT):
In https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabric-client/orderer/orderer.go#L34 Does the orderer.NewOrderer(url string, certificate string, serverHostOverride string, config apiconfig.Config) work with the new embedded Pems or does it only work with paths? I see that in the NewOrdererFromConfig() below it, ordererCfg.TLSCACerts.Path is passed into the `certificate` parameter.

Baha-sk (Wed, 10 Jan 2018 21:52:06 GMT):
@e-nikolov anything that accesses TLSClientCerts should be able to access certs through embedded Pem or through paths

e-nikolov (Wed, 10 Jan 2018 21:53:05 GMT):
@Baha-sk How do I call orderer.NewOrderer with an embedded cert?

e-nikolov (Wed, 10 Jan 2018 21:54:14 GMT):
If I pass the pem of the certificate to NewOrderer, it tries to open a file with that name and fails instead of using the pem directly

Baha-sk (Wed, 10 Jan 2018 21:55:11 GMT):
under Orderer in the config.yaml.. there should be a tlsCACerts group with path value

Baha-sk (Wed, 10 Jan 2018 21:55:26 GMT):
you can replace it with pem: | ....

e-nikolov (Wed, 10 Jan 2018 21:55:30 GMT):
i know

e-nikolov (Wed, 10 Jan 2018 21:55:31 GMT):
i did that

Baha-sk (Wed, 10 Jan 2018 21:55:50 GMT):
ok, and?

Baha-sk (Wed, 10 Jan 2018 21:56:09 GMT):
did it work?

e-nikolov (Wed, 10 Jan 2018 21:56:09 GMT):
doesn't work

Baha-sk (Wed, 10 Jan 2018 21:56:29 GMT):
what error do you get?

e-nikolov (Wed, 10 Jan 2018 21:56:29 GMT):
because NewOrderer seems to expect a path

e-nikolov (Wed, 10 Jan 2018 21:57:09 GMT):
When I look at https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabric-client/orderer/orderer.go#L34

e-nikolov (Wed, 10 Jan 2018 21:57:33 GMT):
I really think it doesn't support pems

e-nikolov (Wed, 10 Jan 2018 21:57:52 GMT):
maybe I'm not supposed to use that function directly?

Baha-sk (Wed, 10 Jan 2018 21:57:56 GMT):
TLSCACertPool doesn't support pems yet

Baha-sk (Wed, 10 Jan 2018 22:00:22 GMT):
currently NewOrderer's signature expects a path as an argument

e-nikolov (Wed, 10 Jan 2018 22:00:35 GMT):
yes, that was my feeling as well

Baha-sk (Wed, 10 Jan 2018 22:00:48 GMT):
func NewOrderer(url string, *certificate string*, serverHostOverride string, config apiconfig.Config) (*Orderer, error)

Baha-sk (Wed, 10 Jan 2018 22:02:28 GMT):
also, it is preferable to use NewOrdererFromConfig function to take advantage of overriding the ssl hostname (useful in dev mode)

e-nikolov (Wed, 10 Jan 2018 22:02:54 GMT):
that's where I saw that the path was being sent directly

Baha-sk (Wed, 10 Jan 2018 22:03:13 GMT):
but if you like to add support for an embedded []byte argument, you can create a second function

Baha-sk (Wed, 10 Jan 2018 22:03:48 GMT):
currently, the sdk doesn't support NewOrderer with []byte argument

e-nikolov (Wed, 10 Jan 2018 22:04:11 GMT):
NewOrdererFromBytes?

e-nikolov (Wed, 10 Jan 2018 22:05:02 GMT):
NewOrdererWithByteCertificate?

Baha-sk (Wed, 10 Jan 2018 22:05:03 GMT):
add Cert maybe.. NewOrdrererFromBytesCert

Baha-sk (Wed, 10 Jan 2018 22:05:15 GMT):
yeah, that's more like it

Baha-sk (Wed, 10 Jan 2018 22:06:07 GMT):
but if you want to support serverhost override, then you need to duplicate NewOrdererFromConfig as well

Baha-sk (Wed, 10 Jan 2018 22:07:24 GMT):
it's optional..

e-nikolov (Wed, 10 Jan 2018 22:07:39 GMT):
what if we first tried to use the certificate parameter as a file path and if that failed, try using it as a pem?

e-nikolov (Wed, 10 Jan 2018 22:07:48 GMT):
sounds a bit dirty though

Baha-sk (Wed, 10 Jan 2018 22:08:04 GMT):
usually pem should take precedence over path

Baha-sk (Wed, 10 Jan 2018 22:08:18 GMT):
try pem first, then if it doesn't exist, then use path

e-nikolov (Wed, 10 Jan 2018 22:09:26 GMT):
Yeah, actually NewOrdererFromConfig already has access to both the path and the pem

e-nikolov (Wed, 10 Jan 2018 22:10:10 GMT):
so it can do the checking and then invoke the appropriate method for bytes or path

e-nikolov (Wed, 10 Jan 2018 22:10:28 GMT):
we don't need 2 new methods

e-nikolov (Wed, 10 Jan 2018 22:10:29 GMT):
just one

Baha-sk (Wed, 10 Jan 2018 22:10:30 GMT):
ordererCfg.TLSCACerts.Path is hardcoded in NewOrdererFromConfig... then yeah... you can refactor this code to check for Pem first

e-nikolov (Wed, 10 Jan 2018 22:10:37 GMT):
yes

Baha-sk (Wed, 10 Jan 2018 22:10:47 GMT):
so we're in agreement

e-nikolov (Wed, 10 Jan 2018 22:11:44 GMT):
Do I need to create a new jira issue for this, or do I link the commit to something existing?

e-nikolov (Wed, 10 Jan 2018 22:11:50 GMT):
not sure what the protocol is

Baha-sk (Wed, 10 Jan 2018 22:12:23 GMT):
but you'll have to change pkg/config/comm/comm.go, the function TLSConfig(...) must also support []byte argument as well

Baha-sk (Wed, 10 Jan 2018 22:13:06 GMT):
yes, you can create a lira issue for fabric-sdk-go component

Baha-sk (Wed, 10 Jan 2018 22:13:06 GMT):
yes, you can create a Jira issue for fabric-sdk-go component

e-nikolov (Wed, 10 Jan 2018 22:13:41 GMT):
I'll take a look to see how to refactor it

Baha-sk (Wed, 10 Jan 2018 22:14:17 GMT):
and make sure to add the Jira issue # in the log comment at the beginning, something like "[FAB-1234] you commit comment here"

Baha-sk (Wed, 10 Jan 2018 22:14:17 GMT):
and make sure to add the Jira issue # in the log comment at the beginning, something like "[FAB-1234] your commit comment here"

e-nikolov (Wed, 10 Jan 2018 22:14:41 GMT):
yeah, I did that with my commits last time

Baha-sk (Wed, 10 Jan 2018 22:14:58 GMT):
sure... it's the same process then

Baha-sk (Wed, 10 Jan 2018 22:15:06 GMT):
thanks for your help Emil

e-nikolov (Wed, 10 Jan 2018 22:16:12 GMT):
No problem, I need those things myself, that's why I work on them :)

e-nikolov (Wed, 10 Jan 2018 22:18:40 GMT):
By the way in https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/config/comm/comm.go#L20, the error that is returned is ignored

e-nikolov (Wed, 10 Jan 2018 22:18:43 GMT):
is that intentional?

e-nikolov (Wed, 10 Jan 2018 22:18:43 GMT):
do you know if that is intentional?

Baha-sk (Wed, 10 Jan 2018 22:25:36 GMT):
it's ignored as the condition right after will check the cert.. and if it's missing or empty, then it returns an error right away

Baha-sk (Wed, 10 Jan 2018 22:26:46 GMT):
personally I would check for the error, not sure why it's not checked

e-nikolov (Thu, 11 Jan 2018 02:40:01 GMT):
In https://github.com/hyperledger/fabric-sdk-go/blob/987d9fdd49bc98cf953c92f40b093b30fbddd384/api/apiconfig/configprovider.go#L39 Would it be acceptable to change the TLSCACertPool(tlsCertificate string) (*x509.CertPool, error) into TLSCACertPool(certConfig TLSConfig) (*x509.CertPool, error) in order for it to support both Path and Pem, or would it be preferable to leave it as it is and add a separate method to the interface (e.g. TLSCACertPoolFromTLSConfig)?

e-nikolov (Thu, 11 Jan 2018 02:40:01 GMT):
In https://github.com/hyperledger/fabric-sdk-go/blob/987d9fdd49bc98cf953c92f40b093b30fbddd384/api/apiconfig/configprovider.go#L39 Would it be acceptable to change the TLSCACertPool(tlsCertificate string) (*x509.CertPool, error) into TLSCACertPool(certConfig TLSConfig) (*x509.CertPool, error) in order for it to support both Path and Pem, or would it be preferable to leave it as it is for backwards compatibility and add a separate method to the interface (e.g. TLSCACertPoolFromTLSConfig)?

e-nikolov (Thu, 11 Jan 2018 02:40:55 GMT):
Internally, the TLSCACertPool is only used in one place, so it wouldn'

e-nikolov (Thu, 11 Jan 2018 02:40:55 GMT):
Internally, the TLSCACertPool is only used in one place, so it wouldn't have a big impact, but not sure about third party programs that depend on it.

e-nikolov (Thu, 11 Jan 2018 02:40:55 GMT):
Inside the fabric-sdk-go itself, the TLSCACertPool is only used in one place, so it wouldn't have a big impact, but not sure about third party programs that depend on it.

e-nikolov (Thu, 11 Jan 2018 02:40:55 GMT):
Inside the fabric-sdk-go itself, the TLSCACertPool() is only used in one place, so it wouldn't have a big impact, but not sure about third party programs that depend on it.

e-nikolov (Thu, 11 Jan 2018 02:48:59 GMT):
Similar question about https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/config/comm/comm.go#L19

praveentalari (Thu, 11 Jan 2018 14:46:33 GMT):
github.com/hyperledger/fabric-sdk-go/test/integration/e2e/end_to_end_test.go is failing.... end_to_end.go:48: Failed to create new SDK: failed to initialize config: loading config file failed: open ../../fixtures/config/config_test.yaml: no such file or directory

praveentalari (Thu, 11 Jan 2018 14:46:33 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end_test.go is failing.... end_to_end.go:48: Failed to create new SDK: failed to initialize config: loading config file failed: open ../../fixtures/config/config_test.yaml: no such file or directory

Baha-sk (Thu, 11 Jan 2018 15:37:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KTxT37GKuCz2ZzEMk) @e-nikolov and you'll have to change all the unit test references.. it would be too big of a task and will impact third party clients using the Go SDK

e-nikolov (Thu, 11 Jan 2018 15:38:48 GMT):
I'll have to change the unit tests anyway, but yeah 3rd party clients are an issue

e-nikolov (Thu, 11 Jan 2018 15:38:48 GMT):
I'll have to change the unit tests anyway because of the mocks, but yeah 3rd party clients are an issue

e-nikolov (Thu, 11 Jan 2018 15:40:28 GMT):
What would be a good name for the TLSConfig() method that takes in a TLSConfig struct? TLSConfigFromTLSConfig() doesn't quite sound right

e-nikolov (Thu, 11 Jan 2018 15:40:41 GMT):
NewTLSConfig()?

e-nikolov (Thu, 11 Jan 2018 15:41:26 GMT):
TLSConfig2()?

Baha-sk (Thu, 11 Jan 2018 17:24:37 GMT):
actually there's a better way in refactoring this..

Baha-sk (Thu, 11 Jan 2018 17:27:32 GMT):
instead of creating new functions we can pass in variadic configs or functional options as mentioned in this link: https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis

e-nikolov (Thu, 11 Jan 2018 17:28:29 GMT):
I've read that article I'll see if I can implement it that way

e-nikolov (Thu, 11 Jan 2018 17:28:52 GMT):
but that would still require a new method I think

e-nikolov (Thu, 11 Jan 2018 17:29:14 GMT):
since the current one already requires the path as a string

Baha-sk (Thu, 11 Jan 2018 17:29:32 GMT):
I think NewOrderer should not have the cert path as an argument.. it should be loaded from the config directly

Baha-sk (Thu, 11 Jan 2018 17:30:34 GMT):
NewOrdererFromConfig is kind of doing the functional options thing but it's calling NewOrderer directly

e-nikolov (Thu, 11 Jan 2018 17:30:38 GMT):
if we remove it, it breaks backwards compatibility though?

Baha-sk (Thu, 11 Jan 2018 17:31:18 GMT):
and I also noticed NewPeer as the cert path as argument.. which needs to change as well

e-nikolov (Thu, 11 Jan 2018 17:31:29 GMT):
yeah, there are a bunch of those

e-nikolov (Thu, 11 Jan 2018 17:31:57 GMT):
I think all of them should have a way of accepting a TLSConfig struct

Baha-sk (Thu, 11 Jan 2018 17:32:08 GMT):
most probably it will break backward compatibility

Baha-sk (Thu, 11 Jan 2018 17:32:47 GMT):
no just TLSConfig... the functions are already passing ing the config.. NewOrderer/NewPeer should load the certs from the config reference instead of passing them

e-nikolov (Thu, 11 Jan 2018 17:33:28 GMT):
But the config contains the pems of all orderers

e-nikolov (Thu, 11 Jan 2018 17:33:43 GMT):
while NewOrderer() needs to create a single orderer from 1 pem

e-nikolov (Thu, 11 Jan 2018 17:33:53 GMT):
that's why the path to the pem is given directly

e-nikolov (Thu, 11 Jan 2018 17:33:59 GMT):
I don't think it will work just from the config

e-nikolov (Thu, 11 Jan 2018 17:35:13 GMT):
I've seen NewOrderer() be used in combination with config.RandomOrdererConfig()

Baha-sk (Thu, 11 Jan 2018 17:35:14 GMT):
I think only the url is the mandatory field to identify the orderer.. NewOrderer should fetch the corresponding cert from the config directly

Baha-sk (Thu, 11 Jan 2018 17:37:31 GMT):
I see, the config argument passed to NewOrderer is supposed to be the client config, not the orderer config

Baha-sk (Thu, 11 Jan 2018 17:42:40 GMT):
what makes more sense is hide NewOrderer function then rename NewOrdererFromConfig into NewOrderer and add the path/pem logic in there

e-nikolov (Thu, 11 Jan 2018 17:43:26 GMT):
what do you mean by hide?

e-nikolov (Thu, 11 Jan 2018 17:46:01 GMT):
If you mean to replace it, then I agree that it makes the most sense code base wise, but we might break other people's code

Baha-sk (Thu, 11 Jan 2018 17:46:12 GMT):
hide is making the function private (function with first letter being lowercase)

e-nikolov (Thu, 11 Jan 2018 17:47:52 GMT):
that's the same as removing it from outside people's perspective

Baha-sk (Thu, 11 Jan 2018 17:47:58 GMT):
but we should also make use of the variadic argument in the function signature..

Baha-sk (Thu, 11 Jan 2018 17:47:59 GMT):
yes

Baha-sk (Thu, 11 Jan 2018 17:48:28 GMT):
the list of orderers is already in the client config if I remember well

Baha-sk (Thu, 11 Jan 2018 17:50:20 GMT):
the function should have only the url as first argument (mandatory field) and the variadic config (config ...Config) and inside the function there should be logic to retrieve the ordererConfig from config (including orderer cert from pem/path)

Baha-sk (Thu, 11 Jan 2018 17:53:40 GMT):
this will break backward compatibility, but it will be a more cleaner way of calling the function

e-nikolov (Thu, 11 Jan 2018 17:53:48 GMT):
how do you obtain the orderer config if you don't supply the variadic config?

e-nikolov (Thu, 11 Jan 2018 17:54:06 GMT):
isn't it always necessary to supply it?

Baha-sk (Thu, 11 Jan 2018 17:55:23 GMT):
OrdererConfig is embedded in the SDK's client config..

e-nikolov (Thu, 11 Jan 2018 17:55:49 GMT):
What should be variadic then?

Baha-sk (Thu, 11 Jan 2018 17:55:50 GMT):
look at the sample sdk config.yaml in fabric-sdk-go/test/fixtures/config/config_test.yaml

Baha-sk (Thu, 11 Jan 2018 17:56:36 GMT):
that's what I'm trying to figure out... according to the doc.. one can set the config on the fly when calling NewOrdrerer....

Baha-sk (Thu, 11 Jan 2018 17:58:12 GMT):
orderer, err := NewOrdrerer(url, apiconfig.Config{ actual config entries here line by line })

Baha-sk (Thu, 11 Jan 2018 18:01:32 GMT):
then NewOrderer can access Config the way it is right now.. and to retrieve OrdererConfig, you can get it with config.OrdererConfig(name string)

e-nikolov (Thu, 11 Jan 2018 18:09:30 GMT):
aren't the url and the name different things?

e-nikolov (Thu, 11 Jan 2018 18:13:50 GMT):
I already have one implementation that doesn't break backwards compatibility and creates new methods for the new functionality.

e-nikolov (Thu, 11 Jan 2018 18:14:19 GMT):
I'll submit a change request so you can have a look if you want

Baha-sk (Thu, 11 Jan 2018 18:18:23 GMT):
we shouldn't be creating new methods

Baha-sk (Thu, 11 Jan 2018 18:19:03 GMT):
too many functions to do the same thing is not recommended and will confuse users of the sdk

Baha-sk (Thu, 11 Jan 2018 18:19:38 GMT):
we should have 1 main function for NewOrderer and NewPeer.. that does the whole logic

Baha-sk (Thu, 11 Jan 2018 18:19:54 GMT):
I think these functions were not properly created initially

Baha-sk (Thu, 11 Jan 2018 18:21:08 GMT):
we can either pass the orderer name (as per the config to make it follow the config names) or the url, but we need a way to map the url to the name in the config

Baha-sk (Thu, 11 Jan 2018 18:22:19 GMT):
and the second argument should be the variadic config argument or optional function

Baha-sk (Thu, 11 Jan 2018 18:24:14 GMT):
I'll bb after lunch..

e-nikolov (Thu, 11 Jan 2018 18:24:24 GMT):
ok

e-nikolov (Thu, 11 Jan 2018 18:24:42 GMT):
I am still not completely clear on what you envision the variadic configs to be

e-nikolov (Thu, 11 Jan 2018 18:24:55 GMT):
apiconfig.Config is an interface

Baha-sk (Thu, 11 Jan 2018 18:25:08 GMT):
you can message me in private if you wanna discuss this in more detail

troyronda (Fri, 12 Jan 2018 01:14:52 GMT):
@praveentalari hmm... the tests are passing for me; what's your setup/environment?

ranjan008 (Fri, 12 Jan 2018 06:02:22 GMT):
@troyronda can we deploy the binary file of the chaincode applictaion ?

newlife 1 (Fri, 12 Jan 2018 08:30:57 GMT):
Has joined the channel.

praveentalari (Fri, 12 Jan 2018 14:54:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RMqHNzEsTrzdXqubb) @troyronda As suggested in https://github.com/hyperledger/fabric-sdk-go#running-a-portion-of-the-test-suite I have run the following commands make depend make checks but instead of running all tests, i have done cd $GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/dockerenv docker-compose up -d cd $GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/integration/e2e go test I have got the following error *end_to_end.go:73: create channel failed: failed broadcast to orderer: NewAtomicBroadcastClient failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable*

troyronda (Fri, 12 Jan 2018 14:55:48 GMT):
Looks like the server is't running

troyronda (Fri, 12 Jan 2018 14:56:17 GMT):
see the next section of the readme (Running integration tests manually)

troyronda (Fri, 12 Jan 2018 14:57:04 GMT):
docker-compose up -d won't load the entire docker-compose file set

troyronda (Fri, 12 Jan 2018 14:57:35 GMT):
you can use (for example): make dockerenv-stable-up

troyronda (Fri, 12 Jan 2018 14:57:55 GMT):
(in the Fabric SDK Go directory)

troyronda (Fri, 12 Jan 2018 14:58:23 GMT):
and you can substitute "stable" for another target (prev, prerelease)

troyronda (Fri, 12 Jan 2018 14:58:49 GMT):
We should probably allow passing a -d option there...

troyronda (Fri, 12 Jan 2018 14:58:49 GMT):
We should probably allow passing a -d option there... (but don't yet)

troyronda (Fri, 12 Jan 2018 14:58:49 GMT):
We should probably allow passing a -d option there... (but we haven't added it yet -- but just run in another term for now)

praveentalari (Fri, 12 Jan 2018 15:00:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CQTvSEdj5wgbCi67p) @troyronda got it.. let me try.. btw i have 2 questions 1.is this because yaml file not properly configured ? and 2.docker-compose up --force-recreate -d is deleting the data

praveentalari (Fri, 12 Jan 2018 15:00:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7Bow2eTRvujp3LwTx) @troyronda yeah I am aware of -d option for docker command

troyronda (Fri, 12 Jan 2018 15:01:24 GMT):
@praveentalari I'll retry those steps once I push my current working directory (as I don't quite remember :)

praveentalari (Fri, 12 Jan 2018 15:03:41 GMT):
docker-compose up --force-recreate -d is driving me nuts everytime I rerun by bringing up containers when they are down, I am loosing the world state.

praveentalari (Fri, 12 Jan 2018 15:17:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=XbrgfcaPe6oybxX8q) @troyronda I did the following 1.cd $GOPATH/src/github.com/hyperledger/fabric-sdk-go 2.make dockerenv-stable-up and in another terminal I did 1.cd /Users/pt/MY_universe/WS/go_ws/GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/integration/e2e 2.go test but I am getting the same error end_to_end.go:73: create channel failed: failed broadcast to orderer: NewAtomicBroadcastClient failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable

troyronda (Fri, 12 Jan 2018 15:19:37 GMT):
--force-recreate is just to keep a clean slate for the SDK's tests

troyronda (Fri, 12 Jan 2018 15:20:03 GMT):
i'll take a look at those steps

praveentalari (Fri, 12 Jan 2018 15:24:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BhjfT3oYcLZ9PbGYZ) @troyronda if I am not wrong docker-compose up --force-recreate -d shouldn't lose data if the volume is external like volumes: path:host path my yaml has the following in docker-compose.yaml peer0.org1.example.com: volumes: /var/run/:/host/var/run/ I tried /host/var/myfolder/ instead of /host/var/run/ too

troyronda (Fri, 12 Jan 2018 16:37:04 GMT):
@praveentalari: I just tried against latest and I was successful. I'm using docker 17.12.0-ce on mac.

troyronda (Fri, 12 Jan 2018 16:37:30 GMT):
I wonder if the ports aren't being expose from docker to the host properly

troyronda (Fri, 12 Jan 2018 16:37:30 GMT):
I wonder if the ports aren't being expose from docker to the host properly in your env

praveentalari (Sat, 13 Jan 2018 06:32:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KG6GHHHBeYp7vFqPJ) @troyronda I

praveentalari (Sat, 13 Jan 2018 06:34:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KG6GHHHBeYp7vFqPJ) @troyronda I have also added the following line in /etc/host 127.0.0.1 ca.org1.example.com as suggested in https://github.com/hyperledger/fabric-sdk-go#enable-local-hostnames

praveentalari (Sat, 13 Jan 2018 06:34:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KG6GHHHBeYp7vFqPJ) @troyronda I'm also using docker 17.12.0-ce on mac. I have also added the following line in /etc/host 127.0.0.1 ca.org1.example.com as suggested in https://github.com/hyperledger/fabric-sdk-go#enable-local-hostnames

e-nikolov (Sat, 13 Jan 2018 14:44:18 GMT):
In https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabric-client/peer/peerendorser.go#L38 Is there a good reason why newPeerEndorser() returns a struct rather than pointer to struct?

e-nikolov (Sat, 13 Jan 2018 14:47:11 GMT):
Because of this there are things like return peerEndorser{}, errors.New("target is required") instead of return nil, errors.New("target is required")

e-nikolov (Sat, 13 Jan 2018 14:48:55 GMT):
and it gets converted to pointer anyway in all callers of newPeerEndorser()

troyronda (Sat, 13 Jan 2018 16:43:11 GMT):
@e-nikolov not really

troyronda (Sat, 13 Jan 2018 16:43:29 GMT):
Probably at the time it was just a small amount of data

e-nikolov (Sat, 13 Jan 2018 16:43:45 GMT):
it makes me write one extra line of code and I hate that :D

troyronda (Sat, 13 Jan 2018 16:43:47 GMT):
But it’s awkward if it’s converted to a pointer later anyways

troyronda (Sat, 13 Jan 2018 16:44:11 GMT):
So might as well be a pointer returned

e-nikolov (Sat, 13 Jan 2018 16:44:19 GMT):
I changed it in my refactor around the NewPeer()

troyronda (Sat, 13 Jan 2018 16:44:53 GMT):
Btw - I wonder if func signatures are changing anyways, perhaps those constructors should simply be named New

troyronda (Sat, 13 Jan 2018 16:45:17 GMT):
peer.NewPeer is a bit repetitive:)

e-nikolov (Sat, 13 Jan 2018 16:45:21 GMT):
true

e-nikolov (Sat, 13 Jan 2018 16:45:39 GMT):
I'll change it

troyronda (Sat, 13 Jan 2018 16:45:43 GMT):
Cool thanks

troyronda (Sat, 13 Jan 2018 16:47:21 GMT):
@praveentalari do you have all the host names set in /etc/hosts

troyronda (Sat, 13 Jan 2018 16:47:51 GMT):
You will need to set the entire list- maybe double check that

troyronda (Sat, 13 Jan 2018 16:48:24 GMT):
If that isn’t it, check your actively bound docker ports

e-nikolov (Sat, 13 Jan 2018 18:19:16 GMT):
https://gerrit.hyperledger.org/r/#/c/16777/

e-nikolov (Sat, 13 Jan 2018 18:19:50 GMT):
I think it's ready to be looked at by other people

e-nikolov (Sat, 13 Jan 2018 18:19:50 GMT):
I think it's ready to be looked at by people other than me

e-nikolov (Sat, 13 Jan 2018 18:21:04 GMT):
Let me know if anything should be changed

troyronda (Sat, 13 Jan 2018 18:40:03 GMT):
@e-nikolov cool will do - you still have wip in the commit message?

e-nikolov (Sat, 13 Jan 2018 18:40:16 GMT):
I can remove it

e-nikolov (Sat, 13 Jan 2018 18:40:21 GMT):
it's semi wip

e-nikolov (Sat, 13 Jan 2018 18:40:26 GMT):
maybe more tests should be added

e-nikolov (Sat, 13 Jan 2018 18:40:41 GMT):
but other than that it looks good to me personally

e-nikolov (Sat, 13 Jan 2018 18:41:58 GMT):
Should I put a more detailed description or something on what is contained in the change?

e-nikolov (Sat, 13 Jan 2018 18:41:58 GMT):
Should I put a more detailed description on what is contained in the change?

PetarAtanasov (Sat, 13 Jan 2018 19:24:44 GMT):
hello

PetarAtanasov (Sat, 13 Jan 2018 19:24:57 GMT):
is there an actual documentation for the go sdk

xuchenhao001 (Sun, 14 Jan 2018 03:12:18 GMT):
Hello, I want to query the channels on my fabric network. I do this by:```bash setup := fabapi.Options{ ConfigFile: "./blockchainPerform/fabricSDK/config.yaml", } sdk, err := fabapi.NewSDK(setup) user, err := sdk.NewPreEnrolledUser("org1", "admin") client, err := fabapi.NewClient(user, true, "", sdk.CryptoSuiteProvider(), sdk.ConfigProvider()) peer0, err := fabapi.NewPeer("grpcs://peer0.org1.example.com:7051", "tlsca.org1.example.com-cert.pem", "peer0.org1.example.com", sdk.ConfigProvider()) channels, err := client.QueryChannels(peer0) log.Print(channels) ``` But there is an error. How to do so?

xuchenhao001 (Sun, 14 Jan 2018 03:12:18 GMT):
Hello, I want to query the channels on my fabric network. I do this by:``` setup := fabapi.Options{ ConfigFile: "./blockchainPerform/fabricSDK/config.yaml", } sdk, err := fabapi.NewSDK(setup) user, err := sdk.NewPreEnrolledUser("org1", "admin") client, err := fabapi.NewClient(user, true, "", sdk.CryptoSuiteProvider(), sdk.ConfigProvider()) peer0, err := fabapi.NewPeer("grpcs://peer0.org1.example.com:7051", "tlsca.org1.example.com-cert.pem", "peer0.org1.example.com", sdk.ConfigProvider()) channels, err := client.QueryChannels(peer0) log.Print(channels) ``` But there is an error. How to do so?

xuchenhao001 (Sun, 14 Jan 2018 03:13:08 GMT):
Error detail is ```bash panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x92e0f3] ```

xuchenhao001 (Sun, 14 Jan 2018 03:13:08 GMT):
Error detail is ``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x92e0f3] ```

troyronda (Sun, 14 Jan 2018 13:17:20 GMT):
@xuchenhao001 did you check the err responses?

troyronda (Sun, 14 Jan 2018 13:17:54 GMT):
@e-nikolov probably a good idea to add some description to the commit message

xuchenhao001 (Sun, 14 Jan 2018 13:32:58 GMT):
In fact I didn't know what happened from error responses:```goroutine 24 [running]: github.com/xuchenhao001/Hyperlook/vendor/github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/peer.(*Peer).ProcessTransactionProposal(0x0, 0xc4202bb680, 0x40, 0xc4203e79a0, 0x18, 0x18, 0xc4201dfe90, 0xc4201eae60, 0x0, 0x0, ...) /home/linc/go/src/github.com/xuchenhao001/Hyperlook/vendor/github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/peer/peer.go:143 +0x93 github.com/xuchenhao001/Hyperlook/vendor/github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/internal/txnproc.SendTransactionProposalToProcessors.func1(0xc42026e410, 0xc420059300, 0xc42026e408, 0xc420158e20, 0x7f3972dd2090, 0x0) /home/linc/go/src/github.com/xuchenhao001/Hyperlook/vendor/github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/internal/txnproc/txnproc.go:41 +0xd3 created by github.com/xuchenhao001/Hyperlook/vendor/github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/internal/txnproc.SendTransactionProposalToProcessors /home/linc/go/src/github.com/xuchenhao001/Hyperlook/vendor/github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/internal/txnproc/txnproc.go:38 +0x135 ```

xuchenhao001 (Sun, 14 Jan 2018 13:36:02 GMT):
Could you give me an example about how to list channels or communicate with fabric network with `fabric-sdk-go`? Thanks!

xuchenhao001 (Sun, 14 Jan 2018 13:37:07 GMT):
I have read about the example of https://github.com/chainHero/heroes-service, but it's `fabric-sdk-go` is too old for now

xuchenhao001 (Sun, 14 Jan 2018 13:39:09 GMT):
Just several lines about how to use `client`, `peer` or `sdk` is ok, thank you!

xuchenhao001 (Sun, 14 Jan 2018 13:46:52 GMT):
Maybe after a deep comprehension on `fabric-sdk-go`, I could contribute some docs about how to use this sdk:smiley:

troyronda (Sun, 14 Jan 2018 13:48:04 GMT):
@xuchenhao001 were the e2e examples helpful?

troyronda (Sun, 14 Jan 2018 13:48:08 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go

troyronda (Sun, 14 Jan 2018 13:49:29 GMT):
btw - we have been refactoring NewSDK to hopefully be more flexible and understandable

troyronda (Sun, 14 Jan 2018 13:49:29 GMT):
by the way - we have been refactoring NewSDK to hopefully be more flexible and understandable

troyronda (Sun, 14 Jan 2018 13:49:45 GMT):
the e2e test will be updated to https://gerrit.hyperledger.org/r/c/16805/1/test/integration/e2e/end_to_end.go shortly

troyronda (Sun, 14 Jan 2018 13:50:20 GMT):
@xuchenhao001 did you check err at each step? e.g., config might not be loading

PetarAtanasov (Sun, 14 Jan 2018 13:52:22 GMT):
does the sdk have documentation?

PetarAtanasov (Sun, 14 Jan 2018 13:52:36 GMT):
ive failed to find one

troyronda (Sun, 14 Jan 2018 13:53:24 GMT):
@PetarAtanasov not good documentation currently - mostly examples and the code comments

PetarAtanasov (Sun, 14 Jan 2018 13:53:32 GMT):
LOL

troyronda (Sun, 14 Jan 2018 13:53:36 GMT):
definitly an area that needs help

troyronda (Sun, 14 Jan 2018 13:53:36 GMT):
definitely an area that needs help

xuchenhao001 (Sun, 14 Jan 2018 13:53:38 GMT):
okay, I have looked through these test files many times, and maybe I need more time to get comprehension. Thanks!

PetarAtanasov (Sun, 14 Jan 2018 13:53:49 GMT):
thats not bad documentation

PetarAtanasov (Sun, 14 Jan 2018 13:53:54 GMT):
thats no documentation at all

PetarAtanasov (Sun, 14 Jan 2018 13:54:24 GMT):
since they have the V1 release

troyronda (Sun, 14 Jan 2018 13:54:26 GMT):
A better set of GoDocs from the code would be helpful

PetarAtanasov (Sun, 14 Jan 2018 13:54:28 GMT):
they should have worked on that

troyronda (Sun, 14 Jan 2018 13:54:34 GMT):
this SDK isn't at v1 release

PetarAtanasov (Sun, 14 Jan 2018 13:54:42 GMT):
i mean hyperledger

troyronda (Sun, 14 Jan 2018 13:54:54 GMT):
Ah - they have docs

troyronda (Sun, 14 Jan 2018 13:54:54 GMT):
Ah Hyperledger Fabric has docs

PetarAtanasov (Sun, 14 Jan 2018 13:55:12 GMT):
yes it does, barely

PetarAtanasov (Sun, 14 Jan 2018 13:55:17 GMT):
but the go sdk does not

troyronda (Sun, 14 Jan 2018 13:55:26 GMT):
Yes - the Go SDK is behind on this

PetarAtanasov (Sun, 14 Jan 2018 13:55:41 GMT):
the fabric docs are very bad as well

PetarAtanasov (Sun, 14 Jan 2018 13:55:58 GMT):
its very difficult to get into this project without docs

PetarAtanasov (Sun, 14 Jan 2018 13:56:16 GMT):
as a fulltime working dev, i don't have whole day every day to debug

troyronda (Sun, 14 Jan 2018 13:58:52 GMT):
Yes, for sure the docs situation for this SDK needs some love.

xuchenhao001 (Sun, 14 Jan 2018 13:59:30 GMT):
Maybe it need us to help! hahaha

troyronda (Sun, 14 Jan 2018 13:59:50 GMT):
We have been working hard on stabilizing the functionality as we depend on the SDK in our apps

troyronda (Sun, 14 Jan 2018 13:59:50 GMT):
We have been working hard on stabilizing the functionality in this SDK as we depend on the SDK in our apps

troyronda (Sun, 14 Jan 2018 14:00:19 GMT):
(but we are not the fabric devs)

troyronda (Sun, 14 Jan 2018 14:00:19 GMT):
(but we are not the fabric project maintainers)

troyronda (Sun, 14 Jan 2018 14:00:19 GMT):
(but the core group of devs on this SDK are not the fabric project maintainers)

troyronda (Sun, 14 Jan 2018 14:00:19 GMT):
(but the core group of devs on this SDK are not the fabric project maintainers - just the SDK)

troyronda (Sun, 14 Jan 2018 14:00:19 GMT):
(but the core group of devs on this SDK are not the fabric project maintainers - just the Go SDK)

PetarAtanasov (Sun, 14 Jan 2018 14:00:37 GMT):
at my job i write completely different area of apps, i am personally interested in blockchain technology

xuchenhao001 (Sun, 14 Jan 2018 14:01:19 GMT):
@PetarAtanasov Yes, you can learn this project through other ways, not only from docs. Youtube for example

PetarAtanasov (Sun, 14 Jan 2018 14:01:45 GMT):
Better to read the source code than from youtube

PetarAtanasov (Sun, 14 Jan 2018 14:02:02 GMT):
videos and other materials are generally lacking behind the versions

PetarAtanasov (Sun, 14 Jan 2018 14:02:11 GMT):
tutorials aren't updated

PetarAtanasov (Sun, 14 Jan 2018 14:02:23 GMT):
therefore are misleading

xuchenhao001 (Sun, 14 Jan 2018 14:02:36 GMT):
@troyronda I believe it is a hard work to follow Fabric's dev

xuchenhao001 (Sun, 14 Jan 2018 14:03:41 GMT):
since it has a so big change between v0.6 and v1.0

xuchenhao001 (Sun, 14 Jan 2018 14:03:41 GMT):
since it has so big a change between v0.6 and v1.0

troyronda (Sun, 14 Jan 2018 14:04:02 GMT):
@xuchenhao001 we totally welcome help

troyronda (Sun, 14 Jan 2018 14:04:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7ibNeFqYpJC3TXhA3) @xuchenhao001 yes we totally welcome help :)

xuchenhao001 (Sun, 14 Jan 2018 14:04:48 GMT):
@troyronda I'll do my best :grin:

xuchenhao001 (Sun, 14 Jan 2018 14:05:33 GMT):
@PetarAtanasov just follow those `v1.0` `Hyperledger Fabric` materials is ok

troyronda (Sun, 14 Jan 2018 14:05:34 GMT):
@PetarAtanasov the test fixtures in the Go SDK may help you - we had to build an environment suitable for testing... you can see what we did

xuchenhao001 (Sun, 14 Jan 2018 14:06:31 GMT):
@PetarAtanasov If you want to get start, maybe from `fabric-sdk-node` is a good choice.

PetarAtanasov (Sun, 14 Jan 2018 14:06:46 GMT):
i hate javascript

xuchenhao001 (Sun, 14 Jan 2018 14:06:56 GMT):
:sweat_smile:

xuchenhao001 (Sun, 14 Jan 2018 14:07:17 GMT):
Then maybe Java

troyronda (Sun, 14 Jan 2018 14:07:34 GMT):
The entry package in the sdk is pkg/fabsdk

PetarAtanasov (Sun, 14 Jan 2018 14:07:47 GMT):
i would rather hook my nuts to a car battery than write javascript

troyronda (Sun, 14 Jan 2018 14:08:05 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk

troyronda (Sun, 14 Jan 2018 14:10:49 GMT):
sdk, err := fabsdk.New(fabsdk.ConfigFile(setup.ConfigFile), defpkgsuite.SDKOpt())

troyronda (Sun, 14 Jan 2018 14:11:54 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go/def/pkgsuite/defpkgsuite

troyronda (Sun, 14 Jan 2018 15:30:00 GMT):
@e-nikolov added opt checking in https://gerrit.hyperledger.org/r/c/16827/

praveentalari (Mon, 15 Jan 2018 12:31:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=MMcuHseNzkkdrFHTb) @troyronda in entire http://hyperledger-fabric.readthedocs.io/ there is no mention of /etc/hosts .

troyronda (Mon, 15 Jan 2018 12:32:05 GMT):
@praveentalari the hosts in the go SDK readme

praveentalari (Mon, 15 Jan 2018 12:45:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Kfguid8j92YsZegPY) @troyronda adding the following line 127.0.0.1 localhost ca.org1.example.com ca.org2.example.com peer0.org1.example.com peer1.org1.example.com peer0.org2.example.com peer1.org2.example.com orderer.example.com in /etc/hosts solved my error. Now I could able to run the tests manually. Thank you very much. Do I need to add hosts in /etc/hosts file every time there is new node?

troyronda (Mon, 15 Jan 2018 12:46:55 GMT):
Only for test nodes running on your own computer

praveentalari (Mon, 15 Jan 2018 12:51:14 GMT):
Ok. is there any article or sample explaining how to get explicit approval from a remote peer manually by clicking a UI button or something before adding the transaction to chain ? I want to write an Android/iOS client app which will push notification to admin who will approve a transaction to be added on chain by clicking some button. isn't it is the main purpose of grpc ?

troyronda (Mon, 15 Jan 2018 16:49:54 GMT):
I haven't seen that sample/article.

e-nikolov (Mon, 15 Jan 2018 23:05:15 GMT):
pushed

ga25waq (Tue, 16 Jan 2018 22:25:59 GMT):
Has joined the channel.

ga25waq (Tue, 16 Jan 2018 22:27:13 GMT):
Hi, I've got a short question: What's the most convenient way to find out if a channel has already been created in the network (with a SaveChannelRequest)? Are there any examples how to achieve that?

ga25waq (Tue, 16 Jan 2018 22:27:22 GMT):
Thanks for helping!

StevenXu (Wed, 17 Jan 2018 10:26:24 GMT):
Has joined the channel.

habpygo (Wed, 17 Jan 2018 14:55:43 GMT):
Hey @ga25waq not sure if I follow you correctly, but have a look at https://github.com/securekey/fabric-examples/tree/master/fabric-cli where you will find many Query commands that you run from the CLI. Perhaps you could also use `$ go run fabric-cli.go event listenblock --format json` that listens for events and spits out the results if something happens.

zcy603 (Wed, 17 Jan 2018 15:29:59 GMT):
Has joined the channel.

Chalex (Thu, 18 Jan 2018 08:48:37 GMT):
Hi. Do I have to compile the `fabric-sdk-go` or do something else when I just want to write codes to interact with the fabric network? Or I can just put it into the `vendor` directories just like other dependency projects?

mastersingh24 (Thu, 18 Jan 2018 13:25:08 GMT):
@Chalex - It's like any other package - either in your GOPATH or vendor it

Chalex (Fri, 19 Jan 2018 02:37:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TqpsdzPspxQNiKABy) @mastersingh24 Thank you. I solved my problem.

awantoch (Sat, 20 Jan 2018 17:38:36 GMT):
Has joined the channel.

yingmsky (Mon, 22 Jan 2018 09:28:44 GMT):
User User_1 added by yingmsky.

DmitryNovenkykh (Mon, 22 Jan 2018 14:45:27 GMT):
Has joined the channel.

ranjan008 (Tue, 23 Jan 2018 08:59:12 GMT):
I am trying to send a transaction to the chaincode which contains somewhat larger payload that gives me the below error everytime however the chaincode method is getting executed.

ranjan008 (Tue, 23 Jan 2018 08:59:18 GMT):
CreateAndSendTransactionProposal failed: SendTransactionProposal failed: Transaction processor (0.0.0.0:57051) returned error 'rpc error: code = Unavailable desc = transport is closing' for txID '6847e35c8e9805a0a55b92d98fb0e8f39df845b1b101befb106e1b5bb65aa20d'

jack (Tue, 23 Jan 2018 09:46:38 GMT):
Has joined the channel.

troyronda (Tue, 23 Jan 2018 14:31:43 GMT):
@ranjan008 have you checked the peer logs?

MaritereNieto (Tue, 23 Jan 2018 15:47:19 GMT):
Has joined the channel.

nchangfong (Tue, 23 Jan 2018 18:16:52 GMT):
is the use of the `testing` package in the non-test, `pkg/fabric-client/events/eventmocks.go` necessary? I'm working on a CLI app and the inherited dependency causes some issues with the flags.

troyronda (Tue, 23 Jan 2018 18:23:50 GMT):
@nchangfong let me look

troyronda (Tue, 23 Jan 2018 18:25:08 GMT):
no that should be fixed

troyronda (Tue, 23 Jan 2018 18:26:15 GMT):
created https://jira.hyperledger.org/secure/RapidBoard.jspa?rapidView=127&view=planning&selectedIssue=FAB-7869

troyronda (Tue, 23 Jan 2018 18:26:15 GMT):
created https://jira.hyperledger.org/browse/FAB-7869

nchangfong (Tue, 23 Jan 2018 18:29:22 GMT):
@troyronda thanks for looking into it and creating the issue!

troyronda (Tue, 23 Jan 2018 18:29:31 GMT):
i'm working on the fix

troyronda (Tue, 23 Jan 2018 18:29:33 GMT):
:)

troyronda (Tue, 23 Jan 2018 18:33:56 GMT):
@nchangfong https://gerrit.hyperledger.org/r/c/17109/

troyronda (Tue, 23 Jan 2018 19:17:42 GMT):
@nchangfong merged into master

nchangfong (Tue, 23 Jan 2018 19:18:00 GMT):
@troyronda thanks so much!

troyronda (Tue, 23 Jan 2018 19:18:18 GMT):
you're welcome.

troyronda (Tue, 23 Jan 2018 19:18:25 GMT):
btw have you been using the new fabsdk interfaces?

nchangfong (Tue, 23 Jan 2018 19:51:45 GMT):
not yet, actually just noticed them. seems like a decent amount of changes—going to be refactoring onto the latest version of `fabric-sdk-go` over the next couple days

troyronda (Tue, 23 Jan 2018 19:53:49 GMT):
ok cool - we are trying to settle the interfaces so feedback welcome

troyronda (Tue, 23 Jan 2018 19:54:43 GMT):
we are also refactoring apps onto this new interface right now

troyronda (Tue, 23 Jan 2018 19:54:43 GMT):
we are also refactoring our apps onto this new interface right now

troyronda (Tue, 23 Jan 2018 19:55:58 GMT):
getting to something stable but flexible is important

troyronda (Tue, 23 Jan 2018 19:56:01 GMT):
so that's the goal

troyronda (Tue, 23 Jan 2018 19:56:01 GMT):
so that's the goal (and getting pretty close I think)

nchangfong (Tue, 23 Jan 2018 19:56:48 GMT):
sounds good. will keep those things in mind and will be providing feedback on our experiences during the refactor

troyronda (Tue, 23 Jan 2018 19:56:56 GMT):
awesome thanks a lot!

nchangfong (Tue, 23 Jan 2018 19:57:41 GMT):
no problem and thanks again for your help

jack (Wed, 24 Jan 2018 01:25:47 GMT):
hi all,sdk import to product. govendor fetch github.com/hyperledger/fabric-sdk-go itis ok?

ranjan008 (Wed, 24 Jan 2018 04:55:47 GMT):
@troyronda yeah have checked the peer logs there is no error log in the peer

Chalex (Wed, 24 Jan 2018 06:40:56 GMT):
Hi. How to use the `fabric-sdk-go` to query local statedb?

mumubin (Wed, 24 Jan 2018 08:36:18 GMT):
Has joined the channel.

dockeryounger (Wed, 24 Jan 2018 10:06:10 GMT):
Hi team, I run fabric-cli, but it can not find the corresponding MSP ID when I specified --orgid parameter. For example:

dockeryounger (Wed, 24 Jan 2018 10:09:20 GMT):
Hi team, I am running fabric-cli, but it can not find the corresponding MSP ID when I specified --orgid parameter. For example: [lab@localhost fabric-cli]$ go run fabric-cli.go query channels --peer grpc://peer0.orgtest.com:7051 --user username --pw password --orgid orgtest [fabriccli] 2018/01/24 09:29:20 UTC - query.glob..func2 -> ERRO Error while initializing queryChannelsAction: Error getting MSP ID for org [orgtest]: MSP ID is empty for org: orgtest Need your help, thanks!

MaritereNieto (Wed, 24 Jan 2018 11:32:35 GMT):
Hi everyone, I am trying to connect the e2e.go example from the fabric-sdk-go repository but there are some certs that i can not figure out how the have been generated. ``` tlsCACerts: # Comma-Separated list of paths path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/ca_root.pem # Client key and cert for SSL handshake with Fabric CA client: keyfile: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/client/client_fabric_client-key.pem certfile: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/client/client_fabric_client.pem ``` How I can generate this certs with the configuration of my own network? Is there any tutorial about it?

MaritereNieto (Wed, 24 Jan 2018 11:32:35 GMT):
Hi everyone, I am trying to connect the e2e.go example from the fabric-sdk-go repository to my own HF-netowork but there are some certs that i can not figure out how the have been generated. ``` tlsCACerts: # Comma-Separated list of paths path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/ca_root.pem # Client key and cert for SSL handshake with Fabric CA client: keyfile: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/client/client_fabric_client-key.pem certfile: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/client/client_fabric_client.pem ``` How I can generate this certs with the configuration of my own network? Is there any tutorial about it?

MaritereNieto (Wed, 24 Jan 2018 11:32:35 GMT):
Hi everyone, I am trying to connect the e2e.go example from the fabric-sdk-go repository to my own HF-network but there are some certs that i can not figure out how the have been generated. ``` tlsCACerts: # Comma-Separated list of paths path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/ca_root.pem # Client key and cert for SSL handshake with Fabric CA client: keyfile: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/client/client_fabric_client-key.pem certfile: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/client/client_fabric_client.pem ``` How I can generate this certs with the configuration of my own network? Is there any tutorial about it?

MaritereNieto (Wed, 24 Jan 2018 11:32:35 GMT):
Hi everyone, I am trying to connect the e2e.go example from the fabric-sdk-go repository to my own HF-network but there are some certs that i can not figure out how they have been generated. ``` tlsCACerts: # Comma-Separated list of paths path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/ca_root.pem # Client key and cert for SSL handshake with Fabric CA client: keyfile: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/client/client_fabric_client-key.pem certfile: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/client/client_fabric_client.pem ``` How I can generate this certs with the configuration of my own network? Is there any tutorial about it?

troyronda (Wed, 24 Jan 2018 12:53:10 GMT):
hi @MaritereNieto these are standard certs for TLS - you can generate them using a CA

troyronda (Wed, 24 Jan 2018 12:53:10 GMT):
hi @MaritereNieto these are standard certs for TLS - you can generate them using a CA or openssl

troyronda (Wed, 24 Jan 2018 12:53:10 GMT):
hi @MaritereNieto these are standard certs and keys for TLS - you can generate them using a CA or openssl

troyronda (Wed, 24 Jan 2018 12:54:18 GMT):
you can google for openssl tutorials on the topic

troyronda (Wed, 24 Jan 2018 12:57:31 GMT):
For some basic ideas, you can search for example: generating mutual TLS openssl self-signed

troyronda (Wed, 24 Jan 2018 13:00:18 GMT):
@Chalex the go sdk doesn't currently leverage a DB

troyronda (Wed, 24 Jan 2018 13:00:48 GMT):
@dockeryounger have you specified an MSP ID for orgtest?

troyronda (Wed, 24 Jan 2018 13:00:48 GMT):
@dockeryounger have you specified an MSP ID for orgtest in your configuration?

MaritereNieto (Wed, 24 Jan 2018 13:01:59 GMT):
@troyronda thanks for aswering! if i can generate this certs with openssl they are independent from the network, right?

troyronda (Wed, 24 Jan 2018 13:02:18 GMT):
@MaritereNieto correct - you need to configure the network to use those certs though

troyronda (Wed, 24 Jan 2018 13:02:18 GMT):
@MaritereNieto the certs are not fabric-specific - you need to configure the network to use those certs though

troyronda (Wed, 24 Jan 2018 13:02:18 GMT):
@MaritereNieto the certs are not fabric-specific, but you need to configure the network to use those certs and CA though

troyronda (Wed, 24 Jan 2018 13:02:18 GMT):
@MaritereNieto the certs are not fabric-specific, but you need to configure the network to use those certs and CA

troyronda (Wed, 24 Jan 2018 13:02:18 GMT):
@MaritereNieto the certs are not fabric-specific, but you need to configure the network to use those certs and CA for TLS

troyronda (Wed, 24 Jan 2018 13:02:18 GMT):
@MaritereNieto the certs are not fabric-specific, but you need to configure the network (particularly peers, orderer) to use those certs and CA for TLS

troyronda (Wed, 24 Jan 2018 13:02:18 GMT):
@MaritereNieto the certs are not fabric-specific (standard PEM formatted PKI certs), but you need to configure the network (particularly peers, orderer) to use those certs and CA for TLS

troyronda (Wed, 24 Jan 2018 13:02:18 GMT):
@MaritereNieto the certs are not fabric-specific (standard PEM formatted x509 certs), but you need to configure the network (particularly peers, orderer) to use those certs and CA for TLS

troyronda (Wed, 24 Jan 2018 13:02:18 GMT):
@MaritereNieto the certs are not fabric-specific (standard PEM formatted x509 certs), but you need to configure the network (particularly peers, orderer) plus the clients to use those certs and CA for TLS

troyronda (Wed, 24 Jan 2018 13:02:18 GMT):
@MaritereNieto the certs are not fabric-specific (they are standard PEM formatted x509 certs), but you need to configure the network (particularly peers, orderer) plus the clients to use those certs and CA for TLS

troyronda (Wed, 24 Jan 2018 13:08:51 GMT):
@ranjan008 I assume your configured timeouts are long enough?

ahmedsajid (Wed, 24 Jan 2018 14:18:02 GMT):
Has joined the channel.

MaritereNieto (Wed, 24 Jan 2018 14:39:23 GMT):
@troyronda I have configured the following network https://github.com/mtnieto/hf-2orgs but the certs clients don't have been created. Should I use the fabric-ca cli to generate it? Thanks!

troyronda (Wed, 24 Jan 2018 14:57:36 GMT):
@MaritereNieto yes you should enroll the users/identities that you need to use

troyronda (Wed, 24 Jan 2018 14:59:34 GMT):
we have an item in the SDK backlog to have an SDK API that enrolls users/identities and produce PEMs. right now that SDK functionality is very old - stores enrolled users into a JSON file-based state store.

troyronda (Wed, 24 Jan 2018 14:59:34 GMT):
we have an item in the Go SDK backlog to have an SDK API that enrolls users/identities and produce PEMs. right now that SDK functionality is very old - stores enrolled users into a JSON file-based state store.

dockeryounger (Thu, 25 Jan 2018 02:01:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=buarhiFt6vi45A9Ny) @troyronda Many thanks for your help, "orgtest" is the Organization's MSP ID.

Chalex (Thu, 25 Jan 2018 02:16:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Mk99zoMPtSGkg4BiG) @troyronda Thank you. But is there any way to query local stateDB? Because I want to inspect the asset created by other chaincodes and I don't have other chaincodes installed on this peer.

aneb (Thu, 25 Jan 2018 04:37:34 GMT):
Has joined the channel.

antitoine (Thu, 25 Jan 2018 15:00:21 GMT):
Hi, I updated the SDK to the latest version of the master branch. Now I wonder how I get the channel to make a request on the blocks? I followed the initialization of the SDK as in the End to End test. Do I have to do the whole process in the basic test to get the channel?

MaritereNieto (Thu, 25 Jan 2018 15:10:44 GMT):
@troyronda After I have generated the certs I have tried to create a NewClient ( sdk, err := fabsdk.New(config.FromFile("config.yaml"))) But I have the following error: ``` DEBU Reading pk from config, unable to retrieve from cert: Could not find matching key for SKI: Failed getting key for SKI ``` Why?

MaritereNieto (Thu, 25 Jan 2018 15:10:44 GMT):
@troyronda After I have generated the certs I have tried to create a NewClient ( sdk, err := fabsdk.New(config.FromFile("config.yaml"))) But I have the following error: ``` DEBU Reading pk from config, unable to retrieve from cert: Could not find matching key for SKI: Failed getting key for SKI ``` Why? Thank you very much!

troyronda (Thu, 25 Jan 2018 15:19:56 GMT):
@antitoine I'm currently doing the refactoring to clean this up.

troyronda (Thu, 25 Jan 2018 15:21:47 GMT):
(I assume you are trying to get access to the Channel object?)

antitoine (Thu, 25 Jan 2018 15:22:13 GMT):
@troyronda Yes exactly

troyronda (Thu, 25 Jan 2018 15:22:25 GMT):
(and not something provided by chclient, chmgmtclient, resmgmtclient)

troyronda (Thu, 25 Jan 2018 15:23:06 GMT):
yeh - the refactoring was on the higher level txn API first, with a temporary backdoor access to Channel as shown in the examples

troyronda (Thu, 25 Jan 2018 15:23:06 GMT):
yeh - the refactoring was on the higher level txn API first, with a temporary backdoor access to Channel and Resource as shown in the examples

troyronda (Thu, 25 Jan 2018 15:23:23 GMT):
now its on to dealing with Channel and Resource

troyronda (Thu, 25 Jan 2018 15:23:23 GMT):
now its on to dealing with Channel and Resource more cleanly

troyronda (Thu, 25 Jan 2018 15:24:30 GMT):
@MaritereNieto that error means that the SDK couldn't determine the private key to use for a configured certificate.

troyronda (Thu, 25 Jan 2018 15:24:30 GMT):
@MaritereNieto that error means that the SDK couldn't determine the private key to use for a configured certificate. The steps are try loading from cryptosuite first (e.g., PKCS11) and then use key from configuration if not found.

troyronda (Thu, 25 Jan 2018 15:24:30 GMT):
@MaritereNieto that error means that the SDK couldn't determine the private key to use for a configured certificate. The steps are try loading from cryptosuite first (e.g., PKCS11) and then use key from configuration if not found. The SKI is the identifier calculated from the certificate bytes that are used to lookup in the cryptosuite.

troyronda (Thu, 25 Jan 2018 15:24:30 GMT):
@MaritereNieto that error means that the SDK couldn't determine the private key to use for a configured certificate. The steps are try loading from cryptosuite first (e.g., PKCS11) and then use key from configuration if not found. The SKI is the identifier calculated from the certificate bytes that are used to lookup the key in the cryptosuite.

troyronda (Thu, 25 Jan 2018 15:24:30 GMT):
@MaritereNieto that debug message means that the SDK couldn't find a private key to use for a configured certificate in the cryptosuite. The steps are try loading from cryptosuite first (e.g., PKCS11) and then use key from configuration if not found. The SKI is the identifier calculated from the certificate bytes that are used to lookup the key in the cryptosuite.

troyronda (Thu, 25 Jan 2018 15:24:45 GMT):
are you using software or PKCS11 cryptosuite

troyronda (Thu, 25 Jan 2018 15:24:45 GMT):
are you using software or PKCS11 cryptosuite - i assume SW so you can ignore this debug message.

troyronda (Thu, 25 Jan 2018 15:25:37 GMT):
@antitoine btw - we are trying to stabilize the APIs if you have any comments/feedback.

antitoine (Thu, 25 Jan 2018 15:28:13 GMT):
@troyronda Ok Thanks ! The new API is much easier to use and more understandable, from my point of view. Perhaps a little more comment on the signatures of the methods to better understand would be ideal. If I have any suggestions, I will not hesitate to tell you.

troyronda (Thu, 25 Jan 2018 15:29:18 GMT):
awesome thanks. Yes more commentary on the signatures is on the list of TODOs.

troyronda (Thu, 25 Jan 2018 15:41:29 GMT):
@MaritereNieto I assume you are simply configuring keys and not using PKCS11. As such, you can ignore this debug message.

DusanKovacevic (Thu, 25 Jan 2018 19:41:46 GMT):
Has joined the channel.

tkuhrt (Fri, 26 Jan 2018 06:08:23 GMT):
Has joined the channel.

tkuhrt (Fri, 26 Jan 2018 06:09:01 GMT):
Hello, Fabric SDK Go community. We are wondering when the SDK for Golang will be released

benjamin.matten (Fri, 26 Jan 2018 12:45:45 GMT):
Has joined the channel.

wpr (Fri, 26 Jan 2018 12:51:14 GMT):
Hello, does anybody know how to restrict specific participants from invoking certain transactions?

troyronda (Fri, 26 Jan 2018 13:11:27 GMT):
@tkuhrt we are working hard towards the goal of the next tag in the next few weeks.

troyronda (Fri, 26 Jan 2018 13:13:09 GMT):
the two big items are updating the API consistency and improving verification / resilience / retry

tkuhrt (Fri, 26 Jan 2018 13:13:35 GMT):
@troyronda : thank you. So the next tag will handle those two items?

troyronda (Fri, 26 Jan 2018 13:14:09 GMT):
yes but it's likely more important to get a tag out even if not completely done

tkuhrt (Fri, 26 Jan 2018 13:14:25 GMT):
so what do tags represent?

troyronda (Fri, 26 Jan 2018 13:16:35 GMT):
the next tag should represent a useable version that is close to the desired v1 API

troyronda (Fri, 26 Jan 2018 13:16:35 GMT):
the next tag should represent a useable version that is close to the desired SDK v1 API

troyronda (Fri, 26 Jan 2018 13:25:11 GMT):
(And from there see if there is feedback to get to stabilization)

tkuhrt (Sat, 27 Jan 2018 03:28:24 GMT):
Thanks for the answer, @troyronda Very helpful

Amjadnz (Sat, 27 Jan 2018 07:14:32 GMT):
Can some one answer a question Chaincode allows for rich queries if I use a storage option of CouchDB. What if some of my peers have couchdb and other use a world-state default for their own peer (non CouchDB). Obviously the rich queries are bound to fail or give inconsistent result. So how can we ensure that all give conisistent results?

ranjan008 (Sat, 27 Jan 2018 11:46:19 GMT):
@troyronda I have not changed the timeouts configuration anywhere I am using the default setting provided.

ranjan008 (Sat, 27 Jan 2018 11:47:09 GMT):
Anyway if the timeout options might me long can you specify where exactly that configuration can be?

tkuhrt (Sat, 27 Jan 2018 12:08:16 GMT):
@Amjadnz : I do not think you can configure your network to use both CouchDB and LevelDB

ga25waq (Sat, 27 Jan 2018 13:03:25 GMT):
Hi, I've got a question regarding the channel management client: I've written a bootstrapper that creates a channel (by sending a SaveChannelRequest to the orderer), joins peers to that channel, installs & instantiates chaincode etc. I want to make my bootstrapper idempotent, i.e. when it is executed on a network that has already been bootstrapped, the bootstrapper should not fail und just do nothing. I've managed to make the join channel / installl & instantiate chaincode parts idempotent, but I haven't found a way to make the channel creation via the orderer idempotent. When I send the same SaveChannelRequest (with the same channel configuration transaction) to the orderer, the SDK just return an generic error (without specifying the error's cause exactly). In the orderer logs, there is an entry that says that the request failed as the channel already exists. But I don't get that information via the SDK. How can I find out before sending the SaveChannelRequest that the channel has already been created? Is the only possibility to query a peer for a list of channels it has joined?

divyank (Sat, 27 Jan 2018 15:25:27 GMT):
Hi @ga25waq, we ran into the same issue in our tests. Unfortunately, the orderer returns a generic 'BAD_REQUEST' status code for duplicate SaveChannel requests. As you've observed, we work around this by grouping SaveChannel and JoinChannel operations together and query the peer's joined channels to achieve idempotence.

ga25waq (Sat, 27 Jan 2018 15:32:26 GMT):
Hi @divyank, thanks for your quick reply! OK, then I guess we'll have to live with that workaround for a while. Hopefully, the Fabric developers return a more specific error soon.

fengfengs (Mon, 29 Jan 2018 05:04:01 GMT):
Has joined the channel.

SenchoPens (Mon, 29 Jan 2018 18:05:39 GMT):
Has joined the channel.

jona (Tue, 30 Jan 2018 04:01:41 GMT):
Has joined the channel.

jona (Tue, 30 Jan 2018 04:05:42 GMT):
Who knows when to release the next official version of fabric-sdk-go ? Thanks.

sashico (Tue, 30 Jan 2018 14:33:32 GMT):
Has joined the channel.

Thinh 2 (Tue, 30 Jan 2018 19:09:40 GMT):
Has joined the channel.

jayg67 (Wed, 31 Jan 2018 06:39:56 GMT):
Has joined the channel.

sambhavdutt (Wed, 31 Jan 2018 15:07:21 GMT):
Has joined the channel.

aneb (Thu, 01 Feb 2018 07:58:40 GMT):
Hi all, Maybe a weird problem but has anyone had the problem before that the CA server says it can't register a new identity because it has already been registered? Obviously the problem is that ... it is already registered. However the very strange thing is that I can't for the life of me find where my CA server could be keeping these settings because I refresh/delete all before restarting my project. Delete all docker images, containers, remove the /tmp/enroll_user folder, /tmp/msp etc And still, even after doing all those things when restarting everthing, which should be a complete reset of everything, when I start all and try to register an identity through the SDK I get the following: ``` ca_peer*** | {"id":"yves@***-jp.com","type":"user","affiliation":"***.businessSolutions","attrs":[{"name":"hf.Registrar.Roles","value":"user"},{"name":"hf.Revoker","value":"true"}],"caname":"ca-indetail"} ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Directing traffic to CA ca-****** ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Checking for revocation/expiration of certificate owned by 'admin' ca_peer*** | 2018/02/01 07:13:57 [DEBUG] DB: Get certificate by serial (75338fb6c4afa7073b27897c7a5a5fb82e21ffeb) and aki (36520ca3eb355f1b44e30a4b8e4db947506be0d2efe867a2b139985cd5b7017a) ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Successful authentication of 'admin' ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Register request received ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Received registration request from admin: &{RegistrationRequest:{Name:yves@***-jp.com Type:user Secret:<> MaxEnrollments:0 Affiliation:indetail.businessSolutions Attributes:[{Name:hf.Registrar.Roles Value:user} {Name:hf.Revoker Value:true}] CAName:ca-indetail}} ca_peer*** | 2018/02/01 07:13:57 [DEBUG] canRegister - Check to see if user admin can register ca_peer*** | 2018/02/01 07:13:57 [DEBUG] DB: Getting identity admin ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Validate ID ca_peer*** | 2018/02/01 07:13:57 [DEBUG] An affiliation is required for identity type user ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Validating affiliation: ***.businessSolutions ca_peer*** | 2018/02/01 07:13:57 [DEBUG] DB: Get affiliation ***.businessSolutions ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Registering user id: yves@***-jp.com ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Max enrollment value verification - User specified max enrollment: 0, CA max enrollment: -1 ca_peer*** | 2018/02/01 07:13:57 [DEBUG] DB: Getting identity yves@***-jp.com ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Registration of 'yves@***-jp.com' failed: Identity 'yves@***-jp.com' is already registered ca_peer*** | 2018/02/01 07:13:57 [INFO] 172.19.0.1:35660 - "POST /register" 0 ``` It really feels as if I am missing something so very obvious but as far as I know deleting /tmp/msg /tmp/enroll_user, the actual CA container and in worst case the docker image should be more enough for a clean restart. Unless my setup is somehow magically using a fabric-ca-server.db that is on my host but that would be strange. Could it be docker that is caching something?

aneb (Thu, 01 Feb 2018 07:58:40 GMT):
Hi all, Maybe a weird problem but has anyone had the problem before that the CA server says it can't register a new identity because it has already been registered? Obviously the problem is that ... it is already registered. However the very strange thing is that I can't for the life of me find where my CA server could be keeping these settings because I refresh/delete all before restarting my project. Delete all docker images, containers, remove the /tmp/enroll_user folder, /tmp/msp etc And still, even after doing all those things when restarting everthing, which should be a complete reset of everything, when I start all and try to register an identity through the SDK I get the following: ``` ca_peer*** | {"id":"yves@***-jp.com","type":"user","affiliation":"***.businessSolutions","attrs":[{"name":"hf.Registrar.Roles","value":"user"},{"name":"hf.Revoker","value":"true"}],"caname":"ca-***"} ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Directing traffic to CA ca-****** ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Checking for revocation/expiration of certificate owned by 'admin' ca_peer*** | 2018/02/01 07:13:57 [DEBUG] DB: Get certificate by serial (75338fb6c4afa7073b27897c7a5a5fb82e21ffeb) and aki (36520ca3eb355f1b44e30a4b8e4db947506be0d2efe867a2b139985cd5b7017a) ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Successful authentication of 'admin' ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Register request received ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Received registration request from admin: &{RegistrationRequest:{Name:yves@***-jp.com Type:user Secret:<> MaxEnrollments:0 Affiliation:indetail.businessSolutions Attributes:[{Name:hf.Registrar.Roles Value:user} {Name:hf.Revoker Value:true}] CAName:ca-indetail}} ca_peer*** | 2018/02/01 07:13:57 [DEBUG] canRegister - Check to see if user admin can register ca_peer*** | 2018/02/01 07:13:57 [DEBUG] DB: Getting identity admin ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Validate ID ca_peer*** | 2018/02/01 07:13:57 [DEBUG] An affiliation is required for identity type user ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Validating affiliation: ***.businessSolutions ca_peer*** | 2018/02/01 07:13:57 [DEBUG] DB: Get affiliation ***.businessSolutions ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Registering user id: yves@***-jp.com ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Max enrollment value verification - User specified max enrollment: 0, CA max enrollment: -1 ca_peer*** | 2018/02/01 07:13:57 [DEBUG] DB: Getting identity yves@***-jp.com ca_peer*** | 2018/02/01 07:13:57 [DEBUG] Registration of 'yves@***-jp.com' failed: Identity 'yves@***-jp.com' is already registered ca_peer*** | 2018/02/01 07:13:57 [INFO] 172.19.0.1:35660 - "POST /register" 0 ``` It really feels as if I am missing something so very obvious but as far as I know deleting /tmp/msg /tmp/enroll_user, the actual CA container and in worst case the docker image should be more enough for a clean restart. Unless my setup is somehow magically using a fabric-ca-server.db that is on my host but that would be strange. Could it be docker that is caching something?

Sahas 2 (Thu, 01 Feb 2018 08:16:36 GMT):
Has joined the channel.

iamdm (Thu, 01 Feb 2018 10:37:14 GMT):
Hi all, does fabric sdk include some tooling for creating ссpackages like `peer chaincode package`?

iamdm (Thu, 01 Feb 2018 11:15:05 GMT):
As i understand, package from sdk `github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/ccpackager/gopackager` doesnt't create package with binary as `peer`? What's purpose of this package?

SreekarSudireddy (Fri, 02 Feb 2018 05:44:14 GMT):
Has joined the channel.

aleksandar.likic (Fri, 02 Feb 2018 10:10:53 GMT):
@iamdm gopackager creates an in-memory package from a CC source code, required for creating InstallChaincodeRequest, for installing the CC. See InstallCC() in test/integration/base_test_setup.go. Only GOLANG CCs are currently supported.

iamdm (Fri, 02 Feb 2018 10:12:09 GMT):
@aleksandar.likic can i distribute ccpackage output to another peers for installing chaincode on them?

aleksandar.likic (Fri, 02 Feb 2018 10:13:58 GMT):
This is what the SDK does when Client.InstallChaincode(..) is called.

aleksandar.likic (Fri, 02 Feb 2018 10:16:42 GMT):
... passing the package to the peer in a grpc call, not as a file, if that's your question.

aleksandar.likic (Fri, 02 Feb 2018 10:19:21 GMT):
You can check https://github.com/securekey/fabric-examples/tree/master/fabric-cli, it supports chaincode install/deploy.

aleksandar.likic (Fri, 02 Feb 2018 10:19:21 GMT):
You can check https://github.com/securekey/fabric-examples/tree/master/fabric-cli, it supports chaincode install/instantiate.

ArvsIndrarys (Fri, 02 Feb 2018 15:39:55 GMT):
Hi all, I am wondering if the data sent from the client to the peers are encrypted? I see that in the config file we need to use a user's private key but I think my peers don't have the associated public key... Does the client send it too? How does it work?

troyronda (Fri, 02 Feb 2018 18:34:31 GMT):
@aneb I'd imagine you would need to ask in the #fabric-ca channel

troyronda (Fri, 02 Feb 2018 18:35:34 GMT):
@ArvsIndrarys you can enable TLS for communication-level encryption.

troyronda (Fri, 02 Feb 2018 18:35:54 GMT):
@jona we are working towards the next tag this month

Sriyansh (Fri, 02 Feb 2018 19:38:05 GMT):
Has joined the channel.

PetarAtanasov (Sat, 03 Feb 2018 22:29:17 GMT):
will there ever be adequate documentation on the go SDK

PetarAtanasov (Sat, 03 Feb 2018 22:30:17 GMT):
or they think like Linus Torvalds, if you need documentation means you don't understand the problem

smallX (Sun, 04 Feb 2018 13:51:22 GMT):
hi guys, I want to know what the content under the vendor folder in go sdk does. please tell me if u know. thx!

dtp (Tue, 06 Feb 2018 14:59:09 GMT):
Has joined the channel.

dtp (Tue, 06 Feb 2018 15:12:11 GMT):
Hi there, I was wondering why the official docs only refer to the Java and Node SDKs, is the Go SDK not officially released/fully developed yet? I don't understand. I mean here: http://hyperledger-fabric.readthedocs.io/en/release/fabric-sdks.html

romany (Tue, 06 Feb 2018 15:19:43 GMT):
Has joined the channel.

arunkarri (Tue, 06 Feb 2018 15:33:48 GMT):
Has joined the channel.

arunkarri (Tue, 06 Feb 2018 15:34:04 GMT):
Hello ,we are looking to create a custom historian which shows all the details related to the transactions based on a particular assetId. Can someone help how can we do that. we have the api which shows just generic info in the history.

cca88 (Tue, 06 Feb 2018 20:01:25 GMT):
Has joined the channel.

Amir (Wed, 07 Feb 2018 01:37:35 GMT):
Has joined the channel.

shailaja.mahara (Wed, 07 Feb 2018 05:57:45 GMT):
Has joined the channel.

tkhwang (Wed, 07 Feb 2018 05:59:55 GMT):
Has joined the channel.

shailaja.mahara (Wed, 07 Feb 2018 08:45:07 GMT):
im working on CentOS and even after installing golang, I am getting an error while running the command: go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim The error is: bash: go: command not found... i'm trying to compile the chaincode, following the official docs guidlines.

aleksandar.likic (Wed, 07 Feb 2018 15:47:26 GMT):
A recent commit changed the default file extension of the filekeyvaluestore. It affects clients who use client.SaveUserToStateStore() and client.LoadUserFromStateStore() to save/load user JSON files, as the default file extension is not .json any more. If you are affected, please take a look at https://gerrit.hyperledger.org/r/#/c/17625/ to see how to modify client code to have .json file extension with the new key store implementation and keep compatibility with previously created stores.

shailaja.mahara (Thu, 08 Feb 2018 02:53:24 GMT):
m working on CentOS and even after installing golang, I am getting an error while running the command: go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim The error is: bash: go: command not found... i'm trying to compile the chaincode, following the official docs guidelines.

shailaja.mahara (Thu, 08 Feb 2018 02:54:25 GMT):
I followed the the docs to install Go as well

shailaja.mahara (Thu, 08 Feb 2018 02:54:26 GMT):
export GOPATH=$HOME/go export PATH=$PATH:$GOPATH/bin

erzeghi (Thu, 08 Feb 2018 09:58:24 GMT):
Has joined the channel.

ranjan008 (Thu, 08 Feb 2018 12:04:52 GMT):
@troyronda for certain chaincode calls where I am passing blob data of a file as chaincode argument the eventhub is getting disconnected and I am getting below log in SDK [fabric_sdk_go] 2018/02/08 11:46:15 UTC - events.(*EventHub).Disconnected -> WARN EventHub was disconnected unexpectedly: rpc error: code = Unavailable desc = transport is closing what can be the issue?

navdevl (Thu, 08 Feb 2018 12:23:21 GMT):
Has joined the channel.

navdevl (Thu, 08 Feb 2018 12:27:32 GMT):
When we submit a transaction for creating an asset, how can we map the current user id to the asset, I've used `GetCreator()` to get the current creator, but I get only the certificate

navdevl (Thu, 08 Feb 2018 12:27:43 GMT):
How can I get user ID instead of certificate?

Koptop (Fri, 09 Feb 2018 06:34:41 GMT):
Has joined the channel.

baoyangc (Fri, 09 Feb 2018 11:06:29 GMT):
`util.BCCSPKeyRequestGenerate` to generate a key , but alway got error

baoyangc (Fri, 09 Feb 2018 14:39:53 GMT):

Clipboard - 2018年2月9日晚上10点36分

troyronda (Fri, 09 Feb 2018 14:45:39 GMT):
@aleksandar.likic ^^^

troyronda (Fri, 09 Feb 2018 14:45:51 GMT):
@baoyangc aleks is currently working on the enrollment code

troyronda (Fri, 09 Feb 2018 14:48:57 GMT):
Can I ask why you are trying to get the key bytes?

baoyangc (Fri, 09 Feb 2018 14:49:23 GMT):
I want store it in a file

troyronda (Fri, 09 Feb 2018 14:49:27 GMT):
and what error you are getting?

baoyangc (Fri, 09 Feb 2018 14:49:49 GMT):
the error is "Not Supported"

troyronda (Fri, 09 Feb 2018 14:50:02 GMT):
i assume you are not using PKCS11?

baoyangc (Fri, 09 Feb 2018 14:50:36 GMT):
yes

baoyangc (Fri, 09 Feb 2018 14:50:47 GMT):
but how to add it

troyronda (Fri, 09 Feb 2018 14:52:03 GMT):
In SW usage, the key is generated and stored to the disk; in PKCS11 it is within the bounds of the HSM.

baoyangc (Fri, 09 Feb 2018 14:53:08 GMT):
you mean I should modify my `config.yaml` to set this

baoyangc (Fri, 09 Feb 2018 14:53:12 GMT):
?

troyronda (Fri, 09 Feb 2018 14:53:26 GMT):
config.yaml has the path where SW keys are stored

baoyangc (Fri, 09 Feb 2018 14:55:29 GMT):
i find them in `/tmp/msp/signcerts/`

baoyangc (Fri, 09 Feb 2018 14:55:29 GMT):
i find them in `/tmp/msp/keystore/`

baoyangc (Fri, 09 Feb 2018 14:56:18 GMT):
but not certs in `/tmp/msp/signcerts/`

troyronda (Fri, 09 Feb 2018 15:05:49 GMT):
Aleks can comment more on the certs and the current work on Enroll.

troyronda (Fri, 09 Feb 2018 15:06:10 GMT):
(when he gets online)

baoyangc (Fri, 09 Feb 2018 15:06:27 GMT):
thanks

aleksandar.likic (Fri, 09 Feb 2018 16:29:25 GMT):
@baoyangc private keys don't support Bytes(), only public keys do. Just curious, what sdk version are you using?

baoyangc (Fri, 09 Feb 2018 16:29:54 GMT):
the latest commit

baoyangc (Fri, 09 Feb 2018 16:32:03 GMT):
no version tag , just the latest commit of fabric-sdk-go

baoyangc (Fri, 09 Feb 2018 16:32:24 GMT):
`95e3a32ea5859859d4be33f7febcb0f7cdd2485e`

aleksandar.likic (Fri, 09 Feb 2018 16:32:43 GMT):
OK, I think I see the problem.

aleksandar.likic (Fri, 09 Feb 2018 16:52:01 GMT):
When a new non-ephemeral key is generated by the sdk, it is stored automatically by the underlying crypto provider in its key store (defined by client.credentialStore.cryptoStore.path in configuration). On the client side, upon enrollment, you need to store the SKI (publicKey.SKI()), which later you can use to lookup the private key from the crypto provider using GetKey(ski).

aleksandar.likic (Fri, 09 Feb 2018 16:54:39 GMT):
Now, here is the problem: I've been working on refactoring how the sdk storage works (in support for enrollment), and it seems I introduced a bug with commit e50cd2550d267b125eee6c584f048713b1357618. Whether you are affected by this or not, it depends what api you are using. The high level API (loading identities using .WithUser(username)) is affected. I'll create a JIRA bug and fix this asap.

aleksandar.likic (Fri, 09 Feb 2018 16:54:39 GMT):
Now, here is the problem: I've been working on refactoring how the sdk storage works (in support for enrollment), and it seems I introduced a bug with commit e50cd2550d267b125eee6c584f048713b1357618. Whether you are affected by this or not, it depends what api you are using. The high level API (loading identities using .WithUser(username), which hides the key management) is affected. I'll create a JIRA bug and fix this asap.

aleksandar.likic (Fri, 09 Feb 2018 16:55:30 GMT):
In the meantime, it is safest to use commit 5f54093a6ab3ff48bb6a640d5f540926c4179385 or earlier.

aleksandar.likic (Fri, 09 Feb 2018 16:57:29 GMT):
Sorry for the inconvenience.

aleksandar.likic (Fri, 09 Feb 2018 17:32:37 GMT):
@baoyangc note that storing SKI would be an optimization, as it can be derived from the user's cert (via public key)

aleksandar.likic (Fri, 09 Feb 2018 17:32:37 GMT):
@baoyangc note that storing SKI would be an optimization, as it can be derived from the user's cert (via public key) that you would normally store

aleksandar.likic (Fri, 09 Feb 2018 20:30:22 GMT):
@baoyangc Looks like I was wrong, newly generated keys are currently NOT stored anywhere on the client side. They are stored on the server (Fabric CA) side, but the client has to looks after them itself on the client side. This means storing the enrolled users' certs and private keys (SW crypto provider only). So nothing is actually broken, there won't be any fix at the moment. However, we are working on a high-level API for enrollment, it will be ready in a week or so. We are planning to have some key/cert management included in the sdk so the app doesn't have do it. Stay tuned!

aleksandar.likic (Fri, 09 Feb 2018 20:30:22 GMT):
@baoyangc Looks like I was wrong, newly generated keys are currently NOT stored anywhere on the client side. They are stored on the server (Fabric CA) side, but the client has to look after them itself on the client side. This means storing the enrolled users' certs and private keys (SW crypto provider only). So nothing is actually broken, there won't be any fix at the moment. However, we are working on a high-level API for enrollment, it will be ready in a week or so. We are planning to have some key/cert management included in the sdk so the app doesn't have do it. Stay tuned!

e-nikolov (Fri, 09 Feb 2018 21:59:03 GMT):
@aleksandar.likic any chance the bug you are talking about involves getting this error? error from ... (Transaction processor (...) returned error for txID '54d26e39c20f791e9daf73e43c07acce067f804d3fc23e20b9aba95efd943a8b': gRPC Transport Status Code: (2) Unknown. Description: Failed to deserialize creator identity, err Could not decode the PEM structure)

troyronda (Fri, 09 Feb 2018 23:20:02 GMT):
@aleksandar.likic @e-nikolov that message sounds like: either the cert weren't loaded properly (or wasn't sent properly to the peer). I'd think the former is more likely as tests are passing though.

troyronda (Fri, 09 Feb 2018 23:20:59 GMT):
I assume you are using embedded certs? so probably this message from aleks doesn't apply to you: https://github.com/hyperledger/fabric-sdk-go/commit/578506b8cf560f500c054fa815554f955cb7c00f

e-nikolov (Fri, 09 Feb 2018 23:47:10 GMT):
Everything worked fine, then I upgraded to the newest sdk version and started getting that error upon init. After I reverted to the commit he mentioned, everything works again.

e-nikolov (Fri, 09 Feb 2018 23:48:25 GMT):
And yes, we use embedded certs

troyronda (Sat, 10 Feb 2018 00:21:14 GMT):
@aleksandar.likic maybe double check that nothing happened to the embedded cert tests?

troyronda (Sat, 10 Feb 2018 00:21:32 GMT):
it's very strange that embedded certs broke

troyronda (Sat, 10 Feb 2018 00:21:32 GMT):
it's very strange that embedded certs broke for emil ...

aleksandar.likic (Sat, 10 Feb 2018 00:36:23 GMT):
I'll take a look

e-nikolov (Sat, 10 Feb 2018 00:50:15 GMT):
the GetSigningIdentity seems to have changed

aleksandar.likic (Sat, 10 Feb 2018 00:50:56 GMT):
@e-nikolov hi, I posted some questions on your configuration on the private channel

aleksandar.likic (Sat, 10 Feb 2018 01:34:28 GMT):
@e-nikolov created https://jira.hyperledger.org/browse/FAB-8195

baoyangc (Sat, 10 Feb 2018 02:33:51 GMT):
@aleksandar.likic ,I run my code with Fabric-ca 1.0.2. the private key is stored in then client side `/tmp/msp/keystore`

aleksandar.likic (Sat, 10 Feb 2018 03:07:15 GMT):
@e-nikolov https://jira.hyperledger.org/browse/FAB-8195 has been merged: https://gerrit.hyperledger.org/r/#/c/17755/

e-nikolov (Sat, 10 Feb 2018 09:49:03 GMT):
great, thansk

e-nikolov (Sat, 10 Feb 2018 09:49:03 GMT):
great, thanks

lengyijun (Sat, 10 Feb 2018 14:58:39 GMT):
Has joined the channel.

troyronda (Sat, 10 Feb 2018 15:14:27 GMT):
:thumbsup:

tittuvarghese (Sat, 10 Feb 2018 16:48:24 GMT):
Has joined the channel.

tittuvarghese (Sat, 10 Feb 2018 16:50:37 GMT):
Hey guys, Maybe this one is off topic. I'm trying to implement the Fabric Go SDK but I'm stuck at a point. I wanted to get block info, Like block height, Hash and all. Is there any way to get that info?

ga25waq (Sun, 11 Feb 2018 01:00:13 GMT):
Hi! I've created a new instance of ChannelClient and now I want to subscribe to a chaincode event via the ChannelClient's RegisterChaincodeEvent method. Unfortunately, it seems that the underlying event hub never gets connected (dumping the ChannelClient shows a 'connected: (bool) false' for its event hub). Do I have to connect the event hub manually? How can I do that for a ChannelClient? I had a look at base_test_setup.go where a new event hub is created and connected manually. But that way, I cannot use the ChannelClient's convenience method RegisterChaincodeEvent that writes the events to a channel.

ga25waq (Sun, 11 Feb 2018 02:30:35 GMT):
I've created a issue for this: https://jira.hyperledger.org/browse/FAB-8203

zsmartc (Sun, 11 Feb 2018 03:22:20 GMT):
Has joined the channel.

tittuvarghese (Sun, 11 Feb 2018 06:03:01 GMT):
Hey guys, Maybe this one is off topic. I'm trying to implement the Fabric Go SDK but I'm stuck at a point. I wanted to get block info, Like block height, Hash and all. Is there any way to get that info?

troyronda (Sun, 11 Feb 2018 22:05:45 GMT):
@tittuvarghese I've updated the example for this ... should be merged soon.

troyronda (Sun, 11 Feb 2018 22:05:45 GMT):
@tittuvarghese I've updated the example for this, and created a more direct interface ... should be merged soon.

troyronda (Sun, 11 Feb 2018 22:05:49 GMT):
(https://gerrit.hyperledger.org/r/c/17773/)

troyronda (Sun, 11 Feb 2018 22:07:33 GMT):
@ga25waq we experienced something similar on Friday - i'll check on what happened with it.

troyronda (Sun, 11 Feb 2018 22:07:33 GMT):
@ga25waq we experienced something similar on Friday - i'll check on what happened with it tomorrow.

guoger (Mon, 12 Feb 2018 03:14:54 GMT):
hey, I wonder what's the status of go-sdk? any release plan for fabric 1.1? thx!

baoyangc (Mon, 12 Feb 2018 03:49:13 GMT):

Clipboard - 2018年2月12日中午11点49分

baoyangc (Mon, 12 Feb 2018 03:50:07 GMT):
I tried to invoke chaincode , but got an error: ailed to created new channel client: create channel service failed: QueryBlockConfig failed: Payloads for config block do not match

baoyangc (Mon, 12 Feb 2018 03:50:53 GMT):
I don't think we need to get the config block before invoke the chain code

tittuvarghese (Mon, 12 Feb 2018 05:00:17 GMT):
@troyronda I'm unable to access the example. Looks like I don't have permission or it's not there.

bo4ek (Mon, 12 Feb 2018 14:00:45 GMT):
Has joined the channel.

troyronda (Mon, 12 Feb 2018 16:46:04 GMT):
@tittuvarghese that happens in gerrit when you use the Old UI (which is the default).

troyronda (Mon, 12 Feb 2018 16:46:10 GMT):
No matter - it's merged now anyways

troyronda (Mon, 12 Feb 2018 16:46:25 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/fab/channel_ledger_test.go

tittuvarghese (Mon, 12 Feb 2018 16:46:28 GMT):
@troyronda How I can access it /

tittuvarghese (Mon, 12 Feb 2018 16:46:30 GMT):
Thanks buddy

troyronda (Mon, 12 Feb 2018 20:05:44 GMT):
@ga25waq https://gerrit.hyperledger.org/r/c/17811/

rjones (Mon, 12 Feb 2018 20:06:31 GMT):
Has left the channel.

troyronda (Mon, 12 Feb 2018 20:11:26 GMT):
It’s merged

troyronda (Mon, 12 Feb 2018 21:01:42 GMT):
@ga25waq https://gerrit.hyperledger.org/r/c/17817/

aleksandar.likic (Tue, 13 Feb 2018 02:28:41 GMT):
@baoyangc See https://gerrit.hyperledger.org/r/#/c/17775/ and https://jira.hyperledger.org/browse/FAB-8212 . I added https://gerrit.hyperledger.org/r/#/c/17775/5/pkg/fabric-client/credentialmgr/enrollment_test.go to ensure that GetSigningIdentity() works correctly on enrollment. Application still needs to manage the enrollment cert (to save it upon enrollment), we will have the SDK doing this soon.

anku94 (Tue, 13 Feb 2018 09:39:59 GMT):
Has joined the channel.

e-nikolov (Tue, 13 Feb 2018 09:47:55 GMT):
In channel.go, inside the Channel interface, it is mentioned that all getters and setters are deprecated (e.g. AddPeer()). What would be the alternative?

e-nikolov (Tue, 13 Feb 2018 09:47:55 GMT):
In https://github.com/hyperledger/fabric-sdk-go/blob/master/api/apifabclient/channel.go, inside the Channel interface, it is mentioned that all getters and setters are deprecated (e.g. AddPeer()). What would be the alternative?

e-nikolov (Tue, 13 Feb 2018 09:53:52 GMT):
I also see that some of those deprecated setters are still used in the https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/base_test_setup.go#L154

e-nikolov (Tue, 13 Feb 2018 09:53:52 GMT):
I also see that some of those deprecated setters are still used in https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/base_test_setup.go#L154

troyronda (Tue, 13 Feb 2018 10:25:50 GMT):
@e-nikolov some interfaces like chclient figure out the peers from config and discovery. Others will simply have a targets slice on the methods. See ChannelLedger for example.

troyronda (Tue, 13 Feb 2018 10:26:37 GMT):
At the end, there will not be a need to mutate the object via adders/getters.

troyronda (Tue, 13 Feb 2018 10:27:07 GMT):
Some are still in use because we aren’t done.

e-nikolov (Tue, 13 Feb 2018 10:27:40 GMT):
I see

e-nikolov (Tue, 13 Feb 2018 10:28:47 GMT):
I ask because we use a modified version of the base_test_setup in our system to boot the sdk, but our IDEs give a warning that the AddPeer method is deprecated

troyronda (Tue, 13 Feb 2018 10:30:37 GMT):
Ah - been trying to do this step by step but it’s taken a bit longer.

troyronda (Tue, 13 Feb 2018 10:30:58 GMT):
Should be soon.

troyronda (Tue, 13 Feb 2018 10:31:19 GMT):
Does it make sense?

e-nikolov (Tue, 13 Feb 2018 10:33:05 GMT):
Yes, but I would probably mark it as deprecated in the godoc once it's fully deprecated, and put a note or something before that

troyronda (Tue, 13 Feb 2018 10:35:37 GMT):
Good point, yes

ArvsIndrarys (Tue, 13 Feb 2018 14:42:52 GMT):
@troyronda thanks !

e-nikolov (Tue, 13 Feb 2018 16:11:45 GMT):
Can I remove the testing.T from func (setup *BaseSetupImpl) Initialize(t *testing.T) error in base_test_setup.go

e-nikolov (Tue, 13 Feb 2018 16:12:36 GMT):
it doesn't seem to be used in anything other than setupEventHub(t *testing.T, client *fabsdk.FabricSDK, identity fab.IdentityContext) error, which in turn doesn't use it for anything

ga25waq (Tue, 13 Feb 2018 18:18:44 GMT):
@troyronda Thanks for the fix! I did not have a look at every single line of code regarding the event management, but an EventHub is linked to a single peer. That is why the question arised if the SDK considers the validity of a transaction that leads to a chaincode event. In other words: If I require peers of two different organizations to endorse a transaction on a chaincode, is it guaranteed that the chaincode event (and its payload) received via a ChannelClient belongs to a validated and committed transaction (that fulfills the endorsement policy etc.)? Or can the peer(s) serving as an event hub manipulate the event at will (in that case the client would have to perform a separate query that gets validated after having received the event)?

troyronda (Tue, 13 Feb 2018 18:19:56 GMT):
we usually use a separate query for events where they client needs to know the validation status.

troyronda (Tue, 13 Feb 2018 18:19:56 GMT):
@ga25waq we usually use a separate query for events where they client needs to know the validation status.

troyronda (Tue, 13 Feb 2018 18:20:07 GMT):
particularly with Fabric 1.1's filtered events

troyronda (Tue, 13 Feb 2018 18:20:27 GMT):
(which are are currently implementing into the Go SDK)

troyronda (Tue, 13 Feb 2018 18:22:01 GMT):
@e-nikolov yes (I was also removing unnecessary receivers when I saw them)

ga25waq (Tue, 13 Feb 2018 18:23:22 GMT):
So the client would have to revalidate the information of the event and its payload, e.g. by performing a separate query?

troyronda (Tue, 13 Feb 2018 18:24:16 GMT):
that's one mechanism to to do, yes

troyronda (Tue, 13 Feb 2018 18:24:16 GMT):
that's one mechanism to to so, yes

troyronda (Tue, 13 Feb 2018 18:24:16 GMT):
that's one mechanism to do so, yes

troyronda (Tue, 13 Feb 2018 18:24:34 GMT):
I guess you are also thinking about hooking receiving events from multiple peers

troyronda (Tue, 13 Feb 2018 18:24:34 GMT):
I guess you are also thinking about receiving events from multiple peers as another idea

ga25waq (Tue, 13 Feb 2018 18:26:37 GMT):
Yes, but then I would have to coordinate the various event hubs and compare the (possibly varying) results on my own, right?

troyronda (Tue, 13 Feb 2018 18:28:47 GMT):
yes - the SDK doesn't have this mechanism at the moment.

ga25waq (Tue, 13 Feb 2018 18:29:07 GMT):
Okay, thanks for the info!

troyronda (Tue, 13 Feb 2018 18:29:41 GMT):
the updated delivery service for fabric 1.1 is being implemented as we speak.

e-nikolov (Tue, 13 Feb 2018 23:29:32 GMT):
I think the tests break for go 1.10

e-nikolov (Tue, 13 Feb 2018 23:29:32 GMT):
I think the tests break for go 1.10rc2

e-nikolov (Tue, 13 Feb 2018 23:30:23 GMT):
I get this:

e-nikolov (Tue, 13 Feb 2018 23:30:23 GMT):
end golint suggestions Checking ./def Checking ./pkg go build github.com/hyperledger/fabric-sdk-go/vendor/github.com/miekg/pkcs11: invalid flag in #cgo LDFLAGS: -Wl,--no-as-needed Makefile:189: recipe for target 'lint' failed make: *** [lint] Error 1

troyronda (Wed, 14 Feb 2018 00:54:35 GMT):
@e-nikolov yes go 1.10 has issues with cgo that is currently blocking the release of 1.10

troyronda (Wed, 14 Feb 2018 00:54:52 GMT):
they are working on a whitelist of cgo flags for the final version.

e-nikolov (Wed, 14 Feb 2018 00:55:09 GMT):
Good to know, thanks

troyronda (Wed, 14 Feb 2018 00:55:09 GMT):
https://github.com/golang/go/issues/23749

troyronda (Wed, 14 Feb 2018 00:55:43 GMT):
(similarly 1.9.4 has these issues)

e-nikolov (Wed, 14 Feb 2018 00:56:37 GMT):
1.9.4 works with the tests

e-nikolov (Wed, 14 Feb 2018 00:56:37 GMT):
at least for me

troyronda (Wed, 14 Feb 2018 00:56:43 GMT):
ah nice

troyronda (Wed, 14 Feb 2018 00:57:06 GMT):
i didn't try it yet but interesting that it works

troyronda (Wed, 14 Feb 2018 00:57:52 GMT):
let me stash my changes and try 1.9.4

e-nikolov (Wed, 14 Feb 2018 01:00:53 GMT):
How do you switch versions of golang? I forked gvm and removed some of their features that modified the gopath and works decently, but I'm curious what others do

troyronda (Wed, 14 Feb 2018 01:07:28 GMT):
@e-nikolov yes 1.9.4 is passing tests for me too

troyronda (Wed, 14 Feb 2018 01:11:53 GMT):
@e-nikolov i've used gimme (https://github.com/travis-ci/gimme) and gvm

e-nikolov (Wed, 14 Feb 2018 01:22:18 GMT):
I tried plain gvm, but it did some strange things to the gopath and had its own philosophy about how it should be set up

e-nikolov (Wed, 14 Feb 2018 01:22:41 GMT):
so I modified it a bit

e-nikolov (Wed, 14 Feb 2018 01:22:49 GMT):
I'll give gimme a try

e-nikolov (Wed, 14 Feb 2018 01:23:02 GMT):
it seems to get updated more often

vudathasaiomkar (Wed, 14 Feb 2018 07:13:24 GMT):
Has joined the channel.

masanchez (Wed, 14 Feb 2018 11:32:08 GMT):
Has joined the channel.

e-nikolov (Wed, 14 Feb 2018 19:30:58 GMT):
Is the golang sdk concurrency safe?

e-nikolov (Wed, 14 Feb 2018 19:32:19 GMT):
Or do I have to add my own mutexes around all sdk calls

e-nikolov (Wed, 14 Feb 2018 19:35:50 GMT):
If I enable the race detector of golang I get some data race warnings

e-nikolov (Wed, 14 Feb 2018 19:42:53 GMT):
Strangely enough, it seems to come from a place inside protobuf, which is surrounded by mutexes

KillerGasy (Thu, 15 Feb 2018 12:08:05 GMT):
Has joined the channel.

troyronda (Thu, 15 Feb 2018 13:08:21 GMT):
@e-nikolov the SDK is intended to be concurrency safe, so it should be considered a bug if you discover an issue

troyronda (Thu, 15 Feb 2018 13:08:21 GMT):
(Other than the old deprecated client)

troyronda (Thu, 15 Feb 2018 13:09:55 GMT):
There is a known issue in the cert pool that is on the backlog

troyronda (Thu, 15 Feb 2018 13:10:08 GMT):
EventHub is also being substantially updated to support delivery service so that code will be updated soon

e-nikolov (Thu, 15 Feb 2018 13:11:23 GMT):
The warning came from golang's protobufs, which seemed pretty strange

e-nikolov (Thu, 15 Feb 2018 13:11:47 GMT):
from the access of a map that was surrounded by mutexes

e-nikolov (Thu, 15 Feb 2018 13:11:54 GMT):
which made it even stranger

troyronda (Thu, 15 Feb 2018 13:12:01 GMT):
Also (Obviously) the caller needs to be careful not to mutate parameters passed into SDK functions during an operation.

e-nikolov (Thu, 15 Feb 2018 13:12:03 GMT):
not sure if -race can give false positives

troyronda (Thu, 15 Feb 2018 13:17:00 GMT):
Are you able to supply the race output and line numbers?

e-nikolov (Thu, 15 Feb 2018 13:33:37 GMT):
Those in protobuf: Read: https://github.com/golang/protobuf/blob/master/proto/properties.go#L649 Write: https://github.com/golang/protobuf/blob/master/proto/properties.go#L678 called from the sdk in: https://github.com/hyperledger/fabric-sdk-go/blob/master/third_party/github.com/hyperledger/fabric/protos/utils/proputils.go#L62

e-nikolov (Thu, 15 Feb 2018 13:33:37 GMT):
Those in protobuf: Read: https://github.com/golang/protobuf/blob/master/proto/properties.go#L649 Write: https://github.com/golang/protobuf/blob/master/proto/properties.go#L678 called from the sdk at: https://github.com/hyperledger/fabric-sdk-go/blob/master/third_party/github.com/hyperledger/fabric/protos/utils/proputils.go#L62

e-nikolov (Thu, 15 Feb 2018 13:35:05 GMT):
but I only got the warning once, so not sure how relevant it is, I will investigate further at a later point

cotofei (Fri, 16 Feb 2018 05:34:25 GMT):
Has left the channel.

Ammu (Fri, 16 Feb 2018 09:03:49 GMT):
Has joined the channel.

mtgran (Fri, 16 Feb 2018 13:51:53 GMT):
Has joined the channel.

troyronda (Fri, 16 Feb 2018 21:51:44 GMT):
@e-nikolov https://gerrit.hyperledger.org/r/c/17995/

troyronda (Fri, 16 Feb 2018 21:51:44 GMT):
@e-nikolov there is some cleanup of configuration here: https://gerrit.hyperledger.org/r/c/17995/

troyronda (Fri, 16 Feb 2018 21:51:44 GMT):
@e-nikolov there is some cleanup of configuration here (related to embedded pems): https://gerrit.hyperledger.org/r/c/17995/

troyronda (Fri, 16 Feb 2018 22:10:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=2hmqumdRHDDrHdCpN) @e-nikolov the latest should now have removed Channel from integration tests

troyronda (Fri, 16 Feb 2018 22:10:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=2hmqumdRHDDrHdCpN) @e-nikolov the latest push should now have removed Channel from integration tests

c.nattawit (Sat, 17 Feb 2018 12:56:55 GMT):
Has joined the channel.

c.nattawit (Sat, 17 Feb 2018 13:12:04 GMT):
Hello, is there any example code of how to register user and save to storage. I try to modify fabric-sdk-go/test/integration/fab/fabric_ca_test.go and successfully registered, enrolled, and saved a new user. But from what I understand, github.com/hyperledger/fabric-sdk-go/pkg/fabric-client is already deplecated and shouldn't be used anymore. So I try to explore github.com/hyperledger/fabric-sdk-go/pkg/fabsdk, but found only method to read user from an existing state but not how to save a new one. Where should I look for next?

troyronda (Sat, 17 Feb 2018 13:36:02 GMT):
@aleksandar.likic @c.nattawit aleks is working on it

troyronda (Sat, 17 Feb 2018 13:37:04 GMT):
He can give a better update on the progress - he has a WIP in Gerrit code review.

c.nattawit (Sat, 17 Feb 2018 13:39:26 GMT):
So fabsdk is not finished right. I thought I overlooked it :grin:

troyronda (Sat, 17 Feb 2018 13:53:44 GMT):
We are aiming for the next tag end of month

troyronda (Sat, 17 Feb 2018 13:55:51 GMT):
(Including an integrated enroll and fabric 1.1 delivery service client)

troyronda (Sat, 17 Feb 2018 13:55:51 GMT):
(Including an integrated user enroll and fabric 1.1 delivery service client)

troyronda (Sat, 17 Feb 2018 20:19:43 GMT):
@e-nikolov on Go 1.10, i'm getting the same error as is reported here: https://github.com/google/certificate-transparency-go/issues/153

troyronda (Sat, 17 Feb 2018 20:26:24 GMT):
interestingly go tool fix -r cftype vendor/github.com/google/certificate-transparency-go/x509/root_cgo_darwin.go fixes it

troyronda (Sat, 17 Feb 2018 20:41:12 GMT):
@e-nikolov to use Go 1.10, you need these changes: https://gerrit.hyperledger.org/r/c/18015/

troyronda (Sat, 17 Feb 2018 20:41:40 GMT):
but "github.com/google/certificate-transparency-go" needs to merge https://github.com/google/certificate-transparency-go/pull/154

troyronda (Sat, 17 Feb 2018 20:42:07 GMT):
(in the above change Gopkg.toml is pointing to a fork on my personal repo)

troyronda (Sat, 17 Feb 2018 20:42:07 GMT):
(in the above change Gopkg.toml is pointing to a fork on my personal repo until the pull request is merged)

olegvg (Sun, 18 Feb 2018 16:26:43 GMT):
Hi guys! I have question on dev process of subj which affects project I run. What's release policy of fabric-sdk-go ? As I see, almost every commit in master affects backward compatibility with my private code. Also, there are only two tags (v1.0.0-alpha & v1.0.0-alpha2) in git. Both of them are quite outdated.

olegvg (Sun, 18 Feb 2018 16:38:10 GMT):
So... which branch should I use in time between tags?

troyronda (Sun, 18 Feb 2018 17:10:47 GMT):
@olegvg aiming for next tag end of month - we are in the midst of a refactor preparing for the tag

troyronda (Sun, 18 Feb 2018 17:11:53 GMT):
And also updating to 1.1 features - particularly delivery service

troyronda (Sun, 18 Feb 2018 17:12:48 GMT):
It is also important for our projects to get to a stabilized API soon - hence the rapid work over the last month

troyronda (Sun, 18 Feb 2018 17:13:00 GMT):
Sorry for the inconvenience

troyronda (Sun, 18 Feb 2018 17:14:22 GMT):
If you have any API suggestionsor feedback, please make post soon

troyronda (Sun, 18 Feb 2018 17:14:22 GMT):
If you have any API suggestionsor feedback, please post soon

troyronda (Sun, 18 Feb 2018 17:14:22 GMT):
If you have any API suggestions or feedback, please post soon

olegvg (Sun, 18 Feb 2018 17:18:26 GMT):
Got it! Quite good new

olegvg (Sun, 18 Feb 2018 17:18:26 GMT):
Got it! Quite good news

sg3des (Sun, 18 Feb 2018 17:26:03 GMT):
Has joined the channel.

culm (Mon, 19 Feb 2018 07:05:14 GMT):
Has joined the channel.

sg3des (Mon, 19 Feb 2018 07:25:15 GMT):
Hi, @troyronda, in fabric-sdk-go in shell-script for linting - test/scripts/check_lint.sh used goimports. goimports is not a linter! it may change a source files - https://github.com/hyperledger/fabric-sdk-go/blob/1f2274d16a42925afb7abf60deeeca8f4581965e/test/scripts/check_lint.sh#L50 . I do not think its a good idea, if you want check missing imports, error about it is enough.

sg3des (Mon, 19 Feb 2018 07:29:16 GMT):
goimports has a conflict with global variables declared in another file of same package, and may add third-party package to imports.

sg3des (Mon, 19 Feb 2018 07:36:01 GMT):
example: in https://github.com/hyperledger/fabric-sdk-go/blob/1f2274d16a42925afb7abf60deeeca8f4581965e/pkg/fabric-client/events/eventhub.go#L36 declared logger variable. but in another file - https://github.com/hyperledger/fabric-sdk-go/blob/1f2274d16a42925afb7abf60deeeca8f4581965e/pkg/fabric-client/events/eventmocks.go#L281 is called `logger.Debug`. if i have third-party package with name *logger* and func *Debug* - goimports add it to imports list of this file.

sg3des (Mon, 19 Feb 2018 07:38:13 GMT):
goimports have issue about it - https://github.com/golang/go/issues/7463 - closed, but not fixed.

vitiko (Mon, 19 Feb 2018 11:44:49 GMT):
Has joined the channel.

troyronda (Mon, 19 Feb 2018 12:34:34 GMT):
@sg3des L50 should not have been committed - i'll remove it.

troyronda (Mon, 19 Feb 2018 12:34:34 GMT):
@sg3des L50 should not have been committed - i have removed it.

troyronda (Mon, 19 Feb 2018 13:04:24 GMT):
@e-nikolov the fix for Go 1.10 is merged

sg3des (Mon, 19 Feb 2018 16:22:21 GMT):
Hi, i have a question - is there a way to rollback/cancel changes?

sg3des (Mon, 19 Feb 2018 17:14:10 GMT):
package "config" - https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/config/subst.go - why do not use environment variables?

sg3des (Mon, 19 Feb 2018 17:18:34 GMT):
CRYPTOCONFIG_FIXTURES_PATH - hardcoded from test packages?? what for?

sg3des (Mon, 19 Feb 2018 18:46:54 GMT):
instead of https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/config/subst.go - i suggest https://gist.github.com/sg3des/ff430e927ce08ac49afb0058dba8be9b, what do you think? it replaces variables ${NAME} anywhere in the path-line.

troyronda (Tue, 20 Feb 2018 00:09:40 GMT):
@sg3des what change are you referring to?

troyronda (Tue, 20 Feb 2018 00:10:48 GMT):
@sg3des If I recall some paths are being used in unit tests, and it is not desired to use an environment variable for unit tests

troyronda (Tue, 20 Feb 2018 00:11:34 GMT):
@sg3des there has been discussion about enabling variable substitution from environment but I keep forgetting about that item.

troyronda (Tue, 20 Feb 2018 00:12:12 GMT):
(and yes - using LookupEnv would be the way to do so)

sg3des (Tue, 20 Feb 2018 07:47:48 GMT):
@troyronda i want to have a possibility to use environment variable in config. now the function substPathVars has unobvious/unexpected behavior: 1st problem - environment variables can not be used (only GOPATH); 2nd problem - it is necessary that the variable was at the beginning of the line; for unit tests environment variables can be declared in testing functions, ex: filename_test.go > func init(){os.Setenv(key,val)} unit tests should prove for that package is a stable in the "real world" - but you use hardcoded values, useless for real products... if you do not want to change the current logic, at least, replace line L92 - https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/config/subst.go#L92 - to os.LookupEnv() - that solves the 1st problem. or so - https://gist.github.com/sg3des/e553b39066990e5aab6279534bf0ce47 - that solves the 2nd problem too, and do not break backward compatibility.

sg3des (Tue, 20 Feb 2018 08:01:37 GMT):
If a look more globally, i would suggest that make substitute all variables on initialize a config stage, no matter what field. That will also reduce the amount of code in https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/config/config.go

sg3des (Tue, 20 Feb 2018 09:25:24 GMT):
@troyronda what are the third-party packages(https://github.com/hyperledger/fabric-sdk-go/tree/master/third_party/github.com/hyperledger/fabric/) used for? why not to use vendoring if they differ from originals?

iamdm (Tue, 20 Feb 2018 12:34:47 GMT):
Hi, I have a question - is there a way to handle "chaincode is starting" error?

antitoine (Tue, 20 Feb 2018 17:19:35 GMT):
Hi, after upgrading the Fabric SDK Go to the last commit on the master branch, I have the following error: `[fabric_sdk_go] 2018/02/20 17:17:31 UTC - orderer.(*Orderer).sendBroadcast -> ERRO NewAtomicBroadcastClient failed, cause : gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded` Any suggestions ?

biljana.lukovic (Tue, 20 Feb 2018 17:36:40 GMT):
Has joined the channel.

biljana.lukovic (Tue, 20 Feb 2018 17:37:32 GMT):
Try changing options for timeout:

biljana.lukovic (Tue, 20 Feb 2018 17:37:33 GMT):
orderer: timeout: connection: 3s response: 5s

biljana.lukovic (Tue, 20 Feb 2018 17:37:55 GMT):
These should be in your config file

biljana.lukovic (Tue, 20 Feb 2018 17:39:21 GMT):
GRPC options for orderer should be set as:

biljana.lukovic (Tue, 20 Feb 2018 17:39:22 GMT):
keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: true

biljana.lukovic (Tue, 20 Feb 2018 17:39:59 GMT):
Zero 0 in keep-alive-time means it will not be used. The default GRPC (infinite)will be used

troyronda (Tue, 20 Feb 2018 17:41:51 GMT):
@sg3des we welcome contributions via gerrit (https://gerrit.hyperledger.org)

troyronda (Tue, 20 Feb 2018 17:42:27 GMT):
@sg3des most packages are imported from vendor with the exception of the fabric and fabric-ca projects.

troyronda (Tue, 20 Feb 2018 17:42:51 GMT):
(and we provide the Go dep constraints for vendored packages).

troyronda (Tue, 20 Feb 2018 17:43:29 GMT):
fabric and fabric-ca are modified to be more friendly for vendoring (so they do not pull in more dependencies than are needed, for example)

troyronda (Tue, 20 Feb 2018 17:43:50 GMT):
those projects are treated more like internal SDK code than vendored code and are split between the internal folder and the third_party folder

troyronda (Tue, 20 Feb 2018 17:43:50 GMT):
those projects are treated more like internal SDK code than vendored code and are split between the internal folder and the third_party folder (eg, the version of fabric and fabric-ca commits are locked and not intended to be changed by the application)

troyronda (Tue, 20 Feb 2018 17:44:32 GMT):
only code that might need to be imported by an application using the SDK is placed into third_party (like proto and proto utils)

troyronda (Tue, 20 Feb 2018 17:45:34 GMT):
(note: we do not check vendored code into the SDK repo for other packages)

troyronda (Tue, 20 Feb 2018 17:47:10 GMT):
@antitoine @biljana.lukovic ^^^^

antitoine (Wed, 21 Feb 2018 08:24:27 GMT):
@biljana.lukovic Thank you for the pointer, but I checked I have the same configuration as the one proposed in the tests of the SDK (with the parameters for the gRPC)

antitoine (Wed, 21 Feb 2018 08:26:44 GMT):
I will check the parameters of the orderer in my docker-compose file

sg3des (Wed, 21 Feb 2018 08:55:03 GMT):
@antitoine i have a same problem...

Menniti (Wed, 21 Feb 2018 12:19:31 GMT):
Has joined the channel.

troyronda (Wed, 21 Feb 2018 12:56:22 GMT):
@antitoine @sg3des what are you prefixing your URLs with (grpcs://, grpc://, or nothing)? have you set allow-insecure to something?

troyronda (Wed, 21 Feb 2018 12:56:46 GMT):
and are your target hosts using TLS or not?

troyronda (Wed, 21 Feb 2018 12:57:52 GMT):
(although I don't think that should cause the error you got)

troyronda (Wed, 21 Feb 2018 12:57:59 GMT):
the error you have is a timeout

troyronda (Wed, 21 Feb 2018 12:58:12 GMT):
but just in case...

sg3des (Wed, 21 Feb 2018 12:58:13 GMT):
grpcs:// allow-insecure: true TLS is used

troyronda (Wed, 21 Feb 2018 12:58:24 GMT):
turn off allow-insecure

troyronda (Wed, 21 Feb 2018 12:58:24 GMT):
turn off allow-insecure when requiring TLS

sg3des (Wed, 21 Feb 2018 13:01:39 GMT):
nope

sg3des (Wed, 21 Feb 2018 13:01:51 GMT):
did not help

sg3des (Wed, 21 Feb 2018 13:06:46 GMT):
if i'm right, one of the peers works fine, but the second peer at the time has an error: 2018-02-21 13:03:13.291 UTC [chaincode] Launch -> ERRO 41f launchAndWaitForRegister failed Error starting container: context canceled 2018-02-21 13:03:13.292 UTC [endorser] simulateProposal -> ERRO 421 failed to invoke chaincode name:"lscc" on transaction 7405e7f464a41e6e7b5b3067f003785183cfaa1b27ecac6c8cdd7b5326272369, error: Error starting container: context canceled

sg3des (Wed, 21 Feb 2018 13:13:45 GMT):
but most likely I'm not right ^^

troyronda (Wed, 21 Feb 2018 13:18:48 GMT):
have you set a dial timeout?

troyronda (Wed, 21 Feb 2018 13:20:20 GMT):
in config: client.orderer.timeout.connection (for dial); client.orderer.timeout.response (for response)

troyronda (Wed, 21 Feb 2018 13:21:32 GMT):
just for fun, see if a longer timeout helps

sg3des (Wed, 21 Feb 2018 13:27:55 GMT):
dial timeout and resp timeout 3s and 5s, now they is 30 and 50 sec. it also did not help. in the docker logs - long pause and then: 2018-02-21 13:25:01.381 UTC [eventhub_producer] Chat -> DEBU 46c Received EOF, ending Chat

troyronda (Wed, 21 Feb 2018 13:31:15 GMT):
What does the ordered log say

troyronda (Wed, 21 Feb 2018 13:31:15 GMT):
What does the orderer log say

sg3des (Wed, 21 Feb 2018 13:31:43 GMT):
orderer.(*Orderer).sendBroadcast -> ERRO NewAtomicBroadcastClient failed, cause : gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded

sg3des (Wed, 21 Feb 2018 13:31:56 GMT):
all the same ^^

troyronda (Wed, 21 Feb 2018 13:32:16 GMT):
I mean the orderer host log

sg3des (Wed, 21 Feb 2018 13:35:27 GMT):
docker logs -> orderer last line [orderer/common/deliver] Handle -> DEBU 79b [channel: chainhero] Received seekInfo (0xc42037be40) start: > stop: >

sg3des (Wed, 21 Feb 2018 13:38:12 GMT):
peer executes a transaction: Received message COMPLETED Fabric side Handling ChaincodeMessage of type: COMPLETED in state ready HandleMessage- COMPLETED. notifying Txid:92b02ef6796a2c05642dfa282ca2fc8e334e8c [chaincode] Execute -> DEBU 463 Exit etc... [eventhub_producer] validateEventMessage -> DEBU 468 ValidateEventMessage starts for signed event 0xc420364180 [eventhub_producer] registerHandler -> DEBU 469 registering event type: BLOCK and then an error

troyronda (Wed, 21 Feb 2018 13:54:43 GMT):
It’s strange. I wonder if cleaning out your docker containers will help

troyronda (Wed, 21 Feb 2018 13:55:05 GMT):
Do the SDK tests pass for you?

antitoine (Wed, 21 Feb 2018 13:55:33 GMT):
I will test it

troyronda (Wed, 21 Feb 2018 13:55:51 GMT):
Also is this against 1.1 alpha?

troyronda (Wed, 21 Feb 2018 13:55:51 GMT):
Also is this against fabric 1.1 alpha?

antitoine (Wed, 21 Feb 2018 14:08:36 GMT):
No fabric 1.0.5

antitoine (Wed, 21 Feb 2018 14:21:09 GMT):
integration test works for me

sg3des (Wed, 21 Feb 2018 14:43:42 GMT):
docker full cleaning at each start. all SDK tests ok.

troyronda (Wed, 21 Feb 2018 15:02:00 GMT):
Do you have any suggestions how I can reproduce your issue here?

sg3des (Wed, 21 Feb 2018 15:08:37 GMT):
Now, i use an example from chainHero with fixes to current version of fabric-sdk-go. upload to github - https://github.com/sg3des/heroes-service/tree/newVersion

sg3des (Wed, 21 Feb 2018 15:09:12 GMT):
in one terminal - make env-up in second window - make run

sg3des (Wed, 21 Feb 2018 15:09:23 GMT):
thx

sg3des (Wed, 21 Feb 2018 15:10:59 GMT):
P.S. branch newVersion

troyronda (Wed, 21 Feb 2018 15:21:02 GMT):
cool

troyronda (Wed, 21 Feb 2018 16:31:45 GMT):
@antitoine @sg3des i see the issue. thanks @sg3des for supplying your code.

troyronda (Wed, 21 Feb 2018 16:31:45 GMT):
@antitoine @sg3des i see the issue. thanks @sg3des for supplying code that I could reproduce the issue.

troyronda (Wed, 21 Feb 2018 16:32:00 GMT):
the problem is happening because the channel config in the network has a different URL than the config file

troyronda (Wed, 21 Feb 2018 16:32:14 GMT):
the SDK is currently obeying the channel config for URLs

troyronda (Wed, 21 Feb 2018 16:32:47 GMT):
channel config has orderer.hf.chainhero.io and the config file has localhost

troyronda (Wed, 21 Feb 2018 16:34:36 GMT):
btw - the application does work when you add 127.0.0.1 orderer.hf.chainhero.io to the hosts file

troyronda (Wed, 21 Feb 2018 16:35:30 GMT):
as a more permanent fix, either the channel config needs to be updated to match OR we need a new feature in the SDK that overrides the channel config URL

troyronda (Wed, 21 Feb 2018 16:35:30 GMT):
as a more permanent fix, either your channel config needs to be updated OR we need a new feature in the SDK that overrides the channel config URL

troyronda (Wed, 21 Feb 2018 16:36:55 GMT):
similar to ssl-target-name-override

antitoine (Wed, 21 Feb 2018 16:40:40 GMT):
@troyronda Oh, you're right! Thanks a lot! Adding this functionality would be useful for local development.

sg3des (Wed, 21 Feb 2018 16:44:00 GMT):
@troyronda thx!

antitoine (Wed, 21 Feb 2018 17:05:02 GMT):
After a little while, the connection to the eventhub is cut off with this error : `[fabric_sdk_go] 2018/02/21 16:48:08 UTC - events.(*EventHub).Disconnected -> WARN EventHub was disconnected unexpectedly: rpc error: code = Unavailable desc = transport is closing`. I can't find any way to detect this disconnection. Do you have any suggestions?

sg3des (Wed, 21 Feb 2018 17:30:57 GMT):
how long? I do not have this problem.

sg3des (Wed, 21 Feb 2018 17:32:56 GMT):
@troyronda you say - "your channel config needs to be updated" - whats you mean?

troyronda (Wed, 21 Feb 2018 17:52:37 GMT):
The Tx file holds the config that initialized the channel

troyronda (Wed, 21 Feb 2018 17:53:08 GMT):
It’s held in a ledger block that the client fetches

troyronda (Wed, 21 Feb 2018 17:53:30 GMT):
One of the config items is the orderer addresses

troyronda (Wed, 21 Feb 2018 17:53:48 GMT):
@sg3des

troyronda (Wed, 21 Feb 2018 17:56:27 GMT):
The channel transactor initialized based on this

sg3des (Wed, 21 Feb 2018 18:02:32 GMT):
thx, i see.

troyronda (Wed, 21 Feb 2018 19:29:46 GMT):
@antitoine a fairly major refactor of events is happening, so that we also support delivery service. i'll ping you when ready.

antitoine (Wed, 21 Feb 2018 19:32:21 GMT):
@troyronda ok thanks !

marek5050 (Wed, 21 Feb 2018 20:32:29 GMT):
Has joined the channel.

troyronda (Wed, 21 Feb 2018 21:12:33 GMT):
@antitoine @sg3des created story for matching the hostname to static configuration: https://jira.hyperledger.org/browse/FAB-8442

antitoine (Thu, 22 Feb 2018 07:25:46 GMT):
@troyronda Great !

chill37 (Thu, 22 Feb 2018 08:21:19 GMT):
Has joined the channel.

ArvsIndrarys (Thu, 22 Feb 2018 14:32:42 GMT):
Hi all ! Is there a way for the Hyperledger Client to delegate the data signature and/or encryption to a "ThirdParty" ? I am asking this because I try to implement its interaction with the Secure Element and Trusted Execution Environment of an Artik..

troyronda (Thu, 22 Feb 2018 17:26:14 GMT):
@ArvsIndrarys the Go SDK allows this

troyronda (Thu, 22 Feb 2018 17:26:14 GMT):
@ArvsIndrarys yes - the Go SDK allows this. you need to provide a custom cryptosuite implementation.

troyronda (Thu, 22 Feb 2018 17:26:14 GMT):
@ArvsIndrarys yes - the Go SDK allows this. you need to provide a PKCS11 module or implement a custom cryptosuite.

troyronda (Thu, 22 Feb 2018 17:28:24 GMT):
the PKCS11 integration tests show an example of using PKCS11: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkcs11/e2e_test.go

troyronda (Thu, 22 Feb 2018 17:29:20 GMT):
using the PKCS11 cryptosuite implementation here: https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/cryptosuite/bccsp/pkcs11

troyronda (Thu, 22 Feb 2018 17:29:47 GMT):
using this configuration file: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_pkcs11_test.yaml

troyronda (Thu, 22 Feb 2018 17:30:13 GMT):
(the PKCS11 library is specified here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_pkcs11_test.yaml#L95)

tittuvarghese (Fri, 23 Feb 2018 07:54:12 GMT):

FabricSDK Go - Make

tittuvarghese (Fri, 23 Feb 2018 07:54:48 GMT):
Fabric SDK Go Make integration test is getting failed. Error: Connection refused to port 7050, transport: Error while dialing dial tcp 127.0.0.1:7050: getsockopt: connection refused"; Reconnecting to {localhost:7050 }

ArvsIndrarys (Fri, 23 Feb 2018 15:00:54 GMT):
@troyronda thanks !

antitoine (Fri, 23 Feb 2018 15:03:22 GMT):
Hi, is there any work in progress on the LoggerProvider? I'm trying to customize the SDK logger with the option, but the LoggerProvider is not used. I wonder if it's a bug or if it's not done yet.

troyronda (Fri, 23 Feb 2018 16:50:53 GMT):
@sudeshrshetty ^^^

sudeshrshetty (Fri, 23 Feb 2018 16:50:53 GMT):
Has joined the channel.

sudeshrshetty (Fri, 23 Feb 2018 16:53:37 GMT):
LoggerProvider is currently used in many places, you have to use logging.InitLogger to pass your logger provider

troyronda (Fri, 23 Feb 2018 16:54:40 GMT):
@antitoine ^^^

tittuvarghese (Fri, 23 Feb 2018 18:57:58 GMT):
Looks like the certificate is expired for the test. (I'm using 1.0.0-rc1

tittuvarghese (Fri, 23 Feb 2018 18:58:25 GMT):

Certificate Expired Notification

tittuvarghese (Fri, 23 Feb 2018 18:58:30 GMT):
How I can resolve this issue.

govinda-attal (Fri, 23 Feb 2018 23:18:45 GMT):
Has joined the channel.

govinda-attal (Fri, 23 Feb 2018 23:23:44 GMT):
Hello All, This is Govinda here..I am working to use Hyperledger Fabric based solutions within enterprises. For good reasons we would like to fabric-sdk-go .. The network is set with practices mentioned on byfn.sh (boot your first network).. The client application a go implementation using fabric-go-sdk is configured to use a configuration file... Based on this file it is able to query the network, but invoke operations which result in endorsing and require interaction with orderer internally are failing.

govinda-attal (Fri, 23 Feb 2018 23:23:58 GMT):
Let me share the config file.

govinda-attal (Fri, 23 Feb 2018 23:25:32 GMT):
A note that network is run with within docker so relevant services ports are exposed and available on host machine... but the client app which I am working on is running locally so connecting to hyperledger services via exposed ports

govinda-attal (Fri, 23 Feb 2018 23:32:47 GMT):
Error that I get is

govinda-attal (Fri, 23 Feb 2018 23:32:49 GMT):
[fabric_sdk_go] 2018/02/23 23:14:01 UTC - config.initConfig -> INFO config fabric_sdk_go logging level is set to: INFO [fabric_sdk_go] 2018/02/23 23:14:01 UTC - msp.(*bccspmsp).DeserializeIdentity -> INFO Obtaining identity 2018/02/23 15:14:01 {"color":"blue","docType":"marble","name":"marble1","owner":"jerry","size":35} [fabric_sdk_go] 2018/02/23 23:14:01 UTC - msp.(*bccspmsp).DeserializeIdentity -> INFO Obtaining identity rpc error: code = DeadlineExceeded desc = context deadline exceeded [fabric_sdk_go] 2018/02/23 23:14:11 UTC - orderer.(*Orderer).sendBroadcast -> ERRO NewAtomicBroadcastClient failed, cause : gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded 2018/02/23 15:14:11 Failed to transfer: %s CreateAndSendTransaction failed: orderer failed: calling orderer 'orderer.example.com:7050' failed: NewAtomicBroadcastClient failed: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded exit status 1

govinda-attal (Fri, 23 Feb 2018 23:34:05 GMT):

temp.zip

govinda-attal (Fri, 23 Feb 2018 23:34:27 GMT):
Let me if there are any configuration changes that I should incorporate in config_test.yaml file.. please advise

govinda-attal (Fri, 23 Feb 2018 23:35:06 GMT):
Many thanks

troyronda (Sat, 24 Feb 2018 01:42:59 GMT):
@govinda-attal sounds like the client isn't able to connect to the host

troyronda (Sat, 24 Feb 2018 01:43:12 GMT):
are you running inside docker environment or against localhost

troyronda (Sat, 24 Feb 2018 01:43:12 GMT):
are you running inside docker environment or against localhost?

troyronda (Sat, 24 Feb 2018 01:43:23 GMT):
if localhost, make sure you have set hosts entries

troyronda (Sat, 24 Feb 2018 01:43:23 GMT):
if localhost, make sure you have set hosts entries (/etc/hosts to point names at 127.0.0.1)

govinda-attal (Sat, 24 Feb 2018 01:43:59 GMT):
The client is running outside the docker network of blockchain... So I have changed the url in config.yaml which is used by client to point to localhost:7050 for orderer

troyronda (Sat, 24 Feb 2018 01:44:30 GMT):
With GRPCS or GRPC

troyronda (Sat, 24 Feb 2018 01:44:56 GMT):
(i.e., TLS or not TLS)

troyronda (Sat, 24 Feb 2018 01:45:33 GMT):
the error usually indicates that either the client cannot find the host or that TLS is failing

govinda-attal (Sat, 24 Feb 2018 01:46:20 GMT):
With GRPCS, I tried that too ... having entries in /etc/hosts/ ... then it simply doesn't respond... I don't know where exactly the client is waiting for, I don't receive any events on the event listener.

troyronda (Sat, 24 Feb 2018 01:46:50 GMT):
@tittuvarghese 1.0.0-rc1 is very old. you could ask in other channels about configuring fabric or fabric-ca.

troyronda (Sat, 24 Feb 2018 01:47:20 GMT):
@govinda-attal did you set hostname override in config.yaml?

troyronda (Sat, 24 Feb 2018 01:47:43 GMT):
TLS will fail if you set URL to localhost but certificate has a name in it

troyronda (Sat, 24 Feb 2018 01:47:43 GMT):
TLS will fail if you set URL to localhost but server's TLS certificate has a name in it

troyronda (Sat, 24 Feb 2018 01:48:12 GMT):
there is a setting in config.yaml for each host where you can override the hostname.

troyronda (Sat, 24 Feb 2018 01:48:12 GMT):
there is a setting in config.yaml for each host where you can override the TLS hostname.

troyronda (Sat, 24 Feb 2018 01:49:10 GMT):
Also another potential problem is that the channel config is incorrect

troyronda (Sat, 24 Feb 2018 01:49:34 GMT):
the client downloads the channel config from the network including ordererer addresses.

troyronda (Sat, 24 Feb 2018 01:50:10 GMT):
if those addresses are wrong then the client will fail to connect (and will NewAtomicBroadcastClient will specifically fail as you have above)

troyronda (Sat, 24 Feb 2018 01:50:10 GMT):
if those addresses are wrong then the client will fail to connect (and NewAtomicBroadcastClient will specifically fail as you have above)

troyronda (Sat, 24 Feb 2018 01:50:42 GMT):
i recommend reviewing your channel config to see what orderer addresses you have in there

baoyangc (Sat, 24 Feb 2018 01:51:55 GMT):
@troyronda ,does current latest version support fabric v1.0.0? if support,how to make integration-test on v1.0.0

troyronda (Sat, 24 Feb 2018 01:52:09 GMT):
@baoyangc yes tests run against 1.0.0

govinda-attal (Sat, 24 Feb 2018 01:52:21 GMT):
@troyronda These are the relevant settings for orderer in config.yaml

govinda-attal (Sat, 24 Feb 2018 01:52:23 GMT):
orderers: orderer.example.com: url: orderer.example.com:7050 # these are standard properties defined by the gRPC library # they will be passed in as-is to gRPC client constructor #TODO to be moved to high level, common for all grpc connections grpcOptions: ssl-target-name-override: orderer.example.com grpc-max-send-message-length: 20 #will be taken into consideration if address has no protocol defined and secured connection fails allow-insecure: false

govinda-attal (Sat, 24 Feb 2018 01:52:44 GMT):
I also have now updated /etc/hosts to point these to localhost

troyronda (Sat, 24 Feb 2018 01:52:55 GMT):
@baoyangc FABRIC_PREV_INTTEST=true make integration-tests

troyronda (Sat, 24 Feb 2018 01:53:18 GMT):
see line 76 of Makefile (master)

govinda-attal (Sat, 24 Feb 2018 01:53:38 GMT):
They Query operation returns fine... But the invoke operation as it has to do with orderer... it simply doesn't get an event

baoyangc (Sat, 24 Feb 2018 01:53:44 GMT):
thanks @troyronda

troyronda (Sat, 24 Feb 2018 01:54:00 GMT):
if you only want to run 1.0.0 do this: FABRIC_STABLE_INTTEST=false FABRIC_PREV_INTTEST=true make integration-tests

govinda-attal (Sat, 24 Feb 2018 01:54:32 GMT):
func main() { cp := fsgConfig.FromFile("./config/config_test.yaml") sdk, err := fabsdk.New(cp) if err != nil { log.Fatalln(err) } // Channel client is used to query and execute transactions (Org1 is default org) chClient, err := sdk.NewClient(fabsdk.WithUser(orgAdmin)).Channel(channelID) if err != nil { log.Fatalln("Failed to create new channel client: %s", err) } defer chClient.Close() var queryArgs = [][]byte{[]byte("marble1")} var invokeArgs = [][]byte{[]byte("marble1"), []byte("jerry")} response, err := chClient.Query(chclient.Request{ChaincodeID: ccID, Fcn: "readMarble", Args: queryArgs}) if err != nil { log.Fatalln("Failed to query : %s", err) } else { log.Println(string(response.Payload)) } eventID := "test([a-zA-Z]+)" // Register chaincode event (pass in channel which receives event details when the event is complete) notifier := make(chan *chclient.CCEvent) rce, err := chClient.RegisterChaincodeEvent(notifier, ccID, eventID) if err != nil { log.Fatalln("Failed to register cc event: %s", err) } // Move funds response, err = chClient.Execute(chclient.Request{ChaincodeID: ccID, Fcn: "transferMarble", Args: invokeArgs}) if err != nil { log.Fatalln("Failed to transfer: %s", err) } select { case ccEvent := <-notifier: log.Println("Received CC event: %s\n", ccEvent) case <-time.After(time.Second * 20): log.Fatalln("Did NOT receive CC event for eventId(%s)\n", eventID) } // Unregister chain code event using registration handle err = chClient.UnregisterChaincodeEvent(rce) if err != nil { log.Fatalln("Unregister cc event failed: %s", err) } }

troyronda (Sat, 24 Feb 2018 01:54:35 GMT):
@govinda-attal there is also configuration in the config block in the network

troyronda (Sat, 24 Feb 2018 01:54:53 GMT):
the client obeys that config block

troyronda (Sat, 24 Feb 2018 01:54:53 GMT):
the client obeys that config block for the orderer addresses

govinda-attal (Sat, 24 Feb 2018 01:55:12 GMT):
I am sorry for this big spam message on the client code.... I really appreciate your help @troyronda

troyronda (Sat, 24 Feb 2018 01:56:42 GMT):
do you have a configtx.yaml somewhere?

troyronda (Sat, 24 Feb 2018 01:56:48 GMT):
or something similar

troyronda (Sat, 24 Feb 2018 01:57:15 GMT):
(it's the input to Fabric config block setup)

govinda-attal (Sat, 24 Feb 2018 01:57:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=h53ofPLq3ErRr8ox9) @troyronda Which one in particular... https://github.com/govinda-attal/mybc-client/blob/master/config/config_test.yaml

troyronda (Sat, 24 Feb 2018 01:57:43 GMT):
how did you produce https://github.com/govinda-attal/mybc-client/blob/master/config/channel.tx

govinda-attal (Sat, 24 Feb 2018 01:58:44 GMT):
the same that was produced by byfn.sh -m generate ... I just copied that.. ... Is it that I have to somehow configure client to use it ??? How can I set that and where ???

troyronda (Sat, 24 Feb 2018 01:59:08 GMT):
ah from fabric's tutorial

govinda-attal (Sat, 24 Feb 2018 01:59:20 GMT):
Yes :-)

troyronda (Sat, 24 Feb 2018 02:02:17 GMT):
so you have orderer.example.com set in /etc/hosts?

troyronda (Sat, 24 Feb 2018 02:02:53 GMT):
127.0.0.1 orderer.example.com

govinda-attal (Sat, 24 Feb 2018 02:03:11 GMT):
127.0.0.1 orderer.example.com 127.0.0.1 peer0.org1.example.com

govinda-attal (Sat, 24 Feb 2018 02:03:25 GMT):
yes I do...

troyronda (Sat, 24 Feb 2018 02:03:26 GMT):
have you tried without TLS?

troyronda (Sat, 24 Feb 2018 02:03:39 GMT):
grpc://orderer.example.com:7050

govinda-attal (Sat, 24 Feb 2018 02:04:45 GMT):
orderers: orderer.example.com: url: orderer.example.com:7050 grpcOptions: ssl-target-name-override: orderer.example.com grpc-max-send-message-length: 20 #will be taken into consideration if address has no protocol defined and secured connection fails allow-insecure: false

troyronda (Sat, 24 Feb 2018 02:04:59 GMT):
the default is actually with TLS

troyronda (Sat, 24 Feb 2018 02:05:11 GMT):
so do url: grpc://orderer.example.com:7050

govinda-attal (Sat, 24 Feb 2018 02:05:59 GMT):
this is blurb from the config.yaml... So if I understand well... I should change the url property in orderes section to grpc://orderer.example.com:7050

govinda-attal (Sat, 24 Feb 2018 02:06:09 GMT):
and set allow -insecure to true

troyronda (Sat, 24 Feb 2018 02:06:33 GMT):
any success?

troyronda (Sat, 24 Feb 2018 02:07:51 GMT):
also run "docker ps" to ensure your environment is running

troyronda (Sat, 24 Feb 2018 02:07:56 GMT):
and that the ports are correct

troyronda (Sat, 24 Feb 2018 02:08:10 GMT):
here is mine: fa8c539a31de registry.hub.docker.com/hyperledger/fabric-orderer:x86_64-1.0.5 "orderer" 11 seconds ago Up 8 seconds 0.0.0.0:7050->7050/tcp fabsdkgo_orderer1_1

govinda-attal (Sat, 24 Feb 2018 02:08:51 GMT):
If I understand well... also make the orderer within the docker run with GPRC

troyronda (Sat, 24 Feb 2018 02:09:41 GMT):
you need to match the client and orderer settings

govinda-attal (Sat, 24 Feb 2018 02:10:32 GMT):
Yes docker ps shows the ports are definitely... right... let me make the change quickly to orderer

troyronda (Sat, 24 Feb 2018 02:11:20 GMT):
you are looking for TLS_ENABLED

troyronda (Sat, 24 Feb 2018 02:13:16 GMT):
you can also try with the SDK's environment and tests ... to see how things work

troyronda (Sat, 24 Feb 2018 02:13:57 GMT):
to run the SDK's docker environment run: maje dockerenv-stable-up

troyronda (Sat, 24 Feb 2018 02:13:57 GMT):
to run the SDK's docker environment run: make dockerenv-stable-up

troyronda (Sat, 24 Feb 2018 02:14:49 GMT):
to run the SDK's test suite locally against that environment: make integration-tests-local

troyronda (Sat, 24 Feb 2018 02:15:13 GMT):
ensure that you have all the hosts that are specified in https://github.com/hyperledger/fabric-sdk-go README in your /etc/hosts

troyronda (Sat, 24 Feb 2018 02:15:28 GMT):
or you can everything in docker using make integration-tests and avoid the /etc/hosts setup

troyronda (Sat, 24 Feb 2018 02:16:13 GMT):
you can see the environment settings here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/dockerenv/docker-compose.yaml

troyronda (Sat, 24 Feb 2018 02:16:13 GMT):
you can see the docker environment settings here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/dockerenv/docker-compose.yaml

troyronda (Sat, 24 Feb 2018 02:16:31 GMT):
and the config here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml

troyronda (Sat, 24 Feb 2018 02:16:31 GMT):
the client config here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml

troyronda (Sat, 24 Feb 2018 02:17:13 GMT):
and the channel config here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/fabric/v1.0/config/configtx.yaml

baoyangc (Sat, 24 Feb 2018 02:41:11 GMT):
in the end_to_end, we need invoke `SaveChannel`, this will create a channel. but in production env, we do not create a new channel, just invoke chaincode in current channel. I didn't find an api to invoke chaincode without creating channel

govinda-attal (Sat, 24 Feb 2018 02:42:13 GMT):
@troyronda ... Even when running entire solution with GRPC (not secured) still has the same problem... Query works fine... But invoke is like get an error "context deadline exceeded"

troyronda (Sat, 24 Feb 2018 02:42:46 GMT):
@govinda-attal that means client is connecting to peers but not orderer

govinda-attal (Sat, 24 Feb 2018 02:42:59 GMT):
Yes

troyronda (Sat, 24 Feb 2018 02:43:59 GMT):
try setting loglevel to debug

troyronda (Sat, 24 Feb 2018 02:44:01 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L44

troyronda (Sat, 24 Feb 2018 02:47:22 GMT):
hopefully it prints out the channel config in your debug logs

troyronda (Sat, 24 Feb 2018 02:47:35 GMT):
and you can see what orderer URL is configured

troyronda (Sat, 24 Feb 2018 02:47:35 GMT):
and you can see what orderer URL(s) are configured in your network

troyronda (Sat, 24 Feb 2018 02:48:19 GMT):
Look for "OrdererAddresses addresses value :: "

baoyangc (Sat, 24 Feb 2018 02:56:15 GMT):
@troyronda

govinda-attal (Sat, 24 Feb 2018 02:59:28 GMT):
Hi @troyronda ,,, I think now execute' operation is working... It is coming back with results... Have a question... I am registering the ChaineCodeEvent against the channel prior to calling execute and after execute using 'select' clause trying to receive chaincode event. ... But no event is received ... Why is this registration of event and receipt of event back important

govinda-attal (Sat, 24 Feb 2018 03:15:29 GMT):
Question, if the client is not really interested in these events... can they be ignored ???

govinda-attal (Sat, 24 Feb 2018 03:21:40 GMT):
Many thanks @troyronda ... You have been really helpful :-)

tittuvarghese (Sat, 24 Feb 2018 05:07:17 GMT):
@troyronda Integration Test Fails - The issue is some *.pem keys expired for v1.0.0-rc1

baoyangc (Sat, 24 Feb 2018 08:04:06 GMT):
I want develop an http service, which can deal with different users' chaincode invoking requests. this will asked the fabric-sdk-go support switch to different user context, I didn't find current version support this. Do we have a plan to support this?

baoyangc (Sat, 24 Feb 2018 08:17:03 GMT):
@aleksandar.likic @troyronda

Ammu (Sat, 24 Feb 2018 10:55:27 GMT):
_, args := stub.GetFunctionAndParameters()

Ammu (Sat, 24 Feb 2018 10:55:36 GMT):
what is the meaning of this line?

troyronda (Sat, 24 Feb 2018 11:33:06 GMT):
@baoyangc call fabsdk.NewClient for each identity

troyronda (Sat, 24 Feb 2018 11:33:06 GMT):
@baoyangc call fabsdk.NewClient for each identity (User)

troyronda (Sat, 24 Feb 2018 11:33:44 GMT):
@Ammu this is the chat room for the go client SDK not chaincode

troyronda (Sat, 24 Feb 2018 11:34:40 GMT):
@govinda-attal you don’t need to subscribe to events

troyronda (Sat, 24 Feb 2018 11:35:07 GMT):
@govinda-attal chaincode event is an event set by chaincode.

baoyangc (Sat, 24 Feb 2018 12:29:15 GMT):
if do this, it means ,for different user's invoking request, will rebuild grpcs connection with peer ?

baoyangc (Sat, 24 Feb 2018 12:29:20 GMT):
@troyronda

troyronda (Sat, 24 Feb 2018 12:30:02 GMT):
@baoyangc we will probably rename NewClient to Context to make this more clear

troyronda (Sat, 24 Feb 2018 12:30:58 GMT):
in any case, we are looking at adding connection caching and those connections would be shared between Contexts

troyronda (Sat, 24 Feb 2018 12:31:12 GMT):
note: the type returned from NewClient is actually ClientContext

troyronda (Sat, 24 Feb 2018 12:31:22 GMT):
not a Client :

troyronda (Sat, 24 Feb 2018 12:31:22 GMT):
not a Client :) - in hindsight, this client name turned out to be confusing

baoyangc (Sat, 24 Feb 2018 12:31:59 GMT):
got it

troyronda (Sat, 24 Feb 2018 12:32:21 GMT):
we are doing our best to wrap up these larger refactors asap

baoyangc (Sat, 24 Feb 2018 12:32:33 GMT):
do we have an method to keep grpcs connection keep alive between switch user context?

troyronda (Sat, 24 Feb 2018 12:32:33 GMT):
so if you have any suggestions, please do send.

troyronda (Sat, 24 Feb 2018 12:33:01 GMT):
not yet, but we know we need to get that done. we will be switching over to performance tasks shortly

troyronda (Sat, 24 Feb 2018 12:33:38 GMT):
we are wrapping up API and 1.1 feature completion this week

troyronda (Sat, 24 Feb 2018 12:33:38 GMT):
we are wrapping up API and Fabric 1.1 feature completion (particularly delivery service) this coming week

troyronda (Sat, 24 Feb 2018 12:33:48 GMT):
then on to "under the covers"

govinda-attal (Sat, 24 Feb 2018 12:34:41 GMT):
You are fantastic @troyronda !!!!

e-nikolov (Sat, 24 Feb 2018 18:01:56 GMT):
@troyronda is the ClientContext in any way related to golang's built in context package? If not it makes the name a bit confusing

e-nikolov (Sat, 24 Feb 2018 18:01:56 GMT):
@troyronda is the ClientContext in any way related to golang's built in [https://golang.org/pkg/context/](context package)? If not it makes the name a bit confusing

e-nikolov (Sat, 24 Feb 2018 18:01:56 GMT):
@troyronda is the ClientContext in any way related to golang's built in [context package](https://golang.org/pkg/context/)? If not it makes the name a bit confusing

e-nikolov (Sat, 24 Feb 2018 18:01:56 GMT):
@troyronda is the ClientContext in any way related to golang's built-in [context package](https://golang.org/pkg/context/)? If not it makes the name a bit confusing

troyronda (Sat, 24 Feb 2018 20:58:09 GMT):
@e-nikolov Not directly (although we do use the built-in context). Golang's built-in context package is a per-request context that we use for GRPC timeouts. The SDK has other scopes of context - SDK object scope (where providers, config and cache has been loaded), Identity/User Context (representing a loaded credential), Context provided to a client (eg, channel client) - largely SDK context + Identity context + channel context (if applicable). Finally we have transaction context (called TransactionHeader) containing TransactionID and other header parameters needed for a transaction.

troyronda (Sat, 24 Feb 2018 20:58:09 GMT):
@e-nikolov Not directly related, no (although we do use the built-in context). Golang's built-in context package is a per-request context that we use for GRPC timeouts. The SDK has other scopes of context - SDK object scope (where providers, config and cache has been loaded), Identity/User Context (representing a loaded credential), Context provided to a client (eg, channel client) - largely SDK context + Identity context + channel context (if applicable). Finally we have transaction context (called TransactionHeader) containing TransactionID and other header parameters needed for a transaction.

troyronda (Sat, 24 Feb 2018 20:58:09 GMT):
@e-nikolov Not directly related, no (although we do use the built-in context). Golang's built-in context package is a per-request context that we use for GRPC timeouts. The SDK has other scopes of context - SDK object scope (where providers, config and cache has been loaded), Identity/User Context (representing a loaded credential), Context provided to a client (eg, channel client) - this is SDK context + Identity context + channel context (if applicable). Finally we have transaction context (called TransactionHeader) containing TransactionID and other header parameters needed for a transaction.

troyronda (Sat, 24 Feb 2018 20:58:09 GMT):
@e-nikolov Not directly related, no (although we do use the built-in context). Golang's built-in context package is a per-request context that we use for GRPC timeouts. The SDK has other scopes of context - SDK object scope (where providers, config and cache has been loaded), Identity/User Context (representing a loaded credential), Context provided to a client (eg, channel client) - this is SDK context + Identity context + channel context (if applicable). Finally we have transaction context (called TransactionHeader) containing the computed TransactionID and other header parameters needed for a transaction.

troyronda (Sat, 24 Feb 2018 20:59:15 GMT):
(also Java and Node SDKs also use the context terminology)

troyronda (Sat, 24 Feb 2018 20:59:15 GMT):
(also Java and Node SDKs also use context terminology)

troyronda (Sat, 24 Feb 2018 20:59:15 GMT):
(also Java and Node Fabric SDKs also use context terminology)

troyronda (Sat, 24 Feb 2018 21:02:04 GMT):
It's, of course, tricky to come up with names :), and the nature of golang package names is on succinctness so this is bound to happen.

troyronda (Sat, 24 Feb 2018 21:02:04 GMT):
It's, of course, tricky to come up with names :), and the nature of golang package names is on succinctness so this is bound to happen.... (and context is such a general concept).

troyronda (Sat, 24 Feb 2018 21:02:49 GMT):
We also tossed Session around - eg., AWS Go SDK has a session package... but these items do seem a lot like context.

StevenXu (Sun, 25 Feb 2018 08:54:31 GMT):
when I call resource.QueryChannels func

gen_el (Mon, 26 Feb 2018 09:36:36 GMT):
Has joined the channel.

parsiya (Tue, 27 Feb 2018 18:01:30 GMT):
Has joined the channel.

TBiehn (Tue, 27 Feb 2018 18:12:40 GMT):
Has joined the channel.

baoyangc (Wed, 28 Feb 2018 03:19:11 GMT):
@troyronda ,sometimes, we need switch to another `chaincode`, does the sdk support this?

troyronda (Wed, 28 Feb 2018 12:10:04 GMT):
@baoyangc I’m not sure I understand your question, but you can use the SDK to interact with multiple chaincodes.

dampuero (Wed, 28 Feb 2018 15:05:53 GMT):
Has joined the channel.

aneb (Wed, 28 Feb 2018 16:12:07 GMT):
Has left the channel.

iamdm (Wed, 28 Feb 2018 16:19:38 GMT):
@troyronda is there the way to construct channel via sdk? I mean constructing consortium, policy, etc block

e-nikolov (Wed, 28 Feb 2018 16:36:43 GMT):
is it possible to control the timeout of chaincode execution?

e-nikolov (Wed, 28 Feb 2018 16:37:25 GMT):
right now it seems that if it takes more than 10 seconds, it times out

e-nikolov (Wed, 28 Feb 2018 16:37:25 GMT):
in our case it seems that if it takes more than 10 seconds, it times out

e-nikolov (Wed, 28 Feb 2018 16:38:26 GMT):
I tried a few of the timeout variables inside the SDK's config.yaml, but they didn't seem to help

iamdm (Wed, 28 Feb 2018 16:46:34 GMT):
@e-nikolov are you querying or invoking?

e-nikolov (Wed, 28 Feb 2018 16:47:02 GMT):
there shouldn't be a difference

e-nikolov (Wed, 28 Feb 2018 16:47:22 GMT):
but invoking in this case

iamdm (Wed, 28 Feb 2018 16:47:55 GMT):
are you using ChannelClient?

e-nikolov (Wed, 28 Feb 2018 16:51:02 GMT):
sdk.FabricProvider().CreateChannelClient()

e-nikolov (Wed, 28 Feb 2018 16:51:02 GMT):
channel = sdk.FabricProvider().CreateChannelClient()

e-nikolov (Wed, 28 Feb 2018 16:51:32 GMT):
and then channel.SendTransactionProposal()

troyronda (Wed, 28 Feb 2018 17:03:49 GMT):
@iamdm we haven't included the code to construct the blocks in the SDK - it would be nice to have though.

troyronda (Wed, 28 Feb 2018 17:03:49 GMT):
@iamdm we haven't included the code to construct the various policy-related blocks in the SDK - it would be nice to have though.

troyronda (Wed, 28 Feb 2018 17:03:49 GMT):
@iamdm we haven't included the code to construct the various policy-related blocks in the SDK - it would be nice to have though. Just haven’t had time.

troyronda (Wed, 28 Feb 2018 17:04:25 GMT):
(currently it expects a preconstructed block)

iamdm (Wed, 28 Feb 2018 17:08:23 GMT):
@e-nikolov hmm try to use `chclient.ChannelClient`, it has `ExecuteTxWithOpts` method, which allows to set timeout

iamdm (Wed, 28 Feb 2018 17:09:39 GMT):
@troyronda i looked fabric code, currently it doesn't allow to construct block on fly, because he looking for msp on filesystem

iamdm (Wed, 28 Feb 2018 17:09:39 GMT):
@troyronda i looked fabric code, currently it doesn't allow to construct block on fly, because he is looking for msp on filesystem

troyronda (Wed, 28 Feb 2018 17:14:35 GMT):
ah - yup it would be good to add to have this capability...

e-nikolov (Wed, 28 Feb 2018 18:26:48 GMT):
@iamdm looking at the code of chclient, it uses the new version of channel.SendTransactionProposal() behind the scenes, and the timeout that can be specified for it comes before the timeout i'm getting

indirajith (Thu, 01 Mar 2018 11:38:21 GMT):
Any pointers where to get started with fabric-sdk-go? Like simple example from where I can build on?

iamdm (Thu, 01 Mar 2018 11:40:28 GMT):
@indirajith https://github.com/securekey/fabric-examples

indirajith (Thu, 01 Mar 2018 11:43:42 GMT):
@iamdm Thank you. I will learn from it.

iamdm (Thu, 01 Mar 2018 11:44:01 GMT):
@indirajith you're welcome

iamdm (Thu, 01 Mar 2018 14:17:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Z7eytH6t3itekpMhZ) @troyronda i created new issue in jira, but i think it won't be taken until release of 1.1

troyronda (Thu, 01 Mar 2018 14:18:10 GMT):
Also feel free to contribute parts if you can :)

iamdm (Thu, 01 Mar 2018 14:20:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jyrTwyt7Mg4g8mKzZ) @troyronda currently i think it'snot easy, because configtxgen has hard-coded functions, which contains msp functionality:)

iamdm (Thu, 01 Mar 2018 14:20:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jyrTwyt7Mg4g8mKzZ) @troyronda currently i think it's not easy, because configtxgen has hard-coded functions, which contains msp functionality:)

iamdm (Thu, 01 Mar 2018 14:21:27 GMT):
also, i'm trying to take parts of their code and use, but if these parts will be changed...

iamdm (Thu, 01 Mar 2018 14:21:27 GMT):
also, i'm trying to take parts of their code and use it, but if these parts will be changed...

e-nikolov (Thu, 01 Mar 2018 14:57:29 GMT):
has there been a change in how the orderer config is stored?

e-nikolov (Thu, 01 Mar 2018 14:58:00 GMT):
I updated one application to the latest sdk and it can no longer connect to the orderer

e-nikolov (Thu, 01 Mar 2018 14:58:41 GMT):
if I inspect the logs in debug mode, I now see ``` [fabric_sdk_go] 2018/03/01 14:52:34 UTC - txn.sendBroadcast -> DEBU Broadcasting envelope to orderer :orderer.example.com:7050

e-nikolov (Thu, 01 Mar 2018 14:59:55 GMT):
whereas with the older version I see ``` [fabric_sdk_go] 2018/03/01 14:52:34 UTC - txn.sendBroadcast -> DEBU Broadcasting envelope to orderer :

e-nikolov (Thu, 01 Mar 2018 15:01:00 GMT):
also if I remove the orderer section from the config file, it still shows :orderer.example.com:7050

e-nikolov (Thu, 01 Mar 2018 15:01:15 GMT):
kind of bizzare, it's possible that I've messed up somehow as well

antitoine (Thu, 01 Mar 2018 15:23:20 GMT):
@e-nikolov I had the same problem, and @troyronda helped me figure out where that problem came from: it seems that the SDK now looks at the address in the genesis block.

e-nikolov (Thu, 01 Mar 2018 15:24:35 GMT):
@antitoine does that mean that the config section for orderers in the config isn't used anymore?

e-nikolov (Thu, 01 Mar 2018 15:25:10 GMT):
it would make sense to still be able to override the genesis block config if necessary

antitoine (Thu, 01 Mar 2018 15:25:26 GMT):
Yes, that why @troyronda create this: https://jira.hyperledger.org/browse/FAB-8442

e-nikolov (Thu, 01 Mar 2018 15:25:27 GMT):
so is this a feature or a bug?

e-nikolov (Thu, 01 Mar 2018 15:25:57 GMT):
I see

e-nikolov (Thu, 01 Mar 2018 15:27:02 GMT):
@antitoine do you know which commit introduced this change? so I can rollback to it

e-nikolov (Thu, 01 Mar 2018 15:27:02 GMT):
@antitoine do you know which commit introduced this change? so I can rollback to the one before it

antitoine (Thu, 01 Mar 2018 15:27:59 GMT):
No, I don't know at all. If you find it, I'm interested.

e-nikolov (Thu, 01 Mar 2018 15:29:50 GMT):
I was on 614551a752802488988921a730b172dada7def1d before trying to update and that worked

e-nikolov (Thu, 01 Mar 2018 15:30:20 GMT):
but not sure which one breaks it, gotta investigate

antitoine (Thu, 01 Mar 2018 15:37:20 GMT):
Ok thanks

antitoine (Thu, 01 Mar 2018 15:49:56 GMT):
@sudeshrshetty and @troyronda thanks for the LoggerProvider, it works! But I would like to come back to you because I find it a shame to have to call the InitLogging method when it is possible to give a parameter to the SDK (`WithLoggerPkg`). I mean, I don't see the point of this parameter at all.

antitoine (Thu, 01 Mar 2018 15:49:56 GMT):
@sudeshrshetty and @troyronda thanks for the `LoggerProvider`, it works! But I would like to come back to you because I find it a shame to have to call the InitLogging method when it is possible to give a parameter to the SDK ( `WithLoggerPkg` ). I mean, I don't see the point of this parameter at all.

antitoine (Thu, 01 Mar 2018 15:49:56 GMT):
@sudeshrshetty and @troyronda thanks for the `LoggerProvider`, it works! But I would like to come back to you because I find it a shame to have to call the `InitLogging` method when it is possible to give a parameter to the SDK ( `WithLoggerPkg` ). I mean, I don't see the point of this parameter at all.

sudeshrshetty (Thu, 01 Mar 2018 16:10:39 GMT):
`InitLogging` will be helpful if you are using these loggers outside SDK. For example an external application which depends on SDK, want to use the SDK logger, but doesn't want to wait for SDK.New to initialize loggers.

antitoine (Thu, 01 Mar 2018 16:13:55 GMT):
All right, fine for `InitLogging`. But then `WithLoggerPkg` should call the function `InitLogging` ? Because with or without `WithLoggerPkg` , the result is the same.

troyronda (Thu, 01 Mar 2018 16:34:56 GMT):
Ledger queries now have a client similar to channel client

troyronda (Thu, 01 Mar 2018 16:35:00 GMT):
example: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/sdk/ledger_queries_test.go

troyronda (Thu, 01 Mar 2018 16:35:28 GMT):
package: github.com/hyperledger/fabric-sdk-go/pkg/client/ledger

troyronda (Thu, 01 Mar 2018 16:36:01 GMT):
@sudeshrshetty @antitoine makes sense

troyronda (Thu, 01 Mar 2018 16:37:08 GMT):
@e-nikolov @antitoine there is actually a WIP on matching the hostnames to the config (which effectively allows for override) https://gerrit.hyperledger.org/r/c/18543/

troyronda (Thu, 01 Mar 2018 16:37:57 GMT):
so even if your channel config block has orderer.example.com:7050, you will be able to override the connection endpoint that using the statuc config.

troyronda (Thu, 01 Mar 2018 16:37:57 GMT):
so even if your channel config block has orderer.example.com:7050, you will be able to override the connection endpoint that using the static config.

troyronda (Thu, 01 Mar 2018 16:38:27 GMT):
for example, see https://gerrit.hyperledger.org/r/c/18543/1/pkg/core/config/testdata/template/config.yaml

troyronda (Thu, 01 Mar 2018 16:38:45 GMT):
(specifically matchPattern & substitutionURL parameters)

troyronda (Thu, 01 Mar 2018 19:19:11 GMT):
@antitoine @sudeshrshetty SDK calls InitLogging here: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabsdk/fabsdk.go#L165

troyronda (Thu, 01 Mar 2018 19:19:27 GMT):
so calling WithLoggerPkg is sufficient

troyronda (Thu, 01 Mar 2018 22:45:20 GMT):
We have updated to fabric 1.1.0-rc1

baoyangc (Fri, 02 Mar 2018 01:57:51 GMT):
do we have design documents? @troyronda

alain2sf (Fri, 02 Mar 2018 08:58:27 GMT):
Has joined the channel.

rangak (Fri, 02 Mar 2018 11:19:58 GMT):
Has left the channel.

jriachi (Fri, 02 Mar 2018 16:10:20 GMT):
@troyronda I've downloaded the securekey/fabric-examples and launched docker-compose up inside the fixtures folder, and executed the following command go run fabric-cli.go channel create --cid mychannel --txfile fixtures/channel/mychannel.tx --config fixtures/config/config_test.yaml

jriachi (Fri, 02 Mar 2018 16:10:51 GMT):
and I got the following error

jriachi (Fri, 02 Mar 2018 16:10:53 GMT):
[fabriccli] 2018/03/02 15:58:31 UTC - channel.glob..func2 -> ERRO Error while running channelCreateAction: NewUser returned error: Enroll failed: enrollmentSecret required

jriachi (Fri, 02 Mar 2018 16:11:00 GMT):
What am I doing wrong?

jriachi (Sat, 03 Mar 2018 15:51:06 GMT):
NEVER MIND I FIGURED IT OUT

Kyroy (Mon, 05 Mar 2018 08:11:26 GMT):
Hey, in my project I want to upgrade my version of the fabric-sdk-go soon. When I tried to do it 3 weeks ago, I experienced a lot of deprecated functions that are still used in the e2e tests, so I did not know which functions to use and a good workflow. When do you think, all of the deprecated functions will be removed from the e2e tests? :D

troyronda (Mon, 05 Mar 2018 14:44:52 GMT):
@Kyroy should be this week

Kyroy (Mon, 05 Mar 2018 14:47:25 GMT):
Cool :)

c.nattawit (Tue, 06 Mar 2018 02:40:48 GMT):
Will there be an example for identity management too? Like register, enroll, revoke, etc. e2e right now assume that you already have a user but never mention how to enroll them.

jriachi (Tue, 06 Mar 2018 10:46:10 GMT):
What does this error message mean

jriachi (Tue, 06 Mar 2018 10:46:13 GMT):
[fabric_sdk_go] 2018/03/06 10:40:15 UTC - orderer.(*Orderer).SendBroadcast.func1 -> DEBU Orderer.broadcastStream - response:status:BAD_REQUEST , error:

jriachi (Tue, 06 Mar 2018 10:46:31 GMT):
This happens when I try to contact the orderer to install the chaincode

jriachi (Tue, 06 Mar 2018 10:47:41 GMT):
I suspects it has something to do with the channel.tx file. Is there a tool to deserialize the channel.tx file?

jriachi (Tue, 06 Mar 2018 11:17:39 GMT):
The orderer is up an running...

jriachi (Tue, 06 Mar 2018 11:35:29 GMT):
configtxgen -inspectChannelCreateTx channel.tx

jriachi (Tue, 06 Mar 2018 11:35:30 GMT):
does deserialize the the tx file, but still no idea why the above error is there

jriachi (Tue, 06 Mar 2018 11:54:23 GMT):
NEVERMIND, Sorted it out. The MSPID was wrong in the config.yaml file

troyronda (Tue, 06 Mar 2018 14:28:39 GMT):
@c.nattawit @aleksandar.likic is working on it

dave.enyeart (Tue, 06 Mar 2018 17:07:25 GMT):
Has joined the channel.

rjones (Tue, 06 Mar 2018 18:06:38 GMT):
dave.enyeart

rjones (Tue, 06 Mar 2018 18:06:43 GMT):
cbf

troyronda (Tue, 06 Mar 2018 19:38:12 GMT):
...

dave.enyeart (Tue, 06 Mar 2018 20:47:19 GMT):
troyronda

dave.enyeart (Tue, 06 Mar 2018 20:47:28 GMT):
aleksandar.likic

dave.enyeart (Tue, 06 Mar 2018 20:47:36 GMT):
firas.qutishat

Kyroy (Wed, 07 Mar 2018 07:15:05 GMT):
Is there a channel delete function that I can use to get rid of a channel and its data? It would be also ok if I could only leave the channel, so that my peer does not have to deal with it anymore

antitoine (Wed, 07 Mar 2018 08:37:57 GMT):
If you're interested, the tutorial to build a simple web application with the Fabric SDK Go was updated and available here: https://github.com/chainHero/heroes-service

jeffprestes (Wed, 07 Mar 2018 13:20:10 GMT):
@antiton

jeffprestes (Wed, 07 Mar 2018 13:20:39 GMT):
@antitoine :clap: :clap: :clap: :clap: :clap:

jeffprestes (Wed, 07 Mar 2018 13:21:03 GMT):
very well done

csati (Wed, 07 Mar 2018 14:23:08 GMT):
Has joined the channel.

csati (Wed, 07 Mar 2018 14:23:57 GMT):
Hello - I am using the GetHistoryForKey() GO SDK API for getting history of transactions for a particular key. Is there a way to get more information about the transactions, i.e. which chaincode was executed, which participants were involved in it, etc.?

ShereenSallam (Thu, 08 Mar 2018 08:00:16 GMT):
Has joined the channel.

nivi81 (Thu, 08 Mar 2018 09:07:01 GMT):
Has joined the channel.

Kyroy (Thu, 08 Mar 2018 12:35:11 GMT):
I saw that the e2e tests were updated. But they totally use the config file for the configuration. How can I join a channel by name, without knowing the complete configuration? Previously there was the `channel.Initialize(nil)` function

troyronda (Thu, 08 Mar 2018 14:26:02 GMT):
@Kyroy the channel configuration is now fetched from the peer

troyronda (Thu, 08 Mar 2018 14:26:20 GMT):
you only need to have a local channel configuration when creating channels

troyronda (Thu, 08 Mar 2018 14:27:29 GMT):
(when joining a channel, the channel configuration is fetched from the orderer)

troyronda (Thu, 08 Mar 2018 14:27:29 GMT):
(when joining a peer to a channel, the channel configuration is fetched from the orderer)

Kyroy (Thu, 08 Mar 2018 14:27:36 GMT):
I will write you a private message with code, to not spam this chat, okay? :D

troyronda (Thu, 08 Mar 2018 14:27:52 GMT):
ok

antitoine (Thu, 08 Mar 2018 14:47:50 GMT):
Someone knows some leads to find the error source of this message: `ERRO [fabric_sdk_go] : NewEndorserClient failed, cause : rpc error: code = Unavailable desc = transport is closing`

antitoine (Thu, 08 Mar 2018 14:47:50 GMT):
Someone knows some leads to find the error source of this message: `ERRO [fabric_sdk_go] : NewEndorserClient failed, cause : rpc error: code = Unavailable desc = transport is closing` ?

Baha-sk (Thu, 08 Mar 2018 15:47:58 GMT):
@antitoine could be that peer/orderer is not up?

antitoine (Thu, 08 Mar 2018 16:39:13 GMT):
Another application submit transactions without issue in the same time :/

Baha-sk (Thu, 08 Mar 2018 16:52:58 GMT):
could be the client timed out before getting a response..

Ammu (Fri, 09 Mar 2018 05:56:46 GMT):

plz.png

Ammu (Fri, 09 Mar 2018 05:57:00 GMT):
please help for this error

username343 (Fri, 09 Mar 2018 06:17:48 GMT):
Has joined the channel.

username343 (Fri, 09 Mar 2018 07:24:55 GMT):
do we have documentation for hyperledger fabric go sdk similar to that of the node sdk?

jeffprestes (Fri, 09 Mar 2018 11:07:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=QQfTrP7xxXiL3iKYu) @Ammu probably you have an error in your Dockerfile....

jeffprestes (Fri, 09 Mar 2018 11:09:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=WQK5zgGKDsTf6FSGq) @username343 I don't think so, at least I didn't find it. I think we might have to write it...

troyronda (Fri, 09 Mar 2018 14:35:23 GMT):
@antitoine i assume you haven't called sdk.Close prior to that happening?

troyronda (Fri, 09 Mar 2018 14:36:01 GMT):
One possible reason for that error is the SDK has closed the connection.

troyronda (Fri, 09 Mar 2018 14:36:24 GMT):
This happens on sdk.Close and when the connection hasn't been used for the connectionIdle period

antitoine (Fri, 09 Mar 2018 15:43:45 GMT):
@troyronda I have two applications, one submitting transactions and the other reading the information. Both applications share the same configuration file (except for temporary files, such as credentials) and the same SDK initialization process. Only the application that makes requests returns this error, very rarely a request works. I tried to increase the timeouts, but I still have the same result.

troyronda (Fri, 09 Mar 2018 15:44:21 GMT):
are you calling sdk.Close()?

antitoine (Fri, 09 Mar 2018 15:45:07 GMT):
No

troyronda (Fri, 09 Mar 2018 15:52:24 GMT):
Have you enabled debug logs - perhaps there is a snippet around the error that I could see?

antitoine (Fri, 09 Mar 2018 15:59:57 GMT):
Good point, I will try

antitoine (Fri, 09 Mar 2018 16:03:35 GMT):
``` 17:00:17.540 DEBU [fabric_sdk_go] : Creating BCCSP-based MSP instance 17:00:17.540 DEBU [fabric_sdk_go] : Setting up MSP instance hf.chainhero.net 17:00:17.541 DEBU [fabric_sdk_go] : MSP hf.chainhero.net validating identity 17:00:17.541 DEBU [fabric_sdk_go] : loadMSPs - adding msp=hf.chainhero.net 17:00:17.541 DEBU [fabric_sdk_go] : Creating BCCSP-based MSP instance 17:00:17.541 DEBU [fabric_sdk_go] : Setting up MSP instance org1.hf.chainhero.net 17:00:17.541 DEBU [fabric_sdk_go] : MSP org1.hf.chainhero.net validating identity 17:00:17.542 DEBU [fabric_sdk_go] : loadMSPs - adding msp=org1.hf.chainhero.net 17:00:17.542 DEBU [fabric_sdk_go] : loadMSPs - loaded 2 MSPs 17:00:17.542 DEBU [fabric_sdk_go] : Setting up the MSP manager (2 msps) 17:00:17.542 DEBU [fabric_sdk_go] : MSP manager setup complete, setup 2 msps 17:00:17.542 DEBU [fabric_sdk_go] : Constructed channel instance for channel chainhero: {chainhero map[] map[orderer.hf.chainhero.net:7050:0xc4204c6090] 0xc420488ae0 0xc4204895e0 [] 0xc42037a3c0 false} 17:00:17.543 INFO [general] : Server listening on: http://localhost:3001/ 17:00:28.203 DEBU [fabric_sdk_go] : Processing proposal using endorser: peer0.org1.hf.chainhero.net:7051 17:00:29.282 ERRO [fabric_sdk_go] : NewEndorserClient failed, cause : rpc error: code = Unavailable desc = transport is closing 17:00:29.282 DEBU [fabric_sdk_go] : Received error response from txn proposal processing: Transaction processing for endorser [peer0.org1.hf.chainhero.net:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing 17:00:29.282 ERRO [api] : Api error: unable to make query: Transaction processing for endorser [peer0.org1.hf.chainhero.net:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing ```

antitoine (Fri, 09 Mar 2018 16:03:35 GMT):
``` ... 17:00:17.540 DEBU [fabric_sdk_go] : Creating BCCSP-based MSP instance 17:00:17.540 DEBU [fabric_sdk_go] : Setting up MSP instance hf.chainhero.net 17:00:17.541 DEBU [fabric_sdk_go] : MSP hf.chainhero.net validating identity 17:00:17.541 DEBU [fabric_sdk_go] : loadMSPs - adding msp=hf.chainhero.net 17:00:17.541 DEBU [fabric_sdk_go] : Creating BCCSP-based MSP instance 17:00:17.541 DEBU [fabric_sdk_go] : Setting up MSP instance org1.hf.chainhero.net 17:00:17.541 DEBU [fabric_sdk_go] : MSP org1.hf.chainhero.net validating identity 17:00:17.542 DEBU [fabric_sdk_go] : loadMSPs - adding msp=org1.hf.chainhero.net 17:00:17.542 DEBU [fabric_sdk_go] : loadMSPs - loaded 2 MSPs 17:00:17.542 DEBU [fabric_sdk_go] : Setting up the MSP manager (2 msps) 17:00:17.542 DEBU [fabric_sdk_go] : MSP manager setup complete, setup 2 msps 17:00:17.542 DEBU [fabric_sdk_go] : Constructed channel instance for channel chainhero: {chainhero map[] map[orderer.hf.chainhero.net:7050:0xc4204c6090] 0xc420488ae0 0xc4204895e0 [] 0xc42037a3c0 false} 17:00:17.543 INFO [general] : Server listening on: http://localhost:3001/ 17:00:28.203 DEBU [fabric_sdk_go] : Processing proposal using endorser: peer0.org1.hf.chainhero.net:7051 17:00:29.282 ERRO [fabric_sdk_go] : NewEndorserClient failed, cause : rpc error: code = Unavailable desc = transport is closing 17:00:29.282 DEBU [fabric_sdk_go] : Received error response from txn proposal processing: Transaction processing for endorser [peer0.org1.hf.chainhero.net:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing 17:00:29.282 ERRO [api] : Api error: unable to make query: Transaction processing for endorser [peer0.org1.hf.chainhero.net:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing ... ```

antitoine (Fri, 09 Mar 2018 16:06:08 GMT):
At 17:00:17.543, SDK has been initialized. At 17:00:28, I made a request to the web server that produce a rich query using the SDK

antitoine (Fri, 09 Mar 2018 16:06:08 GMT):
At 17:00:17.543, SDK has been initialized. At 17:00:28.203, I made a request to the web server that produce a rich query using the SDK

antitoine (Fri, 09 Mar 2018 16:12:20 GMT):
I will upgrade the SDK to the last commit

troyronda (Fri, 09 Mar 2018 16:15:10 GMT):
you will want this fix (hopefully merged shortly): https://gerrit.hyperledger.org/r/c/18873/

troyronda (Fri, 09 Mar 2018 16:15:47 GMT):
unrelated to your issue

troyronda (Fri, 09 Mar 2018 16:15:47 GMT):
unrelated to your issue, but contains a fix for the orderer logic

troyronda (Fri, 09 Mar 2018 16:15:47 GMT):
unrelated to your issue, but contains a fix for the orderer logic along with an enhancement for connection management

antitoine (Fri, 09 Mar 2018 16:23:16 GMT):
@troyronda Ok. Out of curiosity, what exactly are you waiting for to release a first version of the SDK?

troyronda (Fri, 09 Mar 2018 16:23:57 GMT):
the next version is still waiting for delivery service to be merged along with the enrollment API

troyronda (Fri, 09 Mar 2018 16:24:38 GMT):
hopefully those items get merged today or monday

antitoine (Fri, 09 Mar 2018 17:03:40 GMT):
Ok great!

sg3des (Sat, 10 Mar 2018 20:45:03 GMT):
@troyronda Hi, could you please say when i can expect the a stable tag of fabric-sdk-go?

troyronda (Sat, 10 Mar 2018 21:40:08 GMT):
@sg3des the next tag is expected this coming week.

troyronda (Sat, 10 Mar 2018 21:44:36 GMT):
after the next tag, i'm hoping we get feedback ... and it would be awesome to see more collaborators :).

troyronda (Sat, 10 Mar 2018 21:54:15 GMT):
@sg3des @antitoine fyi: the replacement for event hub has now been merged including support for fabric 1.1 delivery service and filtered blocks.

troyronda (Sat, 10 Mar 2018 21:54:15 GMT):
@sg3des @antitoine fyi: the replacement for the old event hub client has now been merged including support for fabric 1.1 delivery service and filtered blocks (and still supporting event hub).

sg3des (Sun, 11 Mar 2018 13:07:20 GMT):
@troyronda, Hi, after upgrade SDK to the last commit, i can not join to channel `orgResMgmt.JoinChannel(channelID)` - error: "genesis block retrieval failed: error from orderer: unknown response from ordering service %!s()". Where there can be a problem?

sg3des (Sun, 11 Mar 2018 13:07:34 GMT):
P.S. Tests pass normally

troyronda (Sun, 11 Mar 2018 13:34:26 GMT):
@sg3des i haven't seen that error - do the logs show anything useful?

sg3des (Sun, 11 Mar 2018 13:42:48 GMT):
hard to say... in debug logs from docker and from SDK, no obvious errors. Order successfuly initialized, and then, when necessary joined to channel - error. it`s fabric-sdk logs after orderer initialization - https://pastebin.com/XyXNfZyZ

troyronda (Sun, 11 Mar 2018 13:44:43 GMT):
@sg3des I noticed that grpc recv is being setup after the Send but not sure it's related. I pushed a fix for that just now: https://gerrit.hyperledger.org/r/c/19043/

troyronda (Sun, 11 Mar 2018 13:44:43 GMT):
@sg3des I noticed that grpc recv is being setup after the Send but not sure it's related. I pushed a change for that just now: https://gerrit.hyperledger.org/r/c/19043/ to see if it makes any difference for you.

troyronda (Sun, 11 Mar 2018 13:44:43 GMT):
@sg3des I noticed that grpc recv is being setup after the Send but not sure it's related. I pushed a change for that just now: https://gerrit.hyperledger.org/r/c/19043/ to see if it makes any difference for you and added a couple more debug liens.

troyronda (Sun, 11 Mar 2018 13:44:43 GMT):
@sg3des I noticed that grpc recv is being setup after the Send but not sure it's related. I pushed a change for that just now: https://gerrit.hyperledger.org/r/c/19043/ to see if it makes any difference for you and added a couple more debug lines.

troyronda (Sun, 11 Mar 2018 14:13:20 GMT):
interesting - that causes the same issue

troyronda (Sun, 11 Mar 2018 14:13:22 GMT):
14:04:44 --- FAIL: TestSendDeliverFailure (0.01s) 14:04:44 orderer_test.go:151: Starting test customized server on 127.0.0.1:37251 14:04:44 orderer_test.go:310: Error response is not working as expected : 'unknown response type from ordering service '

troyronda (Sun, 11 Mar 2018 14:13:33 GMT):
i'll look into it a bit more in a bit

troyronda (Sun, 11 Mar 2018 14:59:54 GMT):
TestSendDeliverFailure - forgot that I change the error message slightly :)

troyronda (Sun, 11 Mar 2018 14:59:54 GMT):
TestSendDeliverFailure was unrelated - forgot that I change the error message slightly :)

troyronda (Sun, 11 Mar 2018 14:59:54 GMT):
@sg3des TestSendDeliverFailure unit test was unrelated - forgot that I change the error message slightly :)

troyronda (Sun, 11 Mar 2018 14:59:54 GMT):
@sg3des TestSendDeliverFailure unit test was unrelated - forgot that I changed the error message slightly :)

troyronda (Sun, 11 Mar 2018 14:59:54 GMT):
@sg3des TestSendDeliverFailure unit test was unrelated - forgot that I changed the error message slightly ... should pass now :)

troyronda (Sun, 11 Mar 2018 14:59:54 GMT):
@sg3des TestSendDeliverFailure unit test was unrelated - forgot that I changed the error message slightly ... the above change should pass unit tests now :)

troyronda (Sun, 11 Mar 2018 15:07:40 GMT):
@sg3des did you see anything in the orderer logs?

sg3des (Sun, 11 Mar 2018 15:31:27 GMT):
https://pastebin.com/gcasQrC6 - orderer log - initialize `context` and `resmgmt` for Admin and JoinCannel

troyronda (Sun, 11 Mar 2018 15:33:48 GMT):
@sg3des FYI: merged the above change ...

troyronda (Sun, 11 Mar 2018 15:33:48 GMT):
@sg3des FYI: merged the above change ... long shot, but the order of operations seems better anywyas.

troyronda (Sun, 11 Mar 2018 15:33:48 GMT):
@sg3des FYI: merged the above change ... long shot, but the order of operations seems better anyways.

troyronda (Sun, 11 Mar 2018 15:35:04 GMT):
The other idea is if CloseSend is causing an issue

sg3des (Sun, 11 Mar 2018 15:35:12 GMT):
this is with last patch

troyronda (Sun, 11 Mar 2018 15:35:23 GMT):
orderer.hyper.com | 2018-03-11 15:28:11.243 UTC [orderer/common/deliver] Handle -> DEBU 729 Received EOF, hangup orderer.hyper.com | 2018-03-11 15:28:11.243 UTC [orderer/main] func1 -> DEBU 72a Closing Deliver stream

troyronda (Sun, 11 Mar 2018 15:35:47 GMT):
what version is the orderer?

sg3des (Sun, 11 Mar 2018 15:36:06 GMT):
container?

troyronda (Sun, 11 Mar 2018 15:36:13 GMT):
I just merged the last patch like 5 mins ago though :)

troyronda (Sun, 11 Mar 2018 15:36:22 GMT):
you are fast

sg3des (Sun, 11 Mar 2018 15:37:30 GMT):
i did it manually from patch ^^

sg3des (Sun, 11 Mar 2018 15:37:52 GMT):
docker container with order 1.0.6 version

sg3des (Sun, 11 Mar 2018 15:37:56 GMT):
orderer*

sg3des (Sun, 11 Mar 2018 15:39:24 GMT):
> Received EOF, hangup what could it be?

troyronda (Sun, 11 Mar 2018 15:41:22 GMT):
maybe see if this makes a difference: https://gerrit.hyperledger.org/r/c/19051/

troyronda (Sun, 11 Mar 2018 15:41:38 GMT):
I moved the CloseSend after Recv is finished

troyronda (Sun, 11 Mar 2018 15:41:50 GMT):
Shouldn't need to do this but maybe the orderer needs it this way.

troyronda (Sun, 11 Mar 2018 15:43:14 GMT):
sorry i lost a line in a rebase - use patch set 2

troyronda (Sun, 11 Mar 2018 15:45:22 GMT):
@sg3des issue could be due to this: https://github.com/hyperledger/fabric/blob/release-1.0/orderer/common/deliver/deliver.go#L79

troyronda (Sun, 11 Mar 2018 15:45:31 GMT):
so moving CloseSend should help

troyronda (Sun, 11 Mar 2018 15:45:31 GMT):
so moving CloseSend might help

troyronda (Sun, 11 Mar 2018 15:45:31 GMT):
so moving CloseSend might help (as in the above patch)

sg3des (Sun, 11 Mar 2018 15:47:26 GMT):
now in orderer log - `Error reading from stream: rpc error: code = Canceled desc = context canceled`

troyronda (Sun, 11 Mar 2018 15:52:14 GMT):
that one is a timeout

troyronda (Sun, 11 Mar 2018 15:52:14 GMT):
that one is a timeout of some sort

troyronda (Sun, 11 Mar 2018 15:53:18 GMT):
did you use patch set 2?

sg3des (Sun, 11 Mar 2018 15:53:25 GMT):
y

troyronda (Sun, 11 Mar 2018 15:54:00 GMT):
are the client logs the same nil error?

sg3des (Sun, 11 Mar 2018 15:54:07 GMT):
y ^^

sg3des (Sun, 11 Mar 2018 16:01:47 GMT):
May be I have some mistake in configuration files... I will try to check it again.

troyronda (Sun, 11 Mar 2018 16:02:26 GMT):
the client logs might show a bit more now - i had added an extra debug line

Hangyu (Mon, 12 Mar 2018 01:24:36 GMT):
Has joined the channel.

Hangyu (Mon, 12 Mar 2018 01:33:13 GMT):
@troyronda Hi, I am new to this project and I would like to run it against my fabric1.0.4 environment. I have noticed it only has two releases and both are not for fabric 1.0. Would you please inform me how can I get the stable source for fabric 1.0.x?

zhulg (Mon, 12 Mar 2018 04:19:17 GMT):
Has joined the channel.

pasimoes (Mon, 12 Mar 2018 04:47:30 GMT):
Has joined the channel.

antitoine (Mon, 12 Mar 2018 07:48:35 GMT):
@Hangyu You must use the "master" branch which is normally compatible with all versions 1.0.x and 1.1

Hangyu (Mon, 12 Mar 2018 07:55:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=A6538bcxzfqccEtgx) @antitoine thanks for the info. Actually I have get it started using the master branch.Only one problems though. When I run the integration test. I was able to communicate with peers and orderers, but the eventhub did not work ``` [fabsdk/fab] 2018/03/12 16:36:56 UTC - comm.NewConnection -> WARN error closing GRPC connection: %!s() [fabsdk/fab] 2018/03/12 16:36:56 UTC - dispatcher.(*Dispatcher).HandleConnectEvent -> WARN error creating connection: could not create stream to 10.131.192.220:7053: rpc error: code = Unavailable desc = all SubConns are in TransientFailure --- FAIL: TestE2E (49.45s) end_to_end.go:113: error registering for TxStatus event: could not create client conn: could not create stream to 10.131.192.220:7053: rpc error: code = Unavailable desc = all SubConns are in TransientFailure FAIL FAIL github.com/hyperledger/fabric-sdk-go/test/integration/e2e 49.471s ``` Could you tell me where I did wrong?

antitoine (Mon, 12 Mar 2018 08:12:41 GMT):
@Hangyu I don't think you're using the make command to run the tests. Is that the case? Place yourself at the root of the SDK and run `make`.

Kyroy (Mon, 12 Mar 2018 10:54:17 GMT):
I cannot find the type `EventServiceType` in the sdk... wanted to implement `EventServiceType() core.EventServiceType`

Kyroy (Mon, 12 Mar 2018 10:54:27 GMT):
also my IDE cannot find it

Hangyu (Mon, 12 Mar 2018 11:14:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NKHSR7gRxnpeMfi6x) @antitoine Thanks for the info. I ran make integration-test and it worked really well. Now I want to test it with tls off, where should I config to turn off tls?

Hangyu (Mon, 12 Mar 2018 11:16:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=LB4xFEd9Zz67wKmr2) Is it allow-insecure=true?

Kyroy (Mon, 12 Mar 2018 12:15:29 GMT):
When trying to instantiate CC, i receive: `error registering for TxStatus event: could not create client conn: could not create stream to grpcs://localhost:7053: rpc error: code = Unavailable desc = all SubConns are in TransientFailure` any idea?

Kyroy (Mon, 12 Mar 2018 12:15:45 GMT):
with the sdk version of thursday it worked :thinking:

troyronda (Mon, 12 Mar 2018 12:46:20 GMT):
grpcs means TLS - is the peer supporting TLS

troyronda (Mon, 12 Mar 2018 12:46:20 GMT):
grpcs://localhost:7053 means TLS - is the peer supporting TLS

Kyroy (Mon, 12 Mar 2018 12:47:20 GMT):
yes it is, but I think the sdk is not properly sending the SSL override

Kyroy (Mon, 12 Mar 2018 12:47:27 GMT):
(just a guess)

troyronda (Mon, 12 Mar 2018 12:47:56 GMT):
Quite often TransientFailure at this point is TLS related, yes.

Kyroy (Mon, 12 Mar 2018 12:48:12 GMT):
because also in thrusday/friday, I had to modify my /etc/hosts to map my orderer url to localhost

troyronda (Mon, 12 Mar 2018 12:48:14 GMT):
Are you using the new Mappers in your config?

Kyroy (Mon, 12 Mar 2018 12:48:20 GMT):
no

troyronda (Mon, 12 Mar 2018 12:48:31 GMT):
We added mappers to avoid needing to modify /etc/hosts

Kyroy (Mon, 12 Mar 2018 12:48:54 GMT):
```GRPCOptions: map[string]interface{}{ "ssl-target-name-override": ordererConfig.GetOverride(), },```

Kyroy (Mon, 12 Mar 2018 12:48:59 GMT):
so this wont work anymore?

troyronda (Mon, 12 Mar 2018 12:49:08 GMT):
it should be working

troyronda (Mon, 12 Mar 2018 12:49:26 GMT):
mappers just allows you to do this globally and also override the URL too.

troyronda (Mon, 12 Mar 2018 12:49:26 GMT):
mappers just allows you to do this more globally and also override the URL too.

Kyroy (Mon, 12 Mar 2018 12:50:06 GMT):
Okay, so not using the mapper should be fine for me, right?

troyronda (Mon, 12 Mar 2018 12:53:41 GMT):
yes mapper is not required - it's possible a bug was introduced, of course

Kyroy (Mon, 12 Mar 2018 12:54:05 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/resmgmt.go#L461-L468 ```opts.Targets [grpcs://localhost:7051] targets [grpcs://localhost:7051]```

Kyroy (Mon, 12 Mar 2018 12:54:22 GMT):
```type Peer interface { ProposalProcessor MSPID() string URL() string }``` there is not override

troyronda (Mon, 12 Mar 2018 12:57:50 GMT):
Override shouldn't be needed in the interface

troyronda (Mon, 12 Mar 2018 12:57:59 GMT):
the Peer object is initialized with options

troyronda (Mon, 12 Mar 2018 12:58:15 GMT):
(THe peer object creates the GRPC connection)

troyronda (Mon, 12 Mar 2018 12:58:15 GMT):
(THe peer object creates the GRPC connection using a connection manager from context)

Kyroy (Mon, 12 Mar 2018 12:58:32 GMT):
so when I map the peer url and orderer url to localhost (/etc/hosts) and only use URLs, everything works

troyronda (Mon, 12 Mar 2018 12:58:45 GMT):
only use URLs?

Kyroy (Mon, 12 Mar 2018 12:59:36 GMT):
```core.OrdererConfig{ URL: .. }``` when I pass the `peer0.org1.example.com` here (and not localhost), it works

Kyroy (Mon, 12 Mar 2018 13:00:01 GMT):
of course with grps:// and port

troyronda (Mon, 12 Mar 2018 15:38:36 GMT):
@Kyroy it looks like the new event client isn't obeying this option - i've asked the implementor to take a look

Kyroy (Mon, 12 Mar 2018 15:38:51 GMT):
Thanks :)

Kyroy (Mon, 12 Mar 2018 15:40:05 GMT):
Another question: How to fetch the `testchainid` config (aka. Network Config) from the orderer?

troyronda (Mon, 12 Mar 2018 15:49:32 GMT):
There is a method called QueryConfigFromOrderer

troyronda (Mon, 12 Mar 2018 15:49:53 GMT):
@Kyroy https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt#Client.QueryConfigFromOrderer

troyronda (Mon, 12 Mar 2018 15:50:23 GMT):
Is that what you are looking for?

Kyroy (Mon, 12 Mar 2018 15:51:01 GMT):
```type ChannelCfg interface { ID() string MSPs() []*msp.MSPConfig AnchorPeers() []*OrgAnchorPeer Orderers() []string Versions() *Versions }``` yes, this returns this struct. but I want to receive the (network)genesis.block

Kyroy (Mon, 12 Mar 2018 15:52:15 GMT):
similar to: ```lc, err := resource.GetLastConfigFromBlock(block) if err != nil { return nil, fmt.Errorf("error getting last config index from block: %v", err) } block, err = ledgerClient.QueryBlock(int(lc.Index)) if err != nil { return nil, fmt.Errorf("error querying block %d: %v", lc, err) } return block, nil```

troyronda (Mon, 12 Mar 2018 15:52:18 GMT):
ah. we might need to add a QueryGensisBlockFromOrderer method ... it's used underneath for creting a channel

troyronda (Mon, 12 Mar 2018 15:52:18 GMT):
ah. we might need to expose a QueryGensisBlockFromOrderer method ... it's used underneath for creting a channel

troyronda (Mon, 12 Mar 2018 15:52:18 GMT):
ah. we might need to expose a QueryGensisBlockFromOrderer method ... it's used underneath for creating a channel

troyronda (Mon, 12 Mar 2018 15:53:04 GMT):
You can already query for arbitrary blocks from a peer

troyronda (Mon, 12 Mar 2018 15:53:08 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/ledger/ledger.go#L177

Kyroy (Mon, 12 Mar 2018 15:53:09 GMT):
what is the functions name?

Kyroy (Mon, 12 Mar 2018 15:53:21 GMT):
yes, peer. this is what I am using for channels

Kyroy (Mon, 12 Mar 2018 15:53:37 GMT):
but I also want to get the >network< config (genesis.block) from the orderer

troyronda (Mon, 12 Mar 2018 15:54:04 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/resmgmt.go#L196

troyronda (Mon, 12 Mar 2018 15:54:11 GMT):
resource.GenesisBlockFromOrderer

troyronda (Mon, 12 Mar 2018 15:54:23 GMT):
it's just not exposed from the client - it's an internal call right now

Kyroy (Mon, 12 Mar 2018 15:54:31 GMT):
ahh :D

troyronda (Mon, 12 Mar 2018 15:54:48 GMT):
it's easy to create a wrapper - if you want faster, you could even add it :)

Kyroy (Mon, 12 Mar 2018 15:55:20 GMT):
Uff, I already forgot how to commit :facepalm_tone3:

troyronda (Mon, 12 Mar 2018 15:55:27 GMT):
heh

Kyroy (Mon, 12 Mar 2018 15:55:52 GMT):
With the whole gerrit stuff

Kyroy (Mon, 12 Mar 2018 15:57:15 GMT):
Which client do I need to use? `resmgmt.New`, `ledger.New` do not seem to work

troyronda (Mon, 12 Mar 2018 15:57:47 GMT):
doesn't work?

Kyroy (Mon, 12 Mar 2018 15:58:17 GMT):
I have to find the correct client type I have to pass to the function :D

troyronda (Mon, 12 Mar 2018 15:59:04 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#FabricSDK.ChannelContext

troyronda (Mon, 12 Mar 2018 15:59:40 GMT):
for Ledger

troyronda (Mon, 12 Mar 2018 15:59:54 GMT):
e.g., https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L119

troyronda (Mon, 12 Mar 2018 16:00:37 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#FabricSDK.Context for resmgmt

troyronda (Mon, 12 Mar 2018 16:00:57 GMT):
e.g., https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L81

Kyroy (Mon, 12 Mar 2018 16:04:45 GMT):
Finally, I managed it

Kyroy (Mon, 12 Mar 2018 16:04:49 GMT):
Thank you :)

troyronda (Mon, 12 Mar 2018 16:17:41 GMT):
nice

troyronda (Mon, 12 Mar 2018 23:43:51 GMT):
@Kyroy the fix for event client options is merged

troyronda (Tue, 13 Mar 2018 00:24:53 GMT):
@Hangyu there was a fix merged for event client as it was ignoring certain grpc options - it may be related to your issue.

troyronda (Tue, 13 Mar 2018 00:24:53 GMT):
@Hangyu there was a fix merged (just now) for event client as it was ignoring certain grpc options - it may be related to your issue.

troyronda (Tue, 13 Mar 2018 00:34:49 GMT):
@sg3des @antitoine @Kyroy fyi - the identity management client has now been merged - https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp / example: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/msp/enrollment_test.go

Hangyu (Tue, 13 Mar 2018 00:52:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NhH4nXPEzGRfw2q2h) @troyronda Thanks for the fix, it worked really well.

troyronda (Tue, 13 Mar 2018 00:55:43 GMT):
also as it looks like fabric might be tagging 1.1 this week, it seems best that we do the next tag on top of 1.1

troyronda (Tue, 13 Mar 2018 00:55:43 GMT):
also as it looks like fabric might be tagging 1.1 this week, it seems best that we do the next tag on top of the fabric 1.1 tag

troyronda (Tue, 13 Mar 2018 00:55:43 GMT):
also as it looks like fabric might be tagging 1.1 this week, it seems best that we do the next tag on top of the fabric 1.1 release

troyronda (Tue, 13 Mar 2018 00:55:43 GMT):
also as it looks like fabric might be releasing 1.1 this week, it seems best that we do the next tag on top of the fabric 1.1 release

troyronda (Tue, 13 Mar 2018 00:55:43 GMT):
also as it looks like fabric might be releasing 1.1 this week, it seems best that we do the next Go SDK tag on top of the fabric 1.1 release

sg3des (Tue, 13 Mar 2018 07:00:39 GMT):
@troyronda , hi, i`m have ERROR message from fabsdk log: `[fabsdk/fab] 2018/03/13 06:57:40 UTC - orderer.WithURL.func1 -> ERRO url [orderer.hyper.com:7050]`, but everything works. How fix this missage?

sg3des (Tue, 13 Mar 2018 07:33:14 GMT):
and yet, if I generate a new certificates - *crypto-config* dir, i must remove the docking containers and download them again, otherwise I will get an error not validity of certificates. `--force-recreate` does not help, `/tmp/msp` dir is empty - where it stored?

sg3des (Tue, 13 Mar 2018 08:52:28 GMT):
@troyronda https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/orderer/orderer.go#L91 - I think this should be removed...

Hangyu (Tue, 13 Mar 2018 09:11:18 GMT):
@troyronda Can I run this sdk on Windows? when I tried e2e test on windows I got the following error which does not happen in linux end_to_end.go:58: Failed to create channel management client: failed to create resmgmt client: user not found

Hangyu (Tue, 13 Mar 2018 09:14:37 GMT):
and what is this CRYPTOCONFIG_FIXTURES_PATH in config_test.yaml, and where I can get it editted? sorry for so many questions... I really need to get it working for my project ASAP.

Kyroy (Tue, 13 Mar 2018 09:49:19 GMT):
Is there a way to get "all" channels? Not only the channels where one peer joined. So something like get channels from orderer. Or all channels that I am allowed to join

username343 (Tue, 13 Mar 2018 09:52:32 GMT):
what is the maximum size of a transaction that can be sent using the hyperledger fabric go sdk?

username343 (Tue, 13 Mar 2018 09:53:03 GMT):
how do i control the max size of the transaction that can be sent using the go sdk? Is it just defined in the configtx.yaml?

username343 (Tue, 13 Mar 2018 09:53:24 GMT):
what is the unit of grpc-max-send-message-length in the config.yaml for the fabric sdk?

username343 (Tue, 13 Mar 2018 09:53:35 GMT):
is it 15 kb or 15 mb?

username343 (Tue, 13 Mar 2018 09:54:13 GMT):
I'm trying to send a transaction of approximately 800kb, but it fails, what do you think is the reason behind it? Is it the grpc or the max transaction size?

troyronda (Tue, 13 Mar 2018 11:56:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kAEGoMgki9Nqv2TWZ) @sg3des fixed and merged

Kyroy (Tue, 13 Mar 2018 16:30:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NhH4nXPEzGRfw2q2h) @troyronda for me, the instantiate still fails

Kyroy (Tue, 13 Mar 2018 16:30:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NhH4nXPEzGRfw2q2h) @troyronda for me, the instantiate still fails

Kyroy (Tue, 13 Mar 2018 16:30:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NhH4nXPEzGRfw2q2h) @troyronda for me, the instantiate still fails when using localhost and grpc options

troyronda (Tue, 13 Mar 2018 16:33:11 GMT):
are you using hostname override if using TLS?

Kyroy (Tue, 13 Mar 2018 16:33:20 GMT):
If I set the mapping in /etc/hosts, it works. so it does not use the localhost address. I think it uses the url from `ChannelConfig(name string) (*core.ChannelConfig, error)` could that be?

Kyroy (Tue, 13 Mar 2018 16:33:39 GMT):
Yes, I am using `ssl-target-name-override`

Kyroy (Tue, 13 Mar 2018 16:36:08 GMT):
Same problem with invoke

Kyroy (Tue, 13 Mar 2018 16:36:17 GMT):
query works :) cause it does not need the orderer ;)

troyronda (Tue, 13 Mar 2018 16:36:34 GMT):
i thought you had an error with events?

Kyroy (Tue, 13 Mar 2018 16:37:32 GMT):
Yes, there was an issue. This was also related to the override ;)

troyronda (Tue, 13 Mar 2018 16:37:41 GMT):
what's the new error?

Kyroy (Tue, 13 Mar 2018 16:39:37 GMT):
`CreateAndSendTransaction failed: SendTransaction failed: calling orderer 'orderer0.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer0.example.com:7050]`

Kyroy (Tue, 13 Mar 2018 16:40:01 GMT):
but it works when I add it to /etc/hosts

sg3des (Tue, 13 Mar 2018 17:28:49 GMT):
guys, tell me please, how to load to peers third-party packages, or execute `go get ./...` before starting chaincode?

troyronda (Tue, 13 Mar 2018 17:37:10 GMT):
@Kyroy I think I'm missing something - it looks like you are trying to dial orderer0.example.com not localhost?

troyronda (Tue, 13 Mar 2018 17:37:29 GMT):
so you either need to use the new mappers or have that entry in /etc/hosts

troyronda (Tue, 13 Mar 2018 17:38:00 GMT):
or dial localhost and use ssl-target-name-override

troyronda (Tue, 13 Mar 2018 17:39:28 GMT):
by new mappers, I mean: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L381

troyronda (Tue, 13 Mar 2018 17:40:25 GMT):
@sg3des inside chaincode? you need to pre-vendor everything you are using.

troyronda (Tue, 13 Mar 2018 17:40:35 GMT):
peer doesn't execute go get

sg3des (Tue, 13 Mar 2018 17:41:18 GMT):
thx

Kyroy (Tue, 13 Mar 2018 20:13:57 GMT):
@troyronda I tried to debug, but I am sure that my config is with localhost and using ssl-override. At this point https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/channel/transactor.go#L118 my client config is correct with localhost ```t.ctx.Config().OrderersConfig()=[{grpcs://localhost:7050 map[ssl-target-name-override:orderer0.example.com] {test/fixtures/node1/crypto/ordererOrganizations/example.com/orderers/orderer0.example.com/tls/ca.crt }}]``` so I think my `transactor` variable is correct (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/resmgmt.go#L494). And I think this variable is also used in `createAndSendTransaction`, right?

username343 (Wed, 14 Mar 2018 05:35:56 GMT):
I'm getting the following error "gRPC Transport Status Code: (14) Unavailable. Description: transport is closing" on sending a transaction size greater than 1MB , how do i check and change the max message size of the grpc in hyperledger fabric go sdk?

username343 (Wed, 14 Mar 2018 06:53:42 GMT):
is there any documentation for go sdk?

troyronda (Wed, 14 Mar 2018 12:06:48 GMT):
@username343 I pushed some code to make the max message size the same as fabric: https://gerrit.hyperledger.org/r/c/19153/ (not yet merged)

troyronda (Wed, 14 Mar 2018 12:07:30 GMT):
@username343 The main references for the go sdk is currently: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/ledger https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt

username343 (Wed, 14 Mar 2018 12:07:57 GMT):
thanks for responding

username343 (Wed, 14 Mar 2018 12:08:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=B99BfSh4mjhz5XGeT) 100mb?

troyronda (Wed, 14 Mar 2018 12:08:29 GMT):
and the sample config: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml

troyronda (Wed, 14 Mar 2018 12:09:02 GMT):
@username343 I decided to just use what Fabric set it at

username343 (Wed, 14 Mar 2018 12:09:14 GMT):
ok thanks

username343 (Wed, 14 Mar 2018 12:10:18 GMT):
there is this option under orderer "grpc-max-send-message-length: 15", is it in KB or MB?

troyronda (Wed, 14 Mar 2018 12:10:55 GMT):
fyi: the fabric code is here: https://github.com/hyperledger/fabric/blob/release-1.1/core/comm/config.go#L25

username343 (Wed, 14 Mar 2018 12:11:19 GMT):
thanks I'm aware of that

username343 (Wed, 14 Mar 2018 12:11:45 GMT):
the above option is in the config.yaml file

troyronda (Wed, 14 Mar 2018 12:11:53 GMT):
@username343 I suspect that is leftovers in the config

username343 (Wed, 14 Mar 2018 12:12:07 GMT):
so it won't make any difference?

troyronda (Wed, 14 Mar 2018 12:12:32 GMT):
I don't think so - I'll take another look and open another item to get rid of it

username343 (Wed, 14 Mar 2018 12:13:18 GMT):
thanks for responding:thumbsup: especially for providing the references:innocent:

troyronda (Wed, 14 Mar 2018 13:32:22 GMT):
@username343 merged the max message size

username343 (Wed, 14 Mar 2018 13:32:46 GMT):
thanks @troyronda

pavan-sk (Wed, 14 Mar 2018 15:17:11 GMT):
Has joined the channel.

troyronda (Wed, 14 Mar 2018 17:00:29 GMT):
@username343 added a bit of text to: https://godoc.org/github.com/hyperledger/fabric-sdk-go

troyronda (Wed, 14 Mar 2018 17:00:35 GMT):
to at least get people started.

mhomaid (Wed, 14 Mar 2018 20:26:28 GMT):
Has joined the channel.

troyronda (Wed, 14 Mar 2018 21:51:25 GMT):
@Kyroy we suspect that your channel config pulled from the peer has the network name not localhost

troyronda (Wed, 14 Mar 2018 21:51:51 GMT):
The current SDK uses that config to determine channel orderers

troyronda (Wed, 14 Mar 2018 21:52:19 GMT):
You can use Matchers to map the network name to localhost

troyronda (Wed, 14 Mar 2018 21:52:47 GMT):
We also need to add better debug output logging in this area

username343 (Thu, 15 Mar 2018 06:05:13 GMT):
thanks @troyronda it's very helpful

Kyroy (Thu, 15 Mar 2018 07:33:03 GMT):
@troyronda thanks for your investigation :) do you have an example how to properly use this? I of couse had a look at https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L383 But I am still not sure how to map `peer0.org1.example.com` to `localhost`

Kyroy (Thu, 15 Mar 2018 07:33:36 GMT):
(or at least it does not work in my code :( )

zimabry (Thu, 15 Mar 2018 13:33:07 GMT):
Has joined the channel.

zimabry (Thu, 15 Mar 2018 13:33:13 GMT):
Hi all, I am trying to use shim.getCreator to get the owner of who submitted that transaction. How can I get the creator and store it in a variable as a String in GOLang?

baoyangc (Thu, 15 Mar 2018 13:40:05 GMT):
does anyone know to how to listen an event

troyronda (Thu, 15 Mar 2018 14:15:42 GMT):
@baoyangc

troyronda (Thu, 15 Mar 2018 14:15:42 GMT):
@baoyangc https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Client.RegisterChaincodeEvent

baoyangc (Thu, 15 Mar 2018 14:20:12 GMT):

Clipboard - 2018年3月15日晚上10点20分

baoyangc (Thu, 15 Mar 2018 14:20:28 GMT):

Clipboard - 2018年3月15日晚上10点20分

baoyangc (Thu, 15 Mar 2018 14:20:47 GMT):
@troyronda I try catch an event with these code

baoyangc (Thu, 15 Mar 2018 14:21:07 GMT):
but I just got the timeout message

troyronda (Thu, 15 Mar 2018 14:21:46 GMT):
is your filter string correct?

troyronda (Thu, 15 Mar 2018 14:21:57 GMT):
note: it's a regular expression

troyronda (Thu, 15 Mar 2018 14:22:31 GMT):
also why listener.RegisterChaincodeEvent?

troyronda (Thu, 15 Mar 2018 14:22:54 GMT):
should be client. RegisterChaincodeEvent

troyronda (Thu, 15 Mar 2018 14:23:10 GMT):
to match the defer client.UnregisterChaincodeEvent you have later

troyronda (Thu, 15 Mar 2018 14:23:31 GMT):
(or vice versa - they should match)

troyronda (Thu, 15 Mar 2018 14:23:56 GMT):
also no need to create two clients for same context

troyronda (Thu, 15 Mar 2018 14:23:56 GMT):
also no need to create two clients for same context (but it doesn't hurt either)

baoyangc (Thu, 15 Mar 2018 14:24:11 GMT):

my chai'n'co'de

baoyangc (Thu, 15 Mar 2018 14:24:25 GMT):
my chaincode set the event

baoyangc (Thu, 15 Mar 2018 14:25:32 GMT):
I learned from the end_to_end.go

troyronda (Thu, 15 Mar 2018 14:25:55 GMT):
have you verified that the transaction is happening?

baoyangc (Thu, 15 Mar 2018 14:27:05 GMT):
in the peer' log , I found the transaction

troyronda (Thu, 15 Mar 2018 14:31:53 GMT):
I'm not seeing anything obvious from the snippets.

troyronda (Thu, 15 Mar 2018 14:31:53 GMT):
I'm not seeing anything else obvious from the snippets.

baoyangc (Thu, 15 Mar 2018 14:33:09 GMT):

Clipboard - 2018年3月15日晚上10点33分

baoyangc (Thu, 15 Mar 2018 14:36:03 GMT):
thanks for your answer

baoyangc (Thu, 15 Mar 2018 14:37:19 GMT):
I have catch the event after change the `listener`RgisterChaincodeEvent to `client`

troyronda (Thu, 15 Mar 2018 14:58:25 GMT):
@zimabry FYI: this channel is about the client GO SDK not about creating Go chaincodes

baoyangc (Thu, 15 Mar 2018 15:18:08 GMT):
in the chaincode, there an function `setEvent(name string,payload []byte)`, is there a way to get the payload in the client side?

pavan-sk (Thu, 15 Mar 2018 19:02:42 GMT):
@Kyroy Please find this https://docs.google.com/document/d/17YwH4z2vf7B-85Z2Mr2YVH-LgqCu-Why-j6KMWGIId8 --> Short tutorial on Entity Matchers

Kyroy (Thu, 15 Mar 2018 20:43:45 GMT):
@pavan-sk Thank you :) I will have a look tomorrow. Is there a link collection with these explanations? :D

troyronda (Thu, 15 Mar 2018 22:21:31 GMT):
@baoyangc the payload field was missing - the latest commit fixes that.

baohua (Fri, 16 Mar 2018 02:00:57 GMT):
hi, i saw the latest go sdk release is v1.0.0-alpha2, is it compatible to the fabric 1.0.5/1.0.6

baohua (Fri, 16 Mar 2018 02:01:13 GMT):
if not, which version supports fabric 1.0.5/1.0.6 now? Thanks!

troyronda (Fri, 16 Mar 2018 02:27:27 GMT):
@baohua master

baohua (Fri, 16 Mar 2018 02:28:01 GMT):
i saw the master is already aligning with the 1.1.0-alpha?

troyronda (Fri, 16 Mar 2018 02:28:14 GMT):
it works with both

baohua (Fri, 16 Mar 2018 02:28:23 GMT):
and this commit is compatible with 1.0.4: * 7731bd8d - (4 months ago) [FAB-6928] Update CI to v1.0.4 - Troy Ronda?

baohua (Fri, 16 Mar 2018 02:28:46 GMT):
ok, thanks

troyronda (Fri, 16 Mar 2018 02:28:58 GMT):
not sure - i dont recommend tge

troyronda (Fri, 16 Mar 2018 02:28:58 GMT):
i dont recommend the old versions - they are quite different

baohua (Fri, 16 Mar 2018 02:29:10 GMT):
and what will be the next release tag?

baohua (Fri, 16 Mar 2018 02:29:20 GMT):
1.0.0 or 1.1.0 directly?

troyronda (Fri, 16 Mar 2018 02:29:51 GMT):
alpha3 shortly

baohua (Fri, 16 Mar 2018 02:30:01 GMT):
1.1.0-alpha3?

troyronda (Fri, 16 Mar 2018 02:30:13 GMT):
the versions are not aligned to fabric versions

troyronda (Fri, 16 Mar 2018 02:30:13 GMT):
the sdk versioning is not aligned to fabric versions

baohua (Fri, 16 Mar 2018 02:30:36 GMT):
ok, i understand, so what's the version for the next release shortly? 1.0.0-alpha3?

troyronda (Fri, 16 Mar 2018 02:30:59 GMT):
yes

baohua (Fri, 16 Mar 2018 02:32:27 GMT):
great, so sdk 1.0.0-alpha3 is compatible with fabric 1.0.5/1.0.6 and the fabric 1.1.0 at the same time.

baohua (Fri, 16 Mar 2018 02:32:35 GMT):
that will be cool

troyronda (Fri, 16 Mar 2018 02:32:47 GMT):
yes

baohua (Fri, 16 Mar 2018 02:34:12 GMT):
thanks, troy!

yopep (Fri, 16 Mar 2018 04:02:22 GMT):
Has joined the channel.

ondar07 (Fri, 16 Mar 2018 13:43:59 GMT):
Has joined the channel.

ondar07 (Fri, 16 Mar 2018 13:49:17 GMT):
Hi! I am a beginner in hyperledger, and I don't know fabric sdk go. Can I find an example of use of sdk go for the hyperledger fabcar sample?

antitoine (Fri, 16 Mar 2018 14:01:34 GMT):
Hi @ondar07 you can follow this short tutorial here: https://github.com/chainHero/heroes-service Or directly checkout examples here: https://github.com/hyperledger/fabric-sdk-go/#examples

ondar07 (Fri, 16 Mar 2018 14:03:24 GMT):
Thanks for the first link @antitoine

troyronda (Fri, 16 Mar 2018 15:35:02 GMT):
we are wrapping up efforts on the next tag ... please let me know if you have further thoughts or are having issues.

troyronda (Fri, 16 Mar 2018 15:35:02 GMT):
we are wrapping up efforts on the next tag ... please let us know if you have further thoughts or are having issues.

ga25waq (Fri, 16 Mar 2018 22:17:05 GMT):
@troyronda For my implementation project, it would be great to have a tagged version of fabric-sdk-go that does not require me to evaluate error strings in my bootstrapper when joining peers via a target filter (see FAB-7820). But I can absolutely understand if there other priorities w.r.t. to the upcoming release, since this is quite a big project. Thanks by the way for doing such a nice job!

troyronda (Sat, 17 Mar 2018 00:59:08 GMT):
@ga25waq thanks a lot!

troyronda (Sat, 17 Mar 2018 00:59:31 GMT):
yes - we should return a special error - just working out if that should be an error type or status code

troyronda (Sat, 17 Mar 2018 00:59:31 GMT):
yes - we should return a special switchable error for this case - just working out if that should be an error type or status code

troyronda (Sat, 17 Mar 2018 01:00:00 GMT):
something like this: https://gerrit.hyperledger.org/r/c/19333/ or based on http://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/util/errors/status/codes.go#L40

troyronda (Sat, 17 Mar 2018 01:00:33 GMT):
example of status code here: http://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/util/errors/status/codes.go#L40

troyronda (Sat, 17 Mar 2018 01:53:16 GMT):
one proposal using status codes: https://gerrit.hyperledger.org/r/c/19335/

troyronda (Sat, 17 Mar 2018 01:53:16 GMT):
@ga25waq a status code is now returned: https://github.com/hyperledger/fabric-sdk-go/commit/cf7cd8ad6f11ad3b1bc430c19b4da51f72895595

troyronda (Sat, 17 Mar 2018 01:53:16 GMT):
@ga25waq a status code (convertible from error) is now returned: https://github.com/hyperledger/fabric-sdk-go/commit/cf7cd8ad6f11ad3b1bc430c19b4da51f72895595

StevenXu (Sat, 17 Mar 2018 03:09:11 GMT):
When I invoke a transaction with fabric 1.0, I can get transaction ID, then using SDK to get the transaction info(but there is not any block info like block number in it), is there a way I can get which block that include the transaction by calling SDK with the transaction id ?

genggjh (Sat, 17 Mar 2018 03:19:36 GMT):
Has joined the channel.

MatrixMuto (Sat, 17 Mar 2018 04:48:33 GMT):
Has joined the channel.

VinayChaudhary (Sat, 17 Mar 2018 15:49:57 GMT):
Has joined the channel.

troyronda (Mon, 19 Mar 2018 20:11:08 GMT):
@StevenXu the latest merge now includes a method to do so. please see: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/ledger#Client.QueryBlockByTxID

lwrabbit (Tue, 20 Mar 2018 06:27:16 GMT):
Has joined the channel.

lwrabbit (Tue, 20 Mar 2018 07:33:20 GMT):
Using the latest sdk lib,there is a error "genesis block retrieval failed: error from orderer: unknown response type from ordering service" when join channel

lwrabbit (Tue, 20 Mar 2018 07:34:29 GMT):
Can anyone tell me why?

yinzhiwu (Tue, 20 Mar 2018 07:54:07 GMT):
Has joined the channel.

jastisriradheshyam (Tue, 20 Mar 2018 08:00:28 GMT):
Has joined the channel.

StevenXu (Tue, 20 Mar 2018 08:33:09 GMT):
@troyronda I find the latest sdk implement the interface,thanks a lot

lwrabbit (Tue, 20 Mar 2018 09:14:38 GMT):
How to query channels that is already been created on the orderer?

baoyangc (Tue, 20 Mar 2018 10:11:16 GMT):
@troyronda I write a chaincode which can do transfer some coin to others. in the transfer operation, I set an event. I write a client to invoke this transfer operation, I `RegisterChaincodeEvent` in the client, then through this client invoke transfer `100` coin to account testuser2, but the result is the testuser2 get 200 coin. I can't understand what happened in this progress? if no `RegisterChaincodeEvent` in the client, the testuser2 get 100 coin.

RadekS 3 (Tue, 20 Mar 2018 10:54:43 GMT):
Has joined the channel.

Kyroy (Tue, 20 Mar 2018 16:32:51 GMT):
I would like to get the status code when invoking. For successful invokes, I can use `response.Responses[0].Status`, but for failed transactions (e.g. chaincode returning error), an error is returnes the the array `.Responses` is empty. Is there a possibility?

troyronda (Tue, 20 Mar 2018 19:45:04 GMT):
@Kyroy is this what you are looking for? https://gerrit.hyperledger.org/r/c/19493/5/test/integration/e2e/end_to_end.go

troyronda (Tue, 20 Mar 2018 19:45:41 GMT):
(or this link of the above doesn't work https://gerrit.hyperledger.org/r/#/c/19493/5/test/integration/e2e/end_to_end.go)

troyronda (Tue, 20 Mar 2018 20:18:58 GMT):
@Kyroy is this what you are looking for? https://github.com/hyperledger/fabric-sdk-go/commit/d7c5c6a03f3346858a0b560464e8277883e673dc#diff-5a2badf708ede7e6a58d784a3374cafa

troyronda (Tue, 20 Mar 2018 20:26:46 GMT):
FYI - we are doing the last alpha3 changes. Tag coming shortly: https://gerrit.hyperledger.org/r/c/19501/

troyronda (Tue, 20 Mar 2018 20:26:46 GMT):
FYI - we are doing the last alpha3 changes today. Tag coming shortly: https://gerrit.hyperledger.org/r/c/19501/

troyronda (Tue, 20 Mar 2018 20:30:47 GMT):
Also - with the change to 1.1.0 as the stable target, the SDK now uses delivery service by default.

troyronda (Tue, 20 Mar 2018 20:31:39 GMT):
If you are using 1.0.0, you will need to override this default by setting eventhub in the config here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L49

ShikarSharma (Tue, 20 Mar 2018 22:45:56 GMT):
Has joined the channel.

baoyangc (Wed, 21 Mar 2018 01:12:06 GMT):
when will be the 1.1.0?

dinstein (Wed, 21 Mar 2018 02:13:59 GMT):
Has joined the channel.

troyronda (Wed, 21 Mar 2018 02:50:35 GMT):
the SDK already works with 1.1.0

baoyangc (Wed, 21 Mar 2018 03:09:30 GMT):
when will be the 1.0 release of the SDK

lwrabbit (Wed, 21 Mar 2018 03:11:56 GMT):
the E2E test with master of the SDK can works right? I get a problem that "instantiateOrUpgradeCC timed out or cancelled"

troyronda (Wed, 21 Mar 2018 03:20:13 GMT):
yes, the e2e tests work

troyronda (Wed, 21 Mar 2018 03:22:38 GMT):
@here we are happy to announce that the Go SDK now has a v1.0.0-alpha3 tag. happy coding!

troyronda (Wed, 21 Mar 2018 03:23:49 GMT):
(and happy first day of spring to those of us in the northern hemisphere)

Norberthu (Wed, 21 Mar 2018 03:25:04 GMT):
congrats

lwrabbit (Wed, 21 Mar 2018 03:25:39 GMT):
can the GO SDK with v1.0.0-alpha3 works with 1.1.0?

troyronda (Wed, 21 Mar 2018 03:26:10 GMT):
@lwrabbit yes it works with both 1.1 and 1.0

troyronda (Wed, 21 Mar 2018 03:26:57 GMT):
it defaults to 1.1 - if you are targeting 1.0, please review https://github.com/hyperledger/fabric-sdk-go/#v10-notes

Kyroy (Wed, 21 Mar 2018 08:20:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8WTXEN7h4n5Kq9vQr) @troyronda hmm, unfortunately this does not work for me ``` s.Details=[] s.Code=7 s.Message=Multiple errors occurred: ``` for CC: ``` return peer.Response{ Status: http.StatusConflict, Message: "Text Exists", } ``` also, for this CC, I want to get the 201. but I am not sure how to do it :( ``` return peer.Response{ Status: http.StatusCreated, Message: "Text Created", Payload: nil, } ```

Kyroy (Wed, 21 Mar 2018 08:33:28 GMT):
for the `http.StatusCreated` example, I use `status.NewFromProposalResponse` and get `s.Code=200`, but I want `201`

Kyroy (Wed, 21 Mar 2018 09:48:12 GMT):
and another question: can an installed chaincode be removed or overwritten?

troyronda (Wed, 21 Mar 2018 10:53:28 GMT):
@Kyroy 201 is not an error

bzeyben (Wed, 21 Mar 2018 11:13:14 GMT):
Has joined the channel.

StevenXu (Wed, 21 Mar 2018 13:14:09 GMT):
@troyronda I add assert in test/integration/sdk/ledger_queries_test.go to check ledgerInfo.BCI.CurrentBlockHash is equal to block.Header.DataHash by call QueryBlockByHash function with params ledgerInfo.BCI.CurrentBlockHash, and run integration test. I find failed in the assert

StevenXu (Wed, 21 Mar 2018 13:20:29 GMT):

bug.png

StevenXu (Wed, 21 Mar 2018 13:23:58 GMT):

bug.png

StevenXu (Wed, 21 Mar 2018 13:27:15 GMT):

integration-test-result.png

troyronda (Wed, 21 Mar 2018 13:59:57 GMT):
@Kyroy for your first question, I asked the implementor of that task to take a look at your question.

troyronda (Wed, 21 Mar 2018 14:00:32 GMT):
@Kyroy For your second question, you can only upgrade chaincode. I'm not aware of an API for removing / overwritting.

troyronda (Wed, 21 Mar 2018 14:52:29 GMT):
(fabric peer API)

kkx (Wed, 21 Mar 2018 15:41:55 GMT):
Has joined the channel.

kkx (Wed, 21 Mar 2018 15:49:38 GMT):
Hello everyone, i have 3 organizations sharing a same channel, every organization has only 1 peer, and i want to install a chaincode in all these 3 peers, so i run "install chaincode" via go-sdk in all 3 seperated scripts(using their own sdk configs), then i instantiate the chaincode from one of these peers and the chaincode container is created only for this peer. my question is: how to instantiate the chaincode via sdk and it creates all the chaincode container(real install) in all previous installed peers. I have checked the node-sdk, they have a parameter "targets" in their instatiate function which you can asign peers to "install" the chaincode

kkx (Wed, 21 Mar 2018 15:49:38 GMT):
Hello everyone, i have 3 organizations sharing a same channel, every organization has only 1 peer, and i want to install a chaincode in all these 3 peers, so i run "install chaincode" via go-sdk in all 3 seperated scripts(using their own sdk configs), then i instantiate the chaincode from one of these peers and the chaincode container is created only for this peer. my question is: how to instantiate the chaincode via sdk and it creates all the chaincode containers(real install) in all previous installed peers. I have checked the node-sdk, they have a parameter "targets" in their instatiate function which you can asign peers to "install" the chaincode

troyronda (Wed, 21 Mar 2018 16:08:44 GMT):
@kkx please see https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt#WithTargetURLs or https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt#WithTargets

troyronda (Wed, 21 Mar 2018 16:08:44 GMT):
@kkx re: target option ... please see https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt#WithTargetURLs or https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt#WithTargets

Kyroy (Wed, 21 Mar 2018 17:56:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kH5Er26YXvchf5QCK) @troyronda

Kyroy (Wed, 21 Mar 2018 17:56:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kH5Er26YXvchf5QCK) @troyronda I thought so :D

kkx (Wed, 21 Mar 2018 21:06:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6GksFuP86egvh3tA3) @troyronda :thumbsup: thank you troyronda! thats what i want!

pavan-sk (Wed, 21 Mar 2018 21:11:05 GMT):
https://github.com/hyperledger/fabric/blob/release-1.1/core/chaincode/shim/response.go

ga25waq (Thu, 22 Mar 2018 02:37:43 GMT):
@troyronda Thanks for providing the new delivery service! I've got two short questions: 1) in ./pkg/common/providers/fab/eventservice.go:43 it is stated that the CCEvent's payload is nil for filtered events. Indeed, I get nil payloads with a chaincode event handler registered via a channel client instance, specifying the chaincode ID and the event name. Is this the desired behaviour? If yes, how am I supposed to get the event's payload? 2) does the new delivery service solve the problem that a peer can manipulate an event at will (we've talked about this some weeks ago). I would think so, since the new delivery service seems to be channel-based, but I'm not completely sure about it.

lwrabbit (Thu, 22 Mar 2018 03:22:10 GMT):
Hi all, i run "join channel" via go-sdk and received an err "genesis block retrieval failed: error from orderer: unknown response type from ordering service",do anyone know the reason?

lwrabbit (Thu, 22 Mar 2018 03:23:19 GMT):
my channel is already created successfully

suntoe (Thu, 22 Mar 2018 03:47:03 GMT):
Has joined the channel.

antitoine (Thu, 22 Mar 2018 10:10:36 GMT):
Hi, I can't get the entityMatchers system to work. I always have to add the rules to my `/etc/hosts` file.

antitoine (Thu, 22 Mar 2018 10:10:36 GMT):
Hi, I can't get the entityMatchers system to work. I always have to add the rules to my `/etc/hosts` file (using the v1.0.0-alpha3)

antitoine (Thu, 22 Mar 2018 10:26:14 GMT):
Second point, the Logger initialization is still not good in my opinion. It works as expected with: ``` // Initialize SDK Logging sdkLogging.Initialize(logging.GetDefaultProvider()) // Init the SDK sdk, err := fabsdk.New(sdkConfig.FromFile(config.GetConfigPath())) ``` But this not: ``` // Init the SDK sdk, err := fabsdk.New(sdkConfig.FromFile(config.GetConfigPath()), fabsdk.WithLoggerPkg(logging.GetDefaultProvider())) ``` See screenshots:

antitoine (Thu, 22 Mar 2018 10:26:14 GMT):
Second point, the Logger initialization is still not good in my opinion. It works as expected with: ``` // Initialize SDK Logging sdkLogging.Initialize(logging.GetDefaultProvider()) // Init the SDK sdk, err := fabsdk.New(sdkConfig.FromFile(config.GetConfigPath())) ``` But this not: ``` // Init the SDK sdk, err := fabsdk.New(sdkConfig.FromFile(config.GetConfigPath()), fabsdk.WithLoggerPkg(logging.GetDefaultProvider())) ``` See screenshots:

antitoine (Thu, 22 Mar 2018 10:26:42 GMT):

2018-03-22 11-24-03.png

antitoine (Thu, 22 Mar 2018 10:26:55 GMT):

2018-03-22 11-24-49.png

antitoine (Thu, 22 Mar 2018 10:27:57 GMT):
Why ?

troyronda (Thu, 22 Mar 2018 11:27:00 GMT):
@antitoine the SDK logger can only be initialized once per application - is the second case a second initialization?

troyronda (Thu, 22 Mar 2018 11:28:58 GMT):
(that one initialization is good for the life of the process)

aleksandar.likic (Thu, 22 Mar 2018 12:07:01 GMT):
@ga25waq the basic idea behind filtered events is outlined in https://jira.hyperledger.org/browse/FAB-5481. Event payload has only enough information to allow the event recipient to query the ledger to obtain more information (beyond the fact that the transaction has successfully completed), with all access rules applied on query.

antitoine (Thu, 22 Mar 2018 13:20:07 GMT):
@troyronda No no, in the second case there is no initialization before, the two pieces of codes presented are at the same place.

ga25waq (Thu, 22 Mar 2018 13:30:03 GMT):
@aleksandar.likic Thanks for your quick reply! So with the new delivery service, there is no (other) way to get a chaincode event's payload set via shim.ChaincodeStubInterface.SetEvent(string, []byte)?

troyronda (Thu, 22 Mar 2018 13:30:35 GMT):
@antitoine yes - i see the issue.

troyronda (Thu, 22 Mar 2018 13:30:45 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/config.go#L118

troyronda (Thu, 22 Mar 2018 13:31:08 GMT):
config.FromFile calls logger which then initializes the default logging.

troyronda (Thu, 22 Mar 2018 13:31:17 GMT):
this happens prior to fabsdk.New

troyronda (Thu, 22 Mar 2018 13:31:36 GMT):
we might just need to remove WithLoggerPkg

troyronda (Thu, 22 Mar 2018 13:31:36 GMT):
we might just need to remove WithLoggerPkg

troyronda (Thu, 22 Mar 2018 13:31:36 GMT):
we might just need to remove WithLoggerPkg and people will just need to call logging.Initialize themselves...

troyronda (Thu, 22 Mar 2018 13:31:36 GMT):
we might just need to remove WithLoggerPkg and people will just need to call logging.Initialize themselves prior to using SDK...

antitoine (Thu, 22 Mar 2018 13:33:36 GMT):
@troyronda Ok thanks :wink:

troyronda (Thu, 22 Mar 2018 13:33:38 GMT):
(if they want to use their own logging backend)

troyronda (Thu, 22 Mar 2018 13:33:38 GMT):
(if they want to use their own logging backend, of course)

troyronda (Thu, 22 Mar 2018 13:34:02 GMT):
Do the tests of entity matchers work for you?

antitoine (Thu, 22 Mar 2018 13:34:38 GMT):
I'll test it right now.

troyronda (Thu, 22 Mar 2018 13:41:24 GMT):
I just re-ran them on my box, with success

troyronda (Thu, 22 Mar 2018 13:41:35 GMT):
make dockerenv-stable-up in one terminal

troyronda (Thu, 22 Mar 2018 13:41:44 GMT):
make integration-tests-local in another terminal

troyronda (Thu, 22 Mar 2018 13:42:24 GMT):
that test uses the matchers defined in https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test_local.yaml

troyronda (Thu, 22 Mar 2018 13:43:37 GMT):
@ga25waq payload is provided when clients request full blocks rather than filtered blocks

troyronda (Thu, 22 Mar 2018 13:46:10 GMT):
we might not have exposed that option in the actual clients - you can see this in the lower level code: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/fab/eventclient_test.go#L111

troyronda (Thu, 22 Mar 2018 13:46:10 GMT):
we might not have exposed that option in the actual clients - you can see this in the lower level code tests: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/fab/eventclient_test.go#L111

troyronda (Thu, 22 Mar 2018 13:46:10 GMT):
we might not have exposed that option in the actual clients (need to double check) - you can see this in the lower level code tests: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/fab/eventclient_test.go#L111

troyronda (Thu, 22 Mar 2018 13:46:10 GMT):
@ga25waq @aleksandar.likic we might not have exposed that option in the actual clients (need to double check) - you can see this in the lower level code tests: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/fab/eventclient_test.go#L111

troyronda (Thu, 22 Mar 2018 13:46:10 GMT):
@ga25waq @aleksandar.likic we might not have exposed that option in the actual clients (need to double check) - you can see the full block mechanism in the lower level code tests: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/fab/eventclient_test.go#L111

troyronda (Thu, 22 Mar 2018 13:46:10 GMT):
@ga25waq @aleksandar.likic we might not have exposed that option in the actual clients or in RegisterChaincodeEvent (need to double check) - you can see the full block mechanism in the lower level code tests: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/fab/eventclient_test.go#L111

ga25waq (Thu, 22 Mar 2018 13:50:42 GMT):
@troyronda Thank you! That test looks promising.

ga25waq (Thu, 22 Mar 2018 13:51:08 GMT):
I'm not aware of any option for that in the channel client.

troyronda (Thu, 22 Mar 2018 13:56:55 GMT):
@ga25waq yes this option is currently missing in the channel client - we should have it (somewhere)

troyronda (Thu, 22 Mar 2018 13:57:33 GMT):
or maybe its a new client for more advanced event stuff ... like pkg/client/channel/event or pkg/client/event

troyronda (Thu, 22 Mar 2018 13:57:33 GMT):
or maybe its a new client for more advanced event stuff ... like pkg/client/channel/delivery or pkg/client/channel/event or pkg/client/event

troyronda (Thu, 22 Mar 2018 13:59:08 GMT):
(channel client is also missing a register for block events, generally)

troyronda (Thu, 22 Mar 2018 13:59:29 GMT):
but it would certainly be useful for some use caes.

troyronda (Thu, 22 Mar 2018 13:59:29 GMT):
but it would certainly be useful for some use cases.

antitoine (Thu, 22 Mar 2018 15:14:53 GMT):
@troyronda All tests work for the entityMatchers, so I will try to find out where is the issue in my configuration

troyronda (Thu, 22 Mar 2018 15:16:05 GMT):
@antitoine did you see this doc from @pavan-sk? https://docs.google.com/document/d/17YwH4z2vf7B-85Z2Mr2YVH-LgqCu-Why-j6KMWGIId8/edit

troyronda (Thu, 22 Mar 2018 15:16:05 GMT):
@antitoine did you see this doc from @pavan-sk? https://docs.google.com/document/d/17YwH4z2vf7B-85Z2Mr2YVH-LgqCu-Why-j6KMWGIId8/edit (tutorial on EntityMatchers)

antitoine (Thu, 22 Mar 2018 15:18:57 GMT):
@troyronda Oh no, thank you very much!

antitoine (Thu, 22 Mar 2018 15:53:10 GMT):
@troyronda Thanks I managed to run my application without modifying my `/etc/hosts` file!

troyronda (Thu, 22 Mar 2018 16:05:41 GMT):
@antitoine awesome

antitoine (Thu, 22 Mar 2018 17:26:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mjm4RXyJz63fDFEMb) I still have random errors on my requests after migrating the SDK to v1.0.0-alpha3. The Hyperledger Fabric network is still on v1.0.6. I will try to migrate to Hyperledger Fabric v1.1 but I'm not sure that solves that problem.

antitoine (Thu, 22 Mar 2018 17:26:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mjm4RXyJz63fDFEMb) I still have random errors on my requests after migrating the SDK to v1.0.0-alpha3. The Hyperledger Fabric network is still on v1.0.6. I will try to migrate to Hyperledger Fabric v1.1 but I'm not sure that solves that problem.

antitoine (Thu, 22 Mar 2018 17:26:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mjm4RXyJz63fDFEMb) I still have random errors on my requests after migrating the SDK to v1.0.0-alpha3. The Hyperledger Fabric network is still on v1.0.6. I will try to migrate to Hyperledger Fabric v1.1 but I'm not sure that solves that problem. The error: `gRPC Transport Status Code: (14) Unavailable. Description: transport is closing`

troyronda (Thu, 22 Mar 2018 17:36:43 GMT):
@antitoine do you see anything in debug logs? are you using keep alive? do you have firewalls dropping connections?

troyronda (Thu, 22 Mar 2018 17:58:08 GMT):
(if you changed keep alive settings in client, try resetting to default)

dylanccccc (Thu, 22 Mar 2018 18:16:05 GMT):
Has joined the channel.

dylanccccc (Thu, 22 Mar 2018 18:17:47 GMT):
Hello, i have some questions about the Example project. https://github.com/hyperledger/fabric/blob/release-1.1/examples/chaincode/java/Example/src/main/java/example/Example.java

dylanccccc (Thu, 22 Mar 2018 18:18:43 GMT):
i'm new for fabric. When i build this demo, meet some errors. functions `run` and `query` not in ChaincodeBase, replaced by init and run .

dylanccccc (Thu, 22 Mar 2018 18:18:56 GMT):
Who can give a latest demo

dylanccccc (Thu, 22 Mar 2018 18:19:08 GMT):
@troyronda

troyronda (Thu, 22 Mar 2018 18:20:11 GMT):
@dylanccccc this is the chatroom for the Go Client SDK - you should try your question in a more general fabric chatroom.

dylanccccc (Thu, 22 Mar 2018 18:20:50 GMT):
@troyronda sorry about that.

troyronda (Thu, 22 Mar 2018 18:20:58 GMT):
no worries - good luck

dylanccccc (Thu, 22 Mar 2018 18:21:02 GMT):
i will send to fabric question channel.

lwrabbit (Fri, 23 Mar 2018 06:07:39 GMT):
@troyronda hi, i have a problem that got an err "InstantiateCC error: instantiateOrUpgradeCC timed out or cancelled" when run InstantiateCC function via go-sdk,i do not know why.

ga25waq (Fri, 23 Mar 2018 13:51:23 GMT):
@lwrabbit I had a similar problem. Have you adapted the SDK config to the new SDK version? New timeout settings have been introduced, and I did not specifiy/increase them in my config.

mrFranklin (Fri, 23 Mar 2018 13:58:24 GMT):
Has joined the channel.

troyronda (Fri, 23 Mar 2018 14:01:33 GMT):
@ga25waq i wonder if we need to increase the defaults when no config is present.

troyronda (Fri, 23 Mar 2018 14:02:40 GMT):
personally I think we should need as little config as possible ;)

mrFranklin (Fri, 23 Mar 2018 14:02:55 GMT):
does the go-sdk v1.0.0-alpha3 work fine on fabric v1.1.0?

troyronda (Fri, 23 Mar 2018 14:03:01 GMT):
@mrFranklin yes

ga25waq (Fri, 23 Mar 2018 14:03:28 GMT):
I'm working on a standard computer here (no high-end machine) and I had to increase the timeouts, as the creation and start of several new chaincode containers (induced by a complex endorsement policy) took some time

mrFranklin (Fri, 23 Mar 2018 14:03:43 GMT):
@troyronda why not release a tag of v1.1.0 for go-sdk ? :grin:

ga25waq (Fri, 23 Mar 2018 14:03:54 GMT):
But indeed, that's highly dependent on the machine someone is working on

troyronda (Fri, 23 Mar 2018 14:04:40 GMT):
@mrFranklin there is always a good healthy debate on whether things should follow Fabric numbering or be independent.

troyronda (Fri, 23 Mar 2018 14:04:40 GMT):
@mrFranklin there is always a good healthy debate on whether versioning should follow Fabric numbering or be independent.

troyronda (Fri, 23 Mar 2018 14:05:32 GMT):
beyond that, I think it would be wonderful to get more feedback, usage (etc) prior to advancing the versions.

troyronda (Fri, 23 Mar 2018 14:05:32 GMT):
beyond that, I think it would be wonderful to get more feedback, usage (etc) prior to advancing the versions.

troyronda (Fri, 23 Mar 2018 14:06:03 GMT):
more collaborators would be super too :)

mrFranklin (Fri, 23 Mar 2018 14:06:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=AXuHQS6keErJod9qW) @troyronda ok,thans

mrFranklin (Fri, 23 Mar 2018 14:07:06 GMT):
thanks

ga25waq (Fri, 23 Mar 2018 15:02:09 GMT):
@troyronda I've had a look into './pkg/fab/events/service/service.go'. For chaincode events, an event filter is required. How am I supposed to get unfiltered chaincode events, including the respective payload? If i register a (unfiltered) block event via RegisterBlockEvent(), as you suggested, I naturally get get pure blocks which I would have to manually extract the needed information out of.

troyronda (Fri, 23 Mar 2018 15:02:57 GMT):
@ga25waq we are working on adding an events client for non-filtered cases

ga25waq (Fri, 23 Mar 2018 15:03:27 GMT):
@troyronda That's cool, thanks!

troyronda (Fri, 23 Mar 2018 15:03:45 GMT):
in the channel client, the filter is a regular expression

troyronda (Fri, 23 Mar 2018 15:03:45 GMT):
in the channel client, the filter for the Handle func is a regular expression

troyronda (Fri, 23 Mar 2018 15:03:45 GMT):
in the channel client, the filter for the Register func is a regular expression

troyronda (Fri, 23 Mar 2018 15:03:57 GMT):
it really needs a better GoDoc

ga25waq (Fri, 23 Mar 2018 15:04:39 GMT):
But the event filter '(.*)' does not lead to an unfiltered chaincode event, does it?

troyronda (Fri, 23 Mar 2018 15:04:54 GMT):
no it's a filter on the filtered events

troyronda (Fri, 23 Mar 2018 15:04:55 GMT):
:)

troyronda (Fri, 23 Mar 2018 15:05:09 GMT):
the events client will have unfiltered events

ga25waq (Fri, 23 Mar 2018 15:06:01 GMT):
Okay. For now, I'm switching back to the eventhub model. It still works with Fabric 1.1 (surprisingly?).

troyronda (Fri, 23 Mar 2018 15:07:42 GMT):
yup eventhub still works but isn't channel-based so delivery service is definitely the way forward.

troyronda (Fri, 23 Mar 2018 15:08:03 GMT):
i'll ping you when we push the next client

ga25waq (Fri, 23 Mar 2018 15:08:29 GMT):
Thank you very much! You and your team are doing a great job.

troyronda (Fri, 23 Mar 2018 15:08:36 GMT):
thanks so much :)

freddyisaac (Sat, 24 Mar 2018 03:10:56 GMT):
Has joined the channel.

gen_el (Sat, 24 Mar 2018 16:47:27 GMT):
Hi, i don't want to use the file based config for the sdk. I want to construct my config in-memory. Pointers to the right packages and functions will be highly appreciated.

gen_el (Sat, 24 Mar 2018 16:47:27 GMT):
Hi, i don't want to use the file based config for the sdk. I want to construct my config in-memory. Pointers to the right packages and functions will be highly appreciated. @troyronda

sklymenko (Sat, 24 Mar 2018 18:13:27 GMT):
Has joined the channel.

aleksandar.likic (Sun, 25 Mar 2018 12:26:55 GMT):
@gen_el You can try https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/core/config#FromReader. It work with json and yaml (formats supported by viper).

aleksandar.likic (Sun, 25 Mar 2018 12:26:55 GMT):
@gen_el You can try https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/core/config#FromReader. It works with json and yaml (formats supported by viper).

habpygo (Mon, 26 Mar 2018 07:27:48 GMT):
Just to let everyone know: After updating to Go v1.10 on my Mac, I got the error when running my HLF app: `cannot use nil as type _Ctype_CFDataRef in assignment - cfssl 1.3.0 go1.10 macos` If you get this, just do: `go get -u github.com/cloudflare/cfssl/cmd/cfssl` It will take a couple of seconds longer than usual when doing a `go get` but in the end it works.

lignyxg (Mon, 26 Mar 2018 09:45:59 GMT):
Has joined the channel.

lignyxg (Mon, 26 Mar 2018 09:54:19 GMT):
Hi, do I have to use fabric-ca for the certificates when using fabric-sdk-go? Can i use cryptogen tool to generate keys and certs instead?

aleksandar.likic (Mon, 26 Mar 2018 11:20:15 GMT):
@lignyxg User identity is resolved by looking up the user enrollment cert first, and then looking up the matching private key. You should be able to use any tool, as long as you put the resulting cert and key in proper places. When resolving the cert, SDK first looks at the user store (@client.credentialStore.path); if cert is found, the key is looked up in the crypto provider key store (HSM or @client.credentialStore.cryptoStore.path). If the identity is not resolved, SDK looks up embedded certs in client configuration; if not found, it looks up the org's MSP directory (@organizations..cryptoPath). If not found, "user not found" is reported. Otherwise, the matching private key is first searched in embedded keys in client configuration, then in the crypto provider key store, and finally in the org's MSP directory. The whole setup essentially attempts to support three use cases: embedded credentials in client configuration, pre-enrolled users in the org's MSP directory, and dynamically enrolled users - when the cert is in the user store and the key in the crypto provider's key store. There are naming conventions used by default implementations of the MSP store and user store. You need to follow them if you want to plant your externally generated certs there. To make sure you understand the conventions correctly, try to study and run https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/msp/enrollment_test.go, and observe how the newly enrolled user's cert and private key are stored . You can also implement your own cert store and let the SDK use it - see https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/msp/user_data_mgmt_test.go. Default org MSP store follows the format generated by the fabric cryptogen tool. Finally, you can implement your own MSP provider to have complete control over enrollment process (but that's for another tutorial). I'll try to put this information into some SDK readme file in the next week or so. Hope this helps.

aleksandar.likic (Mon, 26 Mar 2018 11:20:15 GMT):
@lignyxg User identity is resolved by looking up the user enrollment cert first, and then looking up the matching private key. You should be able to use any tool to generate private key and cert, as long as you put the resulting cert and key in proper places. When resolving the cert, SDK first looks at the user store (@client.credentialStore.path); if cert is found, the key is looked up in the crypto provider key store (HSM or @client.credentialStore.cryptoStore.path). If the identity is not resolved, SDK looks up embedded certs in client configuration; if not found, it looks up the org's MSP directory (@organizations..cryptoPath). If not found, "user not found" is reported. Otherwise, the matching private key is first searched in embedded keys in client configuration, then in the crypto provider key store, and finally in the org's MSP directory. The whole setup essentially attempts to support three use cases: embedded credentials in client configuration, pre-enrolled users in the org's MSP directory, and dynamically enrolled users - when the cert is in the user store and the key in the crypto provider's key store. There are naming conventions used by default implementations of the MSP store and user store. You need to follow them if you want to plant your externally generated certs there. To make sure you understand the conventions correctly, try to study and run https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/msp/enrollment_test.go, and observe how the newly enrolled user's cert and private key are stored . You can also implement your own cert store and let the SDK use it - see https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/msp/user_data_mgmt_test.go. Default org MSP store follows the format generated by the fabric cryptogen tool. Finally, you can implement your own MSP provider to have complete control over enrollment process (but that's for another tutorial). I'll try to put this information into some SDK readme file in the next week or so. Hope this helps.

lignyxg (Mon, 26 Mar 2018 12:02:46 GMT):
@aleksandar.likic Thanks for your detailed reply, it helps a lot:grin:

drasko.draskovic (Mon, 26 Mar 2018 12:30:27 GMT):
Has joined the channel.

bpbuch (Mon, 26 Mar 2018 19:22:56 GMT):
Has joined the channel.

lignyxg (Tue, 27 Mar 2018 08:51:41 GMT):
Hi, I‘ve been trying to run end_to_end test with local fabric network launched by docker-compose, I used config_test_local.yaml for the configuration and pointed cryptopath to the peer and orderer's MSP directory respectively, but when i run the test, I got this error: "`create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7050]`" from sdk side, and got this error: "`grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams received bogus greeting from client:...`" from the orderer side, did I miss something or did I do something wrong about the configuration? :dizzy_face:

aleksandar.likic (Tue, 27 Mar 2018 13:03:53 GMT):
@lignyxg It's hard to tell without seeing your files. I just pulled the latest and ran: make dockerenv-stable-up

aleksandar.likic (Tue, 27 Mar 2018 13:03:53 GMT):
@lignyxg It's hard to tell without seeing your files. I just pulled the latest and ran: make dockerenv-stable-up and then in another shell: make configFile=config_test_local.yaml integration-tests-local and all worked. I would start with these out of the box files and make small changes until you hit the problem.

smeyers (Tue, 27 Mar 2018 19:01:15 GMT):
Has joined the channel.

troyronda (Tue, 27 Mar 2018 20:58:06 GMT):
@ga25waq WIP on event client: https://gerrit.hyperledger.org/r/c/19827/

lignyxg (Wed, 28 Mar 2018 03:00:10 GMT):
@aleksandar.likic Thanks for your reply, I did the test manually step by step trying to figure out the inside work flow, I think I did wrong about the org name and org msp id in crypto-config.yaml, configtx.yaml in fabric and config_test_local.yaml in sdk, they didn't match each other, so after corrected, now I got another error when creating channel through sdk: `Orderer Server Status Code: (400) BAD_REQUEST. Description: Attempted to include a member which is not in the consortium` still no luck...maybe there's still something wrong with the configuration, i'll keep trying

kingofsevens (Wed, 28 Mar 2018 06:12:06 GMT):
Has joined the channel.

StevenXu (Wed, 28 Mar 2018 08:51:05 GMT):
@troyronda When I call sdk to create and join channel with channelID not equal mychannel/orgchannel, I got error "failed to find orderer for request: orderer not found: orderers lookup failed: Unable to retrieve channel config", I find the error is cofing_test.yaml not have channel config setting, and then call ResMgmt.saveChannel with resmgmt.WithOrdererURL("orderer.example.com") options will solve the problem, but when I create/join channel successfully and failed to create channelClient

StevenXu (Wed, 28 Mar 2018 08:54:31 GMT):
the reason is create channel context/create event service need core.conifg in pkg/client/channel/chclient.go New func, but we create sdk with config(config_test.yaml) not have the channel config

StevenXu (Wed, 28 Mar 2018 08:54:31 GMT):
the reason is create channel context/create event service need core.conifg in pkg/client/channel/chclient.go New func, but we create *FabricSDK with config(config_test.yaml) not have the channel config

StevenXu (Wed, 28 Mar 2018 08:56:12 GMT):
So how do I to create channel client without channel config in sdk config?

StevenXu (Wed, 28 Mar 2018 08:56:12 GMT):
So how do I to create channel client without channel config in sdk config? thanks

troyronda (Wed, 28 Mar 2018 20:17:07 GMT):
@StevenXu it sounds like you were able to create/join channel using WithOrdererURL. What error did you get from channel client New?

StevenXu (Thu, 29 Mar 2018 01:42:19 GMT):
@troyronda failed to get discovery service to create channel client: unable to read configuration for channel peers: channel config not found for mychannel3

troyronda (Thu, 29 Mar 2018 01:47:54 GMT):
@StevenXu you can override the discovery service using this SDK option: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#WithServicePkg

troyronda (Thu, 29 Mar 2018 01:48:18 GMT):
(by implementing CreateDiscoveryProvider)

troyronda (Thu, 29 Mar 2018 01:49:37 GMT):
there is an example of a related override here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/sdk/sdk_provider_test.go#L47

troyronda (Thu, 29 Mar 2018 01:50:25 GMT):
We'd have to see if there is something that makes sense for the built-in discovery service when no config is provided

troyronda (Thu, 29 Mar 2018 01:52:07 GMT):
but like I said, the default one is already overridable

StevenXu (Thu, 29 Mar 2018 01:53:30 GMT):
I want to make sure if channel name is random, Is the way work?

troyronda (Thu, 29 Mar 2018 01:55:16 GMT):
The SDK uses the discovery provider to obtain peers based on a channel ID

troyronda (Thu, 29 Mar 2018 01:55:37 GMT):
so you can customize the peers returned based on the channel ID

troyronda (Thu, 29 Mar 2018 01:55:48 GMT):
or you can even ignore the channel ID and always return the same peers

troyronda (Thu, 29 Mar 2018 01:56:01 GMT):
up to your needs :)

troyronda (Thu, 29 Mar 2018 01:57:59 GMT):
the default discovery provider uses the config file to do this work

troyronda (Thu, 29 Mar 2018 01:59:26 GMT):
(but like I mentioned, you can make your own that doesn't rely on config file)

StevenXu (Thu, 29 Mar 2018 02:00:18 GMT):
Ok, I will try it now, thanks a lot

troyronda (Thu, 29 Mar 2018 02:00:24 GMT):
good luck :)

StevenXu (Thu, 29 Mar 2018 03:30:52 GMT):
@troyronda I try to create sdk client with options WithServicePkg, the channel service created successfully, but I find channelService().EventService() and Membership() failed for missing channel config

StevenXu (Thu, 29 Mar 2018 03:31:48 GMT):
the error message return: "event service creation failed: could not get chConfig cache reference: read configuration for channel peers failed: channel config not found for mychannel3"

YangYun (Thu, 29 Mar 2018 03:34:05 GMT):
Has joined the channel.

StevenXu (Thu, 29 Mar 2018 06:46:42 GMT):
@troyronda I think we should add channel config inject func, channels config defind some diff channel type with diff policy or peer ..., when we create new channel, we can choose the channel type to create, It will be more flexible for multi orgs

luckydogchina (Thu, 29 Mar 2018 07:41:08 GMT):
Can the farbic-sdk-go support the farbic-1.1 version?

antitoine (Thu, 29 Mar 2018 08:32:01 GMT):
@luckydogchina yes, 1.0.x and 1.1.0 are supported

gen_el (Thu, 29 Mar 2018 10:39:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fPNF5pXaCNrB3MoBk) @StevenXu I agree!

troyronda (Thu, 29 Mar 2018 13:29:58 GMT):
@StevenXu @gen_el I agree that we should find a solution to flexibly provide this configuration.

troyronda (Thu, 29 Mar 2018 13:31:51 GMT):
FYI: there is WIP that is splitting out (and enabling override) of the key-value configuration backend. once this is complete, you could leverage this override to accomplish the goal.

troyronda (Thu, 29 Mar 2018 13:33:04 GMT):
it could make also sense to have a more specific client-sourced channel config provider (as a new feature)

gen_el (Thu, 29 Mar 2018 13:41:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bkMSftF6HSZ9wMRbF) @troyronda Good to hear! A client-sourced channel config provider that basically then takes advantage of the backend config override is definitely more accessible.

troyronda (Thu, 29 Mar 2018 21:31:52 GMT):
FYI: we merged the first phase of the config refactor - doesn’t get us there yet but was needed as a first step

troyronda (Thu, 29 Mar 2018 21:32:32 GMT):
This change splits the config between the main packages

troyronda (Thu, 29 Mar 2018 21:33:51 GMT):
And moves viper into a wrapped key/value backend

troyronda (Thu, 29 Mar 2018 23:24:41 GMT):
@sg3des event client was merged: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/event

troyronda (Thu, 29 Mar 2018 23:25:26 GMT):
you can use that client to obtain non-filtered block events (& chaincode event payloads)

troyronda (Thu, 29 Mar 2018 23:26:17 GMT):
Use this option for non-filtered: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/event#WithBlockEvents

luckydogchina (Fri, 30 Mar 2018 01:17:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sX8oFCuS6vZ2f688L) @antitoine Thank you, the fabric-sdk-go readme show that 1.0.3-alpha is ok

kpkrish (Fri, 30 Mar 2018 06:47:06 GMT):
Has joined the channel.

ga25waq (Fri, 30 Mar 2018 12:15:44 GMT):
@troyronda Thanks, that looks good!

baoyangc (Mon, 02 Apr 2018 01:58:59 GMT):
`func (s *Service) RegisterBlockEvent(filter ...fab.BlockFilter)` and `func (s *Service) RegisterFilteredBlockEvent() ` why registerFilteredBlockEvent does not have filter paramater? @troyronda

souvik (Mon, 02 Apr 2018 08:52:58 GMT):
Has joined the channel.

muhammad (Mon, 02 Apr 2018 12:54:51 GMT):
Has joined the channel.

troyronda (Mon, 02 Apr 2018 15:24:32 GMT):
@baoyangc it was thought there wasn't enough information in filtered events to have the filter argument.

KGiou (Tue, 03 Apr 2018 13:28:16 GMT):
Has joined the channel.

lignyxg (Tue, 03 Apr 2018 14:54:55 GMT):
Hi, I don't quite understand the `DynamicSelectionProvider/DynamicSelectionProviderFactory`, i noticed the difference between func `testWithOrg1` and `testWithOrg2` is that the `testWithOrg1` has to `load Org Peers` and set targets by `channel.WithTargets()` manually when interacting with chaincode,while `testWithOrg2` doesn't. It seems the dynamic selection obtains targets in the config_test_xxx.yaml(because when org2's peers are deleted in channel configuration part of config_test_xxx.yaml, I got the error `Failed to move funds: Client Status Code: (6) NO_PEERS_FOUND. Description: targets were not provided`), but comment(multiple_orgs_test.go, line 383) says dynamic selection will inspect chaincode policy to determine endorsers, that sounds like targets are not obtained from config_test_xxx.yaml, so what's the real thing?

lignyxg (Tue, 03 Apr 2018 15:13:17 GMT):
After running multiple_orgs_test successfully(org2's peers were added in the channel configuration part of config_test_xxx.yaml), I commented out the first func call `testWithOrg1` and ran `testWithOrg2` alone in `TestOrgsEndToEnd`, I got error `panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x4459033] goroutine 117 [running]: github.com/hyperledger/fabric-sdk-go/pkg/fab/txn.SendProposal.func1(0xc420464e40, 0x47bce40, 0xc4204912c0, 0xc420323c20, 0xc420464e30, 0xc42025ade0, 0xc42025adc0, 0x0, 0x0) /Users/lignyxg/gopath/src/github.com/hyperledger/fabric-sdk-go/pkg/fab/txn/proposal.go:114 +0x53 created by github.com/hyperledger/fabric-sdk-go/pkg/fab/txn.SendProposal /Users/lignyxg/gopath/src/github.com/hyperledger/fabric-sdk-go/pkg/fab/txn/proposal.go:109 +0x237 Process finished with exit code 1` was it wrong to run `testWithOrg2` alone? But I don't see the necessary connection bewteen `testWithOrg1` and `testWithOrg2` that `testWithOrg2` must run after `testWithOrg1` within one execution?

aleksandar.likic (Tue, 03 Apr 2018 20:06:11 GMT):
@lignyxg The idea behind dynamic selection is to have the SDK automatically select the set of endorsers so the application doesn't have to deal with it. Dynamic selection works with current channel configuration (which changes as peers join / drop off), as well as the chaincode endorsement policy. Note that the channel configuration is read from a peer, not from the client configuration. Also, if any peers fail during endorsement, SDK will retry the endorsement with a new set of peers.

aleksandar.likic (Tue, 03 Apr 2018 20:06:11 GMT):
@lignyxg The idea behind dynamic selection is to have the SDK automatically select the set of endorsers so the application doesn't have to deal with it. Dynamic selection works with current channel configuration (which changes as peers join / drop off), as well as the chaincode endorsement policy. Note that the channel configuration is read from a peer, not from the client configuration yaml file. Also, if any peers fail during endorsement, SDK will retry the endorsement with a new set of peers.

lignyxg (Wed, 04 Apr 2018 02:59:12 GMT):
@aleksandar.likic oh I see, but still don't know why the targets not provided error came out when deleting org2's peers in the client configuration yaml file, is there any doc I can learn about dynamic selection? Thanks:relaxed:

richzhao (Wed, 04 Apr 2018 15:57:21 GMT):
Has joined the channel.

aleksandar.likic (Wed, 04 Apr 2018 23:17:46 GMT):
@lignyxg I think that one peer on a channel is needed in client configuration, to pull the channel configuration from.

pankajcheema (Thu, 05 Apr 2018 12:06:41 GMT):
Has joined the channel.

antitoine (Thu, 05 Apr 2018 13:48:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Wn4zMGhikjk5oJvB5) After the network migration to Hyperledger Fabric v1.1.0, the problem no longer seems to be present! I still use eventhub (and not delivery service). So maybe it's a problem with Hyperledger Fabric and not the SDK?

pankajcheema (Thu, 05 Apr 2018 14:22:51 GMT):
Can we select orderer dynamically if one which is set in sdk down or crashed

pankajcheema (Thu, 05 Apr 2018 14:23:02 GMT):
In sdk

pankajcheema (Thu, 05 Apr 2018 14:23:48 GMT):
Same for peer also

pankajcheema (Thu, 05 Apr 2018 17:57:30 GMT):
If I use any afflilation other than `org1.department` `CA` throws an error ``` ca.example.com | 2018/04/05 17:54:10 [DEBUG] Received request for /api/v1/register ca.example.com | 2018/04/05 17:54:10 [DEBUG] Checking for revocation/expiration of certificate owned by 'admin' ca.example.com | 2018/04/05 17:54:10 [DEBUG] DB: Get certificate by serial (4676355c4b2bc7c3194e0eaa76e654a7008b1f82) and aki (2e2223dd901510904ca79e2b436ed98841644be19af8023caade89cb6447c6a0) ca.example.com | 2018/04/05 17:54:10 [DEBUG] Successful token authentication of 'admin' ca.example.com | 2018/04/05 17:54:10 [DEBUG] Received registration request from admin: { Name:user4 Type:client Secret:**** MaxEnrollments:1 Affiliation:org1.custom Attributes:[] CAName: } ca.example.com | 2018/04/05 17:54:10 [DEBUG] DB: Getting identity admin ca.example.com | 2018/04/05 17:54:10 [DEBUG] canRegister - Check to see if user 'admin' can register ca.example.com | 2018/04/05 17:54:10 [DEBUG] Checking to see if caller 'admin' is a registrar ca.example.com | 2018/04/05 17:54:10 [DEBUG] Validate Affiliation ca.example.com | 2018/04/05 17:54:10 [DEBUG] Checking to see if affiliation 'org1.custom' contains caller's affiliation '' ca.example.com | 2018/04/05 17:54:10 [DEBUG] Caller has root affiliation ca.example.com | 2018/04/05 17:54:10 [DEBUG] Validate ID ca.example.com | 2018/04/05 17:54:10 [DEBUG] Validating affiliation: org1.custom ca.example.com | 2018/04/05 17:54:10 [DEBUG] DB: Get affiliation org1.custom ca.example.com | 2018/04/05 17:54:10 [DEBUG] Registration of 'user4' failed: Registration of 'user4' to validate: Failed getting affiliation 'org1.custom': : scode: 404, code: 63, msg: Failed to get Affiliation: sql: no rows in result set ca.example.com | 2018/04/05 17:54:10 [INFO] 172.18.0.1:49518 POST /api/v1/register 404 63 "Failed to get Affiliation: sql: no rows in result set"

aleksandar.likic (Thu, 05 Apr 2018 19:59:59 GMT):
@pankajcheema SDK does automatically fall back to other orderer(s) defined in client config, in case the first one fails. SDK discovery currently doesn't support orderers (this should be added to the SDK), so all of them have to be in client config. Peer discovery is there, so only one peer (on the target channel) has to be in client config - others are discovered. SDK maintains an up to date information of all peers on the channel as the peers join the channel or go off. Dynamic peer selection allows the app to leave peer selection to the SDK - SDK will assure that correct combination of peers on the target channel are chosen for endorsement, based on the transaction policy and current network configuration. Also, in case of error, SDK will automatically retry the transaction endorsement with a new set of peers.

aleksandar.likic (Thu, 05 Apr 2018 19:59:59 GMT):
@pankajcheema SDK does automatically fall back to other orderer(s) defined in client config, in case the first one fails. SDK discovery currently doesn't support orderers (this should be added to the SDK), so all of them have to be in client config. Peer discovery is there, so only one peer (on the target channel) has to be in client config - others are discovered. SDK maintains an up to date information of all peers on the channel as the peers join the channel or go off. Dynamic peer selection allows the app to leave peer selection to the SDK - SDK will assure that correct combination of peers on the target channel are chosen for endorsement, based on the endorsement policy and current network configuration. Also, in case of error, SDK will automatically retry the transaction endorsement with a new set of peers.

pankajcheema (Fri, 06 Apr 2018 05:44:46 GMT):
Thank you very much @aleksandar.likic for your quick response.

xuchenhao001 (Fri, 06 Apr 2018 12:17:53 GMT):
Hello, I have a question for go sdk: When I instantiate a chaincode on a channal, which includes 2 orgs, there will be just 1 org's chaincode containers running? And when I invoke to another org's peer, it'll build it's chaincode container, that makes my invoke so slow.

xuchenhao001 (Fri, 06 Apr 2018 12:18:53 GMT):
I mean, if there is way to enroll a super user, who can instantiate all of the peers at the same time?

xuchenhao001 (Fri, 06 Apr 2018 14:25:08 GMT):
When I change my context to second organization to instantiate, the error log shows: ``` [fabric_sdk_go] 2018/04/06 14:21:01 UTC - msp.(*mspManagerImpl).Setup -> DEBU Setting up the MSP manager (3 msps) [fabric_sdk_go] 2018/04/06 14:21:01 UTC - msp.(*mspManagerImpl).Setup -> DEBU MSP manager setup complete, setup 3 msps [fabric_sdk_go] 2018/04/06 14:21:01 UTC - channel.New -> DEBU Constructed channel instance for channel mychannel: {mychannel map[] map[orderer.fabric-net.svc.cluster.local:7050:0xc42030ad80] 0xc420272680 0xc4202726a0 [] false} [fabric_sdk_go] 2018/04/06 14:21:01 UTC - peer.(*peerEndorser).ProcessTransactionProposal -> DEBU Processing proposal using endorser :peer1-org2.fabric-net:7051 [fabric_sdk_go] 2018/04/06 14:21:01 UTC - peer.(*peerEndorser).ProcessTransactionProposal -> DEBU Processing proposal using endorser :peer0-org2.fabric-net:7051 [fabric_sdk_go] 2018/04/06 14:21:01 UTC - txn.SendProposal.func1 -> DEBU Received error response from txn proposal processing: Transaction processor (peer1-org2.fabric-net:7051) returned error for txID '81a45d6d6f630c2dada81bc80b0d99f02729ded4fd3e5856b533374a0ff584ec': gRPC Transport Status Code: (2) Unknown. Description: chaincode error (status: 500, message: chaincode exists examplecc) [fabric_sdk_go] 2018/04/06 14:21:01 UTC - txn.SendProposal.func1 -> DEBU Received error response from txn proposal processing: Transaction processor (peer0-org2.fabric-net:7051) returned error for txID '81a45d6d6f630c2dada81bc80b0d99f02729ded4fd3e5856b533374a0ff584ec': gRPC Transport Status Code: (2) Unknown. Description: chaincode error (status: 500, message: chaincode exists examplecc) Unable to instantiate chaincode: failed to instantiate the chaincode: send instantiate chaincode proposal failed: Multiple errors occurred: Transaction processor (peer1-org2.fabric-net:7051) returned error for txID '81a45d6d6f630c2dada81bc80b0d99f02729ded4fd3e5856b533374a0ff584ec': gRPC Transport Status Code: (2) Unknown. Description: chaincode error (status: 500, message: chaincode exists examplecc) Transaction processor (peer0-org2.fabric-net:7051) returned error for txID '81a45d6d6f630c2dada81bc80b0d99f02729ded4fd3e5856b533374a0ff584ec': gRPC Transport Status Code: (2) Unknown. Description: chaincode error (status: 500, message: chaincode exists examplecc) ```

aleksandar.likic (Fri, 06 Apr 2018 16:40:49 GMT):
@pankajcheema Let me correct myself: Channel configuration (which can be queried from a peer on the channel) contains information on all peers and orderers on the channel (among other info). This information is used by SDK, so if the app doesn't specify any targets for a transaction, SDK will automatically choose correct peers and orderers for the transaction. It will also perform retries on endorsement / commit by failing over to other peers/orderers from the channel configuration. This means that the app needs only a single peer in the configuration in order to transact with Fabric. This assumes the peer is trusted by the app (so the channel configuration queried from the peer is deemed genuine). If peers are not trusted, SDK needs to query channel configuration from multiple peers and to compare results, thus more than one peer in local configuration. App can specify channel..policies.queryChannelConfig.minResponses to control the minimum number of peers required when querying the channel configuration. The default is 1.

aleksandar.likic (Fri, 06 Apr 2018 17:12:08 GMT):
@xuchenhao001 Looks like you are deploying examplecc? The error you are getting means that examplecc is already deployed on this channel. Chancodes are deployed to a channel, not to org. Orgs join their peers to a channel to let their clients execute transactions on the channel.

aleksandar.likic (Fri, 06 Apr 2018 17:12:08 GMT):
@xuchenhao001 The error you are getting means that examplecc is already instantiated on the peer.

aleksandar.likic (Fri, 06 Apr 2018 17:12:08 GMT):
@xuchenhao001 The error you are getting means that examplecc is already instantiated on the peer. It's done per channel, not per org.

aleksandar.likic (Fri, 06 Apr 2018 17:12:08 GMT):
@xuchenhao001 The error you are getting means that examplecc is already instantiated on the channel. It's done per channel, not per org.

htyagi90 (Fri, 06 Apr 2018 18:42:55 GMT):
Has joined the channel.

xuchenhao001 (Sat, 07 Apr 2018 01:41:30 GMT):
@aleksandar.likic yes, I know that. But how can I build all chaincode container for all of the peers on the channel at one time?

aleksandar.likic (Sat, 07 Apr 2018 01:52:59 GMT):
@xuchenhao001 Take a look at http://hyperledger-fabric.readthedocs.io/en/release-1.1/install_instantiate.html?highlight=instantiate. Installing has to be done on each peer where you want to have it, as it involves copying the CC code to the peer. It is not recorded on the ledger. Instantiate is a transaction on the ledger that has to be endorsed by a number (generally a subset) of peers on the channel that have the CC installed. Other peers (that didn't participate in the endorsement) will be notified appropriately and will eventually install the CC without client intervention. So if you successfully installed CC on org1 peers, you are done.

aleksandar.likic (Sat, 07 Apr 2018 01:52:59 GMT):
@xuchenhao001 Take a look at http://hyperledger-fabric.readthedocs.io/en/release-1.1/install_instantiate.html?highlight=instantiate. Installing has to be done on each peer where you want to have it, as it involves copying the CC code to the peer. It is not recorded on the ledger. Instantiate is a transaction on the ledger that has to be endorsed by a number (generally a subset) of peers on the channel that have the CC installed. Other peers (that didn't participate in the endorsement) will be notified appropriately and will eventually install the CC without client intervention. So if you have successfully installed CC on org1 peers, you are done.

xuchenhao001 (Sat, 07 Apr 2018 02:01:31 GMT):
Thanks! So, does that means, if I specify all peers have to endorse the transaction, all of the chaincode container will be built at the same time?

aleksandar.likic (Sat, 07 Apr 2018 02:11:38 GMT):
@xuchenhao001 Roughly yes. Otherwise, I think that the chaincode container is built by the peer on the first call from the client, when the peer detects the container is not present.

aleksandar.likic (Sat, 07 Apr 2018 02:11:38 GMT):
@xuchenhao001 Roughly yes. Otherwise, I think that the chaincode container is built by the peer on the first call from the client, when the peer detects the container is not present. But to be sure you should ask on the relevant fabric channel.

aleksandar.likic (Sat, 07 Apr 2018 02:11:38 GMT):
@xuchenhao001 Roughly yes. Otherwise, I think that the chaincode container is built by the peer on the first call from the client, when the peer detects the container is not present. But to be sure you should ask on the relevant fabric channel, or look at the peer code.

aleksandar.likic (Sat, 07 Apr 2018 02:11:38 GMT):
@xuchenhao001 Roughly yes. Otherwise, I think that the chaincode container is built by a peer on the first call from the client, when the peer detects the container is not present. But to be sure you should ask on the relevant fabric channel, or look at the peer code.

xuchenhao001 (Sat, 07 Apr 2018 02:24:15 GMT):
Millions of thanks! I will try it!

xuchenhao001 (Sat, 07 Apr 2018 02:26:25 GMT):
By the way, how can I express my policy "signed by all of the peers" in `fabric-sdk-go`? I just found that `ccPolicy := cauthdsl.SignedByAnyMember([]string{"Org1MSP", "Org2MSP"})` is `Set up chaincode policy to 'any of two msps'`

aleksandar.likic (Sat, 07 Apr 2018 03:14:46 GMT):
@xuchenhao001 "signed by all peers" doesn't look like a meaningful policy. A policy is used to engage multiple parties (orgs) during endorsement, as a single party is not generally trusted. Are you just trying to execute instantiate on all peers? For that you should use WithTargets option to explicitly set the endorsing peers.

aleksandar.likic (Sat, 07 Apr 2018 03:14:46 GMT):
@xuchenhao001 "signed by all peers" doesn't look like a meaningful policy. A policy is used to engage multiple parties (orgs) during endorsement, as a single party is generally not trusted. Are you just trying to execute instantiate on all peers? For that you should use WithTargets option to explicitly set the endorsing peers.

xuchenhao001 (Sat, 07 Apr 2018 03:32:16 GMT):
@aleksandar.likic Yes, it just told me `ENDORSEMENT_POLICY_FAILURE`, so where should I add the `WithTargets` parameter?

aleksandar.likic (Sat, 07 Apr 2018 03:42:15 GMT):
@xuchenhao001 https://github.com/hyperledger/fabric-sdk-go/blob/926bca6e81acc50d2a9e006ed6aa93adb0da1544/pkg/client/resmgmt/resmgmt_test.go#L502 . You can also use WithTargetURLs, to specify peer URLs - https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt#RequestOption

xuchenhao001 (Sat, 07 Apr 2018 03:50:35 GMT):
@aleksandar.likic Thank you! I did it!!

aleksandar.likic (Sat, 07 Apr 2018 03:51:09 GMT):
@x :thumbup_tone4:

aleksandar.likic (Sat, 07 Apr 2018 03:51:09 GMT):
@xuchenhao001 :thumbup_tone4:

kkado (Sat, 07 Apr 2018 04:17:31 GMT):
Has joined the channel.

lclclc (Sun, 08 Apr 2018 08:11:14 GMT):
A question about go sdk. Is it now a stable release? Is it now using some codes from Fabric core?

lclclc (Sun, 08 Apr 2018 08:11:14 GMT):
questions about go sdk. Is it now a stable release? Is it now using some codes from Fabric core?

yacovm (Sun, 08 Apr 2018 08:18:22 GMT):
it has to use code from fabric core since it uses the same protobufs

ericmvaughn (Mon, 09 Apr 2018 16:11:53 GMT):
Has joined the channel.

vieiramanoel (Mon, 09 Apr 2018 19:46:49 GMT):
Has joined the channel.

vieiramanoel (Mon, 09 Apr 2018 20:03:27 GMT):
hey, guys! There's any documentation about go sdk at any other place than github?

troyronda (Mon, 09 Apr 2018 20:03:55 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go

troyronda (Mon, 09 Apr 2018 20:04:12 GMT):
provides pointers to the main packages for SDK usage

vieiramanoel (Mon, 09 Apr 2018 20:04:24 GMT):
:top:

vieiramanoel (Mon, 09 Apr 2018 20:04:25 GMT):
thnks

Mathroz1206 (Tue, 10 Apr 2018 03:55:13 GMT):
Has joined the channel.

lclclc (Tue, 10 Apr 2018 07:17:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uZWfzC9ozxtTtYpEh) @yacovm So is it stable and production-ready?

yacovm (Tue, 10 Apr 2018 07:19:56 GMT):
the fabric-SDK-go ?

yacovm (Tue, 10 Apr 2018 07:20:30 GMT):
Well I think they are still doing some work - for example, integrating features of v1.2

yacovm (Tue, 10 Apr 2018 07:22:38 GMT):
I haven't used it myself but from what I've seen the code is pretty robust and the people writing it are pretty technical savvy so - I think if given the choice between all existing SDKs - I'd use this one

yacovm (Tue, 10 Apr 2018 07:22:38 GMT):
I haven't used it myself but from what I've seen the code is pretty robust and the people writing it are pretty technically savvy so - I think if given the choice between all existing SDKs - I'd use this one

yacovm (Tue, 10 Apr 2018 07:22:55 GMT):
@lclclc

lclclc (Tue, 10 Apr 2018 07:23:16 GMT):
I see

lclclc (Tue, 10 Apr 2018 07:23:56 GMT):
node.js sdk has a problem is that its code is not compiled, i don't want my logic distributed to others.

lclclc (Tue, 10 Apr 2018 07:24:21 GMT):
I would rather use a compiled binary client built from go sdk.

yacovm (Tue, 10 Apr 2018 07:26:43 GMT):
I'd say go-sdk is the way to go

yacovm (Tue, 10 Apr 2018 07:26:50 GMT):
since in java you can decompile a jar

yacovm (Tue, 10 Apr 2018 07:27:47 GMT):
though, I came across people in my life that write code that is naturally obfuscated and no one can understand what they write

yacovm (Tue, 10 Apr 2018 07:27:56 GMT):
if you're like them - you have nothing to worry about

lclclc (Tue, 10 Apr 2018 07:50:39 GMT):
But where is the official document for go sdk? All I can find is godoc. Is it all for developers? https://godoc.org/github.com/hyperledger/fabric-sdk-go#hdr-Packages_for_end_developer_usage

antitoine (Tue, 10 Apr 2018 07:51:59 GMT):
"for end developer" not "go sdk developer" ;)

lclclc (Tue, 10 Apr 2018 07:55:29 GMT):
yes, any more tutorial for application deveploers?

sklymenko (Tue, 10 Apr 2018 09:15:10 GMT):
Hi, sdk developers, can you check please, it seems client.RegisterChaincodeEvent(ccID, eventID) function returns empty event payload (but I specify event payload in chaincode). I do similar things as in test: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L158

aleksandar.likic (Tue, 10 Apr 2018 10:38:21 GMT):
@sklymenko There is an integration test for this use case, see https://github.com/hyperledger/fabric-sdk-go/blob/2c86c85894d07327473670874e8873d56d07dbac/test/fixtures/testdata/src/github.com/example_cc/example_cc.go#L110 and https://github.com/hyperledger/fabric-sdk-go/blob/2c86c85894d07327473670874e8873d56d07dbac/test/integration/sdk/events_client_test.go#L107

aleksandar.likic (Tue, 10 Apr 2018 10:38:21 GMT):
@sklymenko There is an integration test for this use case, see https://github.com/hyperledger/fabric-sdk-go/blob/2c86c85894d07327473670874e8873d56d07dbac/test/fixtures/testdata/src/github.com/example_cc/example_cc.go#L110 and https://github.com/hyperledger/fabric-sdk-go/blob/2c86c85894d07327473670874e8873d56d07dbac/test/integration/sdk/events_client_test.go#L107 Try to create event client WithBlockEvents, as in https://github.com/hyperledger/fabric-sdk-go/blob/2c86c85894d07327473670874e8873d56d07dbac/test/integration/sdk/events_client_test.go#L73

lclclc (Tue, 10 Apr 2018 10:46:38 GMT):
Does the Golang SDK include fabric-ca-client SDK features?

lclclc (Tue, 10 Apr 2018 10:47:53 GMT):
ha, I found something marked internal.

yacovm (Tue, 10 Apr 2018 10:50:39 GMT):
Since the fabric core has a reference implementation of the discovery client, I decided to enhance it with some smarter endorser selection: `Endorsers(string, hint Selection) (Endorsers, error)` To be able to prefer endorsers by their ledger height, and also to be able to exclude endorsers from being selected which is useful if a peer is dead / unreachable and we don't want the random selection logic to select it. Here is a WIP change set https://gerrit.hyperledger.org/r/#/c/20371/2/discovery/client/selection.go I'd appreciate your feedback on this as your SDK already has ServiceDiscover client support and you also might know use cases which I am not aware of. @troyronda , @aleksandar.likic , @bstasyszyn

yacovm (Tue, 10 Apr 2018 10:50:39 GMT):
Since the fabric core has a reference implementation of the discovery client, I decided to enhance it with some smarter endorser selection (so the java / node SDKs would follow suit): `Endorsers(string, hint Selection) (Endorsers, error)` To be able to prefer endorsers by their ledger height, and also to be able to exclude endorsers from being selected which is useful if a peer is dead / unreachable and we don't want the random selection logic to select it. Here is a WIP change set https://gerrit.hyperledger.org/r/#/c/20371/2/discovery/client/selection.go I'd appreciate your feedback on this as your SDK already has ServiceDiscover client support and you also might know use cases which I am not aware of. @troyronda , @aleksandar.likic , @bstasyszyn

troyronda (Tue, 10 Apr 2018 10:54:28 GMT):
@lclclc yes - the API is here: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp

troyronda (Tue, 10 Apr 2018 10:55:26 GMT):
The internal folder contains code copied from fabric ca core that is used internally by the SDK

lclclc (Tue, 10 Apr 2018 10:55:29 GMT):
thanks for pointing out that

lclclc (Tue, 10 Apr 2018 10:55:58 GMT):
from the packag path, I don't see it quite "ca-client" to me.

troyronda (Tue, 10 Apr 2018 10:57:47 GMT):
Yup. We named it MSP as that is also a well used term in Fabric.

lclclc (Tue, 10 Apr 2018 10:59:31 GMT):
according to Fabric's doc, MSP is a bunch of folders or a component which defines org relationship and includes a lot of cert, keys. CA is just a term in PKI, which issue certs. I think there is some difference between them

lclclc (Tue, 10 Apr 2018 11:00:13 GMT):
anyway, good to learn your design.

troyronda (Tue, 10 Apr 2018 11:01:23 GMT):
You can see usage example here: https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/msp

lclclc (Tue, 10 Apr 2018 11:01:56 GMT):
This is helpful.

lclclc (Tue, 10 Apr 2018 11:02:39 GMT):
integration test is a good place to show behaviors.

sklymenko (Tue, 10 Apr 2018 12:09:46 GMT):
@aleksandar.likic thanks a lot, it works with 'WithBlockEvents'

bstasyszyn (Tue, 10 Apr 2018 12:18:47 GMT):
@yacovm Yes, I believe that the filter and comparator will cover the main use cases. I'll look deeper and let you know if something is missing.

yacovm (Tue, 10 Apr 2018 12:19:18 GMT):
thanks, if you have an addition i'll add it

bstasyszyn (Tue, 10 Apr 2018 12:20:50 GMT):
@yacovm One thing that the SDK currently has is the ability to specify multiple chaincodes and evaluate a policy that combines the policies of the chaincodes (i.e. for the case that one CC invokes another). Have you thought about this use case for the client?

yacovm (Tue, 10 Apr 2018 12:25:18 GMT):
also - I'm adding a function to verify that the `Membership` inner pointer is not nil... seems like https://gerrit.hyperledger.org/r/#/c/20321/5/pkg/client/common/discovery/dynamicdiscovery/service.go@116 doesn't have a nil check and so does (not) my `client.go` :) > for the case that one CC invokes another I have but didn't get to it yet :( It's not in my top priorities because I need to support also meta-policies like Majority, etc. When I'll work on that - I'll add support for a union of endorsement policies by simply constructing a policy tree that is a root vertex and the policies are the sub-trees of the root, and then I'll change the API accordingly. I was thinking of making the `chaincode string` a var-args string or something

bstasyszyn (Tue, 10 Apr 2018 12:26:05 GMT):
Ok, sounds good - this isn't urgent

yacovm (Tue, 10 Apr 2018 12:26:21 GMT):
it is because we have a deadline for the release

bstasyszyn (Tue, 10 Apr 2018 12:26:30 GMT):
understood

yacovm (Tue, 10 Apr 2018 12:28:34 GMT):
btw i sent you a PM

yacovm (Tue, 10 Apr 2018 12:28:48 GMT):
@bstasyszyn

bstasyszyn (Tue, 10 Apr 2018 12:31:07 GMT):
sorry, PM? (I'm bad with acronyms :)

antitoine (Tue, 10 Apr 2018 12:31:36 GMT):
(Private Message) :wink:

bstasyszyn (Tue, 10 Apr 2018 12:31:41 GMT):
thx :)

yacovm (Tue, 10 Apr 2018 12:55:41 GMT):
@bstasyszyn - is the cc2cc something you guys use a lot?

yacovm (Tue, 10 Apr 2018 12:55:51 GMT):
is it supported already in your SDK ?

yacovm (Tue, 10 Apr 2018 12:56:19 GMT):
(the discovery service is implemented fully in the go SDK, right? you just fetch the policy and compute the peers or something like that, right?)

yacovm (Tue, 10 Apr 2018 12:56:47 GMT):
Trying to asses the priority of this

bstasyszyn (Tue, 10 Apr 2018 13:01:40 GMT):
We are doing a lot of CC2CC - although, so far, we've only been specifying complex policies on the first CC invoked so the feature hasn't really been used.

bstasyszyn (Tue, 10 Apr 2018 13:02:54 GMT):
Yes, selection is fully implemented but it was always meant to be temporary - I have an outstanding task to replace it with your Discovery service

bstasyszyn (Tue, 10 Apr 2018 13:05:47 GMT):
To clarify, yes, multiple CCs are currently supported - the policies are combined

gbolo (Tue, 10 Apr 2018 15:04:24 GMT):
Has joined the channel.

vieiramanoel (Tue, 10 Apr 2018 18:41:35 GMT):
hey guys, sorry for bothering you with newbie questions but when I try to ```clientContext := sdk.Context(fabsdk.WithUser(orgAdmin), fabsdk.WithOrg(Org)) _, err = resmgmt.New(clientContext)``` I got `failed to create resmgmt client: user not found`, and idk at which part of config file the user is defined, as the e2e example I've set my variables as const ```const ( channelID = "mainchannel" orgName = "FundacaoRenovaMSP" orgAdmin = "Admin@renova.org" Org = "org1" ccID = "poc-barragem" )```

vieiramanoel (Tue, 10 Apr 2018 18:41:35 GMT):
hey guys, sorry for bothering you with newbie questions but when I try to ```clientContext := sdk.Context(fabsdk.WithUser(orgAdmin), fabsdk.WithOrg(Org)) _, err = resmgmt.New(clientContext)``` I got `failed to create resmgmt client: user not found`, and idk at which part of config file the user is defined, as the e2e example I've set my variables as const ```const ( channelID = "mainchannel" orgName = "FundacaoRenovaMSP" orgAdmin = "Admin" Org = "org1" ccID = "poc-barragem" )```

vieiramanoel (Tue, 10 Apr 2018 18:42:12 GMT):
the crypto material was generated with cryptogen and `org1` is defined as ```org1: mspid: FundacaoRenovaMSP # This org's MSP store (absolute path or relative to client.cryptoconfig) cryptoPath: "crypto-config/peerOrganizations/renova.org/users/{userName}@renova.org/msp" peers: - peer0.renova.org```

vieiramanoel (Tue, 10 Apr 2018 18:42:35 GMT):
I've already tried to `cryptoPath: "crypto-config/peerOrganizations/renova.org/users/Admin@renova.org/msp"`

vieiramanoel (Tue, 10 Apr 2018 18:44:06 GMT):
the sdk is created successfully

aleksandar.likic (Tue, 10 Apr 2018 20:41:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Pdqua8yuW3pCdyE8s) Keep in mind that the client has to have a privilege to receive block events. For regular app clients this is typically not the case, as you normally don't want to reveal all transaction details to just any client. Instead, they can subscribe for filtered events (just omit WithBlockEvents), and perform query (of the data they have access to) upon receiving the event (notification that data is ready).

Bchainer (Wed, 11 Apr 2018 06:58:23 GMT):
Has joined the channel.

guoshijiang (Wed, 11 Apr 2018 08:13:19 GMT):
Has joined the channel.

guoshijiang (Wed, 11 Apr 2018 08:13:41 GMT):
this SDK can not directly use

guoshijiang (Wed, 11 Apr 2018 08:15:41 GMT):
Always missing some dependencies

guoshijiang (Wed, 11 Apr 2018 08:43:02 GMT):

QQ截图20180411164233.png

guoshijiang (Wed, 11 Apr 2018 08:44:09 GMT):
How to solve this problem?

MilanB3 (Wed, 11 Apr 2018 10:56:29 GMT):
Has joined the channel.

troyronda (Wed, 11 Apr 2018 14:02:21 GMT):
@guoshijiang you do not need to run make to use the SDK - this is just for running SDK tests

troyronda (Wed, 11 Apr 2018 14:02:21 GMT):
@guoshijiang you do not need to run make to use the SDK - this is just for running SDK tests. (you do not need to run the tests to use the SDK)

troyronda (Wed, 11 Apr 2018 14:02:48 GMT):
to run the tests, you do need to install the dependencies following the instructions that were provided.

MaximeAubanel (Wed, 11 Apr 2018 15:19:34 GMT):
Has joined the channel.

MaximeAubanel (Wed, 11 Apr 2018 15:19:40 GMT):
Hello guys

MaximeAubanel (Wed, 11 Apr 2018 15:19:57 GMT):
I'm having an issue with the mspClient

MaximeAubanel (Wed, 11 Apr 2018 15:19:57 GMT):
I'm having an issue with the mspClient from SDG Go.

MaximeAubanel (Wed, 11 Apr 2018 15:19:57 GMT):
I'm having an issue with the mspClient from SDK Go.

MaximeAubanel (Wed, 11 Apr 2018 15:20:56 GMT):
Whenever I try to set to my new user some attribute, like that : ``` var attr []msp.Attribute attr = append(attr, msp.Attribute{Key: "isAdmin", Value: "true"}) username := "Maxime" // Register the new user enrollmentSecret, err := mspClient.Register(&msp.RegistrationRequest{ Name: username, Type: "User", Attributes: attr, Affiliation: "org1.admins", }) ```

MaximeAubanel (Wed, 11 Apr 2018 15:22:35 GMT):
It doesn't appear on the CA database and I figured out that it doesn't appear neither just before post the request, here --> ``` [fabsdk/fab] 2018/04/11 15:14:26 UTC - lib.(*Identity).Register -> WARN { Name:Maxime Type:User Secret:**** MaxEnrollments:0 Affiliation:org1.admins Attributes:[] CAName: } ```

MaximeAubanel (Wed, 11 Apr 2018 15:22:35 GMT):
It doesn't appear on the CA database and I figured out that it doesn't appear neither just before post the request, here : ``` [fabsdk/fab] 2018/04/11 15:14:26 UTC - lib.(*Identity).Register -> WARN { Name:Maxime Type:User Secret:**** MaxEnrollments:0 Affiliation:org1.admins Attributes:[] CAName: } ```

MaximeAubanel (Wed, 11 Apr 2018 15:25:25 GMT):
Here is my print in identity.go line 67 : ```func (i *Identity) Register(req *api.RegistrationRequest) (rr *api.RegistrationResponse, err error) { log.Debugf("Register %+v", req) if req.Name == "" { return nil, errors.New("Register was called without a Name set") } *log.Warning(req)* reqBody, err := util.Marshal(req, "RegistrationRequest") if err != nil { return nil, err }```

MaximeAubanel (Wed, 11 Apr 2018 15:25:25 GMT):
Here is my print in identity.go line 67 : ```func (i *Identity) Register(req *api.RegistrationRequest) (rr *api.RegistrationResponse, err error) { log.Debugf("Register %+v", req) if req.Name == "" { return nil, errors.New("Register was called without a Name set") } log.Warning(req) reqBody, err := util.Marshal(req, "RegistrationRequest") if err != nil { return nil, err }```

MaximeAubanel (Wed, 11 Apr 2018 16:01:20 GMT):
I saw where the problem was and I fixed it. It's at line 138 : ``` // TODO - this code is unused. var attribute []mspapi.Attribute for i := range request.Attributes { attribute = append(attribute, mspapi.Attribute{Name: request.Attributes[i].Name, Key: request.Attributes[i].Key, Value: request.Attributes[i].Value}) } r := mspapi.RegistrationRequest{ Name: request.Name, Type: request.Type, MaxEnrollments: request.MaxEnrollments, Affiliation: request.Affiliation, Attributes: attribute, CAName: request.CAName, Secret: request.Secret, } ```

MaximeAubanel (Wed, 11 Apr 2018 16:01:20 GMT):
I saw where the problem was and I fixed it. It's at line 138 : ``` // TODO - this code is unused. var attribute []mspapi.Attribute for i := range request.Attributes { attribute = append(attribute, mspapi.Attribute{Name: request.Attributes[i].Name, Key: request.Attributes[i].Key, Value: request.Attributes[i].Value}) } r := mspapi.RegistrationRequest{ Name: request.Name, Type: request.Type, MaxEnrollments: request.MaxEnrollments, Affiliation: request.Affiliation, Attributes: attribute, CAName: request.CAName, Secret: request.Secret, } ```

MaximeAubanel (Wed, 11 Apr 2018 16:01:20 GMT):
I saw where the problem was and I fixed it. It's at line 138 : ``` // TODO - this code is unused. var attribute []mspapi.Attribute for i := range request.Attributes { attribute = append(attribute, mspapi.Attribute{Name: request.Attributes[i].Name, Key: request.Attributes[i].Key, Value: request.Attributes[i].Value}) } r := mspapi.RegistrationRequest{ Name: request.Name, Type: request.Type, MaxEnrollments: request.MaxEnrollments, Affiliation: request.Affiliation, Attributes: attribute, CAName: request.CAName, Secret: request.Secret, } ```

MaximeAubanel (Wed, 11 Apr 2018 16:01:20 GMT):
I saw where the problem was and I fixed it. It's at line 138 in the file pkg/client/msp/client.go: ``` // TODO - this code is unused. var attribute []mspapi.Attribute for i := range request.Attributes { attribute = append(attribute, mspapi.Attribute{Name: request.Attributes[i].Name, Key: request.Attributes[i].Key, Value: request.Attributes[i].Value}) } r := mspapi.RegistrationRequest{ Name: request.Name, Type: request.Type, MaxEnrollments: request.MaxEnrollments, Affiliation: request.Affiliation, Attributes: attribute, CAName: request.CAName, Secret: request.Secret, } ```

MaximeAubanel (Wed, 11 Apr 2018 16:03:29 GMT):
Someone forgot to set the Attributes field :D

MaximeAubanel (Wed, 11 Apr 2018 16:03:29 GMT):
Some of you guys forgot to set the Attributes field :D

aleksandar.likic (Wed, 11 Apr 2018 18:52:36 GMT):
@MaximeAubanel Thanks for pointing this out. I created https://jira.hyperledger.org/browse/FAB-9471 for this.

yacovm (Wed, 11 Apr 2018 19:07:09 GMT):
@troyronda , @bstasyszyn - I plan to start working tomorrow on service discovery for collections (after finished with https://gerrit.hyperledger.org/r/#/c/20445/ ) How does your SDK use that feature? Do you know upfront what collections the chaincode writes to?

yacovm (Wed, 11 Apr 2018 19:08:53 GMT):
Does it make sense that if the chaincode query contains a set of collections, it will return an EP descriptor that satisfies the EP of the collection? I assume that the endorsement policy of the chaincode can be satisfied by the membership of the collection (otherwise it wouldn't get into the ledger)

guoshijiang (Thu, 12 Apr 2018 01:18:32 GMT):
Do you hava any blogs that about how to build fabric-sdk-go development environment? Document in github.com is not detail. I build up fabric-sdk-go development environment according to it, I have been attempted many times, But never success.

guoshijiang (Thu, 12 Apr 2018 01:18:32 GMT):
Do you hava any blogs that about how to build fabric-sdk-go development environment? Document in github.com is not detail. I build up fabric-sdk-go development environment according to it, I have been attempted many times, But never success.If you have, Please give me blogs link, Thank you!

aleksandar.likic (Thu, 12 Apr 2018 04:20:56 GMT):
@guoshijiang Assuming you have all prerequisites (at the top of https://github.com/hyperledger/fabric-sdk-go#contributing-to-the-go-sdk), you should be able to run unit tests by following https://github.com/hyperledger/fabric-sdk-go#running-the-test-suite . For running integration tests (with fabric and fabric-ca running in docker containers) you should follow https://github.com/hyperledger/fabric-sdk-go#testing-with-fabric-images-at-docker-hub. Let me know if you have issues.

aleksandar.likic (Thu, 12 Apr 2018 04:20:56 GMT):
@guoshijiang Assuming you have all prerequisites (at the top of https://github.com/hyperledger/fabric-sdk-go#contributing-to-the-go-sdk), you should be able to run unit tests by following https://github.com/hyperledger/fabric-sdk-go#running-the-test-suite . Make sure that you run "make depend-install" at least once. For running integration tests (with fabric and fabric-ca running in docker containers) you should follow https://github.com/hyperledger/fabric-sdk-go#testing-with-fabric-images-at-docker-hub. Let me know if you have issues.

MaximeAubanel (Thu, 12 Apr 2018 06:56:59 GMT):
Hey @aleksandar.likic ! Can I contribute to the ticket ?

MaximeAubanel (Thu, 12 Apr 2018 06:56:59 GMT):
Hey @aleksandar.likic ! Can I contribute to the ticket somehow ?

MaximeAubanel (Thu, 12 Apr 2018 06:56:59 GMT):
Hey @aleksandar.likic ! Can I contribute to the ticket somehow ? I have the working code

MaximeAubanel (Thu, 12 Apr 2018 07:49:41 GMT):
```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }``` Nothing is missing here ? line 326, fabrick-sdk-go/internal/github.com/hyperledger/fabric-ca/api/client.go

MaximeAubanel (Thu, 12 Apr 2018 07:49:41 GMT):
```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }``` Nothing is missing here ? line 326, fabrick-sdk-go/internal/github.com/hyperledger/fabric-ca/api/client.go Where is the field `key` ?

MaximeAubanel (Thu, 12 Apr 2018 07:49:41 GMT):
```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }``` Nothing is missing here ? line 326, fabrick-sdk-go/internal/github.com/hyperledger/fabric-ca/api/client.go Where is the field `key` ?

MaximeAubanel (Thu, 12 Apr 2018 07:49:41 GMT):
```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }``` Nothing is missing here ? line 326, fabrick-sdk-go/internal/github.com/hyperledger/fabric-ca/api/client.go Where is the field `key` ?

MaximeAubanel (Thu, 12 Apr 2018 08:05:39 GMT):
By the way, there is something that I don't understand correctly. Fabric-ca is waiting for this struct ```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }``` And the SDK Go this one : ```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }```

MaximeAubanel (Thu, 12 Apr 2018 08:05:39 GMT):
By the way, there is something that I don't understand correctly. Fabric-ca is waiting for this struct ```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }``` And the SDK Go have this one : ```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }```

MaximeAubanel (Thu, 12 Apr 2018 08:05:39 GMT):
By the way, there is something that I don't understand correctly. Fabric-ca is waiting for this struct ```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }``` And the SDK Go provide this one : ```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }```

MaximeAubanel (Thu, 12 Apr 2018 08:05:39 GMT):
By the way, there is something that I don't understand correctly. Fabric-ca is waiting for this struct ```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }``` And the SDK Go provide this one : ```// Attribute defines additional attributes that may be passed along during registration type Attribute struct { Name string Key string Value string }```

MaximeAubanel (Thu, 12 Apr 2018 08:05:39 GMT):
By the way, there is something that I don't understand correctly. Fabric-ca is waiting for this struct ```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }``` And the SDK Go provide this one : ```// Attribute defines additional attributes that may be passed along during registration type Attribute struct { Name string Key string Value string }```

MaximeAubanel (Thu, 12 Apr 2018 08:05:39 GMT):
By the way, there is something that I don't understand correctly. Fabric-ca is waiting for this struct ```// Attribute is a name and value pair type Attribute struct { Name string `json:"name"` Value string `json:"value"` ECert bool `json:"ecert,omitempty"` }```

MaximeAubanel (Thu, 12 Apr 2018 08:12:32 GMT):
And the SDK Go provide this one : ```// Attribute defines additional attributes that may be passed along during registration type Attribute struct { Name string Key string Value string }```

MaximeAubanel (Thu, 12 Apr 2018 08:12:32 GMT):
And the SDK Go provide this one : ```// Attribute defines additional attributes that may be passed along during registration type Attribute struct { Name string Key string Value string }```

MaximeAubanel (Thu, 12 Apr 2018 08:12:32 GMT):
And the SDK Go provide this one : go```// Attribute defines additional attributes that may be passed along during registration type Attribute struct { Name string Key string Value string }```

MaximeAubanel (Thu, 12 Apr 2018 08:12:32 GMT):
And the SDK Go provide this one : ```// Attribute defines additional attributes that may be passed along during registration type Attribute struct { Name string Key string Value string }```

MaximeAubanel (Thu, 12 Apr 2018 08:12:32 GMT):
And the SDK Go provide this one : ```// Attribute defines additional attributes that may be passed along during registration type Attribute struct { Name string Key string Value string }```dddd

MaximeAubanel (Thu, 12 Apr 2018 08:12:32 GMT):
And the SDK Go provide this one : ```// Attribute defines additional attributes that may be passed along during registration type Attribute struct { Name string Key string Value string }```

lclclc (Thu, 12 Apr 2018 09:59:38 GMT):
What kind of crypto material does Go SDK use? According to my understanding, a client communicating with chaincode must a crypto materials like private key and certificates. The official example using NodeJS SDK is fetching these from CA server, and use those to identify itself. Those material's format is totally different from what I can see inside MSP folder of peer/orderer nodes. So does Go SDK also have to rely on CA server, or can it just use MSP folder created by cryptogen like peer/orderer binaries?

aleksandar.likic (Thu, 12 Apr 2018 13:14:59 GMT):
@MaximeAubanel Sorry, I saw your message when I almost completed the change. It's at https://gerrit.hyperledger.org/r/#/c/20485/. There are other missing Fabric-CA features related to identity and affiliation management, if you are interested in contributing.

yacovm (Thu, 12 Apr 2018 13:50:24 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fXMXPe57onDAP5PKx

yacovm (Thu, 12 Apr 2018 13:50:39 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TZWwWeEgEep4FCv9q

MaximeAubanel (Thu, 12 Apr 2018 14:07:39 GMT):
@aleksandar.likic No problem.

MaximeAubanel (Thu, 12 Apr 2018 14:07:39 GMT):
@aleksandar.likic No problem. Don't have too much time to contribute well to the project as a whole. However if a find a small error that can be fixed quicly, why not.

MaximeAubanel (Thu, 12 Apr 2018 14:07:39 GMT):
@aleksandar.likic No problem. I don't have too much time to contribute well to the project as a whole. However if a find a small error that can be fixed quicly, why not.

MaximeAubanel (Thu, 12 Apr 2018 14:09:00 GMT):
Can someone tells me how can I retrieve the AKI of a user ?

MaximeAubanel (Thu, 12 Apr 2018 14:09:00 GMT):
I registered an user in the fabricCA. How can I execute transaction from him ?

bstasyszyn (Thu, 12 Apr 2018 14:10:01 GMT):
@yacovm Currently the SDK doesn't use collection policies to select endorsers - and the client doesn't know the collections being used by a chaincode - so I'm not sure how best to make use of collection policies

troyronda (Thu, 12 Apr 2018 14:11:12 GMT):
@yacovm @bstasyszyn one thing we wanted to be careful about is having the knowledge that peers are out-of-date on the collection policy or channel configuration.

troyronda (Thu, 12 Apr 2018 14:11:12 GMT):
@yacovm @bstasyszyn one thing we wanted to be careful about is having the knowledge that peers are out-of-date on the collection policy and channel configuration.

yacovm (Thu, 12 Apr 2018 14:11:37 GMT):
well but i provide the ledger height

yacovm (Thu, 12 Apr 2018 14:11:43 GMT):
that solves the out of date problem no?

troyronda (Thu, 12 Apr 2018 14:12:10 GMT):
the client also needs to know the current collection policy (height) once this is implemented

troyronda (Thu, 12 Apr 2018 14:12:28 GMT):
or won't know if the peer is out-of-date.

troyronda (Thu, 12 Apr 2018 14:12:50 GMT):
(once updateable collection policies are available)

yacovm (Thu, 12 Apr 2018 14:13:38 GMT):
but - if you query a peer that is up to date

yacovm (Thu, 12 Apr 2018 14:13:47 GMT):
and the peer returns to you only orgs that are in the collection

yacovm (Thu, 12 Apr 2018 14:13:50 GMT):
i don't see what is the problem?

troyronda (Thu, 12 Apr 2018 14:15:08 GMT):
@yacovm were you planning to have two separate mechanisms? one to pick peers based on a chaincode and the other to pick peers based on a collection?

troyronda (Thu, 12 Apr 2018 14:15:08 GMT):
@yacovm were you planning to have two separate mechanisms? one to pick endorsing peers based on a chaincode and the other to pick peers based on a collection?

troyronda (Thu, 12 Apr 2018 14:15:08 GMT):
@yacovm were you planning to have two separate mechanisms? one to pick endorsing peers (based on a chaincode name) and the other to pick peers based on collection membership?

troyronda (Thu, 12 Apr 2018 14:15:08 GMT):
@yacovm were you planning to have two separate mechanisms? one to pick endorsing peers based on a chaincode name and the other to pick peers based on collection membership?

yacovm (Thu, 12 Apr 2018 14:16:32 GMT):
ah so - what i do right now

yacovm (Thu, 12 Apr 2018 14:16:46 GMT):
for cc2cc for instance

yacovm (Thu, 12 Apr 2018 14:16:57 GMT):
i look at the peers that have the ccs installed and get their MSP IDs

yacovm (Thu, 12 Apr 2018 14:16:57 GMT):
i look at the peers that have the all ccs installed on them and get their MSP IDs

yacovm (Thu, 12 Apr 2018 14:17:07 GMT):
then, I compute the endorsement descriptors (options of endorsements)

yacovm (Thu, 12 Apr 2018 14:17:35 GMT):
and prune from that - all combinations of endorsements that have in them MSP IDs that are not in the set of the set of the installed chaincode set msp ids

yacovm (Thu, 12 Apr 2018 14:17:47 GMT):
(did you understand? I hope i'm not too cryptic)

troyronda (Thu, 12 Apr 2018 14:20:14 GMT):
sure

yacovm (Thu, 12 Apr 2018 14:20:28 GMT):
so i'm asking

troyronda (Thu, 12 Apr 2018 14:20:32 GMT):
(after reading a couple times :)

troyronda (Thu, 12 Apr 2018 14:21:46 GMT):
yes?

yacovm (Thu, 12 Apr 2018 14:22:28 GMT):
the client sends the discovery service a list of collections

yacovm (Thu, 12 Apr 2018 14:22:56 GMT):
the service, only serves back endorsement options such that every option has only peers that are in all collections

yacovm (Thu, 12 Apr 2018 14:22:58 GMT):
right?

yacovm (Thu, 12 Apr 2018 14:23:14 GMT):
because - you need to do "PutState" in all of them, and then the public (hashed RWSet) should match

yacovm (Thu, 12 Apr 2018 14:23:14 GMT):
because - you need to do "PutPrivateState" in all of them, and then the public (hashed RWSet) should match

yacovm (Thu, 12 Apr 2018 14:23:21 GMT):
correct? (doing sanity check)

troyronda (Thu, 12 Apr 2018 14:26:38 GMT):
So I think there are two core reasons for restricting the peer list: (1) ReadPrivateState would fail if a client chooses an peer that wasn't in the collection (2) Confidentiality - some use cases want to restrict the orgs that see the endorsement

yacovm (Thu, 12 Apr 2018 14:27:02 GMT):
right

troyronda (Thu, 12 Apr 2018 14:27:06 GMT):
The first reason, of course, seems like a hard rule.

troyronda (Thu, 12 Apr 2018 14:27:17 GMT):
The second reason has a It Depends on it.

troyronda (Thu, 12 Apr 2018 14:27:17 GMT):
The second reason has an It Depends on it.

troyronda (Thu, 12 Apr 2018 14:28:10 GMT):
You could even make the argument that the second reason isn't strictly related to collections

troyronda (Thu, 12 Apr 2018 14:28:20 GMT):
(It can also apply to transient parameters)

troyronda (Thu, 12 Apr 2018 14:28:20 GMT):
(It can also potentially apply to transient parameters)

yacovm (Thu, 12 Apr 2018 14:28:34 GMT):
not sure what is the point you're trying to make

yacovm (Thu, 12 Apr 2018 14:28:45 GMT):
do you agree with my statement?

troyronda (Thu, 12 Apr 2018 14:29:56 GMT):
Sorry let me try further.

troyronda (Thu, 12 Apr 2018 14:31:09 GMT):
I agree that in some/many cases, a filter using collections is useful.

troyronda (Thu, 12 Apr 2018 14:31:09 GMT):
I agree that in some/many cases, a filter using collection names is useful.

troyronda (Thu, 12 Apr 2018 14:31:09 GMT):
I agree that in some/many cases, a filter using collection names is useful where the intersection is taken.

troyronda (Thu, 12 Apr 2018 14:33:58 GMT):
Particularly where the use case has a ReadPrivateState in it.

troyronda (Thu, 12 Apr 2018 14:34:30 GMT):
There can be cases where no ReadPrivateState occurs and its okay for other peers to be involved in the endorsement.

troyronda (Thu, 12 Apr 2018 14:34:30 GMT):
There can be cases where no ReadPrivateState occurs and its okay for other peers to be involved in the endorsement.

troyronda (Thu, 12 Apr 2018 14:34:30 GMT):
There can be cases where no ReadPrivateState occurs and its okay for other peers to be involved in the endorsement - likely filtered by MSP / Org ID.

troyronda (Thu, 12 Apr 2018 14:35:27 GMT):
There can be cases unrelated to collections where a further filter on MSP / Org ID can be desired (like transient data).

yacovm (Thu, 12 Apr 2018 14:35:58 GMT):
oh but Troy - if there is no read / write of private data

troyronda (Thu, 12 Apr 2018 14:36:01 GMT):
In the case where it's okay for other peers to be involved, I guess the client would just omit the collection name from the filter.

yacovm (Thu, 12 Apr 2018 14:36:10 GMT):
you can just .... not pass the collections

yacovm (Thu, 12 Apr 2018 14:36:12 GMT):
in the API call

yacovm (Thu, 12 Apr 2018 14:36:13 GMT):
no?

yacovm (Thu, 12 Apr 2018 14:36:32 GMT):
it's up to you how you use the client

yacovm (Thu, 12 Apr 2018 14:36:49 GMT):
the service discovery only computes the stuff for you - but it doesn't care for what purpose you use it

yacovm (Thu, 12 Apr 2018 14:37:14 GMT):
ah that's what you said

troyronda (Thu, 12 Apr 2018 14:37:16 GMT):
I agree - I'm cryptically making the point that someone can do a WritePrivateData without a ReadPrivateData :)

yacovm (Thu, 12 Apr 2018 14:37:28 GMT):
like a blind write

troyronda (Thu, 12 Apr 2018 14:37:30 GMT):
yes

yacovm (Thu, 12 Apr 2018 14:37:36 GMT):
ok, i think we are in sync.

troyronda (Thu, 12 Apr 2018 14:37:40 GMT):
cool :)

MaximeAubanel (Thu, 12 Apr 2018 14:38:07 GMT):
Guys how can I process a transaction with a freshed enrolled user ?

MaximeAubanel (Thu, 12 Apr 2018 14:38:07 GMT):
Guys how can I process a transaction with a freshed enrolled user ?

MaximeAubanel (Thu, 12 Apr 2018 14:38:25 GMT):
Can you redirect me somewhere ?

MaximeAubanel (Thu, 12 Apr 2018 14:38:25 GMT):
Can you redirect me somewhere ?

MaximeAubanel (Thu, 12 Apr 2018 14:48:36 GMT):
I createdn user in my fabricCA.

MaximeAubanel (Thu, 12 Apr 2018 14:48:36 GMT):
I createdn user in my fabricCA. How can I execute a transaction using its creditentials ?

MaximeAubanel (Thu, 12 Apr 2018 14:55:55 GMT):
Ok I think I found it :)

aleksandar.likic (Thu, 12 Apr 2018 14:56:05 GMT):
@MaximeAubanel https://github.com/hyperledger/fabric-sdk-go/blob/c826ce1adb69154a99214578aa54fd4106d0a0a8/test/integration/e2e/end_to_end.go#L132

MaximeAubanel (Thu, 12 Apr 2018 14:57:03 GMT):
@aleksandar.likic I should use this : ```// WithIdentity uses a pre-constructed identity object as the credential for the session func WithIdentity(signingIdentity msp.SigningIdentity) ContextOption { return func(o *identityOptions) error { o.signingIdentity = signingIdentity return nil } } ``` right ?

MaximeAubanel (Thu, 12 Apr 2018 15:00:23 GMT):
Ok I made it work :) .

MaximeAubanel (Thu, 12 Apr 2018 15:00:23 GMT):
Ok I made it work :).

aleksandar.likic (Thu, 12 Apr 2018 19:51:35 GMT):
@MaximeAubanel https://gerrit.hyperledger.org/r/#/c/20485/ has been merged

baoyangc (Fri, 13 Apr 2018 01:41:39 GMT):
do we have a lib to New a `msp.SigningIdentity`

guoshijiang (Fri, 13 Apr 2018 02:28:24 GMT):
How can I config fabric-sdk-go communicate with my fabric-ca, peer and orderer server. There are lots of "yaml" file in the directory of fabric-sdk-go project, which file can communicate with my fabric-ca, peer and orderer server after I finished configuration. Following image is the current situation of my project .

guoshijiang (Fri, 13 Apr 2018 02:28:24 GMT):
How can I config fabric-sdk-go communicate with my fabric-ca, peer and orderer server. There are lots of "yaml" file in the directory of fabric-sdk-go project, which file can communicate with my fabric-ca, peer and orderer server after I finished configuration. Following image is the current situation of my project .

guoshijiang (Fri, 13 Apr 2018 02:29:20 GMT):

QQ截图20180413102756.png

guoshijiang (Fri, 13 Apr 2018 02:29:20 GMT):

QQ截图20180413102756.png

guoshijiang (Fri, 13 Apr 2018 02:29:20 GMT):

QQ截图20180413102756.png

govinda-attal (Fri, 13 Apr 2018 02:51:02 GMT):
Hello All. Hope you find this message well... I have a query, is it a common use case that CA can be used to issue certificate(s) for normal users like bob, alice etc (say managed by existing ldap etc). And then applications are implemented to use certificates issued for users instead of apps (post authentication of user against LDAP) to create channel client and call chain code operations? `sdk.ChannelContext(channelID, fabsdk.WithUser(orgName), fabsdk.WithIdentity(signID))`

govinda-attal (Fri, 13 Apr 2018 02:53:23 GMT):
And signID is extracted by `mspClient.GetSigningIdentity(identityName)`

aleksandar.likic (Fri, 13 Apr 2018 02:55:54 GMT):
@baoyangc SigningIdentity cannot be created without registering and enrolling a user. During registration and enrollment user information (enrollment cert, private key) is stored into SDK stores. SDK client can then obtain the user's signing identity by calling mspClient.GetSigningIdentity(username), as here: https://github.com/hyperledger/fabric-sdk-go/blob/66ac24ed71b56271aa6e47889178a927acd84ac2/test/integration/msp/enrollment_test.go#L100

govinda-attal (Fri, 13 Apr 2018 02:56:31 GMT):
This is like total runtime so that users login with credentials, and later their certificates are used to connect to channel and execute chain code operations... Is it valid use-case? or typically only few certificates are issued to say *apps *and app specific certificates are used to invoke operations on chaincode on behalf of these conventional users which are managed in separate infrastructure like LDAP or AD or something else?

aleksandar.likic (Fri, 13 Apr 2018 03:08:12 GMT):
@govinda-attal Fabric supports both use cases, but then any traditional database does too. This question is, however, beyond the scope of this channel, you would be better off posting it to general or some other fabric channel.

govinda-attal (Fri, 13 Apr 2018 03:11:34 GMT):
Cool, thank you @aleksandar.likic ... I will post on generic channel too Also, I was trying to find go sdk how to register/enroll a user with custom attributes ?? Is that feasible in go-sdk and if yes any pointers would help :-)

aleksandar.likic (Fri, 13 Apr 2018 03:12:37 GMT):
@govinda-attal Yes, see https://github.com/hyperledger/fabric-sdk-go/blob/66ac24ed71b56271aa6e47889178a927acd84ac2/test/integration/msp/enrollment_test.go#L67

govinda-attal (Fri, 13 Apr 2018 03:15:20 GMT):
Fantastic!!! You are awesome @aleksandar.likic ...

aleksandar.likic (Fri, 13 Apr 2018 03:16:49 GMT):
@govinda-attal Note that the attributes have Ecert: true. This means that they will be included in any cert issued to the user. Setting Ecert: false, would (I think) make the attribute optional, so they wouldn't be included by default in new certs. Instead, their inclusion would have to be explicitly requested during enrollment. go-sdk currently doesn't support this use case.

aleksandar.likic (Fri, 13 Apr 2018 03:23:12 GMT):
@guoshijiang Looks like you are trying to execute end-to-end test from your IDE. This works from me out of the box (without any code change) when I follow https://github.com/hyperledger/fabric-sdk-go#testing-with-fabric-images-at-docker-hub . So, in one window I run "make dockerenv-stable-up" and then just run https://github.com/hyperledger/fabric-sdk-go/blob/66ac24ed71b56271aa6e47889178a927acd84ac2/test/integration/e2e/end_to_end_test.go#L13 from my IDE.

aleksandar.likic (Fri, 13 Apr 2018 03:23:12 GMT):
@guoshijiang Looks like you are trying to execute end-to-end test from your IDE. This works from me out of the box (without any code change) when I follow https://github.com/hyperledger/fabric-sdk-go#testing-with-fabric-images-at-docker-hub . So, in one window I run "make dockerenv-stable-up" and then just run https://github.com/hyperledger/fabric-sdk-go/blob/66ac24ed71b56271aa6e47889178a927acd84ac2/test/integration/e2e/end_to_end_test.go#L13 from my IDE. Can you not reproduce this?

govinda-attal (Fri, 13 Apr 2018 03:24:15 GMT):
@aleksandar.likic Thanks for that! I am wondering how this would work with identity mixer concept if the certificates are in a given use-case to be totally anonymous, even though these certificates have attributes. So I believe when anonymous but valid certificates are issued attribute based control doesn't make sense ??

aleksandar.likic (Fri, 13 Apr 2018 03:28:05 GMT):
@govinda-attal I think this depends whether or not your attributes can be used to identify the user, but this is also beyond the scope of this channel. There are far more knowledgable people in other channels who could better answer this.

aleksandar.likic (Fri, 13 Apr 2018 03:28:05 GMT):
@govinda-attal I think this depends on whether or not your attributes can be used to identify the user, but this is also beyond the scope of this channel. There are far more knowledgable people in other channels who could better answer this.

aleksandar.likic (Fri, 13 Apr 2018 03:28:05 GMT):
@govinda-attal I think this depends on whether or not your attributes can be used to identify the user, but this is also beyond the scope of this channel. There are far more knowledgable people in other channels who can better answer this.

govinda-attal (Fri, 13 Apr 2018 03:31:38 GMT):
Awesome @aleksandar.likic ... Appreciate your time and Thank you for your help mate!

guoshijiang (Fri, 13 Apr 2018 03:48:31 GMT):

QQ截图20180413114741.png

guoshijiang (Fri, 13 Apr 2018 03:48:31 GMT):

QQ截图20180413114741.png

guoshijiang (Fri, 13 Apr 2018 03:49:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7TEuYCPhPYxroRtKE)

StevenXu (Fri, 13 Apr 2018 07:32:17 GMT):
How can I export privateKey Raw data with signing identity object, I call msp.signingIdentity.PrivateKey().Bytes() return errors with message Not supported.

StevenXu (Fri, 13 Apr 2018 07:59:11 GMT):
I solve the problem

nmarcetic (Fri, 13 Apr 2018 12:27:17 GMT):
Has joined the channel.

bdu 5 (Sat, 14 Apr 2018 10:20:16 GMT):
Has joined the channel.

baoyangc (Mon, 16 Apr 2018 01:28:39 GMT):
do we have a way to avoid error:`create channel client failed with error: event service creation failed: Channel_Cfg_Cache - cache is closed`.

baoyangc (Mon, 16 Apr 2018 01:28:39 GMT):
do we have a way to avoid error:```create channel client failed with error: event service creation failed: Channel_Cfg_Cache - cache is closed```.

baoyangc (Mon, 16 Apr 2018 01:34:24 GMT):
@aleksandar.likic I mean from a private key and cert to generate an ```msp.SigningIdentity```. I want to keep my privatekey and cert in web browser storage and invoke chaincode from browser.

baoyangc (Mon, 16 Apr 2018 01:49:09 GMT):

arch

aleksandar.likic (Mon, 16 Apr 2018 02:43:50 GMT):
@baoyangc sdk-go currently doesn't support this use case, and I think neither does any other SDK. Perhaps you should post this question to fabric-sdk, and start a discussion if this is a use cases that should be supported (by all SDKs).

aleksandar.likic (Mon, 16 Apr 2018 02:43:50 GMT):
@baoyangc sdk-go currently doesn't support this use case, and I think neither does any other SDK. Perhaps you should post this question to fabric-sdk, and start a discussion if this is a use case that should be supported (by all SDKs).

baoyangc (Mon, 16 Apr 2018 02:46:32 GMT):
thanks for your reply. another question: how to avoid error: ```create channel client failed with error: event service creation failed: Channel_Cfg_Cache - cache is closed"``` could I create channel client without getting channel config from the peers or the orderers

aleksandar.likic (Mon, 16 Apr 2018 03:32:49 GMT):
Channel client reads channel configuration from a peer associated with the channel in sdk configuration. The assumption is that the client wants to submit transaction proposal to a set of peers on the channel, and then subsequently submits endorsed transaction to the orderer. Is your question in the context of your scenario where you want the sdk to act like a simple proxy and just send already signed proposals/transactions to peers and orderer?

baoyangc (Mon, 16 Apr 2018 05:17:19 GMT):
yes @aleksandar.likic

baoyangc (Mon, 16 Apr 2018 05:19:18 GMT):
I think we should make the sdk read the channel config from file ```config.yaml```

baoyangc (Mon, 16 Apr 2018 05:19:38 GMT):
not from a peer on the channel.

baoyangc (Mon, 16 Apr 2018 05:23:47 GMT):
do we have an method to avoid error: ```create channel client failed with error: event service creation failed: Channel_Cfg_Cache - cache is closed"```

jriachi (Mon, 16 Apr 2018 06:48:29 GMT):
I am trying to shutdown the fabric system and bringing it back up to the same state it was before the shutdown.

jriachi (Mon, 16 Apr 2018 06:49:46 GMT):
When I bring it back up, I don't install the chaincode, I just initiate the chaincode. when I do the initiation I get the following message

jriachi (Mon, 16 Apr 2018 06:49:49 GMT):
send instantiate chaincode proposal failed: Multiple errors occurred:

jriachi (Mon, 16 Apr 2018 06:50:12 GMT):
gRPC Transport Status Code: (2) Unknown. Description: chaincode error (status: 500, message: chaincode exists cc-1-0-0-0a)

neharprodduturi (Mon, 16 Apr 2018 06:52:43 GMT):
Has joined the channel.

jriachi (Mon, 16 Apr 2018 06:52:48 GMT):
The Code is below

jriachi (Mon, 16 Apr 2018 06:52:52 GMT):
ccPolicy := cauthdsl.SignedByAnyMember([]string{"org1MSP", "org2MSP"}) err := setup.admin.InstantiateCC(setup.ChannelID, resmgmt.InstantiateCCRequest{Name: setup.ChainCodeID, Path: setup.ChaincodePath, Version: "1.0", Args: [][]byte{[]byte("init")}, Policy: ccPolicy}) if err != nil { return fmt.Errorf("failed to instantiate the chaincode: %v", err) }

jriachi (Mon, 16 Apr 2018 06:54:03 GMT):
The docker containers have persistence turned on via the volume(s) on all nodes

jriachi (Mon, 16 Apr 2018 06:54:09 GMT):
Any ideas?

Norberthu (Mon, 16 Apr 2018 07:39:10 GMT):
@jriachi what is the output of the commander docker ps ?

Norberthu (Mon, 16 Apr 2018 07:39:30 GMT):
maybe instanticate twice.

MaximeAubanel (Mon, 16 Apr 2018 07:40:32 GMT):
@jriachi Are you sure that you need to instantiate it everytime you bring it back up ?

MaximeAubanel (Mon, 16 Apr 2018 07:40:32 GMT):
@jriachi Are you sure that you need to instantiate it everytime you bring it back up ? If so, can you quote the source, thanks

tian (Mon, 16 Apr 2018 09:50:17 GMT):
Has joined the channel.

nmarcetic (Mon, 16 Apr 2018 09:50:35 GMT):
Hey Folks, Is there some official documentation or getting started ? Except sdk tests :)

MaximeAubanel (Mon, 16 Apr 2018 09:51:48 GMT):
@nmarcetic https://godoc.org/github.com/hyperledger/fabric-sdk-go is that what you are looking for ? :)

nmarcetic (Mon, 16 Apr 2018 09:53:21 GMT):
@MaximeAubanel Yea, was thinking on something more developer friendly :) Like node version https://fabric-sdk-node.github.io/ But thanks ;)

MaximeAubanel (Mon, 16 Apr 2018 09:54:40 GMT):
@nmarcetic I didn't find anything very developer friendly on the SDK Go :p I'm not puting the fault on anyone tho, I'm just saying it ^

MaximeAubanel (Mon, 16 Apr 2018 09:54:40 GMT):
@nmarcetic I didn't find anything very developer friendly on the SDK Go :p I'm not puting the fault on anyone tho, I'm just saying it ^^

nmarcetic (Mon, 16 Apr 2018 09:55:34 GMT):
@MaximeAubanel Got it! Thanks a lot for info ;)

nmarcetic (Mon, 16 Apr 2018 10:30:38 GMT):
Any idea ? ``` go build [20/536] # github.com/hyperledger/fabric-sdk-go/pkg/core/config ../../../github.com/hyperledger/fabric-sdk-go/pkg/core/config/config.go:119:16: undefined: "github.com/pkg/errors".WithMessage # github.com/hyperledger/fabric-sdk-go/pkg/core/config/cryptoutil ../../../github.com/hyperledger/fabric-sdk-go/pkg/core/config/cryptoutil/cryptoutils.go:33:15: undefined: "github.com/pkg/errors".WithMessage ../../../github.com/hyperledger/fabric-sdk-go/pkg/core/config/cryptoutil/cryptoutils.go:43:15: undefined: "github.com/pkg/errors".WithMessage ../../../github.com/hyperledger/fabric-sdk-go/pkg/core/config/cryptoutil/cryptoutils.go:69:15: undefined: "github.com/pkg/errors".WithMessage # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/msp ```

nmarcetic (Mon, 16 Apr 2018 10:44:45 GMT):
I am trying to follow https://github.com/chainHero/heroes-service#b-initialise

nmarcetic (Mon, 16 Apr 2018 10:48:45 GMT):
It looks like its using old version of fabric-sdk-go, damn. I am really desperate... If someone know about any kind of documentation except sdk spec from godoc pls share it.

nmarcetic (Mon, 16 Apr 2018 11:39:39 GMT):
Found a problem, bad version of `github.com/pkg/errors`

vinayak03 (Mon, 16 Apr 2018 12:57:22 GMT):
Has joined the channel.

vinayak03 (Mon, 16 Apr 2018 12:58:14 GMT):
Hi! Facing issue with make populate getting below error grouped write of manifest, lock and vendor: error while writing out vendor tree: failed to write dep tree: failed to prune github.com/cloudflare/cfssl: failed to prune nested vendor directories: remove /tmp/dep616192544/vendor/github.com/cloudflare/cfssl/vendor/github.com/cloudflare/cfssl_trust/ca-bundle: directory not empty Makefile:430: recipe for target 'populate-vendor' failed make: *** [populate-vendor] Error 1 Any idea what this error means ?

MaximeAubanel (Mon, 16 Apr 2018 13:02:32 GMT):
@nmarcetic it's working now ?

nmarcetic (Mon, 16 Apr 2018 13:02:58 GMT):
Yes, all good. Still dunno how to actually use sdk :D But its compiling.

MaximeAubanel (Mon, 16 Apr 2018 13:03:33 GMT):
@nmarcetic haha great ! Enjoy the tutorial ;)

nmarcetic (Mon, 16 Apr 2018 13:03:43 GMT):
@MaximeAubanel Thanks ;)

MaximeAubanel (Mon, 16 Apr 2018 13:05:11 GMT):
@nmarcetic if you face any problems, contact me :)

MaximeAubanel (Mon, 16 Apr 2018 13:05:11 GMT):
@nmarcetic if you face any problems with the tutorial, contact me :)

nmarcetic (Mon, 16 Apr 2018 13:05:55 GMT):
Thanks @MaximeAubanel really appriciate your help :)

vinayak03 (Mon, 16 Apr 2018 13:10:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xbH3LXHf4ZRmYYGYo) Hi @MaximeAubanel, Can you please help with above error ?

MaximeAubanel (Mon, 16 Apr 2018 13:11:48 GMT):
@vinayak03 Sorry, I didn't realize it's you who posted a comment few minutes ago on the tutorial page

MaximeAubanel (Mon, 16 Apr 2018 13:12:08 GMT):
I didn't get that your question was related to the tutorial, my bad.

MaximeAubanel (Mon, 16 Apr 2018 13:12:46 GMT):
@vinayak03 Why are you executing `f`

MaximeAubanel (Mon, 16 Apr 2018 13:12:46 GMT):
@vinayak03 Why are you executing `make populate` in fabric-sdk-go folder ?

nmarcetic (Mon, 16 Apr 2018 13:13:39 GMT):
He is following the fabric-sdk-go readme

nmarcetic (Mon, 16 Apr 2018 13:13:54 GMT):
``` Optional - populate vendor directory (if needed by your downstream vendoring solution) # cd $GOPATH/src/github.com/hyperledger/fabric-sdk-go/ # make populate ```

vinayak03 (Mon, 16 Apr 2018 13:14:17 GMT):
correct

MaximeAubanel (Mon, 16 Apr 2018 13:14:43 GMT):
Well .. I cannot help you with this kind of questions :/ Sorry, I don't know much than you about this kind of error to be honest

MaximeAubanel (Mon, 16 Apr 2018 13:14:43 GMT):
Well .. I cannot help you with this kind of questions :/ Sorry, I don't know much than you about this kind of error to be honest :p

vinayak03 (Mon, 16 Apr 2018 13:14:50 GMT):
and it is also mentioned in the https://chainhero.io/2018/03/tutorial-build-blockchain-app-2/

MaximeAubanel (Mon, 16 Apr 2018 13:15:38 GMT):
`make depend-install` this is mentionned

MaximeAubanel (Mon, 16 Apr 2018 13:15:38 GMT):
`make depend-install` this is mentioned

vinayak03 (Mon, 16 Apr 2018 13:16:09 GMT):
yeah after that there is make step

vinayak03 (Mon, 16 Apr 2018 13:16:17 GMT):
that is also giving the same result

MaximeAubanel (Mon, 16 Apr 2018 13:16:22 GMT):
mmmm

vinayak03 (Mon, 16 Apr 2018 13:16:38 GMT):
is it optional step to make ?

MaximeAubanel (Mon, 16 Apr 2018 13:17:24 GMT):
It's mandatory, it install the dependencies/

MaximeAubanel (Mon, 16 Apr 2018 13:17:24 GMT):
It's mandatory, it install the dependencies.

vinayak03 (Mon, 16 Apr 2018 13:18:03 GMT):
my go version is go version go1.10.1 linux/amd64

vinayak03 (Mon, 16 Apr 2018 13:18:15 GMT):
should I downgrade to stable version ?

MaximeAubanel (Mon, 16 Apr 2018 13:18:16 GMT):
mmm

MaximeAubanel (Mon, 16 Apr 2018 13:18:38 GMT):
Well, yeah try it please

MaximeAubanel (Mon, 16 Apr 2018 13:18:56 GMT):
and let me know if it changes something

MaximeAubanel (Mon, 16 Apr 2018 13:19:18 GMT):
@nmarcetic did you have this issue too ?

nmarcetic (Mon, 16 Apr 2018 13:21:19 GMT):
Hm, no I didn't run `make depend-install`` at all... Its a section under `Running test suits` I don't want to run any test... Now I run the `make depend-install` no errors

nmarcetic (Mon, 16 Apr 2018 13:22:44 GMT):
@MaximeAubanel Does this step is really mandatory ? Just to use sdk ?

MaximeAubanel (Mon, 16 Apr 2018 13:24:32 GMT):
Well, we are using the SDK go in order to communicate with Fabric. If the SDK Go got some dependences, It's better to have them right ?

MaximeAubanel (Mon, 16 Apr 2018 13:24:53 GMT):
But if you don't want to execute any test, you don't NEED to do that.

vinayak03 (Mon, 16 Apr 2018 13:25:20 GMT):
@nmarcetic Error is occuring in make command after running make depend-install

MaximeAubanel (Mon, 16 Apr 2018 13:26:05 GMT):
To conclude, you don't need to execute `make depend-install` and `make` if you don't want to test if the SDK Go is working correctly on your computer.

nmarcetic (Mon, 16 Apr 2018 13:26:32 GMT):
@MaximeAubanel Yes but there is a lot easier way to do it then running a .sh script :) Like using dep tool or vendor etc... This looks really hacky

nmarcetic (Mon, 16 Apr 2018 13:26:55 GMT):
Ah `, you don't need to execute `make depend-install` and `make` if you don't want to test if the SDK Go is working correctly on your co` Make sense now :)

MaximeAubanel (Mon, 16 Apr 2018 13:28:12 GMT):
@nmarcetic I got you bro ! We used dep in the tutorial. What you just seen have been made by the SDK Go dev :)

vinayak03 (Mon, 16 Apr 2018 13:28:27 GMT):
@MaximeAubanel thanks for clarification :)

nmarcetic (Mon, 16 Apr 2018 13:29:18 GMT):
@MaximeAubanel Got it :+1_tone2:

nmarcetic (Mon, 16 Apr 2018 13:29:50 GMT):
@MaximeAubanel One more question :) If you don't mind ?

MaximeAubanel (Mon, 16 Apr 2018 13:30:32 GMT):
@nmarcetic Go ahead haha

MaximeAubanel (Mon, 16 Apr 2018 13:30:45 GMT):
@vinayak03 No problem dude !

nmarcetic (Mon, 16 Apr 2018 13:30:51 GMT):
I am trying to follow this https://github.com/chainHero/heroes-service/blob/9e3736d512f4aa9d56b42ce6d67d6cd705cc6e3f/README.md#c-test This config.yml is required ? I can't connect to BC from sdk without this yml config ? And also a cert's for admin user (e.g which sdk will use) ?

nmarcetic (Mon, 16 Apr 2018 13:31:07 GMT):
See this `ConfigFile: "config.yaml",`

MaximeAubanel (Mon, 16 Apr 2018 13:31:49 GMT):
What do you mean ?

nmarcetic (Mon, 16 Apr 2018 13:31:50 GMT):
I didn't find any documentation online which actually explain this part ^ config.yml, certs etc..

nmarcetic (Mon, 16 Apr 2018 13:32:10 GMT):
Check from this, they make blockchain.go file https://github.com/chainHero/heroes-service/blob/9e3736d512f4aa9d56b42ce6d67d6cd705cc6e3f/README.md#b-initialise

nmarcetic (Mon, 16 Apr 2018 13:32:25 GMT):
Then from main.go they are using blockchain package to Init the sdk setup

nmarcetic (Mon, 16 Apr 2018 13:32:50 GMT):
``` // FabricSetup implementation type FabricSetup struct { ConfigFile string ChannelID string initialized bool ChannelConfig string OrgAdmin string OrgName string admin resmgmt.ResourceMgmtClient sdk *fabsdk.FabricSDK } ``` See the struct

nmarcetic (Mon, 16 Apr 2018 13:33:15 GMT):
See how they are calling FabricSetup from main.go https://github.com/chainHero/heroes-service/blob/9e3736d512f4aa9d56b42ce6d67d6cd705cc6e3f/README.md#c-test

nmarcetic (Mon, 16 Apr 2018 13:33:33 GMT):
and passing this ChannelConfig which is a huge yml config :)

nmarcetic (Mon, 16 Apr 2018 13:33:38 GMT):
Do I really need this ?

nmarcetic (Mon, 16 Apr 2018 13:34:17 GMT):
You can also see from here ``` // Initialize the SDK with the configuration file sdk, err := fabsdk.New(config.FromFile(setup.ConfigFile)) if err != nil { return fmt.Errorf("failed to create sdk: %v", err) } ```

nmarcetic (Mon, 16 Apr 2018 13:34:24 GMT):
Does this really required to use sdk ?

vinayak03 (Mon, 16 Apr 2018 13:35:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oPBXiz5iDQ3RPoPJu) @MaximeAubanel Getting the same error even after changing the version.

MaximeAubanel (Mon, 16 Apr 2018 13:35:18 GMT):
Yeah, you need this config file. The SDK Go read it.

MaximeAubanel (Mon, 16 Apr 2018 13:35:18 GMT):
@nmarcetic Yeah, you need this config file. The SDK Go read it.

MaximeAubanel (Mon, 16 Apr 2018 13:35:52 GMT):
@nmarcetic Everything file in this tutorial is mandatory ;)

nmarcetic (Mon, 16 Apr 2018 13:36:23 GMT):
@MaximeAubanel Ok I see... Hard to figure out :)

MaximeAubanel (Mon, 16 Apr 2018 13:36:59 GMT):
@nmarcetic Honestly, I'm afraid to understand your question partially. You are asking me if you need to provide this config file or something else ?

MaximeAubanel (Mon, 16 Apr 2018 13:37:16 GMT):
@vinayak03 Can you link me the error please

nmarcetic (Mon, 16 Apr 2018 13:37:21 GMT):
Yes do I need to provide this config file, that's my question

MaximeAubanel (Mon, 16 Apr 2018 13:38:11 GMT):
@nmarcetic Great :thumbsup:

MaximeAubanel (Mon, 16 Apr 2018 13:38:11 GMT):
@nmarcetic Great :thumbsup:, so you have your answer

MaximeAubanel (Mon, 16 Apr 2018 13:38:11 GMT):
@nmarcetic Great :thumbsup:, so you have your answer ;)

vinayak03 (Mon, 16 Apr 2018 13:38:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=88bq2MhPETGMZ2D6T) @MaximeAubanel All files have SPDX-License-Identifier headers Populating vendor ... grouped write of manifest, lock and vendor: error while writing out vendor tree: failed to write dep tree: failed to prune github.com/google/certificate-transparency-go: failed to prune nested vendor directories: remove /tmp/dep889510624/vendor/github.com/google/certificate-transparency-go/vendor/github.com/coreos/etcd/cmd/vendor/golang.org/x/sys/unix: directory not empty Makefile:430: recipe for target 'populate-vendor' failed make: *** [populate-vendor] Error 1

nmarcetic (Mon, 16 Apr 2018 13:38:26 GMT):
Thanks a lot for your hel @MaximeAubanelp, I really appreciate it ;)

nmarcetic (Mon, 16 Apr 2018 13:38:26 GMT):
Thanks a lot for your help @MaximeAubanelp, I really appreciate it ;)

nmarcetic (Mon, 16 Apr 2018 13:38:26 GMT):
Thanks a lot for your help @MaximeAubanel , I really appreciate it ;)

MaximeAubanel (Mon, 16 Apr 2018 13:39:15 GMT):
@nmarcetic Np, moreover you contribute in one way to the improvements that we could do to our tutorial ;)

nmarcetic (Mon, 16 Apr 2018 13:40:21 GMT):
Glad to hear that :) You work on `heroes-service` turtorial ?

MaximeAubanel (Mon, 16 Apr 2018 13:40:59 GMT):
@nmarcetic Check the commit ;)

MaximeAubanel (Mon, 16 Apr 2018 13:40:59 GMT):
@nmarcetic Check the commits ;)

nmarcetic (Mon, 16 Apr 2018 13:41:45 GMT):
Oh :) Niceee so you are definitely the guy to ask :D Good to know that ;)

MaximeAubanel (Mon, 16 Apr 2018 13:41:59 GMT):
@vinayak03 Well, I'm sorry but I cannot help you ... Never face this issue before

MaximeAubanel (Mon, 16 Apr 2018 13:41:59 GMT):
@vinayak03 Well, I'm sorry but I cannot help you ... Never face this issue before. Google don't say much neither :/

MaximeAubanel (Mon, 16 Apr 2018 13:41:59 GMT):
@vinayak03 Well, I'm sorry but I cannot help you ... Never face this issue before. Google don't say much neither :/ It seems to be an issue with a package :/

MaximeAubanel (Mon, 16 Apr 2018 13:42:44 GMT):
@nmarcetic I might be yes :p

nmarcetic (Mon, 16 Apr 2018 13:43:36 GMT):
@MaximeAubanel I started to work on fabric-token, its a fork from @vadimuvin I fix it to work with fabric v1.1 the the chaincode part was easy game :) Now I want to build a wallet using fabric-sdk-go which is not easy at all :D

nmarcetic (Mon, 16 Apr 2018 13:43:48 GMT):
https://github.com/nmarcetic/fabric-token

nmarcetic (Mon, 16 Apr 2018 13:43:52 GMT):
this is a chaincode fork

nmarcetic (Mon, 16 Apr 2018 13:44:47 GMT):
I know that fabric does not support it nativaly, but its very common case and easy to build it with chaincode actually, so why not ;)

MaximeAubanel (Mon, 16 Apr 2018 13:45:24 GMT):
Why not using a private Ethereum blockchain ?

nmarcetic (Mon, 16 Apr 2018 13:45:43 GMT):
Because its a public BC network :) And does not support channels etc...

nmarcetic (Mon, 16 Apr 2018 13:45:58 GMT):
No roles, no channels, privacy etc...

MaximeAubanel (Mon, 16 Apr 2018 13:46:08 GMT):
Yeah, indeed haha

MaximeAubanel (Mon, 16 Apr 2018 13:48:26 GMT):
@nmarcetic You created this repository one year ago :p

nmarcetic (Mon, 16 Apr 2018 13:49:48 GMT):
@MaximeAubanel Ah no its a fork from `vadimuvin/fabric-token` the guy from Swiss blockchain he did it with some old version of fabric a year ago, then I fork it and fix it to work with fabric 1.1

nmarcetic (Mon, 16 Apr 2018 13:52:31 GMT):
Its much bigger community around fabric-sdk-node version and composer, so your turtorial is really helpful (the only one I found so far). So thank you ;) And thank's again for your answers, time savers ;)

MaximeAubanel (Mon, 16 Apr 2018 13:56:43 GMT):
@nmarcetic Pleasure to help !

troyronda (Mon, 16 Apr 2018 14:27:06 GMT):
@vinayak03 i'd delete the vendor directory

troyronda (Mon, 16 Apr 2018 14:27:24 GMT):
and then repopulate

troyronda (Mon, 16 Apr 2018 14:27:33 GMT):
that error is coming from Go dep

troyronda (Mon, 16 Apr 2018 14:27:33 GMT):
(that error is coming from Go dep when trying to populate the vendor directory)

troyronda (Mon, 16 Apr 2018 14:28:39 GMT):
@nmarcetic you can alternatively provide a configuration backend if you don't want to use a config file

troyronda (Mon, 16 Apr 2018 14:30:37 GMT):
(a configuration backend is basically a key/value lookup)

troyronda (Mon, 16 Apr 2018 14:31:10 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/common/providers/core#ConfigBackend

troyronda (Mon, 16 Apr 2018 14:31:39 GMT):
Under the covers, config.FromFile is exposing this interface to the SDK.

nmarcetic (Mon, 16 Apr 2018 14:33:05 GMT):
@MaximeAubanel Will check about ConfigBackend, sounds more generic ;)

troyronda (Mon, 16 Apr 2018 14:33:15 GMT):
the key strings being used are what you'd expect from viper

troyronda (Mon, 16 Apr 2018 14:33:34 GMT):
(i.e., period seperated matching the sections in the YAML file)

troyronda (Mon, 16 Apr 2018 14:34:48 GMT):
there is also WIP to create an integration test/example with minimized configuration, using APIs and bootstrap peers instead.

nmarcetic (Mon, 16 Apr 2018 14:35:36 GMT):
Sounds good

MaximeAubanel (Mon, 16 Apr 2018 15:17:07 GMT):
@nmarcetic As you want. But if I'm not saying something wrong you will need to provide the same information than we do in the config file. So at the end, I guess it's more convenient to use a config file. My opinion tho

troyronda (Mon, 16 Apr 2018 15:23:57 GMT):
@MaximeAubanel of course it depends on what you are doing :)

troyronda (Mon, 16 Apr 2018 15:23:57 GMT):
@MaximeAubanel of course it depends on what someones is doing :)

nmarcetic (Mon, 16 Apr 2018 16:02:57 GMT):
Got it, thanks @MaximeAubanel @troyronda a lot for all info ;)

peter.li (Tue, 17 Apr 2018 08:54:03 GMT):
Has joined the channel.

peter.li (Tue, 17 Apr 2018 08:56:24 GMT):
The struct 'options' in 'pkg/fabsdk/fabsdk.go' can not access out of the package, how can i custom my own MSPProviderFactory?

peter.li (Tue, 17 Apr 2018 08:57:18 GMT):
@troyronda

peter.li (Tue, 17 Apr 2018 09:02:03 GMT):
How can i pass 2nd param in function fabsdk.New ?

peter.li (Tue, 17 Apr 2018 09:21:06 GMT):
Sorry, forget it, i know answer. 😄

Ammu (Tue, 17 Apr 2018 10:25:56 GMT):
if hackers taking information illegally from bank(AXIS bank), if the project into fabrics. if the data is taken from 1 peer how the owner of the bank get notification that our bank information has been stolen? in blockchain/fabrics

nmarcetic (Tue, 17 Apr 2018 12:30:46 GMT):
@Ammu I think this question is out of scope of fabric-sdk-go please post it on #general

nmarcetic (Tue, 17 Apr 2018 12:31:04 GMT):
There is much more skilled peoples there who can maybe answer you :)

nmarcetic (Tue, 17 Apr 2018 12:31:04 GMT):
There is much more skilled peoples there who can maybe answer/help you :)

nmarcetic (Tue, 17 Apr 2018 12:46:55 GMT):
@MaximeAubanel @troyronda Recording to my questions about config.yml file for fabric-sdk-go I have one more question :) For example in hero-service example app I see crypto-conf with a lot of pre generated keys https://github.com/chainHero/heroes-service/blob/master/config.yaml#L32 This is a crypto-config folder https://github.com/chainHero/heroes-service/tree/master/fixtures/crypto-config My question is do I need to have all this ? If so how I can generate it, for example using crypto-gen tool or ?

nmarcetic (Tue, 17 Apr 2018 12:46:57 GMT):
Thanks ;)

nmarcetic (Tue, 17 Apr 2018 12:47:47 GMT):
I have error now ``` Unable to initialize the Fabric SDK: failed to create sdk: failed to create identity manager provider: failed to initialize identity manager for organization: SampleOrg: org config retrieval failed ``` Suppose its related to crypto missing, that's why I am asking you how to generate those keys etc...

nmarcetic (Tue, 17 Apr 2018 12:52:00 GMT):
Ok I see now how to generate the keys http://hyperledger-fabric.readthedocs.io/en/release-1.0/build_network.html#crypto-generator

nmarcetic (Tue, 17 Apr 2018 15:16:09 GMT):
Finally succeed to connect to Fabric network using sdk :) Let's do some coding now ;) Thank you all for help!

habpygo (Tue, 17 Apr 2018 16:29:35 GMT):
Hi, Can someone help me with the following problem? I get an error message when setting up the network and trying to instal the chaincode `Unable to install and instantiate the chaincode: get channel config failed: Channel_Cfg_Cache - cache is closed` The phrase ‘get channel config failed’ comes from `resmgmt.go` around line 635 in the method `sendCCProposal`. I think the error is generated because the parameter `opts` give this strange output: ``` opts is: {[] map[] {5 1s 1m0s 2.5 map[Event Server Status:[MISSING_ENDORSEMENT CHAINCODE_ERROR 11 12] gRPC Transport Status:[14] Endorser Client Status:[ENDORSEMENT_MISMATCH PREMATURE_CHAINCODE_EXECUTION] Endorser Server Status:[503 500] Orderer Server Status:[503 500 400 404]]}} ``` and the mistake is (possibly) generated here `chConfig, err := channelService.ChannelConfig()` because `chConfig` gives `nil`, just below where the error message is generated. Thanks

e-nikolov (Tue, 17 Apr 2018 17:18:07 GMT):
There is a softhsm2 implementation of the bccsp interface in the sdk, does it only work with a local installation of the softhsm or can it also use a remote one?

e-nikolov (Tue, 17 Apr 2018 17:18:29 GMT):
Also is there a plan to eventually support something like hashicorp's vault for secret management?

troyronda (Tue, 17 Apr 2018 18:46:07 GMT):
@e-nikolov it's a pkcs11 implementation

troyronda (Tue, 17 Apr 2018 18:46:19 GMT):
you can supply pkcs11 libs in the config

troyronda (Tue, 17 Apr 2018 18:46:19 GMT):
i.e., you can supply pkcs11 libs in the config

troyronda (Tue, 17 Apr 2018 18:47:02 GMT):
the integration tests are using softhshm but it's not limited to softhsm.

troyronda (Tue, 17 Apr 2018 18:47:49 GMT):
see https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_pkcs11_test.yaml#L58

e-nikolov (Tue, 17 Apr 2018 18:48:26 GMT):
This file is a part of what brought me here

e-nikolov (Tue, 17 Apr 2018 18:48:42 GMT):
to ask if it is possible to use a remote hsm

e-nikolov (Tue, 17 Apr 2018 18:48:52 GMT):
but I guess at the moment it needs direct access to the .so files

troyronda (Tue, 17 Apr 2018 18:49:09 GMT):
those .so files can hit remote HSMs.

troyronda (Tue, 17 Apr 2018 18:49:27 GMT):
if you have a PCKS11 impl that does so

e-nikolov (Tue, 17 Apr 2018 18:49:42 GMT):
aha

e-nikolov (Tue, 17 Apr 2018 18:49:54 GMT):
what about vault?

troyronda (Tue, 17 Apr 2018 18:50:11 GMT):
i haven't used vault so I'm not sure if they have PKCS11 support.

e-nikolov (Tue, 17 Apr 2018 18:50:30 GMT):
they support pkcs11 as a backend

e-nikolov (Tue, 17 Apr 2018 18:50:40 GMT):
but provide an http api

e-nikolov (Tue, 17 Apr 2018 18:50:53 GMT):
to access the hsm

troyronda (Tue, 17 Apr 2018 18:51:15 GMT):
we only have PKCS11 and SW provided in the SDK... of course, someone can make a new cryptosuite impl and pass it in.

troyronda (Tue, 17 Apr 2018 18:51:31 GMT):
using PKCS11 as an example (https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/core/cryptosuite/bccsp/pkcs11)

troyronda (Tue, 17 Apr 2018 18:51:31 GMT):
using PKCS11 as an example (https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/core/cryptosuite/bccsp/pkcs11 plus https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/core/cryptosuite/bccsp/wrapper)

e-nikolov (Tue, 17 Apr 2018 18:52:05 GMT):
If I write a vault implementation of the bccsp interface, would you guys be interested in adding it to the sdk?

e-nikolov (Tue, 17 Apr 2018 18:52:50 GMT):
I think vault provides a good abstraction layer over many possible backends

e-nikolov (Tue, 17 Apr 2018 18:53:04 GMT):
it supports PKCS11 as well as things like consul and etcd

troyronda (Tue, 17 Apr 2018 18:53:12 GMT):
I'm not too familiar with it, but it seems like a good idea

troyronda (Tue, 17 Apr 2018 18:53:12 GMT):
I'm not too familiar with it, but it seems like a good idea to me

e-nikolov (Tue, 17 Apr 2018 18:53:37 GMT):
it also supports the HSM offering of AWS and other cloud providers

troyronda (Tue, 17 Apr 2018 18:53:42 GMT):
nice

e-nikolov (Tue, 17 Apr 2018 18:53:53 GMT):
but it requires vault enterprise

e-nikolov (Tue, 17 Apr 2018 18:54:10 GMT):
so I guess it's more of a separate feature for the people who really need it

troyronda (Tue, 17 Apr 2018 18:54:18 GMT):
right

e-nikolov (Tue, 17 Apr 2018 18:54:55 GMT):
but people would still have the choice to use the pkcs11 bccsp if they don't want vault enterprise edition

troyronda (Tue, 17 Apr 2018 18:55:40 GMT):
also extensions like enterprise edition can exist anywhere on github and can still be used with the SDK

troyronda (Tue, 17 Apr 2018 18:55:59 GMT):
PKCS11 support isn't even directly referenced by the out of the box SDK

troyronda (Tue, 17 Apr 2018 18:56:01 GMT):
;)

troyronda (Tue, 17 Apr 2018 18:56:09 GMT):
it just happens to be in the same repo

troyronda (Tue, 17 Apr 2018 18:56:22 GMT):
and is exercised by the CI tests

troyronda (Tue, 17 Apr 2018 18:56:55 GMT):
you just need this line: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkcs11/e2e_test.go#L25

troyronda (Tue, 17 Apr 2018 18:57:11 GMT):
and that import can come from anywhere, of course.

troyronda (Tue, 17 Apr 2018 18:57:11 GMT):
and that imported type can come from anywhere, of course.

troyronda (Tue, 17 Apr 2018 18:57:46 GMT):
(in this example it's CustomCryptoSuiteProviderFactory using "github.com/hyperledger/fabric-sdk-go/pkg/core/cryptosuite/bccsp/pkcs11")

e-nikolov (Tue, 17 Apr 2018 18:58:33 GMT):
there is also a pkcs11 bccsp in here https://github.com/hyperledger/fabric-sdk-go/blob/master/internal/github.com/hyperledger/fabric/bccsp/pkcs11/impl.go

e-nikolov (Tue, 17 Apr 2018 18:58:42 GMT):
which I think is used by the one you linked

troyronda (Tue, 17 Apr 2018 18:58:58 GMT):
no - i linked the exported version.

troyronda (Tue, 17 Apr 2018 18:59:10 GMT):
https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/core/cryptosuite/bccsp/pkcs11

troyronda (Tue, 17 Apr 2018 18:59:19 GMT):
the one in internal is copied code from fabric

troyronda (Tue, 17 Apr 2018 18:59:19 GMT):
the one in internal is copied code from fabric core

troyronda (Tue, 17 Apr 2018 18:59:34 GMT):
the exported version wraps it into the cryptosuite interfaces

e-nikolov (Tue, 17 Apr 2018 18:59:36 GMT):
I meant that the one you linked imports the one from fabric

troyronda (Tue, 17 Apr 2018 18:59:42 GMT):
ah right

e-nikolov (Tue, 17 Apr 2018 19:01:46 GMT):
do you know how the .so files are used?

e-nikolov (Tue, 17 Apr 2018 19:02:06 GMT):
they are written in C i think

e-nikolov (Tue, 17 Apr 2018 19:02:09 GMT):
is cgo used

e-nikolov (Tue, 17 Apr 2018 19:02:12 GMT):
to load them?

troyronda (Tue, 17 Apr 2018 19:02:13 GMT):
yes

troyronda (Tue, 17 Apr 2018 19:02:22 GMT):
we use a go library to do it

troyronda (Tue, 17 Apr 2018 19:02:22 GMT):
we use a go library to wrap those calls

troyronda (Tue, 17 Apr 2018 19:02:22 GMT):
note: a go library to wrap those calls

troyronda (Tue, 17 Apr 2018 19:02:22 GMT):
note: a go library is used to wrap those calls

troyronda (Tue, 17 Apr 2018 19:02:45 GMT):
github.com/miekg/pkcs11

troyronda (Tue, 17 Apr 2018 19:04:08 GMT):
you can see some of the C calls inside that lib

troyronda (Tue, 17 Apr 2018 19:05:52 GMT):
this is the same lib as Fabric used (this is part of the copied code from Fabric core)

troyronda (Tue, 17 Apr 2018 19:05:52 GMT):
this is the same lib as Fabric core used (this is part of the copied code from Fabric core)

troyronda (Tue, 17 Apr 2018 19:05:52 GMT):
this is the same lib as Fabric core used (since this is part of the copied code from Fabric core)

troyronda (Tue, 17 Apr 2018 19:13:17 GMT):
@e-nikolov @gbolo @aleksandar.likic thoughts about hashicorp vault (see above)?

troyronda (Tue, 17 Apr 2018 19:13:17 GMT):
@gbolo @aleksandar.likic thoughts about hashicorp vault from @e-nikolov (see above)?

troyronda (Tue, 17 Apr 2018 19:13:43 GMT):
seems like a good idea...

troyronda (Tue, 17 Apr 2018 19:13:43 GMT):
seems like a good idea to have more options available...

troyronda (Tue, 17 Apr 2018 19:13:43 GMT):
seems like a good idea to have more options available... (out-of-the-box)

e-nikolov (Tue, 17 Apr 2018 19:14:15 GMT):
do you know how it was originally decided to use pkcs11?

e-nikolov (Tue, 17 Apr 2018 19:14:15 GMT):
do you know how it was originally decided to provide a pkcs11 implementation?

gbolo (Tue, 17 Apr 2018 19:14:43 GMT):
@e-nikolov good idea, I love vault

troyronda (Tue, 17 Apr 2018 19:14:58 GMT):
(i.e., more options in the out-of-the-box SDK)

troyronda (Tue, 17 Apr 2018 19:14:58 GMT):
yeh it would be nice to have easier support in the SDK for externalizing crypto operations

troyronda (Tue, 17 Apr 2018 19:14:58 GMT):
yeh it would be nice to have easier support in the SDK for externalizing crypto operations

gbolo (Tue, 17 Apr 2018 19:15:04 GMT):
pkcs11 is used because its the standard (what CA authorities use)

gbolo (Tue, 17 Apr 2018 19:15:29 GMT):
its an ageing protocol though :(

gbolo (Tue, 17 Apr 2018 19:15:48 GMT):
and vendor support is horrible (only redhat support basically)

gbolo (Tue, 17 Apr 2018 19:16:43 GMT):
and since Thales bough Gemalto, its basically a monopoly now :P

troyronda (Tue, 17 Apr 2018 19:16:47 GMT):
yeh it would be nice to have easier support in the SDK for externalizing crypto operations

gbolo (Tue, 17 Apr 2018 19:17:06 GMT):
im a big fan of all of hashicorp's suite

e-nikolov (Tue, 17 Apr 2018 19:17:23 GMT):
are you aware of any alternatives to vault which have a similar purpose?

gbolo (Tue, 17 Apr 2018 19:17:34 GMT):
@e-nikolov no I am not

e-nikolov (Tue, 17 Apr 2018 19:18:53 GMT):
I also like hashicorp's stuff

e-nikolov (Tue, 17 Apr 2018 19:20:37 GMT):
I'll make a start on the vault implementation of the bccsp interface

troyronda (Tue, 17 Apr 2018 19:20:57 GMT):
nice

troyronda (Tue, 17 Apr 2018 19:20:57 GMT):
nice, that sounds great

gbolo (Tue, 17 Apr 2018 19:21:25 GMT):
thank you very much @e-nikolov

vivek29081993 (Wed, 18 Apr 2018 07:17:47 GMT):
Has joined the channel.

hi-quasars (Wed, 18 Apr 2018 09:12:47 GMT):
Has joined the channel.

hi-quasars (Wed, 18 Apr 2018 09:23:49 GMT):
hey guys I am trying to use fabric-sdk-go to communicate with a fabric cluster. I've met a problem of networking issue , can anyone help? SUCCESS query with channel.Client.query, But failed in channel.Client.Execute(Description: dialing connection timed out)

hi-quasars (Wed, 18 Apr 2018 09:24:57 GMT):
It's ok to send transaction by `fabric-cli`

hi-quasars (Wed, 18 Apr 2018 09:26:51 GMT):
it failed to call orderer (my orderers are set in 'kafka' mode)

lclclc (Wed, 18 Apr 2018 11:24:34 GMT):
If I use a go client to instantiate the chaincode, can I specify the endorsement policy?

troyronda (Wed, 18 Apr 2018 11:30:29 GMT):
@lclclc yes

troyronda (Wed, 18 Apr 2018 11:30:38 GMT):
See https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go

troyronda (Wed, 18 Apr 2018 11:31:54 GMT):
func createCC is doing so.

troyronda (Wed, 18 Apr 2018 11:32:06 GMT):
@hi-quasars I wo

troyronda (Wed, 18 Apr 2018 11:32:42 GMT):
@hi-quasars have you configured the correct orderer in your config block?

lclclc (Wed, 18 Apr 2018 11:37:38 GMT):
thanks

vloup (Wed, 18 Apr 2018 13:31:52 GMT):
Has joined the channel.

Glen (Thu, 19 Apr 2018 00:55:55 GMT):
Hi everyone, does anybody know why the client needs to connect to Fabric -CA during the client sdk initialization, that seems to save the enrolled use under /tmp/enroll_user, what's this user used for? it seems later transactions use orgUser's context to send.

Glen (Thu, 19 Apr 2018 01:00:39 GMT):
@troyronda

lclclc (Thu, 19 Apr 2018 04:40:44 GMT):
What does cryptoSuite/KeyValueStore/cryptoStore do? what do they manage?

lclclc (Thu, 19 Apr 2018 04:40:44 GMT):
Hi, I have a question about the client local storage. What does cryptoSuite/KeyValueStore/cryptoStore do? what do they manage?

MaximeAubanel (Thu, 19 Apr 2018 08:45:51 GMT):
We cannot enroll a new user with a certificate ?

MaximeAubanel (Thu, 19 Apr 2018 08:45:51 GMT):
We cannot enroll a new user with a certificate ?

MaximeAubanel (Thu, 19 Apr 2018 08:47:57 GMT):
How can I enroll a new user with its certificate ? I can only see, withSecret and withOrg option @troyronda

MaximeAubanel (Thu, 19 Apr 2018 08:47:57 GMT):
How can I enroll a new user with its certificate ? I can only see, withSecret and withOrg option. Thanks for your help @troyronda

StevenXu (Thu, 19 Apr 2018 13:04:20 GMT):
I have a problem, when I invoke chaincode at many times by sdk-go, will raise grpc connect peer reset occasionally

StevenXu (Thu, 19 Apr 2018 13:04:49 GMT):
the log: 2018-04-19 12:54:41.305 UTC [grpc] Printf -> DEBU 041 transport: http2Server.HandleStreams failed to read frame: read tcp 127.0.0.1:18000->127.0.0.1:40793: read: connection reset by peer

nmarcetic (Thu, 19 Apr 2018 13:10:45 GMT):
Does somebody know about any online example of creating user https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp#Client.Register Thanks

MaximeAubanel (Thu, 19 Apr 2018 13:22:27 GMT):
@nmarcetic Good luck :)

MaximeAubanel (Thu, 19 Apr 2018 13:22:27 GMT):
@nmarcetic Good luck to find anything online :)

MaximeAubanel (Thu, 19 Apr 2018 13:23:11 GMT):
@nmarcetic I mean, why don't you check the example available on the sdk go github page ?

MaximeAubanel (Thu, 19 Apr 2018 13:23:39 GMT):
@nmarcetic https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/msp/enrollment_test.go

nmarcetic (Thu, 19 Apr 2018 13:24:31 GMT):
@MaximeAubanel Smart one ;) You are right sdk examples are good starting point. Thanks ;)

ga25waq (Thu, 19 Apr 2018 14:04:01 GMT):
@troyronda Is there a chance that the bug mentioned in FAB-9068 gets fixed soon? Unfortunately, it is not currently not possible to use the automatic creation of CouchDB indexes introduced in Fabric 1.1, which leads to disadvantages w.r.t. the performance and the impossibility of using CouchDB's sorting functionality. Thanks for your answer!

troyronda (Thu, 19 Apr 2018 18:58:10 GMT):
@ga25waq it is high in the backlog

akula (Thu, 19 Apr 2018 23:52:03 GMT):
Has joined the channel.

luomin (Fri, 20 Apr 2018 02:32:10 GMT):
Has joined the channel.

MaximeAubanel (Fri, 20 Apr 2018 10:33:33 GMT):
Hey guys, can I have the confirmation that everything ivolved of user management with Fabric CA is working properly ? (Enrool, Reenroll, Revoke .. ?

MaximeAubanel (Fri, 20 Apr 2018 10:33:33 GMT):
Hey guys, can I have the confirmation that everything ivolved of user management with Fabric CA is working properly ? (Enrool, Reenroll, Revoke ..) ?

MaximeAubanel (Fri, 20 Apr 2018 10:33:33 GMT):
Hey guys, can I have the confirmation that everything involved of user management with Fabric CA is working properly ? (Enrool, Reenroll, Revoke ..) ?

MaximeAubanel (Fri, 20 Apr 2018 10:33:33 GMT):
Hey guys, can I have the confirmation that everything involved of user management with Fabric CA is working properly ? (Enroll, Reenroll, Revoke ..) ?

MaximeAubanel (Fri, 20 Apr 2018 10:33:33 GMT):
Hey guys, can I have the confirmation that everything involved in the management of user within the Fabric CA is working properly ? (Enroll, Reenroll, Revoke ..) ?

vivek29081993 (Fri, 20 Apr 2018 11:58:16 GMT):
Hi Guys, using the go-sdk, I used the "GetHistoryForKey" method in the "ChaincodeStubInterface" interface.

vivek29081993 (Fri, 20 Apr 2018 11:58:38 GMT):
`func (t *HeroesServiceChaincode) queryForKey(stub shim.ChaincodeStubInterface, args []string) pb.Response { fmt.Println("########### Chaincode query for a key ###########") // Check whether the number of arguments is sufficient if len(args) < 2 { return shim.Error("The number of arguments is insufficient.") } if args[1] == "hello" { // Get the state of the value matching the key hello in the ledger historyIer, err := stub.GetHistoryForKey("hello") if err != nil { return shim.Error("Failed to get state of hello") } var result []byte if historyIer.HasNext() { modification, err := historyIer.Next() if err != nil { fmt.Println(err) return shim.Error("Error") } fmt.Println("Returning information about", string(modification.GetValue())) result = append(result,modification.GetValue()...) result = append(result,strconv.FormatBool(modification.GetIsDelete())...) result = append(result,modification.GetTxId()...) result = append(result,"\n"...) } // Return this value in response return shim.Success(result) } // If the arguments given don’t match any function, we return an error return shim.Error("Unknown query action, check the second argument.") }`

vivek29081993 (Fri, 20 Apr 2018 11:58:38 GMT):
`func (t *HeroesServiceChaincode) queryForKey(stub shim.ChaincodeStubInterface, args []string) pb.Response { fmt.Println("########### Chaincode query for a key ###########") // Check whether the number of arguments is sufficient if len(args) < 2 { return shim.Error("The number of arguments is insufficient.") } if args[1] == "hello" { // Get the state of the value matching the key hello in the ledger historyIer, err := stub.GetHistoryForKey("hello") if err != nil { return shim.Error("Failed to get state of hello") } var result []byte if historyIer.HasNext() { modification, err := historyIer.Next() if err != nil { fmt.Println(err) return shim.Error("Error") } fmt.Println("Returning information about", string(modification.GetValue())) result = append(result,modification.GetValue()...) result = append(result,strconv.FormatBool(modification.GetIsDelete())...) result = append(result,modification.GetTxId()...) result = append(result,"\n"...) } // Return this value in response return shim.Success(result) } // If the arguments given don’t match any function, we return an error return shim.Error("Unknown query action, check the second argument.") }`

vivek29081993 (Fri, 20 Apr 2018 11:58:38 GMT):
```func (t *HeroesServiceChaincode) queryForKey(stub shim.ChaincodeStubInterface, args []string) pb.Response { fmt.Println("########### Chaincode query for a key ###########") // Check whether the number of arguments is sufficient if len(args) < 2 { return shim.Error("The number of arguments is insufficient.") } if args[1] == "hello" { // Get the state of the value matching the key hello in the ledger historyIer, err := stub.GetHistoryForKey("hello") if err != nil { return shim.Error("Failed to get state of hello") } var result []byte if historyIer.HasNext() { modification, err := historyIer.Next() if err != nil { fmt.Println(err) return shim.Error("Error") } fmt.Println("Returning information about", string(modification.GetValue())) result = append(result,modification.GetValue()...) result = append(result,strconv.FormatBool(modification.GetIsDelete())...) result = append(result,modification.GetTxId()...) result = append(result,"\n"...) } // Return this value in response return shim.Success(result) } // If the arguments given don’t match any function, we return an error return shim.Error("Unknown query action, check the second argument.") }```

vivek29081993 (Fri, 20 Apr 2018 11:59:21 GMT):
aboves my chaincode zthe issue is . I am only getting the first values only in the result. not the further updated ones.

vivek29081993 (Fri, 20 Apr 2018 11:59:21 GMT):
aboves my chaincode the issue is . I am only getting the first values only in the result. not the further updated ones.

vivek29081993 (Fri, 20 Apr 2018 12:05:37 GMT):
I have also added ```- CORE_LEDGER_HISTORY_ENABLEHISTORYDATABASE=true``` in the docker-compose.yaml in the peer configuration part.

vloup (Fri, 20 Apr 2018 13:00:39 GMT):
A while loop might be more appropriate in "if historyIer.HasNext()".

Ammu (Fri, 20 Apr 2018 13:04:50 GMT):

node error.png

vivek29081993 (Fri, 20 Apr 2018 13:11:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=EbfbYWtJSz3KWQh8L) @vloup yeah.it worked. My bad. :slight_frown: Thanks a lot for viewing the code.

vivek29081993 (Fri, 20 Apr 2018 13:11:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=EbfbYWtJSz3KWQh8L) @vloup yeah. it worked. My bad. :slight_frown: Thanks a lot for viewing the code.

vloup (Fri, 20 Apr 2018 13:14:27 GMT):
@Ammu, chaincode mycc version 1.0 already exists, either you already deployed it, either you should change the name/version of it.

Ammu (Fri, 20 Apr 2018 13:27:42 GMT):

node js value.png

Ammu (Fri, 20 Apr 2018 13:27:45 GMT):
this also the similar?

vloup (Fri, 20 Apr 2018 13:36:44 GMT):
looks like it was also already instantiated

e-nikolov (Fri, 20 Apr 2018 13:51:50 GMT):
I am a bit confused about the relationship between the BCCSP and the users in the embedded config or crypto path

e-nikolov (Fri, 20 Apr 2018 13:52:02 GMT):
can someone help me clear this up for myself

e-nikolov (Fri, 20 Apr 2018 13:52:48 GMT):
There is also the fabric CA which I assume only stores public keys

e-nikolov (Fri, 20 Apr 2018 13:54:42 GMT):
and there is also a memory key store

aleksandar.likic (Fri, 20 Apr 2018 14:28:49 GMT):
@e-nikolov SDK supports three use cases: embedded credentials in client configuration, pre-enrolled users in the org's MSP directory, and dynamically enrolled users - when the cert is in the user store and the key in the crypto provider's key store. User identity is resolved by looking up the user enrollment cert first, and then looking up the matching private key. When resolving the cert, SDK first looks at the user store (@client.credentialStore.path); if cert is found, the key is looked up in the crypto provider key store (HSM or @client.credentialStore.cryptoStore.path). If the identity is not resolved, SDK looks up embedded certs in client configuration; if not found, it looks up the org's MSP directory (@organizations..cryptoPath). If not found, "user not found" is reported. Otherwise, the matching private key is first searched in embedded keys in client configuration, then in the crypto provider key store, and finally in the org's MSP directory.

e-nikolov (Fri, 20 Apr 2018 14:42:49 GMT):
@aleksandar.likic Currently if neither the cryptopath nor an embedded user list is provided, an error is returned from the NewIdentityManager function (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/identitymgr.go#L48)

e-nikolov (Fri, 20 Apr 2018 14:43:21 GMT):
how is the case of only having users stored in an HSM currently handled?

e-nikolov (Fri, 20 Apr 2018 14:44:02 GMT):
should a cryptopath/embedded user still be specified?

aleksandar.likic (Fri, 20 Apr 2018 19:54:35 GMT):
@e-nikolov Yes, this needs to be fixed. I created https://jira.hyperledger.org/browse/FAB-9625 to try capture possible authentication scenarios, what configuration each should require, and whether or not they are currently supported. You are welcome to review the story and propose changes. Regarding specifically the HSM use case, it is supported, but as you pointed out it might require you to configure the SDK with unnecessary store(s) as the workaround.

e-nikolov (Fri, 20 Apr 2018 20:25:35 GMT):
@aleksandar.likic I am working on a pull request for supporting Hashicorp's Vault as a user storage backend and I'm trying to figure out how to best approach it

e-nikolov (Fri, 20 Apr 2018 20:25:35 GMT):
@aleksandar.likic I am working on a pull request for supporting Hashicorp's Vault as a user storage backend for the sdk and I'm trying to figure out how to best approach it

e-nikolov (Fri, 20 Apr 2018 20:30:14 GMT):
Do you think it should be done as an implementation of the CryptoSuite or the KeyStore interface?

aleksandar.likic (Fri, 20 Apr 2018 20:36:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wRyT9yTyn57wshWkg) At the moment we have properly tested only register and enroll. I created https://jira.hyperledger.org/browse/FAB-9626 for implementing missing CA functions (this has been outstanding for some time).

aleksandar.likic (Fri, 20 Apr 2018 20:52:09 GMT):
@e-nikolov SDK uses BCCSP behind CryptoSuite interface. The problem with BCCSP's KeyStore interface is that it accepts the Key interface, which is opaque. BCCSP's SW file key store implementation serializes private keys (before persisting them) using functions that are not exported, so it's currently impossible to implement a custom KeyStore unless you want to keep the keys only in memory.

e-nikolov (Fri, 20 Apr 2018 20:54:25 GMT):
then a custom BCCSP implementation would be the way to go?

aleksandar.likic (Fri, 20 Apr 2018 20:56:05 GMT):
I think so. Maybe you can ping authors of https://jira.hyperledger.org/browse/FAB-8930 for tips.

aleksandar.likic (Fri, 20 Apr 2018 20:56:43 GMT):
... if this makes sense to you, not sure

aleksandar.likic (Fri, 20 Apr 2018 20:57:34 GMT):
There is also https://jira.hyperledger.org/browse/FAB-9499?jql=text%20~%20BCCSP%20ORDER%20BY%20created%20DESC in the same context

aleksandar.likic (Fri, 20 Apr 2018 21:08:05 GMT):
I think changing SW implementation to better support pluggable key store is the shortest path. I created https://jira.hyperledger.org/browse/FAB-9627 for this. The change should be easy (export some already existing functions), but it needs to be approved by Fabric maintainers.

e-nikolov (Fri, 20 Apr 2018 21:11:29 GMT):
I think in the case of vault it can also be made to sign a payload with a private key stored in it

e-nikolov (Fri, 20 Apr 2018 21:11:37 GMT):
so that the private keys never leave vault

e-nikolov (Fri, 20 Apr 2018 21:12:03 GMT):
so it's more of a remote alternative of an HSM

e-nikolov (Fri, 20 Apr 2018 21:12:18 GMT):
I think it also supports an HSM as a backend

e-nikolov (Fri, 20 Apr 2018 21:12:36 GMT):
but it also can be used as a generic key/value store for secrets

aleksandar.likic (Fri, 20 Apr 2018 21:13:13 GMT):
PKCS11 implementation uses HSM as the key store.

e-nikolov (Fri, 20 Apr 2018 21:13:36 GMT):
yes, but it requires a local C library

e-nikolov (Fri, 20 Apr 2018 21:13:47 GMT):
as an .so file

e-nikolov (Fri, 20 Apr 2018 21:14:33 GMT):
and where I work, we are trying to keep a more centralized secrets service

aleksandar.likic (Fri, 20 Apr 2018 21:15:45 GMT):
So it looks like you need to create a Vault implementation of BCCSP

e-nikolov (Fri, 20 Apr 2018 21:16:23 GMT):
I think so too

troyronda (Fri, 20 Apr 2018 23:57:33 GMT):
@aleksandar.likic @e-nikolov I probably missed something in your convo, but we don’t need to modify fabric to add vault to the SDK

troyronda (Fri, 20 Apr 2018 23:58:02 GMT):
Just meet the cryptosuite interface of the SDK

troyronda (Fri, 20 Apr 2018 23:58:46 GMT):
Similar to what the wrapper of BCCSP is doing in the SDK

jriachi (Sat, 21 Apr 2018 04:55:26 GMT):
@MaximeAubanel @Norberthu What I need is for the peer to launch the smart contract container and connect to it. Once I shut the system down I need to be able to bring it back up to the same state. I presumed that the initiation process does that! If not, how do I re-launch the smart contract container from GO SDK?

liyanpei (Sat, 21 Apr 2018 17:27:04 GMT):
Has joined the channel.

Norberthu (Mon, 23 Apr 2018 00:06:10 GMT):
@jriachi the initiation process includes {install chaincode } / {instantiate chaincode } in your GO SDK application ?

Norberthu (Mon, 23 Apr 2018 00:06:10 GMT):
@jriachi Does the initiation process include {install chaincode } / {instantiate chaincode } in your GO SDK application ?

smallX (Mon, 23 Apr 2018 07:08:05 GMT):
#fabric-sdk

titoe218 (Mon, 23 Apr 2018 08:07:26 GMT):
Has joined the channel.

titoe218 (Mon, 23 Apr 2018 08:07:38 GMT):
Hi everyone, I used Fabric Go SDK to Put and Get from State DB, does anyone know how to get details of a transaction from transaction id? P.s: I call PutState with my own key, not using stub.GetTxID

titoe218 (Mon, 23 Apr 2018 08:07:38 GMT):
Hi everyone, I used Fabric Go SDK to Put or Get from State DB, does anyone know how to get details of a transaction from transaction id? P.s: I call PutState with my own key, not using stub.GetTxID

clydedacruz (Mon, 23 Apr 2018 09:06:34 GMT):
Has joined the channel.

nmarcetic (Mon, 23 Apr 2018 11:04:37 GMT):
Hey folks, any idea ``` [fabsdk/fab] 2018/04/23 11:03:21 UTC - tls.GetClientTLSConfig -> DEBU Client TLS certificate and/or key file not provided failed to create CA Client: error initializing CA [ca.org1.example.com]: init failed: Failed to get client TLS config: Failed to read '': open : no such file or directory ```

nmarcetic (Mon, 23 Apr 2018 11:59:14 GMT):
Found a problem, I define `https` by mistake for `certificateAuthorities` url

nmarcetic (Mon, 23 Apr 2018 11:59:29 GMT):
I switch to `http` all works now

nmarcetic (Mon, 23 Apr 2018 12:54:47 GMT):
I have one more question :) I just learn how to create a new user, what I am missing is how to fetch that user now by passing and `name` and put it in the context so I can sign transactions or call chaincode with his identity/keys Do I need `GetSigningIdentity` or `WithUser` or what ? :) I know that everything is on godoc and fabric-sdk-go examples folder but its totally unclear I just need a help with logic/procedures. Thanks ;)

aleksandar.likic (Mon, 23 Apr 2018 13:56:56 GMT):
@nmarcetic You can use any of https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#ContextOption. For example, see https://github.com/hyperledger/fabric-sdk-go/blob/dd0297151bf3bf9203423e8d3800375568b76458/test/integration/e2e/end_to_end.go#L59 for example. If you omit WithOrg(), the org will is taken from SDK configuration.

nmarcetic (Mon, 23 Apr 2018 14:18:48 GMT):
Ah got it, so `fabsdk.WithUser` is a magic ;) Thanks a lot @aleksandar.likic and the sdk context with stay with user I set until I change it (e.g set another user using `fabsdk.WithUser`) right ?

aleksandar.likic (Mon, 23 Apr 2018 14:18:53 GMT):
@titoe218 You should use https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/ledger#Client.QueryTransaction, See example at https://github.com/hyperledger/fabric-sdk-go/blob/dd0297151bf3bf9203423e8d3800375568b76458/test/integration/orgs/multiple_orgs_test.go#L212. The call in the example queries two peers and makes sure that both return the same payload.

aleksandar.likic (Mon, 23 Apr 2018 14:19:43 GMT):
@nmarcetic You cannot change user in context. To use another user, create a new context.

nmarcetic (Mon, 23 Apr 2018 14:21:46 GMT):
@aleksandar.likic Got it! Thanks a lot for your help, really appreciate.

jriachi (Mon, 23 Apr 2018 17:51:22 GMT):
@Norberthu No, just initiation.

jriachi (Mon, 23 Apr 2018 17:51:26 GMT):
ccPolicy := cauthdsl.SignedByAnyMember([]string{"org1MSP", "org2MSP"}) err := setup.admin.InstantiateCC(setup.ChannelID, resmgmt.InstantiateCCRequest{Name: setup.ChainCodeID, Path: setup.ChaincodePath, Version: "1.0", Args: [][]byte{[]byte("init")}, Policy: ccPolicy}) if err != nil { return fmt.Errorf("failed to instantiate the chaincode: %v", err) }

jriachi (Mon, 23 Apr 2018 17:52:40 GMT):
The error is happening on InstantiateCC

jriachi (Mon, 23 Apr 2018 17:53:58 GMT):
send instantiate chaincode proposal failed: Multiple errors occurred: gRPC Transport Status Code: (2) Unknown. Description: chaincode error (status: 500, message: chaincode exists cc-1-0-0-0a)

yacovm (Mon, 23 Apr 2018 21:12:31 GMT):
@bstasyszyn FYI https://gerrit.hyperledger.org/r/#/c/20563/ has just been merged so to test fabric's service discovery there is no need for hacks anymore

yacovm (Mon, 23 Apr 2018 21:21:42 GMT):
I mean: ``` // HandleChaincodeDeploy is expected to be invoked when a chaincode is deployed via a deploy transaction func (sub *Subscription) HandleChaincodeDeploy(chaincodeDefinition *cceventmgmt.ChaincodeDefinition, dbArtifactsTar []byte) error { go func() { time.Sleep(time.Second * 2) sub.handleDeploy(chaincodeDefinition, dbArtifactsTar) }() return nil } ```

yacovm (Mon, 23 Apr 2018 21:21:47 GMT):
this isn't needed anymore

Norberthu (Tue, 24 Apr 2018 01:21:47 GMT):
@jriachi Because you have instantiated the chaincode. In this situation, you should get NewClient instance, for example:

Norberthu (Tue, 24 Apr 2018 01:22:57 GMT):
` func SetClient() error { // Initialize the SDK with the configuration file sdk, err := fabsdk.New(config.FromFile(setup.ConfigFile)) if err != nil { return fmt.Errorf("failed to create sdk: %v", err) } // Channel client is used to query and execute transactions client, err = sdk.NewClient(fabsdk.WithUser(setup.UserName)).Channel(setup.ChannelID) if err != nil { return fmt.Errorf("failed to create new channel client: %v", err) } return nil }`

Norberthu (Tue, 24 Apr 2018 01:23:40 GMT):
when you get client object, then you can start transaction .

Nikolas 11 (Tue, 24 Apr 2018 01:25:07 GMT):
Has joined the channel.

titoe218 (Tue, 24 Apr 2018 01:32:47 GMT):
@aleksandar.likic thank you so much

jriachi (Tue, 24 Apr 2018 02:07:16 GMT):
@Norberthu I will give it a try. Thanks

titoe218 (Tue, 24 Apr 2018 04:47:27 GMT):
@aleksandar.likic can I get only value store to state DB on transactionPayload?

rahulch (Tue, 24 Apr 2018 07:18:29 GMT):
Has joined the channel.

rahulch (Tue, 24 Apr 2018 07:21:27 GMT):
Hi, I am trying to run the tests in fabric-sdk-go and it is exiting with the following error - https://pastebin.com/PKzi6pKu . Any suggestion is highly appreciated

nmarcetic (Tue, 24 Apr 2018 15:32:47 GMT):
Hey folks, nice error for today, is some one have idea, would be great ;) ``` event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7053]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7053] ``` I am trying to do this https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L96

nmarcetic (Tue, 24 Apr 2018 15:32:47 GMT):
Hey folks, nice error for today, is some one have idea, would be great ;) ``` event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051] ``` I am trying to do this https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L96

nmarcetic (Tue, 24 Apr 2018 15:33:22 GMT):
``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3e31271d0e28 hyperledger/fabric-ccenv:x86_64-1.1.0-alpha "/bin/bash -c 'sleep…" 6 hours ago Up 6 hours chaincode 7a8a78ed79c6 hyperledger/fabric-tools:x86_64-1.1.0-alpha "/bin/bash -c ./scri…" 6 hours ago Up 6 hours cli e1aa733066e7 hyperledger/fabric-peer:x86_64-1.1.0-alpha "peer node start --p…" 6 hours ago Up 6 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer 40a00915d2c5 hyperledger/fabric-orderer:x86_64-1.1.0-alpha "orderer" 6 hours ago Up 6 hours 0.0.0.0:7050->7050/tcp orderer 8d232eb3e2bd hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-se…" 6 hours ago Up 6 hours 0.0.0.0:7054->7054/tcp fabric-ca-server ```

aleksandar.likic (Wed, 25 Apr 2018 00:32:25 GMT):
@titoe218 Are you asking how to extract transaction details from the block?

aleksandar.likic (Wed, 25 Apr 2018 00:34:44 GMT):
@nmarcetic This test is passing CI, so it should work out of the box. Did you change anything?

aleksandar.likic (Wed, 25 Apr 2018 00:37:34 GMT):
@nmarcetic Does it work when you run "make integration-tests"?

aleksandar.likic (Wed, 25 Apr 2018 00:37:34 GMT):
@nmarcetic Does it work when you run "make integration-test"?

nmarcetic (Wed, 25 Apr 2018 09:22:24 GMT):
@aleksandar.likic No I didn't change anything. Let me try to run `make integration-test`

nmarcetic (Wed, 25 Apr 2018 09:22:51 GMT):
``` event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051] ```

nmarcetic (Wed, 25 Apr 2018 09:23:05 GMT):
This looks to me more like a networking/connection problem don't you think ?

nmarcetic (Wed, 25 Apr 2018 11:07:00 GMT):
@aleksandar.likic Is this `exit 0` normal for `make integration-test` ``` ttaching to fabsdkgo_org2ca1_1, fabsdkgo_golangruntime_1, fabsdkgo_builder_1, fabsdkgo_org1ca1_1, fabsdkgo_orderer1_1, fabsdkgo_org1peer1_1, fabsdkgo_org2peer2_1, fabsdkgo_org2peer1_1, fabsdkgo_integration-tests_1 org2ca1_1 | WARNING: no logs are available with the 'none' log driver golangruntime_1 | WARNING: no logs are available with the 'none' log driver builder_1 | WARNING: no logs are available with the 'none' log driver org1ca1_1 | WARNING: no logs are available with the 'none' log driver orderer1_1 | WARNING: no logs are available with the 'none' log driver org1peer1_1 | WARNING: no logs are available with the 'none' log driver org2peer2_1 | WARNING: no logs are available with the 'none' log driver org2peer1_1 | WARNING: no logs are available with the 'none' log driver integration-tests_1 | Running integration tests ... integration-tests_1 | Testing with code level stable (Fabric v1.1) ... integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/e2e 18.536s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/fab 43.541s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/msp 2.768s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/orgs 66.572s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/sdk 63.438s fabsdkgo_integration-tests_1 exited with code 0 Aborting on container exit... Stopping fabsdkgo_org2peer1_1 ... done Stopping fabsdkgo_org2peer2_1 ... done Stopping fabsdkgo_org1peer1_1 ... done Stopping fabsdkgo_orderer1_1 ... done Stopping fabsdkgo_builder_1 ... done Stopping fabsdkgo_golangruntime_1 ... done Stopping fabsdkgo_org1ca1_1 ... done Stopping fabsdkgo_org2ca1_1 ... done ```

nmarcetic (Wed, 25 Apr 2018 11:07:13 GMT):
this part `fabsdkgo_integration-tests_1 exited with code 0`

aleksandar.likic (Wed, 25 Apr 2018 11:07:42 GMT):
@nmarcetic yes. this means all works fine.

nmarcetic (Wed, 25 Apr 2018 11:07:55 GMT):
Ok got it

bur (Wed, 25 Apr 2018 11:08:27 GMT):
Has joined the channel.

aleksandar.likic (Wed, 25 Apr 2018 11:11:54 GMT):
@nmarcetic I normally start the example network by following https://github.com/hyperledger/fabric-sdk-go#testing-with-fabric-images-at-docker-hub, and then I can run integration tests from my IDE. I use goland, but it should work with any. Or you can run it from command line.

aleksandar.likic (Wed, 25 Apr 2018 11:11:54 GMT):
@nmarcetic I normally start the test network by following https://github.com/hyperledger/fabric-sdk-go#testing-with-fabric-images-at-docker-hub, and then I can run integration tests from my IDE. I use goland, but it should work with any. Or you can run it from command line.

nmarcetic (Wed, 25 Apr 2018 11:12:31 GMT):
:+1_tone2:

nmarcetic (Wed, 25 Apr 2018 11:12:39 GMT):
What about this, what you think ``` ``` event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051] ```

nmarcetic (Wed, 25 Apr 2018 11:12:39 GMT):
What about this, what you think ``` event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051] ```

nmarcetic (Wed, 25 Apr 2018 11:13:44 GMT):
I am getting this error when I try this ``` fabsdk.WithUser(bc.Fabric.OrgAdmin), fabsdk.WithOrg(bc.Fabric.OrgName)) client, err := channel.New(adminChannelContext) ```

nmarcetic (Wed, 25 Apr 2018 11:14:03 GMT):
Is it looks you like a connection/networking problem or ?

nmarcetic (Wed, 25 Apr 2018 11:14:11 GMT):
This is strange `CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051]`

aleksandar.likic (Wed, 25 Apr 2018 11:16:16 GMT):
Yes, for some reason client didn't connect to the peer at localhost:7051. I happened to have this in /etc/hosts, but it should work without it. 127.0.0.1 localhost 127.0.0.1 ca.org1.example.com ca.org2.example.com 127.0.0.1 peer0.org1.example.com peer1.org1.example.com 127.0.0.1 peer0.org2.example.com peer1.org2.example.com 127.0.0.1 orderer.example.com

aleksandar.likic (Wed, 25 Apr 2018 11:16:16 GMT):
Yes, for some reason client didn't connect to the peer at localhost:7051. I happen to have this in /etc/hosts, but it should work without it. 127.0.0.1 localhost 127.0.0.1 ca.org1.example.com ca.org2.example.com 127.0.0.1 peer0.org1.example.com peer1.org1.example.com 127.0.0.1 peer0.org2.example.com peer1.org2.example.com 127.0.0.1 orderer.example.com

aleksandar.likic (Wed, 25 Apr 2018 11:16:16 GMT):
Yes, for some reason client didn't connect to the peer at localhost:7051. I have this in /etc/hosts, but it should work without it. 127.0.0.1 localhost 127.0.0.1 ca.org1.example.com ca.org2.example.com 127.0.0.1 peer0.org1.example.com peer1.org1.example.com 127.0.0.1 peer0.org2.example.com peer1.org2.example.com 127.0.0.1 orderer.example.com

nmarcetic (Wed, 25 Apr 2018 11:26:16 GMT):
Hm I see... I use docker min setup for chaincode development https://github.com/hyperledger/fabric-samples/tree/release-1.1/chaincode-docker-devmode And fabric-ca docker also

nmarcetic (Wed, 25 Apr 2018 11:26:30 GMT):
``` ONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES fd088ea70598 hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-se…" 17 minutes ago Up 17 minutes 0.0.0.0:7054->7054/tcp fabric-ca-server 4cfb5a6b8b5a hyperledger/fabric-tools:x86_64-1.1.0-alpha "/bin/bash -c ./scri…" 17 minutes ago Up 17 minutes cli 56b36bee3406 hyperledger/fabric-ccenv:x86_64-1.1.0-alpha "/bin/bash -c 'sleep…" 17 minutes ago Up 17 minutes chaincode 7b47d62f6e42 hyperledger/fabric-peer:x86_64-1.1.0-alpha "peer node start --p…" 17 minutes ago Up 17 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer 0079667091c9 hyperledger/fabric-orderer:x86_64-1.1.0-alpha "orderer" 17 minutes ago Up 17 minutes 0.0.0.0:7050->7050/tcp orderer ```

nmarcetic (Wed, 25 Apr 2018 11:27:07 GMT):
I can communicate with fabric-ca e.g I create a new user using fabric-sdk-go but not with peer docker hm interesting the port is exposed

aleksandar.likic (Wed, 25 Apr 2018 12:36:58 GMT):
@nmarcetic you need to enable grpc debug logging to see what exactly is going on. Last time I had this issue it was a bad host override, so the peer was rejecting TLS connection.

nmarcetic (Wed, 25 Apr 2018 12:38:51 GMT):
Wow :) OK will try with debug. Thanks @aleksandar.likic

mrkiouak (Wed, 25 Apr 2018 13:30:11 GMT):
Has left the channel.

sheehan (Wed, 25 Apr 2018 14:25:11 GMT):
Has joined the channel.

antitoine (Wed, 25 Apr 2018 14:55:56 GMT):
Hi, I have a problem with entityMatcher. I can't avoid inserting an entry in my `/etc/hosts` file for the CA. If anyone has any idea why? Here is the configuration I use: ``` [...] entityMatchers: [...] certificateAuthorities: - pattern: (\w*)ca.org1.hf.chainhero.io(\w*) urlSubstitutionExp: https://localhost:7054 mappedHost: ca.org1.hf.chainhero.io ```

antitoine (Wed, 25 Apr 2018 14:55:56 GMT):
Hi, I have a problem with entityMatcher. I can't avoid inserting an entry in my `/etc/hosts` file for the CA. If anyone has any idea why? Here is the configuration I use: ``` [...] certificateAuthorities: ca.org1.hf.chainhero.io: url: https://localhost:7054 httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw caName: ca.org1.hf.chainhero.io entityMatchers: [...] certificateAuthorities: - pattern: (\w*)ca.org1.hf.chainhero.io(\w*) urlSubstitutionExp: https://localhost:7054 mappedHost: ca.org1.hf.chainhero.io ``` And this is the error: ``` enroll failed: POST failure of request: POST https://localhost:7054/enroll {"hosts":null,"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIHtMIGUAgEAMBAxDjAMBgNVBAMTBWFkbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEVHjqGTfjqix4DQ5mabn+6mxrSHaFeHK1tUs8f146eMPdezswvQxaCQbu\nXIMC62dpN+b27Z5i4V3AGZBHuA4ZuaAiMCAGCSqGSIb3DQEJDjETMBEwDwYDVR0R\nBAgwBoIEeW1pcjAKBggqhkjOPQQDAgNIADBFAiEAh4NC0+vuOaIK6RyHuCR5BCmn\n1uETnVAZyM5Q4sLDMToCIGxZohRtH3P63FizdBQzG07bZSTu8IQIA+FG4EcvRwd4\n-----END CERTIFICATE REQUEST-----\n","profile":"","crl_override":"","label":"","NotBefore":"0001-01-01T00:00:00Z","NotAfter":"0001-01-01T00:00:00Z","ReturnPrecert":false,"CAName":"ca.org1.hf.chainhero.io"}: Post https://localhost:7054/enroll: x509: certificate is valid for ca.org1.hf.chainhero.io, not localhost ```

antitoine (Wed, 25 Apr 2018 14:55:56 GMT):
Hi, I have a problem with entityMatcher. I can't avoid inserting an entry in my `/etc/hosts` file for the CA. If anyone has any idea why? Here is the configuration I use: ```[...] certificateAuthorities: ca.org1.hf.chainhero.io: url: https://localhost:7054 httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw caName: ca.org1.hf.chainhero.io entityMatchers: [...] certificateAuthorities: - pattern: (\w*)ca.org1.hf.chainhero.io(\w*) urlSubstitutionExp: https://localhost:7054 mappedHost: ca.org1.hf.chainhero.io ``` And this is the error: ```enroll failed: POST failure of request: POST https://localhost:7054/enroll {"hosts":null,"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIHtMIGUAgEAMBAxDjAMBgNVBAMTBWFkbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEVHjqGTfjqix4DQ5mabn+6mxrSHaFeHK1tUs8f146eMPdezswvQxaCQbu\nXIMC62dpN+b27Z5i4V3AGZBHuA4ZuaAiMCAGCSqGSIb3DQEJDjETMBEwDwYDVR0R\nBAgwBoIEeW1pcjAKBggqhkjOPQQDAgNIADBFAiEAh4NC0+vuOaIK6RyHuCR5BCmn\n1uETnVAZyM5Q4sLDMToCIGxZohRtH3P63FizdBQzG07bZSTu8IQIA+FG4EcvRwd4\n-----END CERTIFICATE REQUEST-----\n","profile":"","crl_override":"","label":"","NotBefore":"0001-01-01T00:00:00Z","NotAfter":"0001-01-01T00:00:00Z","ReturnPrecert":false,"CAName":"ca.org1.hf.chainhero.io"}: Post https://localhost:7054/enroll: x509: certificate is valid for ca.org1.hf.chainhero.io, not localhost ```

nmarcetic (Wed, 25 Apr 2018 15:01:34 GMT):
@antitoine can you try to remove `https` and use `http` if its acceptable for you :) from `entityMatcher`

nmarcetic (Wed, 25 Apr 2018 15:01:34 GMT):
@antitoine can you try to remove `https` and use `http` if its acceptable for you :) from `urlSubstitutionExp`

nmarcetic (Wed, 25 Apr 2018 15:01:54 GMT):
I had similar problem

nmarcetic (Wed, 25 Apr 2018 15:02:08 GMT):
and I switched to http for local development

nmarcetic (Wed, 25 Apr 2018 15:02:34 GMT):
This error `https://localhost:7054/enroll: x509: certificate is valid for ca.org1.hf.chainhero.io, not localhost` looks like problem I had

antitoine (Wed, 25 Apr 2018 15:08:16 GMT):
@nmarcetic Thanks but that doesn't correct the problem, I come across another error on the CA server response this time: ```POST failure of request: POST http://localhost:7054/enroll {"hosts":null,"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIHtMIGUAgEAMBAxDjAMBgNVBAMTBWFkbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAETM0stQUpGSdycLekUP+B9EvTx1R7suH6YNEPndTkw+xMKKSaF3LCCSUf\nVVyUZDgKTebFfbhrRtjpJagiXfwuPaAiMCAGCSqGSIb3DQEJDjETMBEwDwYDVR0R\nBAgwBoIEeW1pcjAKBggqhkjOPQQDAgNIADBFAiEAt8DLcQPfivWR1SSBRM1btbjF\nSiu1tJLTHfdNXc+uSegCIAeVlxaFX4vVeROSgtpWxExAVg2aQvYhC7FIhIJ+huB1\n-----END CERTIFICATE REQUEST-----\n","profile":"","crl_override":"","label":"","NotBefore":"0001-01-01T00:00:00Z","NotAfter":"0001-01-01T00:00:00Z","ReturnPrecert":false,"CAName":"ca.org1.hf.chainhero.io"}: Post http://localhost:7054/enroll: net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x15\x03\x01\x00\x02\x02\x16" ```

nmarcetic (Wed, 25 Apr 2018 15:11:37 GMT):
@antitoine wow :) Do you use fabric-ca in docker or its native install ?

antitoine (Wed, 25 Apr 2018 15:12:16 GMT):
@nmarcetic docker

nmarcetic (Wed, 25 Apr 2018 15:13:13 GMT):
@antitoine Me to I had to add this in fabric-ca/docker/server as env var `FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com` to avoid problem with certs verification

nmarcetic (Wed, 25 Apr 2018 15:14:06 GMT):
after that I am successfully creating/enrolling users using sdk

antitoine (Wed, 25 Apr 2018 15:15:19 GMT):
@nmarcetic already in it :confused: ```FABRIC_CA_SERVER_CA_NAME=ca.org1.hf.chainhero.io```

nmarcetic (Wed, 25 Apr 2018 15:15:43 GMT):
Damn...

nmarcetic (Wed, 25 Apr 2018 15:15:55 GMT):
No more ideas

antitoine (Wed, 25 Apr 2018 15:16:43 GMT):
Thanks anyway, I really appreciate it!

nmarcetic (Wed, 25 Apr 2018 15:17:37 GMT):
You still use `https` ? ``` certificateAuthorities: ca.org1.hf.chainhero.io: url: https://localhost: ``` Try to remove that use `http` here to. This is my last shoot ;)

nmarcetic (Wed, 25 Apr 2018 15:17:38 GMT):
Sure :+1:

antitoine (Wed, 25 Apr 2018 15:21:34 GMT):
@nmarcetic Already tried, well I will generate certificates, I see no other solutions. Thank you

nmarcetic (Wed, 25 Apr 2018 15:21:57 GMT):
Ok good luck ;)

sudeshrshetty (Wed, 25 Apr 2018 18:46:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bRZbeoBFWxGYN5rTb) @antitoine You can get remove entity matchers for certificate authorities from config.

sudeshrshetty (Wed, 25 Apr 2018 18:46:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bRZbeoBFWxGYN5rTb) @antitoine You can remove entity matchers for certificate authorities from config.

sudeshrshetty (Wed, 25 Apr 2018 20:10:30 GMT):
starting from this commit 0728814715e64fda854b4455384c7e0e3ef51bbc entity matchers are optional

titoe218 (Thu, 26 Apr 2018 01:21:28 GMT):
@aleksandar.likic Yes

titoe218 (Thu, 26 Apr 2018 02:12:29 GMT):
@aleksandar.likic I have initialized fabric go sdk to create channel & join peers to that channel, and created Go REST server listen to client request through my APIs, also installed and instantiated the chaincode in blockchain network. Now when I change some code logic in my rest server or sometime in chaincode, I must remove all docker containers I have installed and initialize network from beginning. Can I do that no need to remove all docker container and initialized again? When I did not remove docker container, fabric through errors like this:``` Unable to initialize the Fabric SDK: Failed to create channel: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: NewAtomicBroadcastClient failed: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded. [fabsdk/fab] 2018/04/26 02:03:32 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = chaincode error (status: 500, message: chaincode exists mycc)] Unable to install and instantiate the chaincode: Failed to instantiate chaincode mycc: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Unknown Code: (500) UNKNOWN. Description: chaincode exists mycc```

titoe218 (Thu, 26 Apr 2018 02:12:29 GMT):
@aleksandar.likic I have initialized fabric go sdk to create channel & join peers to that channel, and created Go REST server listen to client request through my APIs, also installed and instantiated the chaincode in blockchain network. Now when I change some code logic in my rest server or sometime in chaincode, I must remove all docker containers I have installed and initialize network from beginning. Can I do that no need to remove all docker container and initialized again?``` When I did not remove docker container, fabric through errors like this: Unable to initialize the Fabric SDK: Failed to create channel: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: NewAtomicBroadcastClient failed: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded.``` [fabsdk/fab] 2018/04/26 02:03:32 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = chaincode error (status: 500, message: chaincode exists mycc)] Unable to install and instantiate the chaincode: Failed to instantiate chaincode mycc: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Unknown Code: (500) UNKNOWN. Description: chaincode exists mycc ``` ```

titoe218 (Thu, 26 Apr 2018 02:12:29 GMT):
@aleksandar.likic I have initialized fabric go sdk to create channel & join peers to that channel, and created Go REST server listen to client request through my APIs, also installed and instantiated the chaincode in blockchain network. Now when I change some code logic in my rest server or sometime in chaincode, I must remove all docker containers I have installed and initialize network from beginning. Can I do that no need to remove all docker container and initialized again? When I did not remove docker container, fabric through errors like this:``` Unable to initialize the Fabric SDK: Failed to create channel: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: NewAtomicBroadcastClient failed: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded. [fabsdk/fab] 2018/04/26 02:03:32 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = chaincode error (status: 500, message: chaincode exists mycc)] Unable to install and instantiate the chaincode: Failed to instantiate chaincode mycc: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Unknown Code: (500) UNKNOWN. Description: chaincode exists mycc``` ``` ```

jriachi (Thu, 26 Apr 2018 05:12:37 GMT):
@Norberthu That did it. I was deleting the chaincode images from docker during the cleanup process. By leaving them untouched I was able to restart the system as per your recommendation. Thanks.

nmarcetic (Thu, 26 Apr 2018 08:55:51 GMT):
@titoe218 Good question I would also like to know this. For chaincode I am sure that you must re-deploy e.g kill dockers and start over or deploy a new version of the contract. Its immutable that's the way how all BC contracts/chaincode works, on Ethereum you must re-deploy cotract and do migration.

nmarcetic (Thu, 26 Apr 2018 08:57:38 GMT):
for your rest server, you don't need to reset the network when you change the code I am sure :) Its just a client for Fabric, nothing related to the network

nmarcetic (Thu, 26 Apr 2018 08:58:32 GMT):
From you error `Unable to install and instantiate the chaincode:` ` Description: chaincode exists mycc` I think you are trying to install and instantiate chaincode again and again and this is a action that you should do it only once, not every time

nmarcetic (Thu, 26 Apr 2018 08:59:22 GMT):
Only when you are deploying your chaincode

nmarcetic (Thu, 26 Apr 2018 08:59:30 GMT):
or the new version of you chaincode

soladnet (Thu, 26 Apr 2018 10:47:16 GMT):
Has joined the channel.

aleksandar.likic (Thu, 26 Apr 2018 11:27:39 GMT):
@titoe218 @nmarcetic "chaincode exists" is pretty clear, *the same version* of the chaincode has been installed/instantiated already. If you are making changes to already installed and instantiated chaincode (say version v0), you have two options: 1) install the new version of chaincode (specify the next version) and upgrade the chaincode to the new version. 2) delete the chaincode images so you can start installing/upgrading from v0 again: $ docker images | grep $ docker rmi

aleksandar.likic (Thu, 26 Apr 2018 11:27:39 GMT):
@titoe218 @nmarcetic "chaincode exists" is pretty clear, *the same version* of the chaincode has been installed/instantiated already. If you are making changes to already deployed and instantiated chaincode (say version v0), you have two options: 1) deploy the new version of chaincode (specify the next version) and upgrade the chaincode to the new version. 2) delete the chaincode images so you can start deploying/upgrading from v0 again: $ docker images | grep $ docker rmi

aleksandar.likic (Thu, 26 Apr 2018 11:27:39 GMT):
@titoe218 @nmarcetic "chaincode exists" is pretty clear, *the same version* of the chaincode has been installed/instantiated already. If you are making changes to already deployed and instantiated chaincode (say version v0), you have two options: 1) install the new version of chaincode (specify the next version) and upgrade the chaincode to the new version. 2) delete the chaincode images so you can start deploying/upgrading from v0 again: $ docker images | grep $ docker rmi

nmarcetic (Thu, 26 Apr 2018 12:29:20 GMT):
@aleksandar.likic :+1: Thanks

shiyj (Thu, 26 Apr 2018 16:32:00 GMT):
Has joined the channel.

david_dornseifer (Thu, 26 Apr 2018 19:11:34 GMT):
Has joined the channel.

david_dornseifer (Thu, 26 Apr 2018 19:17:15 GMT):
Hi, just wondering, is there a way that I can use the sdk to join a bunch of peers to different channels and also isolate the chaincode operations on those channels? I can join and install via ```target``` field. But Instantiate for example triggers the SDK to connect the eventbus to all peers in my config and waiting for the tx_event. Since that just one peer is connected to the channel I get the ```instantiateOrUpgradeCC timed out or cancelled``` error back.

titoe218 (Fri, 27 Apr 2018 01:16:10 GMT):
Thanks @nmarcetic @aleksandar.likic so much. Really appreciate! :)

titoe218 (Fri, 27 Apr 2018 01:18:05 GMT):
Does anyone know how to extract transaction details from the block? @nmarcetic @aleksandar.likic

aleksandar.likic (Fri, 27 Apr 2018 12:27:06 GMT):
@titoe218 https://github.com/securekey/fabric-examples/blob/bbef69c35b6aa443a13cf5c9a160d47cabe92350/fabric-cli/cmd/fabric-cli/printer/blockprinter.go#L151

aleksandar.likic (Fri, 27 Apr 2018 12:27:06 GMT):
@titoe218 https://github.com/securekey/fabric-examples/blob/bbef69c35b6aa443a13cf5c9a160d47cabe92350/fabric-cli/cmd/fabric-cli/printer/blockprinter.go#L151

aleksandar.likic (Fri, 27 Apr 2018 13:24:23 GMT):
hj

MaximeAubanel (Fri, 27 Apr 2018 14:37:57 GMT):
Did someone already succeed to retrieve a user affiliation within the chaincode ? I'm able to retrive attributes not affiliation.

aleksandar.likic (Fri, 27 Apr 2018 14:43:26 GMT):
@MaximeAubanel this is not SDK related, you might have more luck on some other channel that is more focused on chaincode.

troyronda (Fri, 27 Apr 2018 14:45:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zb75BKEkYA4An8XaT) @MaximeAubanel @MaximeAubanel @nmarcetic FYI - the config mechanisms have been refactored. If you don't want to use a YAML file, you can supply your own ConfigBackend (basically a key/value lookup). You are now also able to supply a set of ConfigBackends. This allows, for example, a template config with your generic settings and an override config.

troyronda (Fri, 27 Apr 2018 14:45:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zb75BKEkYA4An8XaT) @MaximeAubanel @nmarcetic FYI - the config mechanisms have been refactored. If you don't want to use a YAML file, you can supply your own ConfigBackend (basically a key/value lookup). You are now also able to supply a set of ConfigBackends. This allows, for example, a template config with your generic settings and an override config.

troyronda (Fri, 27 Apr 2018 14:45:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zb75BKEkYA4An8XaT) @MaximeAubanel @nmarcetic FYI - the config mechanisms have been refactored. If you don't want to use a YAML file, you can supply your own ConfigBackend (basically a key/value lookup interface). You are now also able to supply a set of ConfigBackends. This allows, for example, a template config with your generic settings and an override config.

troyronda (Fri, 27 Apr 2018 14:48:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bkMSftF6HSZ9wMRbF) FYI - the config impl has been refactored ^^^

troyronda (Fri, 27 Apr 2018 14:48:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bkMSftF6HSZ9wMRbF) @StevenXu @gen_el FYI - the config impl has been refactored ^^^

troyronda (Fri, 27 Apr 2018 14:55:15 GMT):
There is also WIP to show a minimal config integration test.

troyronda (Fri, 27 Apr 2018 14:55:15 GMT):
There is also WIP to show a minimal config integration test ( @Baha-sk ).

MaximeAubanel (Fri, 27 Apr 2018 14:58:19 GMT):
@aleksandar.likic Yup, my mad, I wanted to write to the #fabric-ca chan, sorry :)

Baha-sk (Fri, 27 Apr 2018 15:52:48 GMT):
Integration test with a minimal interface functions (mimicking config file content) is about to be pushed soon...

troyronda (Fri, 27 Apr 2018 16:02:50 GMT):
yay

govinda-attal (Sat, 28 Apr 2018 02:02:50 GMT):
Hello Guys, For Client applications using fabric-sdk-go we use config.yaml and we specify urls or peer and orderer(s) to connect to Something similar to https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml. Please note I want to specify some externally accessible IP address for orderer or maybe a DNS record later that makes more sense which could be some sort of alias to what we specify on configtx.yaml. ----- config.yaml ---- orderers: orderer.example.com: url: grpc://XX.XX.XX.XX:7050 ----- config.yaml ---- I thought this configuration should be enough for it to connect to Hyperledger Orderer to submit transactions. But when experimenting around, I found that it the client application somehow finds out that it tries to dial orderer url what we specify as one of the orderer 'Addresses' in 'configtx.yaml' used during fabric network setup. I am not sure how did it find out? Nothing like that is directly specified in config.yaml for client application. Also, I think this address is more like an internal address that was when we stood up the fabric network. I could be wrong and happy to be corrected. ----- configtx.yaml ----- Orderer: &OrdererDefaults # Orderer Type: The orderer implementation to start # Available types are "solo" and "kafka" OrdererType: solo Addresses: - orderer.example.com:7050 ----- configtx.yaml ----- I was able to verify with break-points that fabric-sdk-go in its orderer.go somehow knows that orderer url is orderer.example.com, but not what I directly specified in config.yaml XX.XX.XX.XX:7050 I found this a bit hard to understand. Could you please help.

troyronda (Sat, 28 Apr 2018 02:30:21 GMT):
@govinda-attal yes - the Go SDK uses the configuration in the config block to determine the orderer. It's an outstanding issue to resolve this confusion with the config file.

troyronda (Sat, 28 Apr 2018 02:30:21 GMT):
@govinda-attal yes - the Go SDK uses the configuration in the config block to determine the orderer. It's an outstanding issue to resolve this orderer confusion with the config file.

troyronda (Sat, 28 Apr 2018 02:30:44 GMT):
the good news is that you can map URLs with the SDK config

troyronda (Sat, 28 Apr 2018 02:30:55 GMT):
the entity mappers section does this

troyronda (Sat, 28 Apr 2018 02:31:19 GMT):
so you can map whatever you have in the config block to an externally accessible URL

troyronda (Sat, 28 Apr 2018 02:32:12 GMT):
example of a URL mapper for orderer is here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml#L49

zjqpower (Sat, 28 Apr 2018 02:47:18 GMT):
Has joined the channel.

govinda-attal (Sat, 28 Apr 2018 03:02:32 GMT):
@troyronda ! Fantastic, you are always helpful! Many thanks

oqf (Sun, 29 Apr 2018 10:29:03 GMT):
Has joined the channel.

muhammad (Sun, 29 Apr 2018 14:38:36 GMT):
Hello, I try with [fabcar](https://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html) example using go-sdk, and when I use [Execute](https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Client.Execute) function to create a request (proposal) and send it, I get this error: ‘calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050]’ go code: ```ctxCh := sdk.ChannelContext("mychannel", fabsdk.WithUser("user1")) chClient, err := channel.New(ctxCh) if err != nil { log.Fatalln("error from New channel", err) } req := channel.Request{ ChaincodeID: "fabcar", Fcn: "createCar", Args: [][]byte{[]byte("CAR10"), []byte("Honda"), []byte("Accord"), []byte("Black"), []byte("Tom")}, } resp, err := chClient.Execute(req) if err != nil { log.Fatalln("error from Execute =", err) }``` my config.yaml ```channels: # name of the channel mychannel: orderers: - orderer.example.com orderers: orderer.example.com: url: grpc://localhost:7050 # these are standard properties defined by the gRPC library # they will be passed in as-is to gRPC client constructor grpcOptions: ssl-target-name-override: orderer.example.com tlsCACerts: # Certificate location absolute path path: ./crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem``` How I can fix it?

muhammad (Sun, 29 Apr 2018 14:38:36 GMT):
Hello, I try with [fabcar](https://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html) example using go-sdk, and when I use [Execute](https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Client.Execute) function to create a request (proposal) and send it, I get this error: 'calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050]' go code: ```ctxCh := sdk.ChannelContext("mychannel", fabsdk.WithUser("user1")) chClient, err := channel.New(ctxCh) if err != nil { log.Fatalln("error from New channel", err) } req := channel.Request{ ChaincodeID: "fabcar", Fcn: "createCar", Args: [][]byte{[]byte("CAR10"), []byte("Honda"), []byte("Accord"), []byte("Black"), []byte("Tom")}, } resp, err := chClient.Execute(req) if err != nil { log.Fatalln("error from Execute =", err) }``` my config.yaml ```channels: # name of the channel mychannel: orderers: - orderer.example.com orderers: orderer.example.com: url: grpc://localhost:7050 # these are standard properties defined by the gRPC library # they will be passed in as-is to gRPC client constructor grpcOptions: ssl-target-name-override: orderer.example.com tlsCACerts: # Certificate location absolute path path: ./crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem``` How I can fix it?

muhammad (Sun, 29 Apr 2018 14:38:36 GMT):
Hello, I try with [fabcar](https://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html) example using go-sdk, and when I use [Execute](https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Client.Execute) function to create a request (proposal) and send it, I get this error: `calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050]` go code: ```ctxCh := sdk.ChannelContext("mychannel", fabsdk.WithUser("user1")) chClient, err := channel.New(ctxCh) if err != nil { log.Fatalln("error from New channel", err) } req := channel.Request{ ChaincodeID: "fabcar", Fcn: "createCar", Args: [][]byte{[]byte("CAR10"), []byte("Honda"), []byte("Accord"), []byte("Black"), []byte("Tom")}, } resp, err := chClient.Execute(req) if err != nil { log.Fatalln("error from Execute =", err) }``` my config.yaml ```channels: # name of the channel mychannel: orderers: - orderer.example.com orderers: orderer.example.com: url: grpc://localhost:7050 # these are standard properties defined by the gRPC library # they will be passed in as-is to gRPC client constructor grpcOptions: ssl-target-name-override: orderer.example.com tlsCACerts: # Certificate location absolute path path: ./crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem``` How I can fix it?

troyronda (Sun, 29 Apr 2018 18:43:14 GMT):
@muhammad it looks like the config block has orderer.example.com not localhost (so the SDK is trying to connect to orderer.example.com)

troyronda (Sun, 29 Apr 2018 18:43:49 GMT):
Similar to @govinda-attal right before your post.

troyronda (Sun, 29 Apr 2018 18:45:08 GMT):
@sudeshrshetty perhaps you have more info

sudeshrshetty (Sun, 29 Apr 2018 18:51:51 GMT):
@muhammad Refer https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml and https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_orderers_peers.yaml for samples about how to override orderer URLs

muhammad (Sun, 29 Apr 2018 20:50:22 GMT):
I added ```entityMatchers: orderer: - pattern: (\w+).example.(\w+) urlSubstitutionExp: grpc://localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.example.com mappedHost: orderer.example.com``` to config.yaml and worked fine, @troyronda @sudeshrshetty thank you guys for help

muhammad (Sun, 29 Apr 2018 20:50:22 GMT):
I added ```entityMatchers: orderer: - pattern: (\w+).example.(\w+) urlSubstitutionExp: grpc://localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.example.com mappedHost: orderer.example.com``` to config.yaml, and worked fine, @troyronda @sudeshrshetty thank you guys for help

sudeshrshetty (Sun, 29 Apr 2018 21:11:37 GMT):
@muhammad you are welcome

metalog (Mon, 30 Apr 2018 09:26:42 GMT):
Has joined the channel.

e-nikolov (Mon, 30 Apr 2018 09:45:58 GMT):
as far as I understand it, at the moment a user's private key is identified in the CryptoSuite via the SKI of its public key (the GetKey(ski []byte) (k Key, err error) function), but in Vault each key has a path by which it is identified and that path is different to the SKI. Would it be acceptable to make the SKI() function for vault keys return the vault path for the vault implementation, or should I do a separate mapping?

e-nikolov (Mon, 30 Apr 2018 09:45:58 GMT):
as far as I understand it, at the moment a user's private key is identified in the CryptoSuite via the SKI of its public key (the GetKey(ski []byte) (k Key, err error) function), but in Vault each key has a path by which it is identified and that path is different to the SKI. Would it be acceptable to make the SKI() function for vault keys return the vault path for the vault implementation, or should I do a separate mapping between the ski and the path?

nmarcetic (Mon, 30 Apr 2018 13:05:27 GMT):
Hey folks , new problems :) Any idea ``` event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (2) Unknown. Description: Failed to deserialize creator identity, err MSP org1.example.com is unknown exit status 3 ``` I am using minimal network setup for chaincode development https://github.com/hyperledger/fabric-samples/tree/release-1.1/chaincode-docker-devmode

nmarcetic (Mon, 30 Apr 2018 13:05:46 GMT):
trying to call chaincode using sdk

divyank (Mon, 30 Apr 2018 15:16:00 GMT):
@nmarcetic It looks like the peer is unable to verify the signature on a request made by the SDK. You should check your MSP ID to make sure it matches what you have in the channel configuration: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L207

nmarcetic (Mon, 30 Apr 2018 15:17:12 GMT):
@divyank Thank you for you help. I have ` mspid: org1` but dunno what's the valid `mspid` for https://github.com/hyperledger/fabric-samples/tree/release-1.1/chaincode-docker-devmode and how to check, any idea ?

nmarcetic (Mon, 30 Apr 2018 15:19:26 GMT):
I am not even 100% sure that I can use https://github.com/hyperledger/fabric-samples/tree/release-1.1/chaincode-docker-devmode with sdk, don't see any config for this dev mode

divyank (Mon, 30 Apr 2018 15:32:54 GMT):
Each peer has a local MSP ID: https://github.com/hyperledger/fabric/blob/release-1.1/sampleconfig/core.yaml#L328 And each channel has a list of MSPs that are part of the channel https://github.com/hyperledger/fabric/blob/release-1.1/sampleconfig/configtx.yaml#L237

divyank (Mon, 30 Apr 2018 15:34:30 GMT):
I don't see any reason for not being able to use the chaincode dev mode with the SDK. It just means that the user starts the chaincode docker container and not the peer, installing and instantiating like you normally would.

divyank (Mon, 30 Apr 2018 15:35:24 GMT):
From your error message it looks like the MSP ID on your request is being set to `org1.example.com`, which the peer does not recognize.

divyank (Mon, 30 Apr 2018 15:36:36 GMT):
It should be set to one of the MSPs on the channel that you are transacting on.

troyronda (Mon, 30 Apr 2018 15:54:02 GMT):
(@nmarcetic ^^^)

nmarcetic (Mon, 30 Apr 2018 15:54:19 GMT):
checking

sbopanna (Mon, 30 Apr 2018 18:21:00 GMT):
Has joined the channel.

sbopanna (Mon, 30 Apr 2018 18:22:05 GMT):
Hi - Does someone have a sample program in GO to interact with the hyperledger fabric and step by step instructions to run the same successfully on a local network?

troyronda (Mon, 30 Apr 2018 18:28:27 GMT):
@sbopanna @antitoine [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wZqNXemBLpt3S6Kb7) @antitoine

troyronda (Mon, 30 Apr 2018 18:28:27 GMT):
@sbopanna @antitoine [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wZqNXemBLpt3S6Kb7)

hihiboss (Tue, 01 May 2018 14:48:34 GMT):
Has joined the channel.

titoe218 (Wed, 02 May 2018 07:05:57 GMT):
Hi @troyronda @aleksandar.likic , does anyone know how to fix this error? `proto: bad wiretype for field peer.TransactionAction.Header: got wiretype 0, want 2` It happens when I call function `func (c *Client) QueryTransaction(transactionID fab.TransactionID, options ...RequestOption) (*pb.ProcessedTransaction, error)` to extract transaction details from block?

titoe218 (Wed, 02 May 2018 07:05:57 GMT):
Hi @troyronda @aleksandar.likic , does anyone know how to fix this error? `proto: bad wiretype for field peer.TransactionAction.Header: got wiretype 0, want 2` It happens when I use function `func (c *Client) QueryTransaction(transactionID fab.TransactionID, options ...RequestOption) (*pb.ProcessedTransaction, error)` to extract transaction details from block?

e-nikolov (Wed, 02 May 2018 08:44:23 GMT):
@troyronda I pushed a WIP version of the vault CryptoSuite at https://gerrit.hyperledger.org/r/#/c/21287/ Can you guys give me some preliminary feedback on my general approach?

e-nikolov (Wed, 02 May 2018 09:58:47 GMT):
also vault's sdk requires go 1.10, while the fabric sdk claims it supports go 1.9

e-nikolov (Wed, 02 May 2018 09:58:55 GMT):
would that be an issue?

aleksandar.likic (Wed, 02 May 2018 10:27:44 GMT):
@titoe218 looks like a problem with fabric grpc protos. SDK copies all fabric dependencies (including protos) under https://github.com/hyperledger/fabric-sdk-go/tree/master/third_party/github.com/hyperledger/fabric and imports from there. This is done so the client doesn't need to depend on fabric directly (all you vendor is the SDK). Do you import any fabric protos directly? Can you make sure that you import protos from SDK, like in https://github.com/securekey/fabric-examples/blob/master/fabric-cli/cmd/fabric-cli/printer/blockprinter.go ?

troyronda (Wed, 02 May 2018 18:40:53 GMT):
@aleksandar.likic @e-nikolov we should probably update the README to Go 1.10. The CI is only testing 1.10 right now.

troyronda (Wed, 02 May 2018 20:14:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7A9TbirdKvYpdre4j) @ga25waq Fix is https://gerrit.hyperledger.org/r/c/21319/ (merged)

troyronda (Wed, 02 May 2018 20:29:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bRZbeoBFWxGYN5rTb) @antitoine @sudeshrshetty there has been some recent fixes to entity matching & configuration.

Chalex (Thu, 03 May 2018 03:16:13 GMT):
Hi. What's the relation between `fabric` and `fabric-sdk`? Did `peer` command also interact with the ledger via `fabric-sdk`?

binhn (Thu, 03 May 2018 13:14:14 GMT):
Has joined the channel.

binhn (Thu, 03 May 2018 13:21:57 GMT):
`fabric-sdk-*` provide language specific and abstraction on top of `fabric` API to facilitate application development. The `peer` CLI currently is not build on `fabric-sdk-go`. There's work on this https://jira.hyperledger.org/browse/FAB-4610

binhn (Thu, 03 May 2018 13:21:57 GMT):
`fabric-sdk-*` provide language specific and abstraction on top of `fabric` API to facilitate application development. The `peer` CLI currently is not built on `fabric-sdk-go`, but some on going work here https://jira.hyperledger.org/browse/FAB-4610

binhn (Thu, 03 May 2018 13:22:10 GMT):
@Chalex ^^

nmarcetic (Thu, 03 May 2018 14:43:07 GMT):
Hey folks , new day new errors :) If someone have idea, would really appreciate help ``` QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (2) Unknown. Description: Failed to deserialize creator identity, err the supplied identity is not valid: x509: certificate signed by unknown authority exit status 3 ```

nmarcetic (Thu, 03 May 2018 14:43:38 GMT):
` certificate signed by unknown authority` I am using cryptogen for sdk certs and fabric-ca for users

aleksandar.likic (Thu, 03 May 2018 19:15:03 GMT):
@nmarcetic checkout https://github.com/hyperledger/fabric-ca/blob/release-1.1/docs/source/users-guide.rst#troubleshooting, point 4

TungLuu (Fri, 04 May 2018 01:36:33 GMT):
Has joined the channel.

Chalex (Fri, 04 May 2018 02:25:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yeBYiir8w754Hk3nz) @binhn Thank you for your answer. Because it seem I can do almost the same thing with `peer` command and `fabric-sdk`. So i was just confused by their relation.

smallX (Fri, 04 May 2018 05:27:09 GMT):
#fabric-samples

nmarcetic (Fri, 04 May 2018 08:41:59 GMT):
@aleksandar.likic This doc is exactly what I need ;) Thanks a lot!

ondar07 (Fri, 04 May 2018 08:55:47 GMT):
Has left the channel.

whoami 1 (Sat, 05 May 2018 03:15:30 GMT):
Has joined the channel.

whoami 1 (Sat, 05 May 2018 03:37:06 GMT):
when I run fabric-sdk-go/test/integration/fab/main_test.go to install & instantiate chaincode. the install is success, but instantiate failed. It seems to connet orderer peer use cache, can't find kye "orderer.example.com:7050". When I change orderers config “orderer.example.com” to "orderer.example.com:7050" in config_test.yaml , then instantiate chaincode success . The key make me confused, or something wrong with me ? How to understand cache in sdk.

whoami 1 (Sat, 05 May 2018 03:37:06 GMT):
when I run fabric-sdk-go/test/integration/fab/main_test.go to install & instantiate chaincode. the install is success, but instantiate failed. It seems to connet orderer peer use cache, can't find kye "orderer.example.com:7050". When I change orderers config “orderer.example.com” to "orderer.example.com:7050" in config_test.yaml , then instantiate chaincode success . The key make me confused, or something wrong with me ? How to understand cache in sdk. [fabsdk/fab] 2018/04/28 08:01:32 UTC - comm.cache -> DEBU updating existing connection in connection janitor [fabsdk/fab] 2018/04/28 08:04:39 UTC - comm.sweep -> DEBU connection janitor closing connection [106.37.72.153:9051] [fabsdk/fab] 2018/04/28 08:04:39 UTC - comm.(*CachingConnector).removeConn -> DEBU removing connection [106.37.72.153:9051] [fabsdk/fab] 2018/04/28 08:04:39 UTC - comm.janitor -> DEBU closing connection janitor [fabsdk/fab] 2018/04/28 08:07:37 UTC - channel.orderersFromChannelCfg -> DEBU Failed to get channel Cfg orderer [orderer.example.com:7050] from ordererDict, now trying orderer Matchers in Entity Matchers [fabsdk/fab] 2018/04/28 08:08:50 UTC - fab.(*EndpointConfig).OrdererConfig -> DEBU Could not find Orderer for [orderer.example.com:7050], trying with Entity Matchers [fabsdk/fab] 2018/04/28 08:09:50 UTC - channel.orderersFromChannelCfg -> DEBU Unable to find matching ordererConfig from entity Matchers for channel Cfg Orderer [orderer.example.com:7050] [fabsdk/fab] 2018/04/28 08:10:20 UTC - channel.orderersFromChannelCfg -> DEBU Created a new OrdererConfig with URL as [orderer.example.com:7050]

whoami 1 (Sat, 05 May 2018 03:37:06 GMT):
when I run fabric-sdk-go/test/integration/fab/main_test.go to install & instantiate chaincode. the install is success, but instantiate failed. It seems to connet orderer peer use cache, can't find kye "orderer.example.com:7050". When I change orderers config “orderer.example.com” to "orderer.example.com:7050" in config_test.yaml , then instantiate chaincode success . The key make me confused, or something wrong with me ? How to understand cache in sdk. [fabsdk/fab] comm.cache -> DEBU updating existing connection in connection janitor [fabsdk/fab] comm.sweep -> DEBU connection janitor closing connection [172.17.0.3:9051] [fabsdk/fab] comm.(*CachingConnector).removeConn -> DEBU removing connection [172.17.0.3:9051] [fabsdk/fab] comm.janitor -> DEBU closing connection janitor [fabsdk/fab] channel.orderersFromChannelCfg -> DEBU Failed to get channel Cfg orderer [orderer.example.com:7050] from ordererDict, now trying orderer Matchers in Entity Matchers [fabsdk/fab] fab.(*EndpointConfig).OrdererConfig -> DEBU Could not find Orderer for [orderer.example.com:7050], trying with Entity Matchers [fabsdk/fab] channel.orderersFromChannelCfg -> DEBU Unable to find matching ordererConfig from entity Matchers for channel Cfg Orderer [orderer.example.com:7050] [fabsdk/fab] channel.orderersFromChannelCfg -> DEBU Created a new OrdererConfig with URL as [orderer.example.com:7050]

sudeshrshetty (Sat, 05 May 2018 22:08:48 GMT):
@whoami 1 Can you share the config file you used?

whoami 1 (Mon, 07 May 2018 02:41:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dsEKdh8iJfxYTjJpS) @sudeshrshetty I use *fabric-sdk-go/test/fixtures/config/config_test.yaml* , just change the url value *from domain to ip* of orderers and peers . Such as: orderers: orderer.example.com: # url: orderer.example.com:7050 url: 172.17.0.2:9050

TungLuu (Mon, 07 May 2018 08:32:13 GMT):
Hi everyone, I want to build my own Fabric CA to generate crypto, certs materials for peers, orderer, admin, user, ... to build up Fabric network without using cryptogen tool. Are there any tutorials or documents about it?

whoami 1 (Mon, 07 May 2018 13:17:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=cg8sjsdrpF5mLLaCt) @sudeshrshetty I update the code *_from commit-id 830bdea to 914555e_*, the question disappeared ...

whoami 1 (Mon, 07 May 2018 13:17:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=cg8sjsdrpF5mLLaCt) @sudeshrshetty I update the code from commit-id *_830bdea to 914555e_*, the question disappeared ...

lsenta (Mon, 07 May 2018 13:37:27 GMT):
Has joined the channel.

JigneshVasoya (Mon, 07 May 2018 17:20:17 GMT):
Has joined the channel.

JigneshVasoya (Mon, 07 May 2018 17:20:34 GMT):
How stable is fabric-go-sdk?

habpygo (Mon, 07 May 2018 18:25:51 GMT):
Hi everyone, could anyone help with the following. I have a two orgs, two peers each and peer0's of both orgs being endorsers. I have taken the `multiple_orgs_test.go` as starting point. I see the following errors when firing up the network: a) In the terminal after some warning messages that getting orderers from endpoint is depreciated ``` sending deploy transaction proposal failed: Transaction processing for endorser [peer0.UMCorganisation.umc.com:7051]: Chaincode status Code: (500) UNKNOWN. Description: chaincode exists umcCC ``` From the docker logs of peer0: ``` [endorser] ProcessProposal -> ERRO 03d simulateProposal() resulted in chaincode response status 500 for txid: 362ad1b4735bdeed6984f427e084806d333f1880cb476c025a1698812d597137 ``` Also, sometimes(!) the channel won't be created giving the error: ``` get channel config failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [peer0.UMCorganisation.umc.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.UMCorganisation.umc.com:7051] ``` Thanks.

sudeshrshetty (Mon, 07 May 2018 21:25:10 GMT):
@habpygo Are you using latest fabric-sdk-go?

habpygo (Tue, 08 May 2018 06:54:44 GMT):
Yes, I think so. I’m working on fabric-sdk-go v1.0.0-alpha3 72a5fdb4 (HEAD -> master, origin/master, origin/HEAD) [FAB-9808] override orderers configuration. And with Golang v1.10

titoe218 (Tue, 08 May 2018 10:41:29 GMT):
Hi @troyronda , @aleksandar.likic , does anyone knows how to fix this error? `Failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (2) Unknown. Description: access denied: channel [my-channel] creator org [Org1MSP]`

dimaxgl (Tue, 08 May 2018 11:52:03 GMT):
Has joined the channel.

Norberthu (Tue, 08 May 2018 11:55:11 GMT):
ggit

habpygo (Tue, 08 May 2018 12:25:23 GMT):
Exactly the same problem here @titoe218 , see two messages above; however, in my case it’s not always occurring, but seemingly at random. Hopefully @sudeshrshetty is on to it.

habpygo (Tue, 08 May 2018 12:27:28 GMT):
:pray:

sudeshrshetty (Tue, 08 May 2018 17:01:17 GMT):
There should be a detailed error for this in your peer log

sudeshrshetty (Tue, 08 May 2018 17:01:20 GMT):
https://github.com/hyperledger/fabric/blob/release-1.1/core/common/validation/msgvalidation.go#L103

sudeshrshetty (Tue, 08 May 2018 17:07:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kuHvDrnq8RPQAp5Ba) @habpygo Please make sure you have the latest since we made some changes in SDK to accomodate https://gerrit.hyperledger.org/r/#/c/15737/ (chaincode errors coming as a part of proposal response with failure status)

sudeshrshetty (Tue, 08 May 2018 17:07:49 GMT):
let me know if you still face that issue after this update

Kyroy (Wed, 09 May 2018 06:57:39 GMT):
Hey, I am using `logging.SetLevel("fabsdk/fab", logging.WARNING)` with the `"github.com/hyperledger/fabric-sdk-go/pkg/common/logging"` package. However, I get a LOT if `DEBU` logs from the sdk like `[fabsdk/fab] 2018/05/09 06:57:15 UTC - fab.(*EndpointConfig).PeerConfig -> DEBU Found [...]`

titoe218 (Wed, 09 May 2018 07:38:33 GMT):
Does any knows why I change chaincode id, func QueryTransaction return rwset.TxReadWriteSet nil?

nmarcetic (Wed, 09 May 2018 09:19:20 GMT):
Hey Folks, question ``` event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (2) Unknown. Description: Failed to deserialize creator identity, err MSP org1.example.com is unknown ``` I know it can be a lot of stuff, but if someone had idea what should I look etc.. Would really appreciate any advice :)

Kyroy (Wed, 09 May 2018 09:20:12 GMT):
I think I found a bug :D in this function https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/ledger/ledger.go#L213 When I use `ledger.WithTargetURLs(p)`, where `p = "peer0.org1.example.com` the logs still show that all peers are used: localhost:7051: peer0.org1.example.com ``` [fabsdk/fab] 2018/05/09 09:06:05 UTC - fab.(*EndpointConfig).PeerConfig -> DEBU Found MatchingPeerConfig for name/url [localhost:7051] [fabsdk/fab] 2018/05/09 09:06:05 UTC - fab.(*EndpointConfig).PeerConfig -> DEBU Found MatchingPeerConfig for name/url [localhost:7151] ``` and so I get the `access denied: channel [my-test-channel] creator org [Org1MSP]` because peer1 is not part of the channel

Kyroy (Wed, 09 May 2018 09:20:12 GMT):
I think I found a bug :D in this function https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/ledger/ledger.go#L213 When I use `ledger.WithTargetURLs(p)`, where `p = "peer0.org1.example.com` the logs still show that all peers are used: localhost:7051: peer0.org1.example.com localhost:751: peer1.org1.example.com ``` [fabsdk/fab] 2018/05/09 09:06:05 UTC - fab.(*EndpointConfig).PeerConfig -> DEBU Found MatchingPeerConfig for name/url [localhost:7051] [fabsdk/fab] 2018/05/09 09:06:05 UTC - fab.(*EndpointConfig).PeerConfig -> DEBU Found MatchingPeerConfig for name/url [localhost:7151] ``` and so I get the `access denied: channel [my-test-channel] creator org [Org1MSP]` because peer1 is not part of the channel

Kyroy (Wed, 09 May 2018 09:20:12 GMT):
I think I found a bug :D in this function https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/ledger/ledger.go#L213 When I use `ledger.WithTargetURLs(p)`, where `p = "peer0.org1.example.com` the logs still show that all peers are used: localhost:7051: peer0.org1.example.com localhost:7151: peer1.org1.example.com ``` [fabsdk/fab] 2018/05/09 09:06:05 UTC - fab.(*EndpointConfig).PeerConfig -> DEBU Found MatchingPeerConfig for name/url [localhost:7051] [fabsdk/fab] 2018/05/09 09:06:05 UTC - fab.(*EndpointConfig).PeerConfig -> DEBU Found MatchingPeerConfig for name/url [localhost:7151] ``` and so I get the `access denied: channel [my-test-channel] creator org [Org1MSP]` because peer1 is not part of the channel

Kyroy (Wed, 09 May 2018 09:30:10 GMT):
This is also true for: `ledger.WithTargetFilter`

Kyroy (Wed, 09 May 2018 09:49:45 GMT):
@nmarcetic `Failed to deserialize creator identity, err MSP` seems like you have set the mspid to `MSP`

nmarcetic (Wed, 09 May 2018 09:51:07 GMT):
@Kyroy Yea but `err MSP org1.example.com is unknown` sounds like `org1.example.com` is mspid right ?

nmarcetic (Wed, 09 May 2018 09:51:53 GMT):
I don't understand how to register mspid at all ? What's the mspid ? I see in config.yaml organization mspid but what to put there :) ?

Kyroy (Wed, 09 May 2018 09:52:32 GMT):
Which network do you use?

nmarcetic (Wed, 09 May 2018 09:53:29 GMT):
what do you mean by network ?

Kyroy (Wed, 09 May 2018 09:55:17 GMT):
You connect your sdk to a peer (`localhost:7051`). I guess you use docker-compose to start it? Take a look at the docker-compose.yaml and search for something like `CORE_PEER_LOCALMSPID=Org1MSP`

nmarcetic (Wed, 09 May 2018 10:02:18 GMT):
@Kyroy exactly I am using docker-compose , I see CORE_PEER_LOCALMSPID on both peer and orderer it should be the same value as in config.yaml mspid right ?

Kyroy (Wed, 09 May 2018 10:03:46 GMT):
I think in the orderer it should be `ORDERER_GENERAL_LOCALMSPID`. But you (for now) can ignore this value. The peer mspid is the interesting one. Use this in your config.yaml for the sdk ;)

nmarcetic (Wed, 09 May 2018 10:04:55 GMT):
Yea but what to put for mspid in config.yaml which value ? :)

nmarcetic (Wed, 09 May 2018 10:05:16 GMT):
What ever I want , e.g how to know/check my mspid :)

Kyroy (Wed, 09 May 2018 10:06:48 GMT):
check https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L25 and https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L206-L214

nmarcetic (Wed, 09 May 2018 10:10:46 GMT):
OK I see so mspid is some random string actually ? I can put what ever I want like they did https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L208

Kyroy (Wed, 09 May 2018 10:11:35 GMT):
No it is not random. It is based on the configuration of the peer and your crypto material

titoe218 (Wed, 09 May 2018 10:15:14 GMT):
Does anyone knows why I change chaincode id, func QueryTransaction from ledger client return rwset.Namespace is `lscc` not chaincode id?

nmarcetic (Wed, 09 May 2018 10:16:53 GMT):
@Kyroy I see but how they get `mspid: Org1MSP` ? They have Organizagtion Org1 and Org2 and mspid's Org1MSP and Org2MSP so its this a naming rule ? Organization name + MSP = Org1MSP ?

Kyroy (Wed, 09 May 2018 11:16:23 GMT):
@nmarcetic it is specified in the genesis.block, which can be generated from this file https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/fabric/v1.1/config/configtx.yaml#L64

Kyroy (Wed, 09 May 2018 11:16:23 GMT):
@nmarcetic it is specified in the genesis.block, which can be generated from this file https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/fabric/v1.1/config/configtx.yaml#L64 (one example)

nmarcetic (Wed, 09 May 2018 11:27:36 GMT):
@Kyroy OK I see now :) Let me check this, thanks a lot for your help, really appreciate!

victer (Wed, 09 May 2018 11:31:57 GMT):
Has joined the channel.

Ammu (Wed, 09 May 2018 13:12:31 GMT):
hi

sudeshrshetty (Wed, 09 May 2018 15:08:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xvE2ecy62e79FKdab) @Kyroy Let me have a look into this one

sudeshrshetty (Wed, 09 May 2018 15:15:21 GMT):
Are you calling `logging.SetLevel("fabsdk/fab", logging.WARNING)`, after 'sdk.New()' ? If you do it before, then log levels from your config will override earlier log levels set by you.

sudeshrshetty (Wed, 09 May 2018 15:15:21 GMT):
@Kyroy Are you calling `logging.SetLevel("fabsdk/fab", logging.WARNING)`, after 'sdk.New()' ? If you do it before, then log levels from your config will override earlier log levels set by you.

ga25waq (Wed, 09 May 2018 17:24:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gpDXNEpz7Ec4dqpJ9) @troyronda Thank you very much! By the way, is there already a more elegent way to get a user's signing identity than in base_test_setup.go:172 of package test/integration (marked with a TODO comment), or is this workaround still the only possibility?

titoe218 (Thu, 10 May 2018 07:47:23 GMT):
@Kyroy Hi, do you know what error means? `event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [ipaddress:7051]: gRPC Transport Status Code: (2) Unknown. Description: access denied: channel [my-channel] creator org [Org1MSP]`

titoe218 (Thu, 10 May 2018 08:30:46 GMT):
Does anyone knows what's error mean? `failed to retrieve channel config: Channel_Cfg_Cache - cache is closed`

titoe218 (Thu, 10 May 2018 08:30:46 GMT):
Does anyone knows what's error mean? `Transaction processing for endorser [192.168.15.102:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: connection creation failed: caching connector is closed`

titoe218 (Thu, 10 May 2018 08:30:46 GMT):
Does anyone knows what's error mean? `Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: connection creation failed: caching connector is closed`

llhl001 (Thu, 10 May 2018 09:26:27 GMT):
Has joined the channel.

paulkeogh (Thu, 10 May 2018 09:31:44 GMT):
Has joined the channel.

paulkeogh (Thu, 10 May 2018 09:34:38 GMT):
Can anyone confirm if the Go SDK works on Windows or not ? The documentation does not list supported platforms. I am currently seeing an error of - failed to initialize configuration: unable to load endpoint config: failed to initialize endpoint config from config backend: cert pool load failed: crypto/x509: system root pool is not available on Windows. This looks like a go issue to me and there is an issue open here - https://github.com/golang/go/issues/16736

habpygo (Thu, 10 May 2018 12:07:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=R3fZNrqcgNp5A4XaW) @sudeshrshetty Hi, that was indeed the problem. After I updated I got a valid response value after which I could debug. Thanks for the help!

troyronda (Thu, 10 May 2018 13:11:44 GMT):
@paulkeogh the CI tests run against linux and the contributors are generally using Mac or Linux VMs. We are happy to take contributions to fix Windows issues.

divyank (Thu, 10 May 2018 13:25:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DzSdgSWzByygrqyQs) @titoe218 This likely means you are using the SDK after calling fabsdk.Close() https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#FabricSDK.Close

titoe218 (Fri, 11 May 2018 02:02:07 GMT):
@divyank Does anyone know how to connect to network already have channel, peers joined channel using SDK?

titoe218 (Fri, 11 May 2018 02:02:07 GMT):
@divyank do you know how to connect to network already have channel, peers joined channel using SDK?

Kyroy (Fri, 11 May 2018 07:54:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ZtodvPhwTNSz5k8Jz) I only had this error when I tried to do an operation on a channel where the peer was not joined the channel

aleksandar.likic (Fri, 11 May 2018 13:44:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PHqgBuXDcdp6A5Cpp) @ga25waq https://gerrit.hyperledger.org/r/#/c/21697/ was just merged, to remove this old workaround in integration tests. msp.Client is responsible for identity management. It is organization specific, as each org manages its own users.

ga25waq (Fri, 11 May 2018 15:34:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=2HxwdJPvdR7F4zP2C) @aleksandar.likic Thanks, that looks good!

ga25waq (Fri, 11 May 2018 16:36:46 GMT):
@aleksandar.likic I've just discovered a nil pointer panic in the new MSP client: https://jira.hyperledger.org/browse/FAB-10016

Baha-sk (Fri, 11 May 2018 16:50:12 GMT):
@ga25waq it is normal to return a nil msp if it's not found, it's up the application to check if it's nil before using it.

Baha-sk (Fri, 11 May 2018 16:50:12 GMT):
@ga25waq it is normal to return a nil msp if it's not found, it's up to the application to check if it's nil before using it.

ga25waq (Fri, 11 May 2018 16:51:18 GMT):
@Baha-sk But in that case I would except an error.

Baha-sk (Fri, 11 May 2018 16:52:23 GMT):
that's debatable if an error must be returned for an msp not found

ga25waq (Fri, 11 May 2018 16:57:08 GMT):
@Baha-sk By the way, I've inspected the MSP client's New method. Nil for the client instance is only returned together with an error. So I guess the nil pointer panic is provoked in the GetSigningIdentity method itself.

Baha-sk (Fri, 11 May 2018 16:58:33 GMT):
ok, in this case, it's a valid bug.. GetSigningIdentity should't panic

Baha-sk (Fri, 11 May 2018 16:58:33 GMT):
ok, in this case, it's a valid bug.. GetSigningIdentity shouldn't panic

troyronda (Fri, 11 May 2018 17:08:12 GMT):
@Baha-sk @ga25waq @aleksandar.likic I don't think nil should be returned without an accompanying error (or boolean return value in some situations).

troyronda (Fri, 11 May 2018 17:08:46 GMT):
(regardless of whether or not there are underlying issues).

Baha-sk (Fri, 11 May 2018 17:09:14 GMT):
then an error should be returned (MSP not found)

aleksandar.likic (Fri, 11 May 2018 17:11:09 GMT):
@ga25waq thanks for creating the JIRA issue, I'll fix it asap.

Kyroy (Fri, 11 May 2018 18:07:12 GMT):
Is it possible to use the Dynamic Discovery Provider with fabric 1.1? And how? :D (https://github.com/hyperledger/fabric-sdk-go/commit/69158473b79fda797d2d19d9b8e6e79b86410d9e)

troyronda (Fri, 11 May 2018 18:28:08 GMT):
@Baha-sk @aleksandar.likic @bstasyszyn So from the review comments, there is a concern that having both a boolean and err return value adds complexity.

troyronda (Fri, 11 May 2018 18:32:14 GMT):
a few thoughts: * nil shouldn't be returned when err is nil. the value should be safe to use. (same comment as above). * it shouldn't be two steps to check for NotFound. (i.e., shouldn't have to do a cast AND then check a status code). * we could do just a cast to package.NotFound and check for only OK; we could do a comparison to an err value like package.ErrNotFound; or have a(n extra) NotFound boolean return.

aleksandar.likic (Fri, 11 May 2018 18:50:09 GMT):
I prefer ErrNotFound over having an extra boolean return.

aleksandar.likic (Fri, 11 May 2018 20:38:18 GMT):
@ga25waq https://gerrit.hyperledger.org/r/#/c/21711/ has been merged

ck01 (Sat, 12 May 2018 03:10:20 GMT):
Has joined the channel.

ck01 (Sat, 12 May 2018 03:10:38 GMT):
is fabric-sdk-go official yet?

rjain0701 (Sat, 12 May 2018 08:49:38 GMT):
Has joined the channel.

ga25waq (Sat, 12 May 2018 11:55:14 GMT):
@aleksandar.likic @troyronda Thanks for the fix! Is there a chance of a further tagged alpha version that can be referenced with go's dep?

troyronda (Sat, 12 May 2018 13:45:33 GMT):
@ga25waq yes. we would like to do so in the next week or two.

titoe218 (Mon, 14 May 2018 01:27:06 GMT):
@aleksandar.likic @troyronda Is Go SDK official yet?

dodangquan (Mon, 14 May 2018 03:33:39 GMT):
Has joined the channel.

nmarcetic (Mon, 14 May 2018 11:39:37 GMT):
Hey guys any idea what's happening here ``` orderer | 2018-05-14 11:09:45.639 UTC [orderer/common/broadcast] Handle -> WARN 0c9 [channel: myc] Rejecting broadcast of config message from 172.29.0.6:40374 because of error: error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application but was in the read set ```

nmarcetic (Mon, 14 May 2018 11:40:51 GMT):
################################################################################ # # Profile # # - Different configuration profiles may be encoded here to be specified # as parameters to the configtxgen tool # ################################################################################ Profiles: ExampleOrdererGenesis: Orderer: <<: *OrdererDefaults Organizations: - *org1 Consortiums: SampleConsortium: Organizations: - *org1 ExampleChannel: Consortium: SampleConsortium Application: <<: *ApplicationDefaults Organizations: - *org1 ################################################################################ # # Section: Organizations # # - This section defines the different organizational identities which will # be referenced later in the configuration. # ################################################################################ Organizations: # SampleOrg defines an MSP using the sampleconfig. It should never be used # in production but may be used as a template for other definitions - &org1 # DefaultOrg defines the organization which is used in the sampleconfig # of the fabric.git development environment Name: example.com # ID to load the MSP definition as ID: org1MSP MSPDir: crypto-config/peerOrganizations/org1.example.com/msp AnchorPeers: # AnchorPeers defines the location of peers which can be used # for cross org gossip communication. Note, this value is only # encoded in the genesis block in the Application section context - Host: peer0.org1.example.com Port: 7051 ################################################################################ # # SECTION: Orderer # # - This section defines the values to encode into a config transaction or # genesis block for orderer related parameters # ################################################################################ Orderer: &OrdererDefaults # Orderer Type: The orderer implementation to start # Available types are "solo" and "kafka" OrdererType: solo Addresses: - orderer.example.com:7050 # Batch Timeout: The amount of time to wait before creating a batch BatchTimeout: 2s # Batch Size: Controls the number of messages batched into a block BatchSize: # Max Message Count: The maximum number of messages to permit in a batch MaxMessageCount: 10 # Absolute Max Bytes: The absolute maximum number of bytes allowed for # the serialized messages in a batch. AbsoluteMaxBytes: 99 MB # Preferred Max Bytes: The preferred maximum number of bytes allowed for # the serialized messages in a batch. A message larger than the preferred # max bytes will result in a batch larger than preferred max bytes. PreferredMaxBytes: 512 KB # Organizations is the list of orgs which are defined as participants on # the orderer side of the network Organizations: ################################################################################ # # SECTION: Application # # - This section defines the values to encode into a config transaction or # genesis block for application related parameters # ################################################################################ Application: &ApplicationDefaults # Organizations is the list of orgs which are defined as participants on # the application side of the network Organizations:

nmarcetic (Mon, 14 May 2018 11:41:12 GMT):
this is my configtx.yaml ^T

nmarcetic (Mon, 14 May 2018 11:41:12 GMT):
this is my configtx.yaml ^

nmarcetic (Mon, 14 May 2018 12:19:12 GMT):
here is my orderer log ``` 2018-05-14 12:12:08.866 UTC [orderer/common/broadcast] Handle -> WARN 0c9 [channel: myc] Rejecting broadcast of config message from 172.29.0.6:41066 because of error: error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/example.com but was in the read set ```

nmarcetic (Mon, 14 May 2018 12:19:12 GMT):
@Baha-sk Same error when I replace `example.com` with `org1MSP` ``` 2018-05-14 12:12:08.866 UTC [orderer/common/broadcast] Handle -> WARN 0c9 [channel: myc] Rejecting broadcast of config message from 172.29.0.6:41066 because of error: error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/example.com but was in the read set ```

Baha-sk (Mon, 14 May 2018 16:35:42 GMT):
@nmarcetic can you replace `Name: example.com` with `Name: org1MSP` under Organization and try again?

Harlacher (Mon, 14 May 2018 20:17:23 GMT):
Has joined the channel.

nmarcetic (Tue, 15 May 2018 08:26:27 GMT):
@Baha-sk Sure, let me try

titoe218 (Tue, 15 May 2018 09:36:20 GMT):
Does anyone know how to connect to ca server and enroll a user as admin of Org using fabric sdk Go? Or have sample about this problem? I don't know how can do.

tronglx (Tue, 15 May 2018 09:50:21 GMT):
Has joined the channel.

tronglx (Tue, 15 May 2018 09:52:10 GMT):
@titoe218

nmarcetic (Tue, 15 May 2018 10:29:27 GMT):
@Baha-sk No same error when I replace `Name: example.com` with `Name: org1MSP` ``` 2018-05-15 10:26:26.325 UTC [orderer/common/broadcast] Handle -> WARN 0c9 [channel: myc] Rejecting broadcast of config message from 172.29.0.6:58796 because of error: error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application but was in the read set ```

MaximeAubanel (Tue, 15 May 2018 12:29:17 GMT):
@nmarcetic Hello ;)

nmarcetic (Tue, 15 May 2018 12:30:14 GMT):
Hey hey @MaximeAubanel ;)

MaximeAubanel (Tue, 15 May 2018 13:38:24 GMT):
@nmarcetic whats'up

nmarcetic (Tue, 15 May 2018 13:39:15 GMT):
@MaximeAubanel still strangling with fabric ;) You ?

MaximeAubanel (Tue, 15 May 2018 13:39:58 GMT):
@nmarcetic Still working with Fabric :P You didn't answer me on Linkedin lol

nmarcetic (Tue, 15 May 2018 13:40:49 GMT):
Ah sorry @MaximeAubanel Let me answer you now, on linkedin ofv ;)

nmarcetic (Tue, 15 May 2018 13:40:49 GMT):
Ah sorry @MaximeAubanel Let me answer you now, on linkedin ofc ;)

MaximeAubanel (Tue, 15 May 2018 13:40:59 GMT):
haha

nmarcetic (Tue, 15 May 2018 13:48:02 GMT):
done

baoyangc (Wed, 16 May 2018 01:31:57 GMT):
@troyronda does the sdk support Revoke an certificate? I tried to revoke an certificate,and expected to get an CRL. But I got an nil CRL

baoyangc (Wed, 16 May 2018 01:32:11 GMT):
```req := &msp.RevocationRequest{ Serial: ski, AKI: aki, } rrsp, err := caClient.Revoke(req) if err != nil { c.IndentedJSON(http.StatusOK, model.Response{ Message: "revoke meet error: " + err.Error(), }) return }```

baoyangc (Wed, 16 May 2018 01:44:14 GMT):
rrsp.CRL==nil

pankaj13 (Wed, 16 May 2018 04:47:32 GMT):
Has joined the channel.

guolidong (Wed, 16 May 2018 09:32:13 GMT):
Why not release the version? http://hyperledger-fabric.readthedocs.io/en/latest/fabric-sdks.html?highlight=SDK

guolidong (Wed, 16 May 2018 09:45:24 GMT):
@troyronda [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PnKze8PAH3TimpeYQ)

wlahti (Wed, 16 May 2018 13:38:51 GMT):
Has left the channel.

aleksandar.likic (Wed, 16 May 2018 14:44:06 GMT):
@baoyangc Revocation is not supported yet - https://jira.hyperledger.org/browse/FAB-9626

baoyangc (Thu, 17 May 2018 02:14:47 GMT):
I think we should split this sdk to two parts. 1. fabric-ca-sdk: interact with fabric-ca 2.fabric-client-sdk: interact with the fabric network @aleksandar.likic

Baha-sk (Thu, 17 May 2018 20:43:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SzDs78zZ2kgFPYRYQ) I think you might find this link helpful http://hyperledger-fabric.readthedocs.io/en/release-1.1/configtx.html#anatomy-of-a-configuration

Baha-sk (Thu, 17 May 2018 20:43:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SzDs78zZ2kgFPYRYQ) @nmarcetic I think you might find this link helpful http://hyperledger-fabric.readthedocs.io/en/release-1.1/configtx.html#anatomy-of-a-configuration

david_dornseifer (Fri, 18 May 2018 09:38:19 GMT):
Hi, I'm experiencing the issue that my program where I'm using the SDK is accumulating a big amount of open connections (```lsof -p```) when I address single peers via the target field. E.g. I have two peers in the config but I'm just joining a single peer to a channel and install and instantiate different chaincodes on each individual peer. After running some tests I end up with several thousand open files / connections and the program breaks.

david_dornseifer (Fri, 18 May 2018 09:39:14 GMT):
If I just execute all channel and chaincode operations on all peers the open connections are stable

david_dornseifer (Fri, 18 May 2018 09:39:23 GMT):
any idea what I'm doing wrong?

habpygo (Fri, 18 May 2018 12:44:17 GMT):
Hi @troyronda, is there a quick and dirty way to test whether a chaincode has already been installed on a channel? Currently I face is a `panic` when starting up the network for a second time after CC was successfully invoked earlier — in previous sdk versions there used to be only a warning message after which I could continue with the app and start the client and add data to CouchDB, i.e. my stateDatabase. I have been looking at the method `func (rc *Client) isChaincodeInstalled(reqCtx reqContext.Context, req InstallCCRequest, peer fabApi.ProposalProcessor, retryOpts retry.Opts) (bool, error)` in the `resmgmt` package but that looks a bit like killing a mosquito with a gun. Otherwise, can’t we just let the application continue and skip the installing/initialization of the chaincode if ChainCodeID and Version are the same, and only call `UpgradeCC` if name and/or version are not the same? Please advise. Thanks.

angeloatleadiq (Mon, 21 May 2018 04:38:05 GMT):
Has joined the channel.

angeloatleadiq (Mon, 21 May 2018 04:40:40 GMT):
Hi I have a project that uses hyperledger/fabric-sdk-go v1.0.0-alpha3 and hyperledger/fabric v1.1.0. When I run `dep ensure`, I got this error. ``` Solving failure: No versions of github.com/milagro-crypto/amcl met constraints: master: Could not introduce github.com/milagro-crypto/amcl@master due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@v1.1.0.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@v1.1.0.) ``` How could I solve it?

angeloatleadiq (Mon, 21 May 2018 04:40:40 GMT):
@aleksandar.likic so you suggest I should remove fabric constraint from Gopkg.toml? ``` [[constraint]] # v1.0.5 name = "github.com/hyperledger/fabric" revision = "014d6befcf67f3787bb3d67ff34e1a98dc6aec5f" [[constraint]] # v1.0.0-alpha3 name = "github.com/hyperledger/fabric-sdk-go" revision = "ccecff43fb363c92c23975fe3580eec982a0024e" ```

MeghaGupta (Mon, 21 May 2018 10:49:21 GMT):
Has joined the channel.

MeghaGupta (Mon, 21 May 2018 10:49:44 GMT):
Hi I am trying to create one sample chaincode in go

MeghaGupta (Mon, 21 May 2018 10:50:09 GMT):
but getting error for package github.com/hyperledger/fabric/protos/peer" in any of: /usr/local/go/src/github.com/hyperledger/fabric/protos/peer (from $GOROOT) /home/meghagupta/dev/blockchain-dev/go/src/github.com/hyperledger/fabric/protos/peer (from $GOPATH)

MeghaGupta (Mon, 21 May 2018 10:50:19 GMT):
please help me to resolve this issue

MeghaGupta (Mon, 21 May 2018 10:51:03 GMT):
I tried to get this packge with go get github.com/hyperledger/fabric/protos/peer

MeghaGupta (Mon, 21 May 2018 10:51:22 GMT):
but getting same error message.

MeghaGupta (Mon, 21 May 2018 10:51:51 GMT):
I am new to this .. please help me or point me in right direction

aleksandar.likic (Mon, 21 May 2018 15:09:19 GMT):
@angeloatleadiq @MeghaGupta Is it possible that you guys import fabric github.com/hyperledger/fabric packages in your application code? Go SDK doesn't import them directly, it rather copies them under fabric-sdk-go/internal/github.com/hyperledger/fabric and uses them from there. This way the client application doesn't need to vendor fabric (and its dependencies). But it has use any fabric packages required when using the SDK (e.g. protos) from fabric-sdk-go/internal/github.com/hyperledger/fabric, otherwise you'll have errors due to structs coming from different packages.

MeghaGupta (Mon, 21 May 2018 15:12:17 GMT):
Hi, I have imported import ( "fmt" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/protos/peer" )

MeghaGupta (Mon, 21 May 2018 15:12:24 GMT):
only these ..

MeghaGupta (Mon, 21 May 2018 15:12:58 GMT):
I am really new to all this.. So I was just following fiber-sample

MeghaGupta (Mon, 21 May 2018 15:13:11 GMT):
fabric-samples*

MeghaGupta (Mon, 21 May 2018 15:13:47 GMT):
so could you please tell me correct way to do this

MeghaGupta (Mon, 21 May 2018 15:14:21 GMT):
I have fabric-sdk-go package in my gopath

MeghaGupta (Mon, 21 May 2018 15:14:52 GMT):
now how I should import that in my chain code.

MeghaGupta (Mon, 21 May 2018 15:16:29 GMT):
I tried with govendor

angeloatleadiq (Mon, 21 May 2018 15:35:07 GMT):
@aleksandar.likic so you suggest I should remove fabric constraint from Go ``` [[constraint]] # v1.0.5 name = "github.com/hyperledger/fabric" revision = "014d6befcf67f3787bb3d67ff34e1a98dc6aec5f" [[constraint]] # v1.0.0-alpha3 name = "github.com/hyperledger/fabric-sdk-go" revision = "ccecff43fb363c92c23975fe3580eec982a0024e" ```

angeloatleadiq (Mon, 21 May 2018 15:35:07 GMT):
@aleksandar.likic so you suggest I should remove fabric constraint from Gopkg.toml ``` [[constraint]] # v1.0.5 name = "github.com/hyperledger/fabric" revision = "014d6befcf67f3787bb3d67ff34e1a98dc6aec5f" [[constraint]] # v1.0.0-alpha3 name = "github.com/hyperledger/fabric-sdk-go" revision = "ccecff43fb363c92c23975fe3580eec982a0024e" ```

aleksandar.likic (Mon, 21 May 2018 15:35:35 GMT):
@MeghaGupta It is OK to do it in chaincode. I didn't pay attention, it looks like your question is not SDK related, so you'll be better served in another chat channel. Most likely you just need to follow the documentation more carefully.

aleksandar.likic (Mon, 21 May 2018 15:36:13 GMT):
@angeloatleadiq yes, you don't need to vendor fabric in your client application

jrosmith (Mon, 21 May 2018 15:38:11 GMT):
@MeghaGupta please post this question in #fabric-chaincode-dev

aleksandar.likic (Mon, 21 May 2018 15:38:16 GMT):
@angeloatleadiq take a look at https://github.com/securekey/fabric-examples/blob/master/fabric-cli/Gopkg.toml

elicrisko (Mon, 21 May 2018 17:23:05 GMT):
Has joined the channel.

elicrisko (Mon, 21 May 2018 17:54:01 GMT):
Hi all!! I'm new here... just tried this fabric-sdk-go and after some attempts I got something partially working... 'make integration-test rm -Rf /tmp/enroll_user /tmp/msp /tmp/keyvaluestore /tmp/hfc-kvs /tmp/state /tmp/state-store rm -f integration-report.xml report.xml go clean FIXTURE_PROJECT_NAME=fabsdkgo DOCKER_REMOVE_FORCE=false test/scripts/clean_integration.sh Removing docker-compose network created from fixtures ... Stopping fabsdkgo_org2peer2_1 ... done Stopping fabsdkgo_org1peer1_1 ... done Stopping fabsdkgo_org2peer1_1 ... done Stopping fabsdkgo_org1ca1_1 ... done Stopping fabsdkgo_golangruntime_1 ... done Stopping fabsdkgo_orderer1_1 ... done Stopping fabsdkgo_org2ca1_1 ... done Stopping fabsdkgo_builder_1 ... done Removing fabsdkgo_org2peer2_1 ... done Removing fabsdkgo_org1peer1_1 ... done Removing fabsdkgo_org2peer1_1 ... done Removing fabsdkgo_org1ca1_1 ... done Removing fabsdkgo_golangruntime_1 ... done Removing fabsdkgo_orderer1_1 ... done Removing fabsdkgo_org2ca1_1 ... done Removing fabsdkgo_builder_1 ... done Removing network fabsdkgo_default Populating vendor ... rm -Rf /tmp/enroll_user /tmp/msp /tmp/keyvaluestore /tmp/hfc-kvs /tmp/state /tmp/state-store rm -f integration-report.xml report.xml go clean FIXTURE_PROJECT_NAME=fabsdkgo DOCKER_REMOVE_FORCE=false test/scripts/clean_integration.sh Removing docker-compose network created from fixtures ... Removing network fabsdkgo_default WARNING: Network fabsdkgo_default not found. rm -Rf /tmp/enroll_user /tmp/msp /tmp/keyvaluestore /tmp/hfc-kvs /tmp/state /tmp/state-store rm -f integration-report.xml report.xml go clean'

elicrisko (Mon, 21 May 2018 17:54:26 GMT):
FIXTURE_PROJECT_NAME=fabsdkgo DOCKER_REMOVE_FORCE=false test/scripts/clean_integration.sh Removing docker-compose network created from fixtures ... Removing network fabsdkgo_default WARNING: Network fabsdkgo_default not found. Creating network "fabsdkgo_default" with the default driver Pulling integration-tests (registry.hub.docker.com/hyperledger/fabric-baseimage:x86_64-0.4.6)... x86_64-0.4.6: Pulling from hyperledger/fabric-baseimage 1be7f2b886e8: Already exists 6fbc4a21b806: Already exists c71a6f8e1378: Already exists 4be3072e5a37: Already exists 06c6d2f59700: Already exists 4d536120d8a5: Already exists 0baaf9ec263e: Already exists 3ea9b6cc6f21: Already exists 6173b9a5fe5e: Already exists e73719e0bcbe: Already exists b55408c6ced5: Already exists Digest: sha256:4bd7a050fbd0470d47fe1eb983bc1e32a826d6b7e5f81a694ac3928375b2321f Status: Downloaded newer image for registry.hub.docker.com/hyperledger/fabric-baseimage:x86_64-0.4.6 Creating fabsdkgo_org2ca1_1 ... done Creating fabsdkgo_orderer1_1 ... done Creating fabsdkgo_golangruntime_1 ... done Creating fabsdkgo_org1ca1_1 ... done Creating fabsdkgo_builder_1 ... done Creating fabsdkgo_org1peer1_1 ... done Creating fabsdkgo_org2peer2_1 ... done Creating fabsdkgo_org2peer1_1 ... done Creating fabsdkgo_integration-tests_1 ... done Attaching to fabsdkgo_golangruntime_1, fabsdkgo_orderer1_1, fabsdkgo_org1ca1_1, fabsdkgo_org2ca1_1, fabsdkgo_builder_1, fabsdkgo_org1peer1_1, fabsdkgo_org2peer1_1, fabsdkgo_org2peer2_1, fabsdkgo_integration-tests_1 golangruntime_1 | WARNING: no logs are available with the 'none' log driver orderer1_1 | WARNING: no logs are available with the 'none' log driver org1ca1_1 | WARNING: no logs are available with the 'none' log driver org2ca1_1 | WARNING: no logs are available with the 'none' log driver builder_1 | WARNING: no logs are available with the 'none' log driver org1peer1_1 | WARNING: no logs are available with the 'none' log driver org2peer1_1 | WARNING: no logs are available with the 'none' log driver org2peer2_1 | WARNING: no logs are available with the 'none' log driver integration-tests_1 | Running integration tests ... integration-tests_1 | Testing with code level stable (Fabric v1.1) ...

elicrisko (Mon, 21 May 2018 17:54:47 GMT):
integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/e2e 19.779s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/e2e/configless 3.434s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/fab 44.845s integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:42 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:42 UTC - util.BCCSPKeyRequestGenerate -> INFO generating key: &{A:ecdsa S:256} integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:42 UTC - log.print -> INFO encoded CSR integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:42 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:42 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:42 UTC - util.BCCSPKeyRequestGenerate -> INFO generating key: &{A:ecdsa S:256} integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:42 UTC - log.print -> INFO encoded CSR integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:43 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:43 UTC - util.BCCSPKeyRequestGenerate -> INFO generating key: &{A:ecdsa S:256} integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:43 UTC - log.print -> INFO encoded CSR integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:44 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | --- FAIL: TestIdentity (1.51s) integration-tests_1 | identity_test.go:53: Create identity failed: failed to add identity: Response from server: Error Code: 20 - Authorization failure integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:45 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:45 UTC - util.BCCSPKeyRequestGenerate -> INFO generating key: &{A:ecdsa S:256} integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:45 UTC - log.print -> INFO encoded CSR integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:46 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | --- FAIL: TestUpdateIdentity (1.47s) integration-tests_1 | identity_test.go:119: Create identity failed: failed to add identity: Response from server: Error Code: 20 - Authorization failure integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:46 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:46 UTC - util.BCCSPKeyRequestGenerate -> INFO generating key: &{A:ecdsa S:256} integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:46 UTC - log.print -> INFO encoded CSR integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:47 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | --- FAIL: TestGetAllIdentities (1.48s) integration-tests_1 | identity_test.go:181: Create identity failed: failed to add identity: Response from server: Error Code: 20 - Authorization failure integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:48 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:48 UTC - util.BCCSPKeyRequestGenerate -> INFO generating key: &{A:ecdsa S:256} integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:48 UTC - log.print -> INFO encoded CSR integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:48 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:48 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:48 UTC - util.BCCSPKeyRequestGenerate -> INFO generating key: &{A:ecdsa S:256} integration-tests_1 | [fabsdk/fab] 2018/05/21 14:20:48 UTC - log.print -> INFO encoded CSR integration-tests_1 | FAIL integration-tests_1 | FAIL github.com/hyperledger/fabric-sdk-go/test/integration/msp 7.870s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/orgs 54.633s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/sdk 67.111s fabsdkgo_integration-tests_1 exited with code 1 Aborting on container exit... Stopping fabsdkgo_org2peer2_1 ... done Stopping fabsdkgo_org2peer1_1 ... done Stopping fabsdkgo_org1peer1_1 ... done Stopping fabsdkgo_builder_1 ... done Stopping fabsdkgo_org1ca1_1 ... done Stopping fabsdkgo_org2ca1_1 ... done Stopping fabsdkgo_golangruntime_1 ... done Stopping fabsdkgo_orderer1_1 ... done make[1]: *** [integration-tests-stable] Error 1 make: *** [integration-test] Error 2`

dellwood (Tue, 22 May 2018 02:03:13 GMT):
Has joined the channel.

raceli (Tue, 22 May 2018 08:19:51 GMT):
Has joined the channel.

sriharshajasthi (Tue, 22 May 2018 09:11:31 GMT):
Has joined the channel.

KGiou (Tue, 22 May 2018 10:50:41 GMT):
credentialstore

sudeshrshetty (Tue, 22 May 2018 14:24:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RTyPoxyc7Cs5CGnqL) @elicrisko There was a recent change in fabric-ca which isn't backward comptaible. We are fixing it right now, please refer https://jira.hyperledger.org/browse/FAB-10279 for more details

sudeshrshetty (Tue, 22 May 2018 14:24:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RTyPoxyc7Cs5CGnqL) @elicrisko There was a recent change in fabric-ca which isn't backward compatible. We are fixing it right now, please refer https://jira.hyperledger.org/browse/FAB-10279 for more

elicrisko (Tue, 22 May 2018 15:09:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=JHQG3ZSJEXSLoZj8r) @sudeshrshetty Thanks for this fix... but I'm running go get -u github.com/hyperledger/fabric-sdk-go and I'm still having the same errors... Am I doing it right?

sudeshrshetty (Tue, 22 May 2018 15:10:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qhK6uyCAeNvwJrhD9) @elicrisko We are still in the process of fixing it, fabric-ca code push for revert didn't work for us. It is still under investigation.

swetha (Tue, 22 May 2018 19:19:19 GMT):
Has joined the channel.

swetha (Tue, 22 May 2018 19:22:57 GMT):
Hello! I am trying to write some tests for a project that uses the fabric-sdk-go. I use the fabsdk.FabricSDK to obtain the channelClient. Once I have the channelClient I want to mock out the responses for Query and Invoke. Is there test code I could look at to achieve that? I am using v1.0.0-alpha3

titoe218 (Wed, 23 May 2018 09:09:43 GMT):
Hello, does anyone knows how to fix this error `Enroll failed: failed to create CA Client: no CAs configured` when I call msp.Enroll, got this

elicrisko (Wed, 23 May 2018 11:26:40 GMT):
Hello all, I'm looking for a go debugger for MacOS... which one do you recommend?

ping40 (Wed, 23 May 2018 13:10:39 GMT):
Has joined the channel.

yacovm (Wed, 23 May 2018 13:34:03 GMT):
hey Guys, FYI the golang client implementation for service discovery has now support for cc2cc and collectioons

yacovm (Wed, 23 May 2018 13:34:03 GMT):
hey Guys, FYI the golang client implementation for service discovery has now support for cc2cc and collections

yacovm (Wed, 23 May 2018 13:34:20 GMT):
and i don't expect to make anymore changes

yacovm (Wed, 23 May 2018 13:34:28 GMT):
so you may now incorporate that into the SDK

yacovm (Wed, 23 May 2018 13:34:48 GMT):
@troyronda @bstasyszyn

aleksandar.likic (Wed, 23 May 2018 13:45:19 GMT):
@titoe218 It means SDK didn't find any CA defined in your client configuration

aleksandar.likic (Wed, 23 May 2018 13:47:30 GMT):
@elicrisko I like goland. If you want a free tool, try https://github.com/derekparker/delve

sudeshrshetty (Wed, 23 May 2018 14:01:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=45oHKQQY3gWwvGeQq) @elicrisko Please try now, your tests should be passing now. Make sure to clean all docker images before you try

elicrisko (Wed, 23 May 2018 14:20:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=or32cxhd9DzT7TiNh) @aleksandar.likic I'm trying delve, thanks!

sudeshrshetty (Wed, 23 May 2018 14:39:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NtYbt63Ph7mWyDiLx) @swetha try mockgen if you are using channelClient interface. https://github.com/golang/mock

elicrisko (Wed, 23 May 2018 15:02:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=A2CLFjgYyLFicDDw2) @sudeshrshetty I'm still having the same errors... how can I make sure I'm cleaning all docker images?

habpygo (Wed, 23 May 2018 15:04:03 GMT):
@elicrisko first run `docker ps -a` to see if there are any left.

habpygo (Wed, 23 May 2018 15:06:52 GMT):
Ah, you want to remove images. Then you do `docker rmi -f $(docker images -q)`

swetha (Wed, 23 May 2018 15:22:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zjxNsMp8XvCcebB32) @sudeshrshetty Thanks! I ended up doing something similar

Baha-sk (Wed, 23 May 2018 15:39:01 GMT):
@titoe218 you need to have a ca registered under your client's organization config like the following: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L221

jeffgarratt (Wed, 23 May 2018 15:39:33 GMT):
Has joined the channel.

elicrisko (Wed, 23 May 2018 15:40:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hHmoocHY4rRMMm4uF) @habpygo Thanks, but I'm still having the same errors... I even tried 'docker rm $(docker ps -a -f status=exited -q)'

elicrisko (Wed, 23 May 2018 15:40:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hHmoocHY4rRMMm4uF) @habpygo Thanks, but I'm still having the same errors... I even tried `docker rm $(docker ps -a -f status=exited -q)`

Baha-sk (Wed, 23 May 2018 15:41:32 GMT):
@elicrisko to remove all docker images you need to call this: `docker rmi -f $(docker images -aq)`

Baha-sk (Wed, 23 May 2018 15:42:08 GMT):
make sure to delete the containers first : `docker rm -f $(docker ps -aq)`

habpygo (Wed, 23 May 2018 15:45:35 GMT):
@elicrisko if you run on a Mac you have Kitematics at your disposal. By firing this up you can see if there are still docker containers floating around and remove them manually. Just to make sure, are you using the right tags for the images?

Kyroy (Wed, 23 May 2018 15:52:29 GMT):
When I use `client.Execute(channel.Request{…}, channel.WithTargetEndpoints(peerURL))` https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/chclient.go#L111
at some point queryPeers https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/chconfig/chconfig.go#L149
is executed.
This calls `c.calculateTargetsFromConfig` which selects all peers that are configured in the config.
Afterwards, only 2 of these peers get randomly selected by `randomMaxTargets`. As a user, I would expect all following requests of `client.Execute` to target my `peerURL` specified in the options. Is there a way to enforce this? When submitting a PR, where would you add this option? I would be happy to help. ( @troyronda )

elicrisko (Wed, 23 May 2018 15:53:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=c4QQvfg8fCrnRy2gM) @habpygo Yes, I do have Kitematic (Beta)

habpygo (Wed, 23 May 2018 16:02:07 GMT):
If you open it it will show all docker containers which are running or stopped. The ones stopped or down are greyed out. If you find any of these remove them by clicking on the cross on the right side when you hover over them. Then, if you are sure there are no more containers around, delete the left over images and then start again.

habpygo (Wed, 23 May 2018 16:08:09 GMT):
By the way, Kitematic is still Beta and you have to give a `cmd-r` to refresh the UI, because sometimes the containers don't show up.

Baha-sk (Wed, 23 May 2018 16:28:10 GMT):
@Kyroy I don't think `channel.WithTargetEndpoints(peerURL)` is meant to enforce that such target... in any case, the discovery service underneath the SDK will propagate the `client.Execute` invocation to all the network's peers

Kyroy (Wed, 23 May 2018 17:56:44 GMT):
@Baha-sk `// WithTargetEndpoints allows overriding of the target peers for the request.`

elicrisko (Wed, 23 May 2018 19:06:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=X5efbDvBMJEfnnKLb) @habpygo Thanks for the tips :)...

troyronda (Wed, 23 May 2018 19:11:48 GMT):
@Kyroy the calls to fetch channel config is unrelated to the chaincode invocation.

troyronda (Wed, 23 May 2018 19:12:09 GMT):
selection of peers is handled by the selection service.

troyronda (Wed, 23 May 2018 19:12:09 GMT):
selection of peers for chaincode invocation is handled by the selection service.

troyronda (Wed, 23 May 2018 19:15:22 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/common/selection/staticselection/staticselection.go#L46

troyronda (Wed, 23 May 2018 19:16:17 GMT):
(and the dynamic version: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/common/selection/dynamicselection/dynamicselection.go#L166)

Kyroy (Wed, 23 May 2018 19:16:31 GMT):
@troyronda The use-case is: managing a lot of channels dynamically. So I created 1 `channels` entry with all my peers. But sometimes, a channel is only joined by 1 peer and I do NOT want to update my config all the time and persist a state in my config.yaml file. But, when now invoking a chaincode, where I know it is in channelX in peerY, I want only to query peerY and not 2 RANDOM peers (most likely peerY is not one of them).

Kyroy (Wed, 23 May 2018 19:16:31 GMT):
@troyronda The use-case is: managing a lot of channels dynamically. So I created 1 `channels` entry with all my peers. But sometimes, a channel is only joined by 1 peer and I do NOT want to update my config all the time and persist a state in my config.yaml file. But, when now invoking a chaincode, where I know it is in channelX in peerY, I want only to query peerY and not 2 RANDOM peers (most likely peerY is not one of them).

Kyroy (Wed, 23 May 2018 19:16:31 GMT):
@troyronda The use-case is: managing a lot of channels dynamically. So I created 1 `channels` entry with all my peers. But sometimes, a channel is only joined by 1 peer and I do NOT want to update my config all the time and persist a state in my config.yaml file. edit: all channels are mapped to this one entry `pattern: (\w+)` But, when now invoking a chaincode, where I know it is in channelX in peerY, I want only to query peerY and not 2 RANDOM peers (most likely peerY is not one of them).

Kyroy (Wed, 23 May 2018 19:17:11 GMT):
@troyronda so I should use a `PeerFilter`?

troyronda (Wed, 23 May 2018 19:18:02 GMT):
note if you supplied the target list then selection service is not invoked.

troyronda (Wed, 23 May 2018 19:18:06 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L68

troyronda (Wed, 23 May 2018 19:20:01 GMT):
you can create a custom selection service

troyronda (Wed, 23 May 2018 19:20:01 GMT):
@Kyroy you can create a custom selection service

troyronda (Wed, 23 May 2018 19:20:01 GMT):
@Kyroy you can create a custom selection service

troyronda (Wed, 23 May 2018 19:21:05 GMT):
a PeerFilter can also be used if that interface covers your needs.

troyronda (Wed, 23 May 2018 19:21:21 GMT):
(it's called by the selection service)

troyronda (Wed, 23 May 2018 19:24:34 GMT):
@Kyroy btw - are you sure that the peers aren't being called when you supply them in the options?

troyronda (Wed, 23 May 2018 19:24:34 GMT):
@Kyroy btw - are you sure that all the peers aren't being called when you supply them in the options?

troyronda (Wed, 23 May 2018 19:25:09 GMT):
(i thought it did)

Kyroy (Wed, 23 May 2018 19:25:31 GMT):
@troyronda No, I am not completely sure, but I think I did not see any errors :sweat_smile:

Kyroy (Wed, 23 May 2018 19:25:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7Xhjbghf3ifaceXRy) What is it meant to do? When to be used? :D

troyronda (Wed, 23 May 2018 19:26:42 GMT):
So if you do not supply WithTargetEndpoints, the SDK uses a combination of the discovery service and selection service to determine which endorsers to use.

troyronda (Wed, 23 May 2018 19:26:42 GMT):
So if you do not supply WithTargetEndpoints, the SDK uses a combination of the discovery service and selection service to determine which endorsers (peers) to use.

troyronda (Wed, 23 May 2018 19:26:55 GMT):
If you do supply WithTargetEndpoints, then the SDK uses the endpoints you supplied.

troyronda (Wed, 23 May 2018 19:26:55 GMT):
If you do supply WithTargetEndpoints, then the SDK uses the endpoints you supplied as the endorser (peer) list.

troyronda (Wed, 23 May 2018 19:27:38 GMT):
So if you know which endpoints you want at the point of the call, then you can use the option.

troyronda (Wed, 23 May 2018 19:27:38 GMT):
So if you know which endpoints you want at the point of the call, then you can use the WithTargetEndpoints option.

troyronda (Wed, 23 May 2018 19:29:35 GMT):
btw - most of the process is overridable. i.e., you can create your own invocation chain; you can override both discovery and selection services, etc.

troyronda (Wed, 23 May 2018 19:29:35 GMT):
btw - most of the process is overridable. i.e., you can create your own invocation handler chain; you can override both discovery and selection services, etc.

troyronda (Wed, 23 May 2018 19:30:40 GMT):
but if you have the peer list at the call, you have the simple case of just using the WithTargetEndpoints :).

Kyroy (Wed, 23 May 2018 19:30:56 GMT):
> uses the endpoints you supplied as the endorser (peer) list But it still calls all peers from my channel config?

Kyroy (Wed, 23 May 2018 19:31:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=HBmMN7yeucsrcwegc) That was exactly my use-case I wrote :O

troyronda (Wed, 23 May 2018 19:31:27 GMT):
It will only call the peers that you supply in WithTargetEndpoints for the chaincode invocation.

Kyroy (Wed, 23 May 2018 19:31:30 GMT):
I know all the peers when I am executing `Execute`

troyronda (Wed, 23 May 2018 19:32:07 GMT):
(I purposely say chaincode invocation as there is a background activity that is refreshing the channel config).

troyronda (Wed, 23 May 2018 19:32:18 GMT):
and that background activity is what you saw in the logs.

troyronda (Wed, 23 May 2018 19:34:07 GMT):
well, I'm guessing you should check if the WithTargetEndpoints is working for you or if there is a problem

Kyroy (Wed, 23 May 2018 19:35:02 GMT):
Just to clarify: When I am using WithTargetEndpoints with only one peer, none of the other peers should get called, right?

troyronda (Wed, 23 May 2018 19:35:43 GMT):
correct ... for chaincode invocation. the background activity will still call peers for channel config.

Kyroy (Wed, 23 May 2018 19:36:10 GMT):
But the background activity is erroring my request

Kyroy (Wed, 23 May 2018 19:36:20 GMT):
(sometimes)

troyronda (Wed, 23 May 2018 19:36:25 GMT):
what's the error?

Kyroy (Wed, 23 May 2018 19:36:32 GMT):
If the wrong 2 peers are selected

Kyroy (Wed, 23 May 2018 19:38:53 GMT):
```failed to get channel deve512acb0-dfb6-42cb-9dfe-8a920321a8d4hopefully-load-balanced client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Multiple errors occurred: \nTransaction processing for endorser [peer0……….:7051]: gRPC Transport Status Code: (2) Unknown. Description: Failed to deserialize creator identity, err MSP organizationMSP is unknown\nTransaction processing for endorser [peer2…….:7051]: gRPC Transport Status Code: (2) Unknown. Description: Failed to deserialize creator identity, err MSP organizationMSP is unknown``` only peer1 is joined this channel

Kyroy (Wed, 23 May 2018 19:40:38 GMT):
@troyronda for this use-case (when channels are load-balanced to different peers), do you think the sdk would be more efficient when not providing the targets and select them automatically? :O

troyronda (Wed, 23 May 2018 19:49:14 GMT):
@Kyroy the selection of peers for fetching channel config comes from the channel peers subsection of the config

troyronda (Wed, 23 May 2018 19:49:48 GMT):
you should only have peers that are callable from that client in that subsection

troyronda (Wed, 23 May 2018 19:50:35 GMT):
specifically this code is handling the retrieval of peers for this purpose: https://github.com/hyperledger/fabric-sdk-go/blob/81cbc396a6d006ee1476620fa6522f3290270bbc/pkg/fab/chconfig/chconfig.go#L197

Kyroy (Wed, 23 May 2018 19:51:29 GMT):
I know =) But I have to handle a lot of channels and don't want to update my config.yaml when a new channel is created. So I added only 1 channel in the config, where all peers are included and map all channels to it. [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kymv6Rjq2yETpruTQ)

troyronda (Wed, 23 May 2018 19:51:39 GMT):
I believe the WithTargetEndpoints allows you to specify peers that are not in the channel peers subsection.

troyronda (Wed, 23 May 2018 19:52:33 GMT):
So, as usual, we allowed the ability to override logic ... ;)

Kyroy (Wed, 23 May 2018 19:53:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wPDvjehn3eMe2bQFf)

troyronda (Wed, 23 May 2018 19:53:18 GMT):
You can actually supply a custom endpoint config impl

troyronda (Wed, 23 May 2018 19:54:52 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/81cbc396a6d006ee1476620fa6522f3290270bbc/pkg/fabsdk/fabsdk.go#L121

troyronda (Wed, 23 May 2018 19:58:14 GMT):
Example of Channel Peers impl is here: https://github.com/hyperledger/fabric-sdk-go/blob/ee50b2f7189a85cd036c7daddc34f8efb7735ad5/test/integration/e2e/configless/endpointconfig_override_test.go#L604

troyronda (Wed, 23 May 2018 19:58:14 GMT):
Example of Channel Peers impl override is here: https://github.com/hyperledger/fabric-sdk-go/blob/ee50b2f7189a85cd036c7daddc34f8efb7735ad5/test/integration/e2e/configless/endpointconfig_override_test.go#L604

troyronda (Wed, 23 May 2018 19:59:24 GMT):
(i.e., if you override this function then it is used to determine the channel peers rather than config.yaml)

Kyroy (Wed, 23 May 2018 20:00:21 GMT):
Thanks :) In previous versions of the SDK I completely implemented the whole large config interface :D But I hope that I can use normal functionalities without any hacky solution or persisting a state in my stateless service

troyronda (Wed, 23 May 2018 20:00:23 GMT):
(we've been doing ongoing work to minimize the need for the config backend)

troyronda (Wed, 23 May 2018 20:00:34 GMT):
(and to allow overriding much more fine-grained)

Kyroy (Wed, 23 May 2018 20:00:43 GMT):
Cool :+1:

troyronda (Wed, 23 May 2018 20:01:55 GMT):
So far: * the config map has been abstracted; * the endpoint config has been broken into many subinterfaces; * integration tests (and can also act as an example)

Kyroy (Wed, 23 May 2018 20:02:44 GMT):
To be able to partially implement the interface is awesome. Great work!

troyronda (Wed, 23 May 2018 20:04:24 GMT):
:) (also @Baha-sk & @sudeshrshetty)

troyronda (Wed, 23 May 2018 20:05:35 GMT):
this is the abstract config map (backend): https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/defbackend.go#L22

troyronda (Wed, 23 May 2018 20:06:49 GMT):
(i.e., if someone want to supply a different backend than viper)

troyronda (Wed, 23 May 2018 20:06:49 GMT):
(i.e., if someone want to supply a different backend than viper & config file)

troyronda (Wed, 23 May 2018 20:07:11 GMT):
the higher level configs like endpoint config impl reads values from the backend using key/value.

troyronda (Wed, 23 May 2018 20:07:11 GMT):
the higher level configs like endpoint config impl reads values from the backend using key/value via the Lookup function.

Kyroy (Wed, 23 May 2018 20:09:10 GMT):
Haha yes, already saw this when I upgraded the sdk and really did not want to implement the Lookup XD

troyronda (Wed, 23 May 2018 20:09:47 GMT):
Ha... yeh that's why the finer grained interface overrides were also allowed ;)

troyronda (Wed, 23 May 2018 20:09:47 GMT):
Ha... yeh that's why the finer grained interface overrides were also built ;)

troyronda (Wed, 23 May 2018 20:10:53 GMT):
For other cases (e.g., using a database config), it's easier to override the entire config backend.

troyronda (Wed, 23 May 2018 20:10:53 GMT):
For other cases (e.g., using a database as config), it's easier to override the entire config backend.

troyronda (Wed, 23 May 2018 20:10:53 GMT):
For other cases (e.g., using a database as config source), it's easier to override the entire config backend.

Kyroy (Wed, 23 May 2018 21:06:00 GMT):
@troyronda Does the dynamicdiscovery work out of the box? Or is HLF1.1 required? Or some flags I have to pass to fabric?

Baha-sk (Wed, 23 May 2018 21:19:36 GMT):
@Kyroy it requires Fabric 1.2

Baha-sk (Wed, 23 May 2018 21:20:18 GMT):
and you need to create a factory that returns a dynamic discovery instance..

Baha-sk (Wed, 23 May 2018 21:21:30 GMT):
see the bootstrap test https://github.com/hyperledger/fabric-sdk-go/blob/e255416dbdfbc0a164a500c87de1655717417fe0/test/integration/orgs/multiple_orgs_minconfig_test.go#L33 for an example

Baha-sk (Wed, 23 May 2018 21:23:10 GMT):
DynamicDiscoveryProviderFactory is declared further down at line 100

troyronda (Wed, 23 May 2018 22:41:14 GMT):
@elicrisko @Baha-sk @sudeshrshetty it’s possible there is a problem running that test on Mac :(

titoe218 (Thu, 24 May 2018 01:20:10 GMT):
@aleksandar.likic, @Baha-sk Yes, I already config CA in my client's organization config like this `# Fabric-CA is a special kind of Certificate Authority provided by Hyperledger Fabric # which allows certificate management to be done via REST APIs. certificateAuthorities: ca.org1.example.com: url: https://localhost:7054 # the properties specified under this object are passed to the # 'http' client verbatim when making the request to the Fabric-CA server httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw caName: ca.org1.example.com`

titoe218 (Thu, 24 May 2018 03:09:48 GMT):
@aleksandar.likic @Baha-sk Does we have any sample about enroll user use Fabric Go SDK?

titoe218 (Thu, 24 May 2018 07:37:52 GMT):
Does anyone knows how to check a user is enrolled?

star2478 (Thu, 24 May 2018 08:52:53 GMT):
Has joined the channel.

huxinxin (Thu, 24 May 2018 09:50:42 GMT):
Has joined the channel.

aleksandar.likic (Thu, 24 May 2018 17:30:21 GMT):
@titoe218 Try mspClient.GetIdentity - https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/msp/client.go#L263

aleksandar.likic (Thu, 24 May 2018 17:30:21 GMT):
@titoe218 Try msp.GetIdentity - https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/msp/client.go#L263

aleksandar.likic (Thu, 24 May 2018 17:37:55 GMT):
@titoe218 ... but depending on what you want, this may or may not be the best. It will make a call to the CA Server - it's more a user management tool.

sukrit.handa@gmail.com (Fri, 25 May 2018 00:02:25 GMT):
Has joined the channel.

star2478 (Fri, 25 May 2018 03:26:26 GMT):
At present, i can set a network succesfully by running https://github.com/hyperledger/fabric-samples/blob/release-1.1/basic-network/start.sh, and then cd fabric-sdk-go/test/integration/sdk | go test, but it run fail: panic: failed to initialize channel: checking for joined targets failed: failed while checking if primary peer has already joined channel: failed to query channel for peer: cscc.GetChannels failed: SendProposal failed: Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.org1.example.com:7051]

star2478 (Fri, 25 May 2018 03:26:26 GMT):
At present, i can set a network succesfully by running https://github.com/hyperledger/fabric-samples/blob/release-1.1/basic-network/start.sh, and then cd fabric-sdk-go/test/integration/sdk | go test, but it run fail: `panic: failed to initialize channel: checking for joined targets failed: failed while checking if primary peer has already joined channel: failed to query channel for peer: cscc.GetChannels failed: SendProposal failed: Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.org1.example.com:7051]`

star2478 (Fri, 25 May 2018 03:26:26 GMT):
At present, i can set a network succesfully by running https://github.com/hyperledger/fabric-samples/blob/release-1.1/basic-network/start.sh, and then cd fabric-sdk-go/test/integration/sdk && go test, but it run fail: `panic: failed to initialize channel: checking for joined targets failed: failed while checking if primary peer has already joined channel: failed to query channel for peer: cscc.GetChannels failed: SendProposal failed: Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.org1.example.com:7051]`

star2478 (Fri, 25 May 2018 03:54:45 GMT):
After running https://github.com/hyperledger/fabric-samples/blob/release-1.1/basic-network/start.sh, and `docker ps -a`, *peer0.org1.example.com:7051* exists, why connection timed out [peer0.org1.example.com:7051]?

star2478 (Fri, 25 May 2018 03:55:21 GMT):

dockerps.png

binhn (Fri, 25 May 2018 15:32:28 GMT):
is there a way to test the sdk api calls without standing up fabric network? i m looking for some kind of mock package of the api but it looks like currently the sdk returns the objects instead of the interfaces representing the objects; eg in fabsdk, `func New(cp core.ConfigProvider, opts ...Option) (*FabricSDK, error)` which doesn't facilitate implementing mocks for unit testing

binhn (Fri, 25 May 2018 15:42:17 GMT):
if the answer is no, my thought is this: we refactor the api and define interfaces for the current objects that we return, then we can create a mocks package implementing the interfaces to allow app unit test to use mocks in testing the app code. Thoughts?

muralisr (Fri, 25 May 2018 16:30:34 GMT):
works I think...we could start with the minimal interfaces we use and keep adding as we go

aleksandar.likic (Fri, 25 May 2018 19:12:33 GMT):
@binhn @muralisr Under the hood, the FabricSDK object is just a container for SDK Services. If you don't provide your implementation of services (SDK options - https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#Option), default implementations are initialized by FabricSDK. So one can provide implementation of SDK services (SDK service providers) that mocks the network. SDK service providers are interfaces defined at https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabsdk/api/factory.go . SDK Services are not used directly; to simplify the SDK usage, high-level clients are exposed as described at https://godoc.org/github.com/hyperledger/fabric-sdk-go. Hope this helps.

aleksandar.likic (Fri, 25 May 2018 19:12:33 GMT):
@binhn @muralisr Under the hood, the FabricSDK object is just a container for SDK Services. If you don't provide your implementation of services (SDK options - https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#Option), default implementations are initialized by FabricSDK. So one can provide implementation of SDK services (SDK service providers) that mocks the network. SDK service providers are interfaces defined at https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabsdk/api/factory.go . SDK Services are not used directly; to simplify the SDK usage, high-level clients are exposed to SDK users as described at https://godoc.org/github.com/hyperledger/fabric-sdk-go. Hope this helps.

aleksandar.likic (Fri, 25 May 2018 19:21:50 GMT):
One way to mock SDK services is to use https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/test/mocksdkapi, which is generated from the services interfaces using GoMock.

aleksandar.likic (Fri, 25 May 2018 19:52:45 GMT):
@binhn I think the cleanest way to quickly mock, for example, executing a transaction using the SDK, would be to create an interface that would be implemented by the channel client (https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Client). Then you provide mock implementation of the functions you need. Perhaps we could add to the SDK interfaces for high-level clients, to allow for easier API mocking.

aleksandar.likic (Fri, 25 May 2018 19:52:45 GMT):
@binhn I think the cleanest way to quickly mock, for example, executing a transaction using the SDK, would be to create an interface that would be implemented by the channel client (https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Client). Then you provide mock implementation of the functions you need. Perhaps we could add to the SDK interfaces for high-level clients, to allow for easier SDK mocking.

kelvinzhong (Mon, 28 May 2018 02:21:14 GMT):
Has joined the channel.

kelvinzhong (Mon, 28 May 2018 02:22:01 GMT):
@aleksandar.likic hi, i got some confusion while using the sdk, it seems that a client can only connect to the peer of it's own MSP, but what if a endorsement policy need the other MSP's signature? how can a client send the transaction to the peer of the other MSPs?

Kyroy (Mon, 28 May 2018 09:37:29 GMT):
Hey, we are experiencing `gRPC Transport Status Code: (14) Unavailable. Description: transport is closing` when querying and also when reading a block from a channel with the sdk: error message: ```QueryBlock failed: Transaction processing for endorser [peer0......:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing``` The payload size is ~370kb, so it is not too large. Sometimes the query works, and then works a lot of times in a row. *When waiting ~40s (>30s)*, it stops working and in the peer DEBUG log, we can see ```[grpc] Printf -> DEBU 5a8 transport: http2Server.HandleStreams failed to read frame: read tcp 172.17.0.4:7051->XX.XX.XX.XX:40792: use of closed network connection``` We think this might be an issue with the connection handling of the sdk. Also very weird: It is working reliable with smaller payloads ~25kb. ``` client: global: cache: channelMembership: 30s connectionIdle: 30s ``` Also, when restarting the sdk, getting a “large” (370kb) block fails. Sometimes the 2nd try works, but not reliably. But restarting and getting a “small” (25kb) block always works!

Kyroy (Mon, 28 May 2018 09:37:29 GMT):
Hey, we are experiencing `gRPC Transport Status Code: (14) Unavailable. Description: transport is closing` when querying and also when reading a block from a channel with the sdk: error message: ```QueryBlock failed: Transaction processing for endorser [peer0......:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing``` The payload size is ~370kb, so it is not too large. Sometimes the query works, and then works a lot of times in a row. *When waiting ~40s (>30s)*, it stops working and in the peer DEBUG log, we can see ```[grpc] Printf -> DEBU 5a8 transport: http2Server.HandleStreams failed to read frame: read tcp 172.17.0.4:7051->XX.XX.XX.XX:40792: use of closed network connection``` We think this might be an issue with the connection handling of the sdk. Also very weird: It is working reliable with smaller payloads ~25kb. ``` client: global: cache: channelMembership: 30s connectionIdle: 30s ``` Also, when restarting the sdk, getting a “large” (370kb) block fails. Sometimes the 2nd try works, but not reliably. But restarting and getting a “small” (25kb) block always works!

Kyroy (Mon, 28 May 2018 09:37:29 GMT):
Hey, we are experiencing `gRPC Transport Status Code: (14) Unavailable. Description: transport is closing` when querying and also when reading a block from a channel with the sdk: error message: ``` QueryBlock failed: Transaction processing for endorser [peer0......:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing ``` The payload size is ~370kb, so it is not too large. Sometimes the query works, and then works a lot of times in a row. *When waiting ~40s (>30s)*, it stops working and in the peer DEBUG log, we can see ``` [grpc] Printf -> DEBU 5a8 transport: http2Server.HandleStreams failed to read frame: read tcp 172.17.0.4:7051->XX.XX.XX.XX:40792: use of closed network connection ``` We think this might be an issue with the connection handling of the sdk. Also very weird: It is working reliable with smaller payloads ~25kb. ``` client: global: cache: channelMembership: 30s connectionIdle: 30s ``` Also, when restarting the sdk, getting a “large” (370kb) block fails. Sometimes the 2nd try works, but not reliably. But restarting and getting a “small” (25kb) block always works!

Kyroy (Mon, 28 May 2018 09:37:29 GMT):
Hey, we are experiencing `gRPC Transport Status Code: (14) Unavailable. Description: transport is closing` when querying and also when reading a block from a channel with the sdk: error message: ```QueryBlock failed: Transaction processing for endorser [peer0......:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing ``` The payload size is ~370kb, so it is not too large. Sometimes the query works, and then works a lot of times in a row. *When waiting ~40s (>30s)*, it stops working and in the peer DEBUG log, we can see ```[grpc] Printf -> DEBU 5a8 transport: http2Server.HandleStreams failed to read frame: read tcp 172.17.0.4:7051->XX.XX.XX.XX:40792: use of closed network connection ``` We think this might be an issue with the connection handling of the sdk. Also very weird: It is working reliable with smaller payloads ~25kb. ```client: global: cache: channelMembership: 30s connectionIdle: 30s ``` Also, when restarting the sdk, getting a “large” (370kb) block fails. Sometimes the 2nd try works, but not reliably. But restarting and getting a “small” (25kb) block always works!

Kyroy (Mon, 28 May 2018 09:37:29 GMT):
Hey, we are experiencing `gRPC Transport Status Code: (14) Unavailable. Description: transport is closing` when querying and also when reading a block from a channel with the sdk: error message: ```QueryBlock failed: Transaction processing for endorser [peer0......:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing ``` The payload size is ~370kb, so it is not too large. Sometimes the query works, and then works a lot of times in a row. *When waiting ~40s (>30s)*, it stops working and in the peer DEBUG log, we can see ```[grpc] Printf -> DEBU 5a8 transport: http2Server.HandleStreams failed to read frame: read tcp 172.17.0.4:7051->XX.XX.XX.XX:40792: use of closed network connection ``` We think this might be an issue with the connection handling of the sdk. Also very weird: It is working reliable with smaller payloads ~25kb. ```client: global: cache: channelMembership: 30s connectionIdle: 30s ``` Also, when restarting the sdk, getting a “large” (370kb) block fails. Sometimes the 2nd try works, but not reliably. But restarting and getting a “small” (25kb) block always works!

DerekC (Mon, 28 May 2018 09:38:22 GMT):
Has joined the channel.

Kyroy (Mon, 28 May 2018 09:39:20 GMT):
In case you need any logs, just let me know ;)

aleksandar.likic (Mon, 28 May 2018 11:31:45 GMT):
@kelvinzhong This is true for org admin operations, like installing chaincodes. One cannot install a chaincode to another organization's peer. One can, however, ask any peer on the channel for endorsement.

kelvinzhong (Mon, 28 May 2018 11:37:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Qa8mjXGfAnwrPxvij) @aleksandar.likic is that means a client can send the transaction to any peer from the other MSP? but I can't even call client.queryChannels(peer) if the peer is in different MSP, so how can i know if the peer is in the same channel?

kelvinzhong (Mon, 28 May 2018 11:38:59 GMT):
do we have any example that runs between different MSP within a channel?

aleksandar.likic (Mon, 28 May 2018 12:03:51 GMT):
@kelvinzhong https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/orgs/multiple_orgs_test.go#L475 . This example uses dynamic endorser selection, which is based on the CC endorsement policy. I guess this is what you are looking for?

Kyroy (Mon, 28 May 2018 13:23:20 GMT):
More info about my previous problem (`gRPC Transport Status Code: (14) Unavailable. Description: transport is closing`): This also happens with get installed chaincodes (with a lot of chaincodes). So basically with all grpc connections to the peer if the payload gets larger (some kb :/)

Kyroy (Mon, 28 May 2018 13:23:20 GMT):
More info about my previous problem (`gRPC Transport Status Code: (14) Unavailable. Description: transport is closing`): This also happens with get installed chaincodes (with a lot of chaincodes). So basically with all grpc connections to the peer if the payload gets larger (some kb)

troyronda (Mon, 28 May 2018 13:37:41 GMT):
@Kyroy the connection manager closes connection upon connection idle or upon call to sdk.Close. There were some bug fixes in the connection manager in the last couple weeks as well.

Kyroy (Mon, 28 May 2018 13:38:21 GMT):
@troyronda we are using commit e8566fe4cebbcedb8974bc41cbc7ea31948ec081 right now

troyronda (Mon, 28 May 2018 13:39:10 GMT):
did the debug logs have anything interesting?

troyronda (Mon, 28 May 2018 13:39:59 GMT):
(and i assume there isn't a chance that sdk.close is accidentally getting called on these longer ops?)

Kyroy (Mon, 28 May 2018 13:57:12 GMT):
(no, close is not called ;) )

troyronda (Mon, 28 May 2018 13:59:06 GMT):
@divyank has spent some time looking at the connection manager topic ^^^

troyronda (Mon, 28 May 2018 13:59:06 GMT):
@divyank has spent some time looking at the connection manager topic (but for load not necessarily for txn size) ^^^

troyronda (Mon, 28 May 2018 13:59:06 GMT):
@divyank has spent some time looking at the connection manager topic (but for load not for txn size) ^^^

Kyroy (Mon, 28 May 2018 14:01:42 GMT):
@troyronda here are the logs ;) ```[fabsdk/fab] 2018/05/28 09:21:04 UTC - fab.(*EndpointConfig).PeerConfig -> DEBU Found MatchingPeerConfig for name/url [peer0.........] [fabsdk/fab] 2018/05/28 09:21:04 UTC - peer.(*peerEndorser).ProcessTransactionProposal -> DEBU Processing proposal using endorser: peer0.........:7051 [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).DialContext -> DEBU DialContext: peer0.........:7051 [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).loadConn -> DEBU using cached connection [peer0.........:7051: 0xc420208480] [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).ensureJanitorStarted -> DEBU janitor already started [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).openConn -> DEBU connection was opened [peer0.........:7051] [fabsdk/fab] 2018/05/28 09:21:04 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unavailable desc = transport is closing] [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).ReleaseConn -> DEBU ReleaseConn [peer0.........:7051] [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).ensureJanitorStarted -> DEBU janitor already started [fabsdk/fab] 2018/05/28 09:21:04 UTC - txn.SendProposal.func1 -> DEBU Received error response from txn proposal processing: Transaction processing for endorser [peer0.........:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing QueryBlock failed: Transaction processing for endorser [peer0.........:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing ```

Kyroy (Mon, 28 May 2018 14:01:42 GMT):
@troyronda here are the logs ;) ```[fabsdk/fab] 2018/05/28 09:21:04 UTC - fab.(*EndpointConfig).PeerConfig -> DEBU Found MatchingPeerConfig for name/url [peer0.........] [fabsdk/fab] 2018/05/28 09:21:04 UTC - peer.(*peerEndorser).ProcessTransactionProposal -> DEBU Processing proposal using endorser: peer0.........:7051 [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).DialContext -> DEBU DialContext: peer0.........:7051 [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).loadConn -> DEBU using cached connection [peer0.........:7051: 0xc420208480] [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).ensureJanitorStarted -> DEBU janitor already started [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).openConn -> DEBU connection was opened [peer0.........:7051] [fabsdk/fab] 2018/05/28 09:21:04 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unavailable desc = transport is closing] [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).ReleaseConn -> DEBU ReleaseConn [peer0.........:7051] [fabsdk/fab] 2018/05/28 09:21:04 UTC - comm.(*CachingConnector).ensureJanitorStarted -> DEBU janitor already started [fabsdk/fab] 2018/05/28 09:21:04 UTC - txn.SendProposal.func1 -> DEBU Received error response from txn proposal processing: Transaction processing for endorser [peer0.........:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing ``` And the error from the call: ```QueryBlock failed: Transaction processing for endorser [peer0.........:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing ```

divyank (Mon, 28 May 2018 15:11:09 GMT):
Hi @Kyroy , i'm trying to reproduce this issue. What do you mean by "restarting the sdk"?

Kyroy (Mon, 28 May 2018 15:16:42 GMT):
@divyank When I restart my go application (REST service) and start making calls again Thank you for trying to help :)

divyank (Mon, 28 May 2018 15:24:42 GMT):
@Kyroy Does the issue only appear after restart? Is the SDK reinitialized upon restart (i.e. sdk.Close() and sdk.New())?

Kyroy (Mon, 28 May 2018 15:31:38 GMT):
@divyank no, it does not only appear after restart. The app runs in a docker container and comes up with the container. Then the `sdk.New()` is executed. With the restart, I wanted to say that the error also occurs after a fresh sdk.New call. Not only when the sdk had connections to the peer and closed them ... and so on

troyronda (Mon, 28 May 2018 15:43:52 GMT):
@Kyroy @divyank do the peer logs show anything?

Kyroy (Mon, 28 May 2018 15:44:43 GMT):
The show that everything runs fine and then: ```[grpc] Printf -> DEBU 5a8 transport: http2Server.HandleStreams failed to read frame: read tcp 172.17.0.4:7051->XX.XX.XX.XX:40792: use of closed network connection ```

troyronda (Mon, 28 May 2018 15:45:04 GMT):
(could "transport is closing" due to the peer closing the connection?)

troyronda (Mon, 28 May 2018 15:45:04 GMT):
(could "transport is closing" be due to the peer closing the connection?)

Kyroy (Mon, 28 May 2018 15:45:07 GMT):
where XX.XX.XX.XX is the ip where the sdk is running

Kyroy (Mon, 28 May 2018 15:46:18 GMT):
I don't know for sure if the peer is closing the connection. But at least it does not log this and there is no reason to do so :D The request also does not take long :thinking:

divyank (Mon, 28 May 2018 18:53:30 GMT):
@Kyroy I ran some tests locally with 10MB payloads with success. I assume you're using a networked environment? Could there be some infrastructure on your network that closes long lived connections?

divyank (Mon, 28 May 2018 18:54:09 GMT):
If you can create a Jira issue with complete debug logs from the peers and client I can take a deeper look.

Kyroy (Mon, 28 May 2018 21:00:29 GMT):
@divyank I was also able to get over 50mb locally. Yes. It is a networked environment on AWS. But everything within one region. Okay. I will do this tomorrow. Thanks for your help :)

yacovm (Mon, 28 May 2018 22:00:08 GMT):
Go SDK folks - FYI, there is a now utility in fabric core that allows you to generate a self signed TLS certificate. https://github.com/hyperledger/fabric/tree/master/common/crypto/tlsgen Useful for forcing the SDK to use mutual TLS even when the client didn't supply a certificate, as the fabric peer requests (but doesn't verify) the client cert by default. Usage is pretty simple: ``` ca, err := NewCA() kp, err := ca.NewClientCertKeyPair() ```

yacovm (Mon, 28 May 2018 22:00:08 GMT):
Go SDK folks - FYI, there is a now utility in fabric core that allows you to generate a self signed TLS certificate (with a `elliptic.P256()` key) . https://github.com/hyperledger/fabric/tree/master/common/crypto/tlsgen Useful for forcing the SDK to use mutual TLS even when the client didn't supply a certificate, as the fabric peer requests (but doesn't verify) the client cert by default. Usage is pretty simple: ``` ca, err := NewCA() kp, err := ca.NewClientCertKeyPair() ```

dimaxgl (Tue, 29 May 2018 07:55:35 GMT):
Hi guys! How to subscribe on events without channel context?

kelvinzhong (Tue, 29 May 2018 10:05:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kYrw7zHZ7inGtL9hj) @aleksandar.likic Thanks for the reply, but I'm not sure if that is what I needed. It seems the example also each MSP has create it's own channel, but still I have no idea how to send a transaction to different MSP's peer within the same channel, and clearly fabric-sdk-java does not support for dynamic select the endorse peer which confuse me......

huxinxin (Tue, 29 May 2018 11:34:47 GMT):
events

nmarcetic (Tue, 29 May 2018 12:43:04 GMT):
Hey Folks, have a problem when I am trying to register a user exactly like this https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/msp/enrollment_test.go#L80 ``` [fabsdk/core] 2018/05/29 12:39:10 UTC - sw.getOptsByConfig -> DEBU Initialized SW cryptosuite [fabsdk/fab] 2018/05/29 12:39:10 UTC - sw.(*fileBasedKeyStore).openKeyStore -> DEBU KeyStore opened at [/tmp/example-service-msp/keystore]...done Successfully connected to Fabric network [fabsdk/msp] 2018/05/29 12:39:10 UTC - msp.(*IdentityConfig).getCAConfig -> DEBU Getting cert authority for org: %s.org1 [fabsdk/msp] 2018/05/29 12:39:10 UTC - msp.(*IdentityConfig).getCAConfig -> DEBU Cert authority for org: org1 is ca.org1.example.com [fabsdk/msp] 2018/05/29 12:39:10 UTC - msp.(*IdentityConfig).getCAConfig -> DEBU Getting cert authority for org: %s.org1 [fabsdk/msp] 2018/05/29 12:39:10 UTC - msp.(*IdentityConfig).getCAConfig -> DEBU Cert authority for org: org1 is ca.org1.example.com [fabsdk/msp] 2018/05/29 12:39:10 UTC - msp.(*IdentityConfig).getCAConfig -> DEBU Getting cert authority for org: %s.org1 [fabsdk/msp] 2018/05/29 12:39:10 UTC - msp.(*IdentityConfig).getCAConfig -> DEBU Cert authority for org: org1 is ca.org1.example.com Registration failed: %v failed to create CA Client: error initializing CA [ca.org1.example.com]: failed to load pem bytes from path : open : no such file or directory Unable to create a user in the fabric-ca %v failed to create CA Client: error initializing CA [ca.org1.example.com]: failed to load pem bytes from path : open : no such file or directory ``` This was working like a charm but I setup everything from scratch and my network is running fine, my chaincode is deployed and it works but I can't interact with network using SDK, any ideas ? Thanks !

nmarcetic (Tue, 29 May 2018 12:44:34 GMT):
Its a this part from fabric-sdk-go but can't figure out which part is looking for https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/identityconfig.go#L180

Kyroy (Tue, 29 May 2018 14:15:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nYmMvCiQvfD7hA6Do)

Kyroy (Tue, 29 May 2018 14:16:58 GMT):
@divyank I upgraded the peer binary to 1.1.0. This seems to solve the issue :thinking: [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nYmMvCiQvfD7hA6Do)

divyank (Tue, 29 May 2018 14:33:43 GMT):
@Kyroy What version were you on before?

Kyroy (Tue, 29 May 2018 14:41:45 GMT):
@divyank 1.0.6

divyank (Tue, 29 May 2018 14:59:41 GMT):
We still support 1.0.6 so the logs would be helpful if you can provide them. I'll try reproducing this on a networked environment when I am able to.

divyank (Tue, 29 May 2018 15:17:43 GMT):
Actually, I can reproduce this locally with 1.0.6. Thank you for reporting the issue. We will look into this.

Kyroy (Tue, 29 May 2018 15:18:55 GMT):
Nice, so I dont have to set everything up again :)

Kyroy (Tue, 29 May 2018 15:19:08 GMT):
Thanks for looking into this and sorry that I did not stated that I used 1.0.6 before

Kyroy (Tue, 29 May 2018 15:19:08 GMT):
Thanks for looking into this and sorry that I did not state that I used 1.0.6 before

binhn (Tue, 29 May 2018 20:46:12 GMT):
@aleksandar.likic thanks for the suggestions; i'll look into that

aleksandar.likic (Tue, 29 May 2018 21:22:20 GMT):
@kelvinzhong Oh, I thought you were using Go SDK, since you posted to this channel :wink: Take a look at https://hyperledger-fabric.readthedocs.io/en/release-1.1/membership/membership.html#local-and-channel-msps . Peers authenticate clients (who submit tx proposals on the channel) based on the channel MSP which is shared among peers and orderers that participate on the channel. As long as a client belongs to an org on the channel, it should be able to transact with any peer on the channel. If you can't do it, it's probably a misconfiguration.

aleksandar.likic (Tue, 29 May 2018 21:37:08 GMT):
@nmarcetic Should be https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L333

kelvinzhong (Wed, 30 May 2018 01:42:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NEsiRsEAGDg7AN8Wv) @aleksandar.likic okay, thanks for this~I would check it first

Penglq (Wed, 30 May 2018 02:43:44 GMT):
Has joined the channel.

yljgo (Wed, 30 May 2018 03:18:43 GMT):
Has joined the channel.

pankaj13 (Wed, 30 May 2018 05:15:25 GMT):

output.txt

pankaj13 (Wed, 30 May 2018 05:21:12 GMT):
Hi Folks, I tweaked the test-config.yaml file that came with SDH-Go v 1.1 tests and here are snippets of code from my main.go and the output sdk, err := fabsdk.New(config.FromFile("/home/anshu/go/src/10-network/config.yaml")) //The above row is creating an instance of fabsdk instance from the configuration file. //When I out the network config in next steps, I get blanks l.Infof("Network config is : %#v", fabApi.NetworkConfig{}) //Output after running the binary 19:06:04.136 main ▶ DEBU 001 ================ STARTING MAIN ================ Do something with sdk to supress error &{{0xef7898 0xef7898 0xef7898 0xef7898 [0xc4201bd950]} 0xc420132480} 19:06:04.140 main ▶ INFO 002 Do something with sdk to supress error &{{0xef7898 0xef7898 0xef7898 0xef7898 [0xc4201bd950]} 0xc420132480} Network config is : fab.NetworkConfig{Name:"", Description:"", Version:"", Client:msp.ClientConfig{Organization:"", Logging:api.LoggingType{Level:""}, CryptoConfig:msp.CCType{Path:""}, TLSCerts:endpoint.MutualTLSConfig{Pem:[]string(nil), Path:"", Client:endpoint.TLSKeyPair{Key:endpoint.TLSConfig{Path:"", Pem:""}, Cert:endpoint.TLSConfig{Path:"", Pem:""}}}, CredentialStore:msp.CredentialStoreType{Path:"", CryptoStore:struct { Path string}{Path:""}}}, What am I doing wrong as the same sequence of code seems to be working under SDK tests? Thanks. PS: The test-config.yaml file is same the test Sdk with only cosmetic changes and has the same org structure.

pankaj13 (Wed, 30 May 2018 05:21:12 GMT):
Hi Folks, I tweaked the test-config.yaml file that came with SDH-Go v 1.1 tests and here are snippets of code from my main.go and the output sdk, err := fabsdk.New(config.FromFile("/home/anshu/go/src/10-network/config.yaml")) //The above row is creating an instance of fabsdk instance from the configuration file. //When I output the network config in next steps, I get blank output l.Infof("Network config is : %#v", fabApi.NetworkConfig{}) //Output after running the binary 19:06:04.136 main ▶ DEBU 001 ================ STARTING MAIN ================ Do something with sdk to supress error &{{0xef7898 0xef7898 0xef7898 0xef7898 [0xc4201bd950]} 0xc420132480} 19:06:04.140 main ▶ INFO 002 Do something with sdk to supress error &{{0xef7898 0xef7898 0xef7898 0xef7898 [0xc4201bd950]} 0xc420132480} Network config is : fab.NetworkConfig{Name:"", Description:"", Version:"", Client:msp.ClientConfig{Organization:"", Logging:api.LoggingType{Level:""}, CryptoConfig:msp.CCType{Path:""}, TLSCerts:endpoint.MutualTLSConfig{Pem:[]string(nil), Path:"", Client:endpoint.TLSKeyPair{Key:endpoint.TLSConfig{Path:"", Pem:""}, Cert:endpoint.TLSConfig{Path:"", Pem:""}}}, CredentialStore:msp.CredentialStoreType{Path:"", CryptoStore:struct { Path string}{Path:""}}}, What am I doing wrong as the same sequence of code seems to be working under SDK tests? Thanks. PS: The test-config.yaml file is same the test Sdk with only cosmetic changes and has the same org structure.

pankaj13 (Wed, 30 May 2018 05:21:12 GMT):
Hi Folks, I tweaked the test-config.yaml file that came with SDK-Go v 1.1 tests and here are snippets of code from my main.go and the output sdk, err := fabsdk.New(config.FromFile("/home/anshu/go/src/10-network/config.yaml")) //The above row is creating an instance of fabsdk instance from the configuration file. //When I output the network config in next steps, I get blank output l.Infof("Network config is : %#v", fabApi.NetworkConfig{}) //Output after running the binary 19:06:04.136 main ▶ DEBU 001 ================ STARTING MAIN ================ Do something with sdk to supress error &{{0xef7898 0xef7898 0xef7898 0xef7898 [0xc4201bd950]} 0xc420132480} 19:06:04.140 main ▶ INFO 002 Do something with sdk to supress error &{{0xef7898 0xef7898 0xef7898 0xef7898 [0xc4201bd950]} 0xc420132480} Network config is : fab.NetworkConfig{Name:"", Description:"", Version:"", Client:msp.ClientConfig{Organization:"", Logging:api.LoggingType{Level:""}, CryptoConfig:msp.CCType{Path:""}, TLSCerts:endpoint.MutualTLSConfig{Pem:[]string(nil), Path:"", Client:endpoint.TLSKeyPair{Key:endpoint.TLSConfig{Path:"", Pem:""}, Cert:endpoint.TLSConfig{Path:"", Pem:""}}}, CredentialStore:msp.CredentialStoreType{Path:"", CryptoStore:struct { Path string}{Path:""}}}, What am I doing wrong as the same sequence of code seems to be working under SDK tests? Thanks. PS: The test-config.yaml file is same the test Sdk with only cosmetic changes and has the same org structure.

pankaj13 (Wed, 30 May 2018 05:21:12 GMT):
Hi Folks, I tweaked the test-config.yaml file that came with SDK-Go v 1.1 tests and here are snippets of code from my main.go and the output sdk, err := fabsdk.New(config.FromFile("/home/anshu/go/src/10-network/config.yaml")) //The above row is creating an instance of fabsdk instance from the configuration file. //When I output the network config in next steps, I get blank output l.Infof("Network config is : %#v", fabApi.NetworkConfig{}) //Output after running the binary 19:06:04.136 main ▶ DEBU 001 ================ STARTING MAIN ================ Do something with sdk to supress error &{{0xef7898 0xef7898 0xef7898 0xef7898 [0xc4201bd950]} 0xc420132480} 19:06:04.140 main ▶ INFO 002 Do something with sdk to supress error &{{0xef7898 0xef7898 0xef7898 0xef7898 [0xc4201bd950]} 0xc420132480} Network config is : fab.NetworkConfig{Name:"", Description:"", Version:"", Client:msp.ClientConfig{Organization:"", Logging:api.LoggingType{Level:""}, CryptoConfig:msp.CCType{Path:""}, TLSCerts:endpoint.MutualTLSConfig{Pem:[]string(nil), Path:"", Client:endpoint.TLSKeyPair{Key:endpoint.TLSConfig{Path:"", Pem:""}, Cert:endpoint.TLSConfig{Path:"", Pem:""}}}, CredentialStore:msp.CredentialStoreType{Path:"", CryptoStore:struct { Path string}{Path:""}}}, What am I doing wrong as the same sequence of code seems to be working under SDK tests? Thanks. PS: The config.yaml file is same the test Sdk with only cosmetic changes and has the same org structure.

pathfinder2104 (Wed, 30 May 2018 07:16:53 GMT):
Has joined the channel.

nmarcetic (Wed, 30 May 2018 09:03:32 GMT):
@aleksandar.likic My man :) Thank you so much! It works like a charm now!

RealDeanZhao (Wed, 30 May 2018 09:41:34 GMT):
Has joined the channel.

huxinxin (Wed, 30 May 2018 09:54:04 GMT):
Hi,guys!How can I know whether a transaction was validated or invalidated. I am looking for it in the struct CCEvent `type CCEvent struct { // TxID is the ID of the transaction in which the event was set TxID string // ChaincodeID is the ID of the chaincode that set the event ChaincodeID string // EventName is the name of the chaincode event EventName string // Payload contains the payload of the chaincode event // NOTE: Payload will be nil for filtered events Payload []byte // BlockNumber contains the block number in which the // chaincode event was committed BlockNumber uint64 // SourceURL specifies the URL of the peer that produced the event SourceURL string }```` but did not find any field to get it. ```

huxinxin (Wed, 30 May 2018 09:54:04 GMT):
Hi,guys!How can I know whether a transaction was validated or invalidated. I am looking for it in the struct CCEvent type CCEvent struct { // TxID is the ID of the transaction in which the event was set TxID string // ChaincodeID is the ID of the chaincode that set the event ChaincodeID string // EventName is the name of the chaincode event EventName string // Payload contains the payload of the chaincode event // NOTE: Payload will be nil for filtered events Payload []byte // BlockNumber contains the block number in which the // chaincode event was committed BlockNumber uint64 // SourceURL specifies the URL of the peer that produced the event SourceURL string }```` but did not find any field to get it.

huxinxin (Wed, 30 May 2018 09:54:04 GMT):
Hi,guys!How can I know whether a transaction was validated or invalidated. I am looking for it in the struct CCEvent ``` type CCEvent struct { // TxID is the ID of the transaction in which the event was set TxID string // ChaincodeID is the ID of the chaincode that set the event ChaincodeID string // EventName is the name of the chaincode event EventName string // Payload contains the payload of the chaincode event // NOTE: Payload will be nil for filtered events Payload []byte // BlockNumber contains the block number in which the // chaincode event was committed BlockNumber uint64 // SourceURL specifies the URL of the peer that produced the event SourceURL string }```` but did not find any field to get it.

huxinxin (Wed, 30 May 2018 09:54:04 GMT):
Hi,guys!How can I know whether a transaction was validated or invalidated. I am looking for it in the struct CCEvent ``` type CCEvent struct { // TxID is the ID of the transaction in which the event was set TxID string // ChaincodeID is the ID of the chaincode that set the event ChaincodeID string // EventName is the name of the chaincode event EventName string // Payload contains the payload of the chaincode event // NOTE: Payload will be nil for filtered events Payload []byte // BlockNumber contains the block number in which the // chaincode event was committed BlockNumber uint64 // SourceURL specifies the URL of the peer that produced the event SourceURL string }``` but did not find any field to get it.

AlexanderZhovnuvaty (Wed, 30 May 2018 11:38:40 GMT):
Has joined the channel.

haibbo (Wed, 30 May 2018 14:48:34 GMT):
Has joined the channel.

Baha-sk (Wed, 30 May 2018 15:01:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=N8rnm2YMQMBuh5ep4) @pankaj13 can you try to provide a relative path to your config file and retry?

aleksandar.likic (Wed, 30 May 2018 15:02:19 GMT):
@pankaj13 fabApi.NetworkConfig{} creates an empty structure, thus blank output

Baha-sk (Wed, 30 May 2018 15:03:51 GMT):
oh @aleksandar.likic is right @pankaj13 , I didn't realize the '{}' they looked like '()' :)

aleksandar.likic (Wed, 30 May 2018 15:11:05 GMT):
@huxinxin CCEvent is a part of the committed block. So the transaction was validated. By listening for a CCEvent you are listening for a committed transaction. Any number of clients can listen for a CCEvent. Only the client that has committed a transaction to an orderer will be notified if the transaction failed.

Baha-sk (Wed, 30 May 2018 15:20:08 GMT):
@pankaj13 , NetworkConfig struct is indirectly available from sdk, you need to first get the configBackend like this (once the sdk is created): configBackend, err := sdk.Config() then, you can get an endpointConfig from this configBackend like this: endpointConfig, err := fab.ConfigFromBackend(configBackend...) finally, this endpointConfig has the NetworkConfig struct you are looking for: endpointConfig, err := fab.ConfigFromBackend(configBackend...) of course, make sure err is nil

Baha-sk (Wed, 30 May 2018 15:20:08 GMT):
@pankaj13 , NetworkConfig struct is indirectly available from sdk, you need to first get the configBackend like this (once the sdk is created): configBackend, err := sdk.Config() then, you can get an endpointConfig from this configBackend like this: endpointConfig, err := fab.ConfigFromBackend(configBackend...) finally, this endpointConfig has the NetworkConfig struct you are looking for: endpointConfig.NetworkConfig() of course, make sure err is nil

Baha-sk (Wed, 30 May 2018 15:20:08 GMT):
@pankaj13 , NetworkConfig struct is indirectly available from sdk, you need to first get the configBackend like this (once the sdk is created): configBackend, err := sdk.Config() then, you can get an endpointConfig from this configBackend like this: endpointConfig, err := fab.ConfigFromBackend(configBackend...) finally, this endpointConfig has the NetworkConfig struct you are looking for: netConfig, ok := endpointConfig.NetworkConfig() of course, make sure err is nil and ok is true

Baha-sk (Wed, 30 May 2018 15:20:08 GMT):
@pankaj13 , NetworkConfig struct is indirectly available from sdk, you need to first get the configBackend like this (once the sdk is created): configBackend, err := sdk.Config() then, you can get an endpointConfig from this configBackend like this: endpointConfig, err := fab.ConfigFromBackend(configBackend...) finally, this endpointConfig has the NetworkConfig struct you are looking for: netConfig, ok := endpointConfig.NetworkConfig() of course, make sure err is nil and ok is true

Baha-sk (Wed, 30 May 2018 15:20:08 GMT):
@pankaj13 , NetworkConfig struct is indirectly available from sdk, you need to first get the configBackend like this (once the sdk is created): configBackend, err := sdk.Config() then, you can get an endpointConfig from this configBackend like this: endpointConfig, err := fab.ConfigFromBackend(configBackend...) where fab package is found under 'fabric-sdk-go/pkg/fab' finally, this endpointConfig has the NetworkConfig struct you are looking for: netConfig, ok := endpointConfig.NetworkConfig() of course, make sure err is nil and ok is true

troyronda (Wed, 30 May 2018 17:45:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ECpphzkdFv3pyPzvZ) the mac issue has been resolved.

troyronda (Wed, 30 May 2018 17:45:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ECpphzkdFv3pyPzvZ) the mac issue has been resolved. @elicrisko

rogerwilcos (Wed, 30 May 2018 23:23:53 GMT):
Has joined the channel.

pankaj13 (Thu, 31 May 2018 01:28:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uPpKCGT3XDGDXw76j) @Baha-sk It worked like a charm!! Thanks.

huxinxin (Thu, 31 May 2018 03:52:59 GMT):
@aleksandar.likic thanks for your reply.I still have a puzzle.I tried update the same key at the same time with Execute() in different peers. Only one succeed and the others get a MVCC_READ_CONFLICT error.Does it means that if there is no errors in Execute(), the transaction is validated.

MonnyClara (Thu, 31 May 2018 08:48:26 GMT):
Has joined the channel.

Alex0 (Thu, 31 May 2018 10:06:56 GMT):
Has joined the channel.

yacovm (Thu, 31 May 2018 18:20:42 GMT):
what is static discovery and what is dynamic discovery, @bstasyszyn ? is static just like a connection profile equivalent?

bstasyszyn (Thu, 31 May 2018 18:30:24 GMT):
Static discovery reads a config file where all peers are defined; dynamic uses the peer's discovery service

yacovm (Thu, 31 May 2018 18:30:56 GMT):
how far are you with integrating with the peer's discovery service, by the way?

yacovm (Thu, 31 May 2018 18:31:07 GMT):
i mean, you as golang SDK

bstasyszyn (Thu, 31 May 2018 18:33:32 GMT):
Discovering peers is basically done; I'll start integrating with the peers endorser selection early next week

RealDeanZhao (Fri, 01 Jun 2018 03:00:53 GMT):
Is there a go version doc like the node one? https://fabric-sdk-node.github.io/index.html

jrosmith (Fri, 01 Jun 2018 04:45:16 GMT):
@RealDeanZhao not sure if there are official docs elsewhere but you can use godoc.org to get the docs from the github repo: https://godoc.org/github.com/hyperledger/fabric-sdk-go

MonnyClara (Fri, 01 Jun 2018 09:10:08 GMT):
Hello, I have some trouble setting correcly the endorsement policy of a chaincode via the Go SDK. I have a non-TLS fabric network with one org : org1-hfclarablock. To instantiate my chaincode I use ```ccPolicy := cauthdsl.SignedByAnyMember([]string{"org1-hfclarablock"}) setup.admin.InstantiateCC(setup.ChannelID, resmgmt.InstantiateCCRequest{Name: setup.ChainCodeID, Path: setup.ChaincodePath, Version: "1.0", Args: [][]byte{[]byte("init")}, Policy: ccPolicy}) ``` But then I got error in my peer logs looking like ```2018-06-01 08:52:16.935 UTC [vscc] Invoke -> WARN e54 Endorsement policy failure for transaction txid=7899092b96d9dab4c86d5dead4d260fddf3d337fd423639f758a2417d9912012, err: signature set did not satisfy policy 2018-06-01 08:52:16.935 UTC [committer/txvalidator] validateTx -> ERRO e61 VSCCValidateTx for transaction txId = 7899092b96d9dab4c86d5dead4d260fddf3d337fd423639f758a2417d9912012 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy ``` Did someone faced the same issues ? Any help is welcome ;) Thanks !

titoe218 (Fri, 01 Jun 2018 09:23:42 GMT):
Hello, I call function GetBlockByNumber but got this error? `Description: Invalid chain ID` does anyone know where to get chain ID?

Kyroy (Fri, 01 Jun 2018 10:41:19 GMT):
I currently have a channel where (when querying the last block) `LastConfigFromBlock` points to block 1734, but actually, block 1735 is the CONFIG block. Block 1734 is a ENDORSER_TRANSACTION How can this happen? GetLastConfigFromBlock: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/resource/config.go#L110

aleksandar.likic (Fri, 01 Jun 2018 11:25:17 GMT):
@titoe218 It's the name of the channel you are querying

troyronda (Fri, 01 Jun 2018 13:15:18 GMT):
Hi all - we are planning the next tag shortly. https://gerrit.hyperledger.org/r/c/22669/

troyronda (Fri, 01 Jun 2018 13:15:18 GMT):
Hi all - we are planning to push the next tag shortly. https://gerrit.hyperledger.org/r/c/22669/

dimaxgl (Fri, 01 Jun 2018 13:38:43 GMT):
@troyronda hi, when we can see stable version of SDK?

MaximeAubanel (Fri, 01 Jun 2018 13:40:17 GMT):
@dimaxgl lol, it's already pretty stable honestly. If you are talking about a stable tag, then I don't know

troyronda (Fri, 01 Jun 2018 13:49:00 GMT):
@Kyroy @bstasyszyn hmm... this function is simply doing an unmarshal.

troyronda (Fri, 01 Jun 2018 13:49:10 GMT):
maybe bob has more info.

troyronda (Fri, 01 Jun 2018 13:58:07 GMT):
@dimaxgl @MaximeAubanel here is the Hyperledger release taxonomy: https://wiki.hyperledger.org/community/release_taxonomy

troyronda (Fri, 01 Jun 2018 14:00:25 GMT):
I would also have preferred to have more contributors from different organizations and known usage :). If the community see a way to help us get there, we'd very much welcome that.

troyronda (Fri, 01 Jun 2018 14:00:25 GMT):
I would also have preferred to have more contributors from different organizations and known usage :). If the community sees a way to help us get there, we'd very much welcome that.

troyronda (Fri, 01 Jun 2018 14:02:19 GMT):
The core functionality is pretty stable at this point as @MaximeAubanel mentioned.

dimaxgl (Fri, 01 Jun 2018 14:05:53 GMT):
@troyronda does it seems that main functionality is backward compatible? I didn't update sdk for a long time, and update caused some troubles cause many packages were removed or renamed

troyronda (Fri, 01 Jun 2018 14:18:28 GMT):
@dimaxgl the pace of changes to the main client interfaces (intended for usage by end developers) is much lower than in earlier tags. the upcoming tag had a few tweaks based on feedback/usage (compared to alpha3). The largest functional changes in alpha4 have been a refactoring of config to allow for progmatic/minimal configurations (rather than requiring a config file) and inclusion of Fabric 1.2's discovery service.

troyronda (Fri, 01 Jun 2018 14:18:28 GMT):
@dimaxgl the pace of changes to the main client interfaces (intended for usage by end developers) is much lower than in earlier tags. the upcoming tag had a few tweaks based on feedback/usage (compared to alpha3). As I recall, the largest functional changes in alpha4 have been a refactoring of config to allow for progmatic/minimal configurations (rather than requiring a config file) and inclusion of Fabric 1.2's discovery service.

troyronda (Fri, 01 Jun 2018 14:18:28 GMT):
@dimaxgl the pace of changes to the main client interfaces (intended for usage by end developers) is much lower than in earlier tags. the upcoming tag had a few tweaks based on feedback/usage (compared to alpha3). Additionally (as I recall), the largest functional changes in alpha4 have been a refactoring of config to allow for progmatic/minimal configurations (rather than requiring a config file) and inclusion of Fabric 1.2's discovery service.

troyronda (Fri, 01 Jun 2018 14:20:27 GMT):
@muralisr @binhn how are things going? i saw your notes earlier in the chat history :).

muralisr (Fri, 01 Jun 2018 14:23:15 GMT):
@troyronda going good. We were exploring to mock SDK access. Main options were to write mocks for the SDK calls themselves or prime SDK with fabric mocks in the SDK

troyronda (Fri, 01 Jun 2018 14:24:39 GMT):
Cool - let me know if you want to discuss anything :).

divyank (Fri, 01 Jun 2018 15:46:43 GMT):
Hi @Kyroy, I ran some tests and the LastConfig.Index returned from resource.GetLastConfigFromBlock is accurate. What API are you using to query blocks?

Kyroy (Fri, 01 Jun 2018 15:48:05 GMT):
@divyank So faw (couple of months) everything worked like a charm. Also now. Normally there is no problem. But I have one channel, where this happens. Probably a fabric problem, right? :D

Kyroy (Fri, 01 Jun 2018 15:49:53 GMT):
I am using https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/ledger/ledger.go#L218

divyank (Fri, 01 Jun 2018 15:50:39 GMT):
It is unlikely. Maybe a bad assumption somewhere? Block numbers are always zero indexed (block 0 being the genesis block).

divyank (Fri, 01 Jun 2018 15:50:51 GMT):
I used the same API in my test

Kyroy (Fri, 01 Jun 2018 15:54:54 GMT):
GetLatestChannelConfig 1. `QueryInfo` to get height 2. lastBlockNumber := channelInfo.Height - 1 3. block := ledgerClient.QueryBlock(lastBlockNumber) 4. lc, err := resource.GetLastConfigFromBlock(block) 5. block, err = ledgerClient.QueryBlock(lc.Index) 99.9% works fine. Only for this one channel, it returns a block with `ENDORSER_TRANSACTION` number 1734 instead of block with CONFIG 1735

Kyroy (Fri, 01 Jun 2018 15:54:54 GMT):
GetLatestChannelConfig 1. QueryInfo to get height 2. lastBlockNumber := channelInfo.Height - 1 3. block := ledgerClient.QueryBlock(lastBlockNumber) 4. lc, err := resource.GetLastConfigFromBlock(block) 5. block, err = ledgerClient.QueryBlock(lc.Index) 99.9% works fine. Only for this one channel, it returns a block with `ENDORSER_TRANSACTION` number 1734 instead of block with CONFIG 1735

Kyroy (Fri, 01 Jun 2018 15:54:54 GMT):
GetLatestChannelConfig 1. ledgerClient.QueryInfo to get height 2. lastBlockNumber := channelInfo.Height - 1 3. block := ledgerClient.QueryBlock(lastBlockNumber) 4. lc, err := resource.GetLastConfigFromBlock(block) 5. block, err = ledgerClient.QueryBlock(lc.Index) 99.9% works fine. Only for this one channel, it returns a block with `ENDORSER_TRANSACTION` number 1734 instead of block with CONFIG 1735

Kyroy (Fri, 01 Jun 2018 15:54:54 GMT):
GetLatestChannelConfig 1. ledgerClient.QueryInfo to get height 2. lastBlockNumber := channelInfo.Height - 1 3. block := ledgerClient.QueryBlock(lastBlockNumber) 4. lc, err := resource.GetLastConfigFromBlock(block) 5. block, err = ledgerClient.QueryBlock(lc.Index) 99.9% works fine. Only for this one channel, it returns a block 1734 with `ENDORSER_TRANSACTION` instead of block 1735 with `CONFIG` tx

Kyroy (Fri, 01 Jun 2018 15:54:54 GMT):
GetLatestChannelConfig 1. ledgerClient.QueryInfo to get height 2. lastBlockNumber := channelInfo.Height - 1 3. block := ledgerClient.QueryBlock(lastBlockNumber) 4. lc, err := resource.GetLastConfigFromBlock(block) 5. block, err = ledgerClient.QueryBlock(lc.Index) 99.9% works fine. Only for this one channel, it returns block 1734 with `ENDORSER_TRANSACTION` instead of block 1735 with `CONFIG` tx

divyank (Fri, 01 Jun 2018 16:04:18 GMT):
What is the last config index field set to on block 1734?

Kyroy (Fri, 01 Jun 2018 16:33:36 GMT):
block 1733 => 1626 block 1734 => 1734

Kyroy (Fri, 01 Jun 2018 16:34:35 GMT):
@divyank Sorry, hat to patch my service and it took a lot of time for building the docker container with dep =.=

Kyroy (Fri, 01 Jun 2018 16:34:35 GMT):
@divyank Sorry, had to patch my service and it took a lot of time for building the docker container with dep =.=

Kyroy (Fri, 01 Jun 2018 16:35:40 GMT):
I really wanna switch to vgo, but this is not possible with fabric1.1.0 because of their weird `amcl` packages

Kyroy (Fri, 01 Jun 2018 16:37:43 GMT):
1625 => 0 1626 => 1626 1627 => 1626

divyank (Fri, 01 Jun 2018 17:05:29 GMT):
If the last config index on block 1734 is 1734 and 1734 does not have any config transactions, that we be pretty conclusive evidence of a fabric bug. I would create a Jira ticket with the block dumps and contact fabric maintainers.

divyank (Fri, 01 Jun 2018 17:05:29 GMT):
If the last config index on block 1734 is 1734 and 1734 does not have any config transactions, that would be pretty conclusive evidence of a fabric bug. I would create a Jira ticket with the block dumps and contact fabric maintainers.

Kyroy (Fri, 01 Jun 2018 17:11:29 GMT):
block dumps = `peer/ledgersData/pvtdataStore/000001.log`? or what do you mean

divyank (Fri, 01 Jun 2018 17:18:24 GMT):
By block dump I mean any readable form of your blocks to help the developers see the issue. I use this block printer package to debug: github.com/securekey/fabric-examples/blob/master/fabric-cli/cmd/fabric-cli/printer/blockprinter.go

titoe218 (Sat, 02 Jun 2018 01:11:30 GMT):
@aleksandar.likic Thank you. But I think we should change "chain Id" to "channel Id" could make others easier to understand :D

titoe218 (Sat, 02 Jun 2018 01:11:30 GMT):
@aleksandar.likic Thank you

PhilipFeairheller (Sat, 02 Jun 2018 20:04:28 GMT):
Has joined the channel.

angeloatleadiq (Sun, 03 Jun 2018 04:51:58 GMT):
I got a warning like this. What does it mean? ``` [orderer/common/broadcast] Handle -> WARN 7e2 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Readset expected key [Groups] /Channel/Application at version 0, but got version 1 ```

angeloatleadiq (Sun, 03 Jun 2018 04:51:58 GMT):
I got a warning like this. What does it mean when moving to use fabric-sdk-go version v1.0.0-alpha3 from the tutorial https://github.com/chainHero/heroes-service ``` [orderer/common/broadcast] Handle -> WARN 7e2 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Readset expected key [Groups] /Channel/Application at version 0, but got version 1 ```

angeloatleadiq (Sun, 03 Jun 2018 04:51:58 GMT):
I got a warning like this. What does it mean when moving to use fabric-sdk-go version v1.0.0-alpha3 from the tutorial https://github.com/chainHero/heroes-service ```[orderer/common/broadcast] Handle -> WARN 7e2 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Readset expected key [Groups] /Channel/Application at version 0, but got version 1 ```

angeloatleadiq (Sun, 03 Jun 2018 04:51:58 GMT):
I got a warning like this when moving to use fabric-sdk-go version v1.0.0-alpha3 from the tutorial https://github.com/chainHero/heroes-service. What does it mean? ```[orderer/common/broadcast] Handle -> WARN 7e2 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Readset expected key [Groups] /Channel/Application at version 0, but got version 1 ```

angeloatleadiq (Sun, 03 Jun 2018 04:51:58 GMT):
I got a warning like this when moving to use fabric-sdk-go version v1.0.0-alpha3 from the tutorial https://github.com/chainHero/heroes-service. What does it mean? ``` [fabsdk/fab] 2018/06/03 07:56:03 UTC - connection.(*DeliverConnection).Receive -> WARN Received error from stream: [rpc error: code = Unimplemented desc = unknown service protos.Deliver]. Sending disconnected event. Unable to install and instantiate the chaincode: failed to instantiate the chaincode: CreateAndSendTransaction failed: SendTransaction failed: calling orderer 'orderer.hf.leadiq.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.hf.leadiq.com:7050] [fabsdk/fab] 2018/06/03 07:56:03 UTC - client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: rpc error: code = Unimplemented desc = unknown service protos.Deliver [fabsdk/fab] 2018/06/03 07:56:03 UTC - client.(*Client).monitorConnection -> WARN Attempting to reconnect... panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x45000ec]```

angeloatleadiq (Sun, 03 Jun 2018 07:01:09 GMT):
This is how I set up

angeloatleadiq (Sun, 03 Jun 2018 07:03:20 GMT):
Did I do it right? ```func (setup *FabricSetup) Initialize() error { // Add parameters for the initialization if setup.initialized { return fmt.Errorf("sdk already initialized") } // Initialize the SDK with the configuration file sdk, err := fabsdk.New(config.FromFile(setup.ConfigFile)) if err != nil { return fmt.Errorf("failed to create sdk: %v", err) } setup.sdk = sdk // Channel management client is responsible for managing channels (create/update channel) // Supply user that has privileges to create channel (in this case orderer admin) orgAdminClientContext := sdk.Context(fabsdk.WithUser(setup.OrgAdmin), fabsdk.WithOrg(setup.OrgName)) chMgmtClient, err := resmgmt.New(orgAdminClientContext) if err != nil { return fmt.Errorf("failed to add Admin user to sdk: %v", err) } setup.admin = chMgmtClient // Org admin user is signing user for creating channel. // The session method is the only way for now to get the user identity. orgAdminUser, err := GetSigningIdentity(sdk, setup.OrgAdmin, setup.OrgName) if err != nil { return fmt.Errorf("failed to get session for %s, %s: %s", setup.OrgName, setup.OrgAdmin, err) } r, err := os.Open(setup.ChannelConfig) if err != nil { return fmt.Errorf("opening channel config file failed: %v", err) } defer r.Close() // Creation of the channel. A channel can be understood as a private network inside the main network between two or more specific network Organizations // The channel is defined by its : Organizations, // anchor peer (A peer node that all other peers can discover and communicate with. Every Organizations have one), // the shared ledger, chaincode application(s) and the ordering service node(s) // Each transaction on the network is executed on a channel. req := resmgmt.SaveChannelRequest{ChannelID: setup.ChannelID, ChannelConfig: r, SigningIdentities: []msp.SigningIdentity{orgAdminUser}} if err = chMgmtClient.SaveChannel(req); err != nil { return fmt.Errorf("failed to create channel: %v", err) } // Allow orderer to process channel creation time.Sleep(time.Second * 5) // Org peers join channel if err = setup.admin.JoinChannel(setup.ChannelID); err != nil { return fmt.Errorf("org peers failed to join the channel: %v", err) } fmt.Println("Initialization Successful") setup.initialized = true return nil }```

angeloatleadiq (Sun, 03 Jun 2018 07:03:20 GMT):
Did I do it right? ```func (setup *FabricSetup) Initialize() error { // Add parameters for the initialization if setup.initialized { return fmt.Errorf("sdk already initialized") } // Initialize the SDK with the configuration file sdk, err := fabsdk.New(config.FromFile(setup.ConfigFile)) if err != nil { return fmt.Errorf("failed to create sdk: %v", err) } setup.sdk = sdk // Channel management client is responsible for managing channels (create/update channel) // Supply user that has privileges to create channel (in this case orderer admin) orgAdminClientContext := sdk.Context(fabsdk.WithUser(setup.OrgAdmin), fabsdk.WithOrg(setup.OrgName)) chMgmtClient, err := resmgmt.New(orgAdminClientContext) if err != nil { return fmt.Errorf("failed to add Admin user to sdk: %v", err) } setup.admin = chMgmtClient // Org admin user is signing user for creating channel. // The session method is the only way for now to get the user identity. orgAdminUser, err := GetSigningIdentity(sdk, setup.OrgAdmin, setup.OrgName) if err != nil { return fmt.Errorf("failed to get session for %s, %s: %s", setup.OrgName, setup.OrgAdmin, err) } r, err := os.Open(setup.ChannelConfig) if err != nil { return fmt.Errorf("opening channel config file failed: %v", err) } defer r.Close() // Creation of the channel. A channel can be understood as a private network inside the main network between two or more specific network Organizations req := resmgmt.SaveChannelRequest{ChannelID: setup.ChannelID, ChannelConfig: r, SigningIdentities: []msp.SigningIdentity{orgAdminUser}} if err = chMgmtClient.SaveChannel(req); err != nil { return fmt.Errorf("failed to create channel: %v", err) } // Allow orderer to process channel creation time.Sleep(time.Second * 5) // Org peers join channel if err = setup.admin.JoinChannel(setup.ChannelID); err != nil { return fmt.Errorf("org peers failed to join the channel: %v", err) } fmt.Println("Initialization Successful") setup.initialized = true return nil }```

angeloatleadiq (Sun, 03 Jun 2018 07:03:20 GMT):
Did I do it right? ```func (setup *FabricSetup) Initialize() error { // Add parameters for the initialization if setup.initialized { return fmt.Errorf("sdk already initialized") } // Initialize the SDK with the configuration file sdk, err := fabsdk.New(config.FromFile(setup.ConfigFile)) if err != nil { return fmt.Errorf("failed to create sdk: %v", err) } setup.sdk = sdk // Channel management client is responsible for managing channels (create/update channel) // Supply user that has privileges to create channel (in this case orderer admin) orgAdminClientContext := sdk.Context(fabsdk.WithUser(setup.OrgAdmin), fabsdk.WithOrg(setup.OrgName)) chMgmtClient, err := resmgmt.New(orgAdminClientContext) if err != nil { return fmt.Errorf("failed to add Admin user to sdk: %v", err) } setup.admin = chMgmtClient // Org admin user is signing user for creating channel. // The session method is the only way for now to get the user identity. orgAdminUser, err := GetSigningIdentity(sdk, setup.OrgAdmin, setup.OrgName) if err != nil { return fmt.Errorf("failed to get session for %s, %s: %s", setup.OrgName, setup.OrgAdmin, err) } r, err := os.Open(setup.ChannelConfig) if err != nil { return fmt.Errorf("opening channel config file failed: %v", err) } defer r.Close() // Creation of the channel. A channel can be understood as a private network inside the main network between two or more specific network Organizations req := resmgmt.SaveChannelRequest{ChannelID: setup.ChannelID, ChannelConfig: r, SigningIdentities: []msp.SigningIdentity{orgAdminUser}} if err = chMgmtClient.SaveChannel(req); err != nil { return fmt.Errorf("failed to create channel: %v", err) } // Allow orderer to process channel creation time.Sleep(time.Second * 5) // Org peers join channel if err = setup.admin.JoinChannel(setup.ChannelID); err != nil { return fmt.Errorf("org peers failed to join the channel: %v", err) } fmt.Println("Initialization Successful") setup.initialized = true return nil } func (setup *FabricSetup) InstallAndInstantiateCC() error { // Create a new go lang chaincode package and initializing it with our chaincode ccPkg, err := packager.NewCCPackage(setup.ChaincodePath, setup.ChaincodeGoPath) if err != nil { return fmt.Errorf("failed to create chaincode package: %v", err) } // Install our chaincode on org peers // The resource management client send the chaincode to all peers in its channel in order for them to store it and interact with it later ccReq := resmgmt.InstallCCRequest{Name: setup.ChainCodeID, Path: setup.ChaincodePath, Version: "1.0", Package: ccPkg} _, err = setup.admin.InstallCC(ccReq) // THIS LINE THROWS THE ERROR if err != nil { return fmt.Errorf("failed to install cc to org peers %v", err) } .... }```

angeloatleadiq (Sun, 03 Jun 2018 07:03:20 GMT):
Did I do it right? ```func (setup *FabricSetup) Initialize() error { if setup.initialized { return fmt.Errorf("sdk already initialized") } sdk, err := fabsdk.New(config.FromFile(setup.ConfigFile)) if err != nil { return fmt.Errorf("failed to create sdk: %v", err) } setup.sdk = sdk orgAdminClientContext := sdk.Context(fabsdk.WithUser(setup.OrgAdmin), fabsdk.WithOrg(setup.OrgName)) chMgmtClient, err := resmgmt.New(orgAdminClientContext) if err != nil { return fmt.Errorf("failed to add Admin user to sdk: %v", err) } setup.admin = chMgmtClient orgAdminUser, err := GetSigningIdentity(sdk, setup.OrgAdmin, setup.OrgName) if err != nil { return fmt.Errorf("failed to get session for %s, %s: %s", setup.OrgName, setup.OrgAdmin, err) } r, err := os.Open(setup.ChannelConfig) if err != nil { return fmt.Errorf("opening channel config file failed: %v", err) } defer r.Close() req := resmgmt.SaveChannelRequest{ChannelID: setup.ChannelID, ChannelConfig: r, SigningIdentities: []msp.SigningIdentity{orgAdminUser}} if err = chMgmtClient.SaveChannel(req); err != nil { return fmt.Errorf("failed to create channel: %v", err) } time.Sleep(time.Second * 5) if err = setup.admin.JoinChannel(setup.ChannelID); err != nil { return fmt.Errorf("org peers failed to join the channel: %v", err) } fmt.Println("Initialization Successful") setup.initialized = true return nil } func (setup *FabricSetup) InstallAndInstantiateCC() error { ccPkg, err := packager.NewCCPackage(setup.ChaincodePath, setup.ChaincodeGoPath) if err != nil { return fmt.Errorf("failed to create chaincode package: %v", err) } ccReq := resmgmt.InstallCCRequest{Name: setup.ChainCodeID, Path: setup.ChaincodePath, Version: "1.0", Package: ccPkg} _, err = setup.admin.InstallCC(ccReq) // THIS LINE THROWS THE ERROR if err != nil { return fmt.Errorf("failed to install cc to org peers %v", err) } .... }```

chill37 (Mon, 04 Jun 2018 07:36:50 GMT):
block number greater than

chill37 (Mon, 04 Jun 2018 08:00:55 GMT):
Hi I'm getting Block number error when calling chaincode numerous times from multiple client.

chill37 (Mon, 04 Jun 2018 08:02:35 GMT):
Hi I'm getting Block number error when calling chaincode numerous times from multiple client. The Error message is as follows: ERRO: Expecting block number greater than 2 but received block number 2 I haven't used any of eventService (registerchaincode, register block). should I be using these to avoid this error? Thanks!

chill37 (Mon, 04 Jun 2018 08:03:04 GMT):
Hi I'm getting Block number error when calling chaincode numerous times from multiple client. The Error message is as follows: `ERRO: Expecting block number greater than 2 but received block number 2` I haven't used any of eventService (registerchaincode, register block). should I be using these to avoid this error? Thanks!

Kyroy (Mon, 04 Jun 2018 10:49:53 GMT):
Is there a way that I use fabrics protolator features when using the fabric-sdk-go? E.g. `protolator.DeepMarshalJSON` gives me errors or panics. I think because of the sdk including the protobuf files

Kyroy (Mon, 04 Jun 2018 10:51:22 GMT):
```*common.Block: error in PopulateTo for field data for message *common.Block: *common.BlockData: error in PopulateTo for slice field data at index 0 for message *common.BlockData: *common.Envelope: error in PopulateTo for field payload for message *common.Envelope: *common.Payload: error in PopulateTo for field data for message *common.Payload: *common.ConfigEnvelope: error in PopulateTo for field config for message *common.ConfigEnvelope: *common.Config: error in PopulateTo for field channel_group for message *common.Config: *common.DynamicChannelGroup: error in PopulateTo for map field groups and key Orderer for message *common.DynamicChannelGroup: unknown channel ConfigGroup sub-group: Orderer```

Kyroy (Mon, 04 Jun 2018 10:51:59 GMT):
when I use ```_ "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" _ "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp" _ "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer" _ "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer"```

Kyroy (Mon, 04 Jun 2018 10:52:08 GMT):
and panic when I use the protos from fabric

angeloatleadiq (Mon, 04 Jun 2018 10:52:34 GMT):
I got a warning like this when moving to use fabric-sdk-go version v1.0.0-alpha3 from the tutorial https://github.com/chainHero/heroes-service. What does it mean? ``` [fabsdk/fab] 2018/06/03 07:56:03 UTC - connection.(*DeliverConnection).Receive -> WARN Received error from stream: [rpc error: code = Unimplemented desc = unknown service protos.Deliver]. Sending disconnected event. Unable to install and instantiate the chaincode: failed to instantiate the chaincode: CreateAndSendTransaction failed: SendTransaction failed: calling orderer 'orderer.hf.leadiq.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.hf.leadiq.com:7050] [fabsdk/fab] 2018/06/03 07:56:03 UTC - client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: rpc error: code = Unimplemented desc = unknown service protos.Deliver [fabsdk/fab] 2018/06/03 07:56:03 UTC - client.(*Client).monitorConnection -> WARN Attempting to reconnect... panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x45000ec]```

MonnyClara (Mon, 04 Jun 2018 11:23:48 GMT):
Hello, I'm looking to instantiate a chaincode like this `peer chaincode instantiate -o orderer.example.com:7050 -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":[]}` But throught the Golang SDK `setup.admin.InstantiateCC(setup.ChannelID, resmgmt.InstantiateCCRequest{Name: setup.ChainCodeID, Path: setup.ChaincodePath, Version: "1.0", , Args: [][]byte{[]byte()}, Policy: ccPolicy})` What do you put in `ccPolicy` ?

RealDeanZhao (Mon, 04 Jun 2018 14:49:28 GMT):
`enrollmentSecret, err := mspClient.Register(&msp.RegistrationRequest{ Name: username, Type: "user", Attributes: testAttributes, // Affiliation is mandatory. "org1" and "org2" are hardcoded as CA defaults // See https://github.com/hyperledger/fabric-ca/blob/release/cmd/fabric-ca-server/config.go Affiliation: "org1", })`

RealDeanZhao (Mon, 04 Jun 2018 14:49:32 GMT):
``

RealDeanZhao (Mon, 04 Jun 2018 14:50:34 GMT):
When I changed the Affiliation to other value like 'anotherorg', it errors out

RealDeanZhao (Mon, 04 Jun 2018 14:50:59 GMT):
failed to register user: failed to register user: Response from server: Error Code: 63 - Failed to get Affiliation: sql: no rows in result set

RealDeanZhao (Mon, 04 Jun 2018 14:51:28 GMT):
Is there any configuration I need to fabric ca server?

Baha-sk (Mon, 04 Jun 2018 15:01:45 GMT):
@MonnyClara ccPolicy sets who can access this cc.. take a look at https://github.com/hyperledger/fabric-sdk-go/blob/df181da0c806d03bd8b7fcde8dfa147472ff6a89/pkg/client/resmgmt/resmgmt_test.go#L891 for a simple example, or for a more complex example with multi-orgs: https://github.com/hyperledger/fabric-sdk-go/blob/df181da0c806d03bd8b7fcde8dfa147472ff6a89/test/integration/orgs/multiple_orgs_test.go#L557

Baha-sk (Mon, 04 Jun 2018 15:04:21 GMT):
@RealDeanZhao if you want to use a different CA in your code, you need to create a new entry with its own MSP cert/keys, take at look at the this config: https://github.com/hyperledger/fabric-sdk-go/blob/df181da0c806d03bd8b7fcde8dfa147472ff6a89/test/fixtures/config/config_test.yaml#L359

Baha-sk (Mon, 04 Jun 2018 15:04:21 GMT):
@RealDeanZhao if you want to use a different CA in your code, you need to create a new entry with its own MSP cert/keys, take at look at the this config: https://github.com/hyperledger/fabric-sdk-go/blob/df181da0c806d03bd8b7fcde8dfa147472ff6a89/test/fixtures/config/config_test.yaml#L359, the CAs are configured in each org like this for org1: https://github.com/hyperledger/fabric-sdk-go/blob/df181da0c806d03bd8b7fcde8dfa147472ff6a89/test/fixtures/config/config_test.yaml#L230

MonnyClara (Mon, 04 Jun 2018 15:05:09 GMT):
@Baha-sk I resolved my issue, but thanks a lot for the material ! The multi-orgs example will be very usefull !!

troyronda (Mon, 04 Jun 2018 15:08:26 GMT):
@Kyroy are you trying to mix protos being imported from both fabric and fabric-sdk-go? @divyank

troyronda (Mon, 04 Jun 2018 15:12:00 GMT):
if so, is it just "github.com/hyperledger/fabric/common/tools/protolator" ?

troyronda (Mon, 04 Jun 2018 15:12:00 GMT):
if so, is it due to "github.com/hyperledger/fabric/common/tools/protolator" ?

mtnieto (Mon, 04 Jun 2018 15:14:02 GMT):
Has joined the channel.

Kyroy (Mon, 04 Jun 2018 15:17:23 GMT):
@troyronda Well, yes, I tried. I tried to get it to work .. somehow. But the fact that the sdk has copied the proto files (and not imported, dunno why?) I cannot work with it. Because they are too new. Not on fabric 1.1 anymore

troyronda (Mon, 04 Jun 2018 15:18:43 GMT):
SDK doesn't want an import dependency back to Fabric was the reason :).

Kyroy (Mon, 04 Jun 2018 15:19:33 GMT):
e.g. I want to use `protolator.DeepUnmarshalJSON`

troyronda (Mon, 04 Jun 2018 15:21:01 GMT):
@angeloatleadiq Unimplemented desc = unknown service protos.Deliver means you are trying to use the deliver service on 1.0. The deliver service is a 1.1 feature. You can override using config. https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L45

troyronda (Mon, 04 Jun 2018 15:21:01 GMT):
@angeloatleadiq Unimplemented desc = unknown service protos.Deliver means you are trying to use the deliver service against a Fabric 1.0 network. The deliver service is a Fabric 1.1 feature. You can override using config. https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L45

Kyroy (Mon, 04 Jun 2018 15:21:28 GMT):
It is very hard/not possible to include fabric and fabric-sdk-go together. e.g. fabric@master and fabric-sdk-go@master require differen viper versions. so dep sais NO

Kyroy (Mon, 04 Jun 2018 15:21:28 GMT):
and so on and so on

troyronda (Mon, 04 Jun 2018 15:22:04 GMT):
fyi: we use them together

troyronda (Mon, 04 Jun 2018 15:22:49 GMT):
(but not necessarily master)

Kyroy (Mon, 04 Jun 2018 15:23:06 GMT):
yes, fabric@release-1.1 works

troyronda (Mon, 04 Jun 2018 15:23:11 GMT):
@divyank know more about it.

troyronda (Mon, 04 Jun 2018 15:23:11 GMT):
@divyank knows more about it.

troyronda (Mon, 04 Jun 2018 15:23:53 GMT):
is it just protolator?

Kyroy (Mon, 04 Jun 2018 15:25:03 GMT):
But the sdk has other proto files that do not work with fabric1.1 proto files

Kyroy (Mon, 04 Jun 2018 15:25:03 GMT):
or do not work with the protolator

Kyroy (Mon, 04 Jun 2018 15:25:03 GMT):
or, do not work with the protolator

troyronda (Mon, 04 Jun 2018 15:25:26 GMT):
the SDK protos are namespaced seperately from the fabric protos

Kyroy (Mon, 04 Jun 2018 15:26:03 GMT):
Currently, I am calling the configtxlator binary REST endpoint from my application and I would love to just include the protolator from fabric

Kyroy (Mon, 04 Jun 2018 15:26:07 GMT):
hmm :thinking:

troyronda (Mon, 04 Jun 2018 15:26:09 GMT):
so you should be able to import them into the same project.

troyronda (Mon, 04 Jun 2018 15:26:31 GMT):
as long as their usage is independent :)

Kyroy (Mon, 04 Jun 2018 15:27:03 GMT):
Importing worked, but I got some errors (see above) that I couldnt unmarshal etc. Thought it was because of the proto files.

troyronda (Mon, 04 Jun 2018 15:28:24 GMT):
are you trying to send an object from an SDK proto as the argument into what you imported from fabric?

Kyroy (Mon, 04 Jun 2018 15:29:38 GMT):
No, I am e.g. trying to get the json from my genesis.block

troyronda (Mon, 04 Jun 2018 15:29:57 GMT):
you fetched the genesis block using the SDK?

troyronda (Mon, 04 Jun 2018 15:29:57 GMT):
you fetched the genesis block from a Fabric network using the SDK?

troyronda (Mon, 04 Jun 2018 15:30:36 GMT):
and then tried to send that object into DeepUnmarshal?

troyronda (Mon, 04 Jun 2018 15:30:36 GMT):
and then tried to send that object into protolator.DeepUnmarshalJSON?

Kyroy (Mon, 04 Jun 2018 15:31:31 GMT):
No, no sdk included, right now. I am reading the file and try to pass it to DeepMarshalJSON

troyronda (Mon, 04 Jun 2018 15:31:46 GMT):
oh - that's weird then.

troyronda (Mon, 04 Jun 2018 15:31:46 GMT):
oh - that's weird then - i don't see why the SDK protos would impact that call.

Kyroy (Mon, 04 Jun 2018 15:32:10 GMT):
`failed to deep marshal json: *common.Block: error in PopulateTo for field data for message *common.Block: *common.BlockData: error in PopulateTo for slice field data at index 0 for message *common.BlockData: *common.Envelope: error in PopulateTo for field payload for message *common.Envelope: *common.Payload: error in PopulateTo for field data for message *common.Payload: *common.ConfigEnvelope: error in PopulateTo for field config for message *common.ConfigEnvelope: *common.Config: error in PopulateTo for field channel_group for message *common.Config: *common.DynamicChannelGroup: error in PopulateTo for map field groups and key Orderer for message *common.DynamicChannelGroup: unknown channel ConfigGroup sub-group: Orderer`

Kyroy (Mon, 04 Jun 2018 15:32:10 GMT):
```failed to deep marshal json: *common.Block: error in PopulateTo for field data for message *common.Block: *common.BlockData: error in PopulateTo for slice field data at index 0 for message *common.BlockData: *common.Envelope: error in PopulateTo for field payload for message *common.Envelope: *common.Payload: error in PopulateTo for field data for message *common.Payload: *common.ConfigEnvelope: error in PopulateTo for field config for message *common.ConfigEnvelope: *common.Config: error in PopulateTo for field channel_group for message *common.Config: *common.DynamicChannelGroup: error in PopulateTo for map field groups and key Orderer for message *common.DynamicChannelGroup: unknown channel ConfigGroup sub-group: Orderer```

troyronda (Mon, 04 Jun 2018 15:36:53 GMT):
Was there a reason you suspect the SDK protos? e.g., you tried without importing the SDK?

troyronda (Mon, 04 Jun 2018 15:37:27 GMT):
(since these protos are namespaced separately, it wouldn't be my first suspicion)

Kyroy (Mon, 04 Jun 2018 15:38:14 GMT):
I also tried with the sdk objects. And previously (a long time ago) I think there was a problem with both proto files and you coudn't use it together

Kyroy (Mon, 04 Jun 2018 15:38:22 GMT):
did not know that they are now namespaced

troyronda (Mon, 04 Jun 2018 15:39:37 GMT):
yeh we modify the proto registrations paths, to allow both protos to be imported

troyronda (Mon, 04 Jun 2018 15:39:40 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/scripts/third_party_pins/fabric/apply_fabric_protos.sh#L72

troyronda (Mon, 04 Jun 2018 15:39:40 GMT):
e.g., https://github.com/hyperledger/fabric-sdk-go/blob/master/scripts/third_party_pins/fabric/apply_fabric_protos.sh#L72

troyronda (Mon, 04 Jun 2018 15:39:58 GMT):
(we also had the use case where we needed to import both fabric and fabric-sdk-go)

Kyroy (Mon, 04 Jun 2018 15:41:39 GMT):
I am also not sure what ````msgType := proto.MessageType("common.Block") msg = reflect.New(msgType.Elem()).Interface().(proto.Message)``` is doing when I import both, fabric and the sdk :thinking:

troyronda (Mon, 04 Jun 2018 15:41:42 GMT):
when objects need to be shared between the protos, then additional files can be copied from fabric into the sdk.

troyronda (Mon, 04 Jun 2018 15:42:14 GMT):
e.g., that's why we copy https://github.com/hyperledger/fabric-sdk-go/tree/master/third_party/github.com/hyperledger/fabric/common/cauthdsl

troyronda (Mon, 04 Jun 2018 15:42:14 GMT):
e.g., that's why we copy https://github.com/hyperledger/fabric-sdk-go/tree/master/third_party/github.com/hyperledger/fabric/common/cauthdsl into the SDK.

troyronda (Mon, 04 Jun 2018 15:42:14 GMT):
e.g., that's why we copied https://github.com/hyperledger/fabric-sdk-go/tree/master/third_party/github.com/hyperledger/fabric/common/cauthdsl into the SDK.

divyank (Mon, 04 Jun 2018 16:03:05 GMT):
@Kyroy The SDK's version of the protos are distinct types from fabric's protos. I doubt protolator would work with type "fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" as it expects type "fabric/protos/common".

divyank (Mon, 04 Jun 2018 16:05:02 GMT):
Is this what you're trying to do?

RealDeanZhao (Tue, 05 Jun 2018 05:33:34 GMT):
Hi all, does the FabricSDK need to be singleton? Or just init and close it during each http request?

angeloatleadiq (Tue, 05 Jun 2018 07:30:44 GMT):
@troyronda Thanks! It works but now I got a different error. I also change the sdk-go to a newer version ```[[constraint]] name = "github.com/hyperledger/fabric-sdk-go" revision = "fda0d9a039dd3afc034e970023e51cd7690bb6d7"``` ```Unable to setup the Fabric: failed to create channel: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: Unable to install and instantiate the chaincode: failed to instantiate the chaincode: CreateAndSendTransaction failed: SendTransaction failed: calling orderer 'orderer.hf.leadiq.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.hf.leadiq.com:7050] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x447b58c]```

angeloatleadiq (Tue, 05 Jun 2018 07:58:32 GMT):
@troyronda After I changed eventService to eventhub at config.yaml (I assume this is what you meant), how can I change the network service to use eventhub as well. > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.657 UTC [deliveryClient] StartDeliverForChannel -> DEBU 312 This peer will pass blocks from orderer service to other peers for channel leadiq peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.660 UTC [ConnProducer] NewConnection -> ERRO 313 Failed connecting to orderer.hf.leadiq.com:7050 , error: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "tlsca.hf.leadiq.com")

angeloatleadiq (Tue, 05 Jun 2018 07:58:32 GMT):
@troyronda After I changed eventService to eventhub at config.yaml (I assume this is what you meant), how can I change the network service to use eventhub as well. > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.657 UTC [deliveryClient] StartDeliverForChannel -> DEBU 312 This peer will pass blocks from orderer service to other peers for channel leadiq > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.660 UTC [ConnProducer] NewConnection -> ERRO 313 Failed connecting to orderer.hf.leadiq.com:7050 , error: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "tlsca.hf.leadiq.com")

angeloatleadiq (Tue, 05 Jun 2018 07:58:32 GMT):
@troyronda After I changed eventService to eventhub at config.yaml (I assume this is what you meant), how can I change the network service to use eventhub as well? > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.657 UTC [deliveryClient] StartDeliverForChannel -> DEBU 312 This peer will pass blocks from orderer service to other peers for channel leadiq > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.660 UTC [ConnProducer] NewConnection -> ERRO 313 Failed connecting to orderer.hf.leadiq.com:7050 , error: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "tlsca.hf.leadiq.com")

angeloatleadiq (Tue, 05 Jun 2018 07:58:32 GMT):
@troyronda After I changed eventService to eventhub at config.yaml (I assume this is what you meant), how can I change the network service to use eventhub as well? I asked it because now I can't start my network. I am not sure why? But I updated .env to the value below. > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.657 UTC [deliveryClient] StartDeliverForChannel -> DEBU 312 This peer will pass blocks from orderer service to other peers for channel leadiq > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.660 UTC [ConnProducer] NewConnection -> ERRO 313 Failed connecting to orderer.hf.leadiq.com:7050 , error: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "tlsca.hf.leadiq.com") ```FABRIC_FIXTURE_VERSION=v1.1 FABRIC_CRYPTOCONFIG_VERSION=v1 FABRIC_CA_FIXTURE_TAG=1.1.0 FABRIC_ORDERER_FIXTURE_TAG=1.1.0 FABRIC_PEER_FIXTURE_TAG=1.1.0 FABRIC_BUILDER_FIXTURE_TAG=1.1.0 FABRIC_COUCHDB_FIXTURE_TAG=0.4.6 FABRIC_BASEOS_FIXTURE_TAG=0.4.6 FABRIC_BASEIMAGE_FIXTURE_TAG=0.4.6```

angeloatleadiq (Tue, 05 Jun 2018 07:58:32 GMT):
@troyronda After I changed eventService to eventhub at config.yaml (I assume this is what you meant), how can I change the network service to use eventhub as well? I asked it because now I can't start my network. I am not sure why? But I updated .env to these values below. > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.657 UTC [deliveryClient] StartDeliverForChannel -> DEBU 312 This peer will pass blocks from orderer service to other peers for channel leadiq > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.660 UTC [ConnProducer] NewConnection -> ERRO 313 Failed connecting to orderer.hf.leadiq.com:7050 , error: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "tlsca.hf.leadiq.com") ```FABRIC_FIXTURE_VERSION=v1.1 FABRIC_CRYPTOCONFIG_VERSION=v1 FABRIC_CA_FIXTURE_TAG=1.1.0 FABRIC_ORDERER_FIXTURE_TAG=1.1.0 FABRIC_PEER_FIXTURE_TAG=1.1.0 FABRIC_BUILDER_FIXTURE_TAG=1.1.0 FABRIC_COUCHDB_FIXTURE_TAG=0.4.6 FABRIC_BASEOS_FIXTURE_TAG=0.4.6 FABRIC_BASEIMAGE_FIXTURE_TAG=0.4.6```

angeloatleadiq (Tue, 05 Jun 2018 07:58:32 GMT):
@troyronda After I changed eventService to eventhub at config.yaml (I assume this is what you meant), how can I change the network service to use eventhub as well? I asked it because now I can't start my network. I am not sure why? But I updated .env to to 1.1.0 because I have updated chain code application constraint to fabric-sdk-go fda0d9a039dd3afc034e970023e51cd7690bb6d7. > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.657 UTC [deliveryClient] StartDeliverForChannel -> DEBU 312 This peer will pass blocks from orderer service to other peers for channel leadiq > peer1.org1.hf.leadiq.com | 2018-06-05 07:55:39.660 UTC [ConnProducer] NewConnection -> ERRO 313 Failed connecting to orderer.hf.leadiq.com:7050 , error: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "tlsca.hf.leadiq.com") ```FABRIC_FIXTURE_VERSION=v1.1 FABRIC_CRYPTOCONFIG_VERSION=v1 FABRIC_CA_FIXTURE_TAG=1.1.0 FABRIC_ORDERER_FIXTURE_TAG=1.1.0 FABRIC_PEER_FIXTURE_TAG=1.1.0 FABRIC_BUILDER_FIXTURE_TAG=1.1.0 FABRIC_COUCHDB_FIXTURE_TAG=0.4.6 FABRIC_BASEOS_FIXTURE_TAG=0.4.6 FABRIC_BASEIMAGE_FIXTURE_TAG=0.4.6```

RealDeanZhao (Tue, 05 Jun 2018 08:21:11 GMT):
Hi all, When I try to install the chaincode using sdk-go, it errors: ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [] creator org [XiaoYuDianMSP]]

RealDeanZhao (Tue, 05 Jun 2018 08:21:50 GMT):
`mspClient, err := msp.New(sdk.Context(), msp.WithOrg("xiaoyudian")) admin, err := mspClient.GetSigningIdentity("admin") adminContext := sdk.Context(fabsdk.WithIdentity(admin)) resMgmtClient, err := resmgmt.New(adminContext) if err != nil { c.AbortWithError(http.StatusBadRequest, err) return } ccPkg, err := gopackager.NewCCPackage("themis.xyd.cn/themis/cc/example_cc.go", "") if err != nil { c.AbortWithError(http.StatusBadRequest, err) return } req := resmgmt.InstallCCRequest{ Name: "example_cc", Path: "/opt/gopath/src/themis.xyd.cn/themis/cc", Version: "0", Package: ccPkg, } peers := ricsdk.PeersByOrg()["xiaoyudian"] responses, err := resMgmtClient.InstallCC(req, resmgmt.WithTargets(peers...))`

RealDeanZhao (Tue, 05 Jun 2018 08:22:50 GMT):
I am using the admin user

RealDeanZhao (Tue, 05 Jun 2018 08:22:50 GMT):
unable to verify if cc is installed on grpcs://peer0.xiaoyudian.xyd-themis.cn:7051. Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [peer0.xiaoyudian.xyd-themis.cn:7051]: Chaincode status Code: (500) UNKNOWN. Description: Authorization for GETINSTALLEDCHAINCODES on channel getinstalledchaincodes has been denied with error Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]

RealDeanZhao (Tue, 05 Jun 2018 09:32:29 GMT):
fixed...

RealDeanZhao (Tue, 05 Jun 2018 10:19:24 GMT):
unable to verify if cc is installed on grpcs://peer0.xiaoyudian.xyd-themis.cn:7051. Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [peer0.xiaoyudian.xyd-themis.cn:7051]: Chaincode status Code: (500) UNKNOWN. Description: Authorization for GETINSTALLEDCHAINCODES on channel getinstalledchaincodes has been denied with error Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]

ck01 (Tue, 05 Jun 2018 16:14:37 GMT):
Hi

ck01 (Tue, 05 Jun 2018 16:15:07 GMT):
I want to contribute an example for fabric-sdk-go

ck01 (Tue, 05 Jun 2018 16:15:14 GMT):
how to do it?

Spar (Tue, 05 Jun 2018 19:55:13 GMT):
Has joined the channel.

RealDeanZhao (Wed, 06 Jun 2018 07:34:29 GMT):
``` unable to verify if cc is installed on grpcs://peer0.xiaoyudian.xyd-themis.cn:7051. Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [peer0.xiaoyudian.xyd-themis.cn:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.xiaoyudian.xyd-themis.cn:7051] unable to verify if cc is installed on grpcs://peer1.xiaoyudian.xyd-themis.cn:8051. Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [peer1.xiaoyudian.xyd-themis.cn:8051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer1.xiaoyudian.xyd-themis.cn:8051] ```

nmarcetic (Wed, 06 Jun 2018 12:07:27 GMT):
Hey Folks I have a error when I do `dep init`

nmarcetic (Wed, 06 Jun 2018 12:07:46 GMT):
``` dep init init failed: unable to solve the dependency graph: Solving failure: No versions of github.com/milagro-crypto/amcl met constraints: master: Could not introduce github.com/milagro-crypto/amcl@master due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Packag e is required by github.com/hyperledger/fabric@release-1.1.) add-js-tests: Could not introduce github.com/milagro-crypto/amcl@add-js-tests due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Packag e is required by github.com/hyperledger/fabric@release-1.1.) fix-retval: Could not introduce github.com/milagro-crypto/amcl@fix-retval due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Packag e is required by github.com/hyperledger/fabric@release-1.1.) format-code: Could not introduce github.com/milagro-crypto/amcl@format-code due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Packag e is required by github.com/hyperledger/fabric@release-1.1.) milagro-crypto-c: Could not introduce github.com/milagro-crypto/amcl@milagro-crypto-c due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Packag e is required by github.com/hyperledger/fabric@release-1.1.) milagro-crypto-js: Could not introduce github.com/milagro-crypto/amcl@milagro-crypto-js due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Packag e is required by github.com/hyperledger/fabric@release-1.1.) revert-change: Could not introduce github.com/milagro-crypto/amcl@revert-change due to multiple problematic subpackages:

nmarcetic (Wed, 06 Jun 2018 12:07:49 GMT):
I saw some workarounds from chaincode blog where they actually replace the fabric version to 1.0.5 but I want to use the latest v1.1.0 https://chainhero.io/2018/03/tutorial-build-blockchain-app-2/ Check the comments Does anybody had similar experience ? Thanks ;)

nmarcetic (Wed, 06 Jun 2018 12:09:30 GMT):
This was recommendation from the blog ^ `Edit the “Gopkg.toml” and make it match with the new “Gopkg.toml” which is available in our repository : https://github.com/chainHero/heroes-service/blob/v1.0.5/Gopkg.toml` But revision `014d6befcf67f3787bb3d67ff34e1a98dc6aec5f` is Fabric 1.0.05 release

nmarcetic (Wed, 06 Jun 2018 12:12:18 GMT):
@MaximeAubanel any idea ^ ? :)

nmarcetic (Wed, 06 Jun 2018 12:20:39 GMT):
Similar problem with fabric-sdk-go and dep init ``` dep init init failed: unable to solve the dependency graph: Solving failure: No versions of github.com/cloudflare/cfssl met constraints: 1.3.2: Could not introduce github.com/cloudflare/cfssl@1.3.2, as it is not allowed by constraint master from project github.com/hyperledger/fabric-sdk-go. 1.3.1: Could not introduce github.com/cloudflare/cfssl@1.3.1, as it is not allowed by constraint master from project github.com/hyperledger/fabric-sdk-go. 1.3.0: Could not introduce github.com/cloudflare/cfssl@1.3.0, as it is not allowed by constraint master from project github.com/hyperledger/fabric-sdk-go. 1.2.0: Could not introduce github.com/cloudflare/cfssl@1.2.0, as it is not allowed by constraint master from project github.com/hyperledger/fabric-sdk-go. 1.1.0: Could not introduce github.com/cloudflare/cfssl@1.1.0, as it is not allowed by constraint master from project github.com/hyperledger/fabric-sdk-go. 1.0.0: Could not introduce github.com/cloudflare/cfssl@1.0.0, as it is not allowed by constraint master from project github.com/hyperledger/fabric-sdk-go. master: Could not introduce github.com/cloudflare/cfssl@master, as it has a dependency on github.com/google/certificate-transparency-go with constraint 5ab67e519c93568ac3ee50fd6772a5bcf8aa460d, which does not allow the currently selected version of master cbroglie/fix-tests: Could not introduce github.com/cloudflare/cfssl@cbroglie/fix-tests, as it is not allowed by constraint master from project github.com/hyperledger/fabric-sdk-go. kyle/darwin-broken: Could not introduce github.com/cloudflare/cfssl@kyle/darwin-broken, as it is not allowed by constraint master from project github.com/hyperledger/fabric-sdk-go. ```

Baha-sk (Wed, 06 Jun 2018 15:43:42 GMT):
@nmarcetic in Go SDK, simply run 'make populate-vendor' then 'dep ensure' .. no need to do 'dep init' as the toml files are checked in git already. Why do you need to build the sdk, may I ask?

RealDeanZhao (Thu, 07 Jun 2018 02:48:58 GMT):
Hi All, I meet the connection timeout issue when send the grpc request from the mac host to the local docker container. ``` Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [peer1-xxxx:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out ```

RealDeanZhao (Thu, 07 Jun 2018 04:00:02 GMT):
Anyone can help??

lwrabbit (Thu, 07 Jun 2018 07:57:50 GMT):
Hi All, is there a demo in Go SDK to interact with fabric-ca now?

SriramaSharma (Thu, 07 Jun 2018 08:34:44 GMT):
Has joined the channel.

titoe218 (Thu, 07 Jun 2018 08:58:01 GMT):
@troyronda Hi, I used latest Fabric Go SDK with Fabric v1.1.0 but when I init sdk from config.yaml, it through this error? `[fabsdk/fab] 2018/06/07 08:51:26 UTC - fab.detectDeprecatedNetworkConfig -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration [fabsdk/fab] 2018/06/07 08:51:26 UTC - fab.detectDeprecatedNetworkConfig -> WARN visit https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml for samples [fabsdk/fab] 2018/06/07 08:51:26 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled [fabsdk/fab] 2018/06/07 08:51:26 UTC - util.BCCSPKeyRequestGenerate -> INFO generating key: &{A:ecdsa S:256} [fabsdk/fab] 2018/06/07 08:51:26 UTC - log.print -> INFO encoded CSR` Do you know how to fix it?

titoe218 (Thu, 07 Jun 2018 08:58:01 GMT):
@troyronda Hi, I used latest Fabric Go SDK with Fabric v1.1.0 but when I init sdk from config.yaml, it through this error? `[fabsdk/fab] 2018/06/07 08:51:26 UTC - fab.detectDeprecatedNetworkConfig -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration [fabsdk/fab] 2018/06/07 08:51:26 UTC - fab.detectDeprecatedNetworkConfig -> WARN visit https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml for samples [fabsdk/fab] 2018/06/07 08:51:26 UTC - lib.(*Client).initHTTPClient -> INFO TLS Enabled [fabsdk/fab] 2018/06/07 08:51:26 UTC - util.BCCSPKeyRequestGenerate -> INFO generating key: &{A:ecdsa S:256} [fabsdk/fab] 2018/06/07 08:51:26 UTC - log.print -> INFO encoded CSR` Do you know how to fix it?

lwrabbit (Thu, 07 Jun 2018 09:08:21 GMT):
@titoe218 take a look at your sdk config.yaml about the channels

RealDeanZhao (Thu, 07 Jun 2018 09:34:55 GMT):
Still not fix the issue. The peers are running in the docker containers and the SDK is sending the request from the host. ``` Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [peer1-xxxx:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out ```

RealDeanZhao (Thu, 07 Jun 2018 09:35:44 GMT):
Seems that the grpc server in the container not listening the request from the host

nmarcetic (Thu, 07 Jun 2018 09:36:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qejnz3FThafiXDSJp) @Baha-sk I am not building the SDK I want to `dep init` for my project App. I am using `fabric-sdk-go` and `fabric` in my App which is the purpose of SDK ofc and I want to do `dep init` and manage my project deps/vendor but I can't because of this error.

RealDeanZhao (Thu, 07 Jun 2018 09:36:16 GMT):
Sending the https request to the CA server in the container works fine

titoe218 (Thu, 07 Jun 2018 10:47:05 GMT):
@lwrabbit I used config.yaml like config_test.yaml of fabric-sample

MaximeAubanel (Thu, 07 Jun 2018 12:55:20 GMT):
@nmarcetic Hey dude, sorry but my dep's errors understanding is vey low .. cannot help you with that

MaximeAubanel (Thu, 07 Jun 2018 12:55:20 GMT):
@nmarcetic Hey dude, sorry but my dep's errors understanding is vey low .. cannot help you with that

troyronda (Thu, 07 Jun 2018 13:34:33 GMT):
@RealDeanZhao I would guess you are using hostnames that are not known outside of docker?

troyronda (Thu, 07 Jun 2018 13:35:18 GMT):
If so, You can add them to your /etc/hosts file or use entity Matchers in the config.

troyronda (Thu, 07 Jun 2018 13:36:24 GMT):
@ck01 excellent, depending on the complexity pf

troyronda (Thu, 07 Jun 2018 13:36:24 GMT):
@ck01 excellent, depends on the complexity of the example. We put more complex

troyronda (Thu, 07 Jun 2018 13:36:24 GMT):
@ck01 excellent, depends on the complexity of the example. We put more complex ones or those that bring in dependencies into its own repo and add a link to the readme.

troyronda (Thu, 07 Jun 2018 13:38:19 GMT):
I would think this is the default way, except for documentation-related examples.

troyronda (Thu, 07 Jun 2018 13:39:32 GMT):
Eg https://github.com//fabric-examples/tree/master/fabric-cli

troyronda (Thu, 07 Jun 2018 13:40:12 GMT):
@lwrabbit the integration tests show usage of fabric ca (under MSP)

troyronda (Thu, 07 Jun 2018 13:41:43 GMT):
@titoe218 this warning comes from specifying the orderer in the channel section of the config. The SDK discovers the channel orderer from the config block

troyronda (Thu, 07 Jun 2018 13:43:05 GMT):
As the SDK is more focused on using dynamic network configuration and peer discovery, warnings have started to be added

troyronda (Thu, 07 Jun 2018 13:44:11 GMT):
@nmarcetic the Go SDK is compatible with dep - we use both in our own projects

troyronda (Thu, 07 Jun 2018 13:48:51 GMT):
it looks like there is a constraint conflict currently

RealDeanZhao (Thu, 07 Jun 2018 13:56:14 GMT):
@troyronda I've edited the host file and peer1-xxxx is mapped to 127.0.0.1

RealDeanZhao (Thu, 07 Jun 2018 13:56:21 GMT):
but it still not works

troyronda (Thu, 07 Jun 2018 16:14:31 GMT):
@nmarcetic i'll look at the cfssl constraint in Go SDK.

troyronda (Thu, 07 Jun 2018 16:15:28 GMT):
@nmarcetic regarding fabric - i see you tried to use dep using Fabric 1.1, but I believe it is master/1.2 that added dep compatability.

troyronda (Thu, 07 Jun 2018 16:15:28 GMT):
@nmarcetic regarding fabric - i see you tried to use dep using Fabric 1.1, but I believe it is master (upcoming 1.2) that added dep compatibility.

troyronda (Thu, 07 Jun 2018 17:44:13 GMT):
@RealDeanZhao you can also check that your docker containers are exposing the needed ports to the host

troyronda (Thu, 07 Jun 2018 17:44:40 GMT):
@nmarcetic updated the cfssl dependency on Go SDK to release version.

troyronda (Thu, 07 Jun 2018 17:44:40 GMT):
@nmarcetic I updated the cfssl dependency on Go SDK to release version: https://github.com/hyperledger/fabric-sdk-go/commit/6314b19a943e51d82140e3a6c21e8086530154a6.

abraham (Fri, 08 Jun 2018 05:32:00 GMT):
Has joined the channel.

aKesav (Fri, 08 Jun 2018 07:47:39 GMT):
Has joined the channel.

antitoine (Fri, 08 Jun 2018 10:29:29 GMT):
Hi, does the SDK support CouchDB indexes introduced in HF v1.1? https://jira.hyperledger.org/browse/FAB-3067 I tried to follow the example with the marbles (https://github.com/hyperledger/fabric-samples/tree/master/chaincode/marbles02/go), but it doesn't seem to work. In the NodeJS SDK there is a new attribute in the installation and instantiation request of the chaincode (https://fabric-sdk-node.github.io/tutorial-metadata-chaincode.html), it is not present in the Go SDK. Anybody got any more information on this?

troyronda (Fri, 08 Jun 2018 11:24:21 GMT):
@antitoine the SDK simply includes the META-INF directory in your chaincode directory.

troyronda (Fri, 08 Jun 2018 11:25:41 GMT):
https://github.com/hyperledger/fabric-sdk-go/commit/ae5783a16506388690cc9e7cbba9a215a1cb60a8#diff-88c719943afa288eeeab55012769c6a9

troyronda (Fri, 08 Jun 2018 11:27:22 GMT):
I guess the node SDK handled it a bit differently by allowing to specify the meta directory separately

antitoine (Fri, 08 Jun 2018 11:55:16 GMT):
@troyronda Thanks, I'm currently using an older version of the SDK, so that must be why I don't have the functionality. I'm going to update all this.

troyronda (Fri, 08 Jun 2018 18:08:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=t5Zt7vdJmKPhcNuwP) @RealDeanZhao does not *need* to be singleton but you will lose the benefits of caching (each SDK instance maintains various caches and those caches are flushed on close), so for common cases it *should* be.

dimaxgl (Sat, 09 Jun 2018 09:35:32 GMT):
Hi, is there a way to provide custom identity manager for organization?

aleksandar.likic (Sat, 09 Jun 2018 14:30:07 GMT):
@dimaxgl Take a look at this test case: https://github.com/hyperledger/fabric-sdk-go/blob/9cbdc1bb4619d9015e9caa9984b2f319af0bd790/test/integration/msp/user_data_mgmt_test.go#L84. You can modify implementation of CustomMSPFactory at https://github.com/hyperledger/fabric-sdk-go/blob/740085464a149d23d2b9bac03c495fa992ef6fe2/test/integration/msp/custom_msp_factory.go#L35 to return different implementation of msp.IdentityManagerProvider per organization.

aleksandar.likic (Sat, 09 Jun 2018 14:30:07 GMT):
@dimaxgl You can use https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#WithMSPPkg to inject a custom MSP provider factory. Take a look at this test case which customizes user store: https://github.com/hyperledger/fabric-sdk-go/blob/9cbdc1bb4619d9015e9caa9984b2f319af0bd790/test/integration/msp/user_data_mgmt_test.go#L84. You can modify implementation of CustomMSPFactory at https://github.com/hyperledger/fabric-sdk-go/blob/740085464a149d23d2b9bac03c495fa992ef6fe2/test/integration/msp/custom_msp_factory.go#L35 to return different implementation of msp.IdentityManagerProvider per organization.

yacovm (Sun, 10 Jun 2018 18:58:25 GMT):
Go SDK folks, in case you guys are using your CLI - I implemented a CLI tool for the discovery service that is pending to be merged (I hope someone will merge it before we cut GA :rolling_eyes: ) Documentation for the CLI - https://logs.hyperledger.org/production/vex-yul-hyp-jenkins-3/fabric-docs-build-x86_64/421/html/discovery-cli.html In case you want to incorporate the discovery CLI into your own CLI based on go-SDK, it can be done quite easily! The code is pretty modular... https://gerrit.hyperledger.org/r/#/c/22509/

yacovm (Sun, 10 Jun 2018 18:58:25 GMT):
Go SDK folks, in case you guys want a CLI tool for the discovery service - I implemented a CLI tool for the discovery service that is pending to be merged (I hope someone will merge it before we cut GA :rolling_eyes: ) Documentation for the CLI - https://logs.hyperledger.org/production/vex-yul-hyp-jenkins-3/fabric-docs-build-x86_64/421/html/discovery-cli.html In case you want to incorporate the discovery CLI into your own CLI based on go-SDK, it can be done quite easily! The code is pretty modular... https://gerrit.hyperledger.org/r/#/c/22509/

RealDeanZhao (Mon, 11 Jun 2018 02:21:57 GMT):

Clipboard - June 11, 2018 10:21 AM

RealDeanZhao (Mon, 11 Jun 2018 02:26:01 GMT):
I tried to use the official fabric-ca sample to build my local network and it always told me the 'User not found'.. I read fabric-sdk-go code and found that the admin msp home must be in the pattern '${org}/users/${username}@${org}/msp' ...

RealDeanZhao (Mon, 11 Jun 2018 02:28:18 GMT):
Do I have to change the setup script of fabric-ca sample or is there anything I miss for the network-config.yaml?

RealDeanZhao (Mon, 11 Jun 2018 02:32:50 GMT):

crypto files generated by fabric-ca smaples

dzqoo (Mon, 11 Jun 2018 06:39:42 GMT):
Has joined the channel.

RealDeanZhao (Mon, 11 Jun 2018 07:21:10 GMT):
I use the official fabric-ca sample to setup my local network. When I try to send the proposal to the endorser using fabric-sdk-go, the grpcs connection times out.

RealDeanZhao (Mon, 11 Jun 2018 07:21:31 GMT):
``` --- name: "xyd-themis" x-type: "hlfv1" description: "Themis Network" version: "1.0" client: organization: xiaoyudian logging: level: debug credentialStore: path: /tmp/xiaoyudian/state-store cryptoStore: path: /tmp/xiaoyudian/msp BCCSP: security: enabled: true default: provider: "SW" hashAlgorithm: "SHA2" softVerify: true level: 256 # 请参考pkg/fab/endpointconfig.go的代码 global: timeout: resmgmt: 600s peer: timeout: connection: 600s channels: mychannel: peers: peer1-xiaoyudian: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer2-xiaoyudian: endorsingPeer: false chaincodeQuery: true ledgerQuery: true eventSource: false peer1-jinzun: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer2-jinzun: endorsingPeer: false chaincodeQuery: true ledgerQuery: true eventSource: false organizations: xiaoyudian: mspid: xiaoyudianMSP peers: - peer1-xiaoyudian - peer2-xiaoyudian certificateAuthorities: - ica-xiaoyudian cryptoPath: xiaoyudian/users/${username}/msp jinzun: mspid: jinzunMSP peers: - peer1-jinzun - peer2-jinzun certificateAuthorities: - ica-jinzun cryptoPath: jinzun/users/${username}/msp themis: mspID: themisMSP certificateAuthorities: - ica-themis cryptoPath: themis/users/${username}/msp orderers: orderer1-themis: url: grpcs://localhost:7050 grpcOptions: ssl-target-name-override: orderer1-themis grpc-max-send-message-length: 15 tlsCACerts: pem: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/orgs/themis/msp/tlsintermediatecerts/ica-themis-7054.pem peers: peer1-xiaoyudian: url: grpcs://localhost:7051 eventUrl: grpcs://localhost:7053 grpcOptions: ssl-target-name-override: peer1-xiaoyudian tlsCACerts: path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer1-xiaoyudian-client.crt peer2-xiaoyudian: url: grpcs://localhost:8051 eventUrl: grpcs://localhost:8053 grpcOptions: ssl-target-name-override: peer2-xiaoyudian tlsCACerts: path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer2-xiaoyudian-client.crt peer1-jinzun: url: grpcs://localhost:7151 eventUrl: grpcs://localhost:7153 grpcOptions: ssl-target-name-override: peer1-jinzun tlsCACerts: path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer1-jinzun-client.crt peer2-jinzun: url: grpcs://localhost:8151 eventUrl: grpcs://localhost:8153 grpcOptions: ssl-target-name-override: peer2-jinzun tlsCACerts: path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer2-jinzun-client.crt certificateAuthorities: ica-themis: url: https://localhost:7054 tlsCACerts: path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/themis-ca-chain.pem registrar: enrollId: ica-themis-admin enrollSecret: ica-themis-adminpw caName: ica-themis ica-xiaoyudian: url: https://localhost:8054 tlsCACerts: path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/xiaoyudian-ca-chain.pem registrar: enrollId: ica-xiaoyudian-admin enrollSecret: ica-xiaoyudian-adminpw caName: ica-xiaoyudian ica-jinzun: url: https://localhost:9054 tlsCACerts: path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/jinzun-ca-chain.pem registrar: enrollId: ica-jinzun-admin enrollSecret: ica-jinzun-adminpw caName: ica-jinzun ```

charitydao (Mon, 11 Jun 2018 07:22:23 GMT):
Has joined the channel.

RealDeanZhao (Mon, 11 Jun 2018 07:23:28 GMT):
Is there anything wrong with my network-config.yaml?

charitydao (Mon, 11 Jun 2018 07:24:49 GMT):
Hello, can you help me? May be exist good example with golang sdk v1.1? Txn

RealDeanZhao (Mon, 11 Jun 2018 07:38:28 GMT):
I also created a stackoverflow question for this: https://stackoverflow.com/questions/50792520/connection-timeout-when-installing-chaincode-using-fabric-sdk-go

alex4ip (Tue, 12 Jun 2018 00:37:02 GMT):
Has joined the channel.

kshitiz_leo (Tue, 12 Jun 2018 05:07:12 GMT):
Has joined the channel.

kshitiz_leo (Tue, 12 Jun 2018 05:29:00 GMT):
hi, i am new to hyperledger, can any one point me to a link where i can learn go lang SDk

RealDeanZhao (Tue, 12 Jun 2018 06:38:55 GMT):
``` func (c *EndpointConfig) loadPeerConfigsByOrg() { c.peerConfigsByOrg = make(map[string][]fab.PeerConfig) for orgName, orgConfig := range c.networkConfig.Organizations { orgPeers := orgConfig.Peers peers := []fab.PeerConfig{} for _, peerName := range orgPeers { p := c.networkConfig.Peers[strings.ToLower(peerName)] if err := c.verifyPeerConfig(p, peerName, endpoint.IsTLSEnabled(p.URL)); err != nil { logger.Debugf("Could not verify Peer for [%s], trying with Entity Matchers", peerName) matchingPeerConfig := c.tryMatchingPeerConfig(peerName) if matchingPeerConfig == nil { continue } logger.Debugf("Found a matchingPeerConfig for [%s]", peerName) p = *matchingPeerConfig } peers = append(peers, p) } c.peerConfigsByOrg[strings.ToLower(orgName)] = peers } } ```

RealDeanZhao (Tue, 12 Jun 2018 06:41:56 GMT):
Is there a bug for fabric-sdk-go master branch when loadingPeerConfigsByOrg?? Why does it need to verifyPeerConfig first?

RealDeanZhao (Tue, 12 Jun 2018 06:41:56 GMT):
Is there a bug for fabric-sdk-go master branch when loadingPeerConfigsByOrg?? Why does it need to verifyPeerConfig first?

RealDeanZhao (Tue, 12 Jun 2018 07:05:00 GMT):
In my case, the sdk will never try to use the entity matchers config because verifyPeerConfig always returns nil

titoe (Tue, 12 Jun 2018 09:46:01 GMT):
Has joined the channel.

troyronda (Tue, 12 Jun 2018 14:20:24 GMT):
@sudeshrshetty @RealDeanZhao ^^^^

sudeshrshetty (Tue, 12 Jun 2018 14:22:26 GMT):
@RealDeanZhao looking into this

RealDeanZhao (Tue, 12 Jun 2018 14:23:17 GMT):
Is there any detailed doc about the network-config.yaml?

RealDeanZhao (Tue, 12 Jun 2018 14:24:29 GMT):
Spent huge time and still cannot make an chaincode installation request to the endorser

RealDeanZhao (Tue, 12 Jun 2018 14:30:15 GMT):
https://stackoverflow.com/questions/50792520/connection-timeout-when-installing-chaincode-using-fabric-sdk-go

RealDeanZhao (Tue, 12 Jun 2018 14:31:37 GMT):
@sudeshrshetty Please help have a look at this issue. https://stackoverflow.com/questions/50792520/connection-timeout-when-installing-chaincode-using-fabric-sdk-go

sudeshrshetty (Tue, 12 Jun 2018 14:32:30 GMT):
sure

RealDeanZhao (Tue, 12 Jun 2018 14:34:22 GMT):

ErrorMessage from the debug console

RealDeanZhao (Tue, 12 Jun 2018 15:29:15 GMT):
@sudeshrshetty I have to sleep.. I've added/updated some new content in the stackoverflow question such as the go-client-app, network-config.yaml, docker-compose.yaml and things I've tried before.. thanks a lot.

Baha-sk (Tue, 12 Jun 2018 15:41:29 GMT):
@RealDeanZhao enable grpc debug logs on the client by following these steps: 1. run: export GRPC_GO_LOG_SEVERITY_LEVEL=error 2. run: export GRPC_GO_LOG_VERBOSITY_LEVEL=2 3. in the client code add this line: grpclog.SetLogger(logger) grpclog is this package: "google.golang.org/grpc/grpclog" (you should have a logger defined in your code, look in the SDK files for examples) then start the client and you should see grpc logs, it should give you more details about the connection timeout...

Baha-sk (Tue, 12 Jun 2018 15:41:29 GMT):
@RealDeanZhao enable grpc debug logs on the client by following these steps: to enable GRPC debug on the client side use this: 1. run: export GRPC_GO_LOG_SEVERITY_LEVEL=error 2. run: export GRPC_GO_LOG_VERBOSITY_LEVEL=2 3. in the client code add this line: grpclog.SetLogger(logger) grpclog is this package: "google.golang.org/grpc/grpclog" then start the client and you should see grpc logs, it should give you more details about the connection timeout...

Baha-sk (Tue, 12 Jun 2018 15:41:29 GMT):
@RealDeanZhao enable grpc debug logs on the client by following these steps: 1. run: export GRPC_GO_LOG_SEVERITY_LEVEL=error 2. run: export GRPC_GO_LOG_VERBOSITY_LEVEL=2 3. in the client code add this line: grpclog.SetLogger(logger) grpclog is this package: "google.golang.org/grpc/grpclog" then start the client and you should see grpc logs, it should give you more details about the connection timeout...

Baha-sk (Tue, 12 Jun 2018 15:41:29 GMT):
@RealDeanZhao enable grpc debug logs on the client by following these steps: 1. run: export GRPC_GO_LOG_SEVERITY_LEVEL=error 2. run: export GRPC_GO_LOG_VERBOSITY_LEVEL=2 3. in the client code add this line: grpclog.SetLogger(logger) grpclog is this package: "google.golang.org/grpc/grpclog" (you should have a logger defined in your code, look at in the SDK files for examples) then start the client and you should see grpc logs, it should give you more details about the connection timeout...

sudeshrshetty (Tue, 12 Jun 2018 16:54:56 GMT):
@RealDeanZhao It doesn't look like a bug, in this case sdk will try to use entity matchers only if it is unable to find peer config by peer name. in this case, `verifyPeerConfig` returns error if peer `p` found by lookup is [ empty || doesn't have valid URL || tls certificate doesn't exist]

sudeshrshetty (Tue, 12 Jun 2018 16:54:56 GMT):
@RealDeanZhao It doesn't look like a bug, in this case sdk will try to use entity matchers only if it is unable to find by peer config by peer name. in this case, `verifyPeerConfig` returns error if peer `p` found by lookup is [ empty || doesn't have valid URL || tls certificate doesn't exist]

DannyWong (Wed, 13 Jun 2018 03:23:11 GMT):
Has joined the channel.

DannyWong (Wed, 13 Jun 2018 03:23:29 GMT):
Community, in release-1.1 doc (http://hyperledger-fabric.readthedocs.io/en/release-1.1/idemix.html?highlight=MSP) it states `integration with fabric-sdk-go to enable signing transactions from the client side.` however, in latest doc (https://hyperledger-fabric.readthedocs.io/en/latest/idemix.html) it states `integration with fabric-sdk-java to enable signing transactions from the client side` haha....

DannyWong (Wed, 13 Jun 2018 03:23:40 GMT):
Do you guys have any idea!?

DannyWong (Wed, 13 Jun 2018 03:23:53 GMT):
it's about the idmixer

RealDeanZhao (Wed, 13 Jun 2018 04:00:24 GMT):
@Baha-sk The error said certificated signed by unknown authority.. I'm checking the certs config. Thanks.

RealDeanZhao (Wed, 13 Jun 2018 04:01:21 GMT):
@sudeshrshetty EntityMatchers works now. Thank you for pointing that the mapped host name should not be the same as the peer name

RealDeanZhao (Wed, 13 Jun 2018 06:23:54 GMT):
Hi, how to generate the mutual_tls cert?

RealDeanZhao (Wed, 13 Jun 2018 07:38:21 GMT):

Bad cert error

RealDeanZhao (Wed, 13 Jun 2018 07:39:43 GMT):

Certs are generated by this script

RealDeanZhao (Wed, 13 Jun 2018 07:42:12 GMT):
Hi, using the fabric-ca sample to generate certs for the client, why does sdk-go say it is a bad cert?

RealDeanZhao (Wed, 13 Jun 2018 07:42:29 GMT):
Failed to dial localhost:7051: connection error: desc = "transport: authentication handshake failed: remote error: tls: bad certificate"; please retry.

RealDeanZhao (Wed, 13 Jun 2018 07:43:05 GMT):
xiaoyudian-ca-chain.pem is the intermediate ca cert.

Kyroy (Wed, 13 Jun 2018 07:48:58 GMT):
When executing `channelClient.Execute` or `.Query`, do I always need to specify `WithTargetEndpoints` now? I can see that https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L167 does not do it. But I always get `Failed to get endorsing peers: N must be greater than 0` when I don't use `WithTargetEndpoints`.

RealDeanZhao (Wed, 13 Jun 2018 10:03:37 GMT):
fixed the issue. Thank u all the same...

troyronda (Wed, 13 Jun 2018 11:31:39 GMT):
@Kyroy - no you do not need to always specify.

Kyroy (Wed, 13 Jun 2018 11:32:17 GMT):
@troyronda whats going on in L167

Kyroy (Wed, 13 Jun 2018 11:32:54 GMT):
Oh, do NOT need

Kyroy (Wed, 13 Jun 2018 11:33:20 GMT):
And how to fix the N must be greater error?

troyronda (Wed, 13 Jun 2018 11:43:06 GMT):
You need enough peers to be discovered for that channel

troyronda (Wed, 13 Jun 2018 11:44:51 GMT):
Prior to 1.2, discovery comes from config (unless override with a custom discovery). In 1.2, the SDK discovers peers automatically using the peer discovery service.

Kyroy (Wed, 13 Jun 2018 12:07:46 GMT):
My peer is configured in the config.yaml file. I have no entityMatchers. And still the error. But when providing it in the targetEndpoints, it works (so the peer is in the config and can be accessed) @troyronda

RealDeanZhao (Wed, 13 Jun 2018 14:07:58 GMT):

Clipboard - June 13, 2018 10:05 PM

RealDeanZhao (Wed, 13 Jun 2018 14:12:21 GMT):

Clipboard - June 13, 2018 10:11 PM

RealDeanZhao (Wed, 13 Jun 2018 14:18:30 GMT):
``` err = mspClient.Enroll("admin-xiaoyudian", msp.WithSecret("admin-xiaoyudianpw")) if err != nil { c.AbortWithError(http.StatusBadRequest, err) return } ```

RealDeanZhao (Wed, 13 Jun 2018 14:20:58 GMT):
when I tried to enroll the user and /tmp/xiaoyudian/state-store/admin-xiaoyudian@xiaoyudianMSP-cert.pem will be created. But this cert is not an admin identity..

RealDeanZhao (Wed, 13 Jun 2018 14:22:54 GMT):
If i don't enroll the admin and use the cert from the cert store, the request will succeed

troyronda (Wed, 13 Jun 2018 15:01:33 GMT):
@Kyroy did you get some warnings in the log?

Kyroy (Wed, 13 Jun 2018 15:04:28 GMT):
@troyronda no, no warning :/

RealDeanZhao (Wed, 13 Jun 2018 15:35:10 GMT):

Clipboard - June 13, 2018 11:34 PM

aleksandar.likic (Wed, 13 Jun 2018 21:55:05 GMT):
@RealDeanZhao the enrollment process doesn't know if the user will be an admin. On the other hand, for a user to be an admin, he/she has to be enrolled - issued an x509 cert. The cert then has to be stored into a proper place. For a user to be able to create an application channel, its cert has to be stored as admin in the system channel's configuration. This is normally done when the genesis block of the system channel is created/modified. For a user to be able to perform operations on an application channel (not the system channel), like chaincode deployment, its cert has to be stored as admin in the application channel's configuration. This is normally done when the genesis block of the application channel is created/modified. For a user to be able to perform operations on a peer, like to join a peer to a channel, its cert has to be stored into the admin folder of the peer local MSP. I think this is roughly how this works, but don't hold me to it. To get the exact details see the Fabric Operations Guides at https://hyperledger-fabric.readthedocs.io/en/release-1.1/ops_guide.html.

aleksandar.likic (Wed, 13 Jun 2018 21:55:05 GMT):
@RealDeanZhao the enrollment process doesn't know if the user will be an admin. On the other hand, for a user to be an admin, he/she has to be enrolled - issued an x509 cert. The cert then has to be stored into a proper place. For a user to be able to create a tx channel, its cert has to be stored into the admin MSP folder of the system channel's configuration. This is normally done when the genesis block of the system channel is created/modified. For a user to be able to perform operations on a tx channel (not the system channel), like chaincode deployment, its cert has to be stored into the admin MSP folder of the tx channel's configuration. This is normally done when the genesis block of the tx channel is created/modified. For a user to be able to perform operations on a peer, like to join a peer to a channel, its cert has to be stored into the admin folder of the peer local MSP. I think this is roughly how this works, but don't hold me to it. To get the exact details see the Fabric Operations Guide, starting with https://hyperledger-fabric.readthedocs.io/en/release-1.0/msp.html.

aleksandar.likic (Wed, 13 Jun 2018 21:55:05 GMT):
@RealDeanZhao the enrollment process doesn't know if the user will be an admin. On the other hand, for a user to be an admin, he/she has to be enrolled - issued an x509 cert. The cert then has to be stored into a proper place. For a user to be able to create a tx channel, its cert has to be stored into the admin MSP folder of the system channel's configuration. This is normally done when the genesis block of the system channel is created/modified. For a user to be able to perform operations on a tx channel (not the system channel), like chaincode deployment, its cert has to be stored into the admin MSP folder of the tx channel's configuration. This is normally done when the genesis block of the tx channel is created/modified. For a user to be able to perform operations on a peer, like to join a peer to a channel, its cert has to be stored into the admin folder of the peer local MSP. I think this is roughly how this works, but don't hold me to it. To get the exact details see the Fabric Operations Guide, starting with https://hyperledger-fabric.readthedocs.io/en/release-1.1/config_update.html.

aleksandar.likic (Wed, 13 Jun 2018 21:55:05 GMT):
@RealDeanZhao the enrollment process doesn't know if the user will be an admin. On the other hand, for a user to be an admin, he/she has to be enrolled - issued an x509 cert. The cert then has to be stored into a proper place. For a user to be able to create a tx channel, its cert has to be stored into the admin MSP folder of the system channel's configuration. This is normally done when the genesis block of the system channel is created/modified. For a user to be able to perform operations on a tx channel (not the system channel), like chaincode deployment, its cert has to be stored into the admin MSP folder of the tx channel's configuration. This is normally done when the genesis block of the tx channel is created/modified. For a user to be able to perform operations on a peer, like to join a peer to a channel, its cert has to be stored into the admin folder of the peer local MSP. I think this is roughly how this works, but don't hold me to it. To get the exact details see the Fabric Operations Guides at https://hyperledger-fabric.readthedocs.io/en/release-1.1/ops_guide.html.

RealDeanZhao (Thu, 14 Jun 2018 02:09:16 GMT):
@aleksandar.likic Thank you for the explanation.

chriszhenghf (Thu, 14 Jun 2018 15:49:02 GMT):
Has joined the channel.

ga25waq (Thu, 14 Jun 2018 22:56:05 GMT):
@troyronda Thanks for the tag! That's the final part that was missing to complete my project. Thanks also for all the bugfixes over the last few months, and of course for the whole SDK! Great job!

BhaskarRaju (Fri, 15 Jun 2018 05:18:30 GMT):
Has joined the channel.

indirajith (Fri, 15 Jun 2018 09:26:41 GMT):
Hi, is there any example of fabric sdk go implementations available? Just to have a look at it to understand and get started with my own implementation?

yacovm (Fri, 15 Jun 2018 09:31:17 GMT):
https://github.com/securekey/fabric-examples/tree/master/fabric-cli/

yacovm (Fri, 15 Jun 2018 09:31:20 GMT):
@indirajith ^

TomGeerts (Fri, 15 Jun 2018 09:45:51 GMT):
Has joined the channel.

paulananth (Fri, 15 Jun 2018 12:21:08 GMT):
Has joined the channel.

troyronda (Fri, 15 Jun 2018 18:34:09 GMT):
@ga25waq thanks so much - happy to hear that you completed your project!

MaximeAubanel (Fri, 15 Jun 2018 23:46:56 GMT):
Hello guys, I'm kinda trying new stuff and I came up with an error: ```unable to verify if cc is installed on localhost:7051. Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: connection creation failed: caching connector is closed``` I guess the error might come from the config files, but I checked everything and it's correct, does anyone got the same error while Intalling CC ? I'm using the last SDK Go version :)

MaximeAubanel (Fri, 15 Jun 2018 23:46:56 GMT):
Hello guys, DOes anyone got this error ? : ```unable to verify if cc is installed on localhost:7051. Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: connection creation failed: caching connector is closed``` I guess the error might come from the config files, but I checked everything and it's correct, does anyone got the same error while Intalling CC ? I'm using the last SDK Go version :)

MaximeAubanel (Fri, 15 Jun 2018 23:46:56 GMT):
Hello guys, Does anyone already have this error ? : ```unable to verify if cc is installed on localhost:7051. Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: connection creation failed: caching connector is closed``` I guess the error might come from the config files, but I checked everything and it's correct, does anyone got the same error while Intalling CC ? I'm using the last SDK Go version :)

MaximeAubanel (Fri, 15 Jun 2018 23:48:18 GMT):
I checked peer logs and they seems fine

szytko (Sat, 16 Jun 2018 11:57:27 GMT):
Has joined the channel.

dhruvrana (Mon, 18 Jun 2018 11:34:11 GMT):
Has joined the channel.

divyank (Mon, 18 Jun 2018 14:25:54 GMT):
Hi @MaximeAubanel , is there any chance that you are using the SDK after calling sdk.Close()? https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#FabricSDK.Close

MaximeAubanel (Mon, 18 Jun 2018 15:46:01 GMT):
@divyank Indeed it was that ! I split my function in 2 and I forgot that I was calling ```defer sdk.close()``` in the first function haha, I gotta stop working late :P

MaximeAubanel (Mon, 18 Jun 2018 15:46:01 GMT):
@divyank Indeed it was that ! I split my function in 2 and I forgot that I was calling ```defer sdk.close()``` in the first function haha, I gotta stop working late :P Thnaks tho

MaximeAubanel (Mon, 18 Jun 2018 15:46:01 GMT):
@divyank Indeed it was that ! I split my function in 2 and I forgot that I was calling ```defer sdk.close()``` in the first function haha, I gotta stop working late :P Thanks tho

ng2dev (Tue, 19 Jun 2018 11:05:18 GMT):
Has joined the channel.

ng2dev (Tue, 19 Jun 2018 11:07:19 GMT):
I have a problem encoding attributes into registrationRequest of the msp package. I am using the ibm cloud blockchain which provides an admin user to the ca-org1

ng2dev (Tue, 19 Jun 2018 11:09:33 GMT):
this is my function body

ng2dev (Tue, 19 Jun 2018 11:09:35 GMT):
attributes := []msp.Attribute{} // normal user with id attribute attributes = append(attributes, msp.Attribute{ Name: "hf.Registrar.Roles", Value: "validator", ECert: true, }) registrationRequest := &msp.RegistrationRequest{ Name: username, Type: "validator", Affiliation: e.orgID, Attributes: attributes, } enrollmentSecret, err := e.mspClient.Register(registrationRequest) if err != nil { return errors.Wrapf(err, "Failed to register user - %s", username) }

ng2dev (Tue, 19 Jun 2018 11:10:46 GMT):
this is one example but I have tried many different ways, essentially trying to follow the documentation here

ng2dev (Tue, 19 Jun 2018 11:10:46 GMT):
this is one example but I have tried many different ways, essentially trying to follow the documentation here and the unit tests

ng2dev (Tue, 19 Jun 2018 11:10:59 GMT):
http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#registering-a-new-identity

ng2dev (Tue, 19 Jun 2018 11:10:59 GMT):
http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#registering-a-new-identity https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/msp/enrollment_test.go

ng2dev (Tue, 19 Jun 2018 11:12:21 GMT):
this is the errori get back from msp.Register

ng2dev (Tue, 19 Jun 2018 11:12:22 GMT):
Error Code: 20 - Authorization failure

ng2dev (Tue, 19 Jun 2018 11:12:38 GMT):
if I do not set attributes it works fine

ng2dev (Tue, 19 Jun 2018 11:14:17 GMT):
@mastersingh24 I was asked to reach out to you regarding this question - could you indicate a direction to follow?

ng2dev (Tue, 19 Jun 2018 13:01:33 GMT):
I elaborated in somewhat more detail about this question in this stack overflow question https://stackoverflow.com/questions/50928951/hyperledger-fabric-v1-1-0-register-user-with-attributes-fails

dhruvrana (Tue, 19 Jun 2018 13:33:06 GMT):
getting this error: Unable to initialize the Fabric SDK: failed to create channel: create channel failed: failed broadcast to orderer: Orderer Server Status Code: (400) BAD_REQUEST. Description: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x9ac25d] ubuntu 16.04 Anybody knows what to do ?

sudeshrshetty (Tue, 19 Jun 2018 18:21:41 GMT):
@Kyroy please use latest sdk (commit:884d2cdbc32165cc813aac46b386902ec421ac31) for "N must be greater than 0" issue fix

aleksandar.likic (Tue, 19 Jun 2018 19:02:20 GMT):
@ng2dev Is it possible that the SDK user doesn't have a permission to register a new user with "hf:Registrar.Roles":"validator"? That's what the error (Authorization failure) seems to indicate. Did you try some other attribute name/value?

vanitas92 (Tue, 19 Jun 2018 20:10:31 GMT):
Has joined the channel.

CsterKuroi (Wed, 20 Jun 2018 06:32:50 GMT):
Has joined the channel.

CsterKuroi (Wed, 20 Jun 2018 06:48:33 GMT):
Anyone has a repo with vendor, I have a trouble when `dep ensure` as We have GWF in China

nmarcetic (Wed, 20 Jun 2018 10:07:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=thwGJqJQrrDTTkyNT) @troyronda Thank you!

Rachit_gaur (Wed, 20 Jun 2018 10:33:54 GMT):
Has joined the channel.

Rachit_gaur (Wed, 20 Jun 2018 10:33:56 GMT):
Hi i have setup my chaincode endorsement policy such that 2 organization have to sign it out of 3..How can i pass the signs so that transaction is approved. I am using Oracle Blockchain Beta..and calling my arguments through rest API's..Can i pass some parameters which enable signing or is there some other method?

ng2dev (Wed, 20 Jun 2018 11:08:32 GMT):
@aleksandar.likic pretty much tried any combination I could think of - like accountID, hf.accountID ... but ye this did not make sense as admin needs to have as you say permission to set certain attributes on users

ng2dev (Wed, 20 Jun 2018 11:12:44 GMT):
so hf.Registrar.Roles is I thought the most straight-forward as this standard admin user is able to register type validator (without attributes) but maybe I am mixing up type/role and attribute/role

ng2dev (Wed, 20 Jun 2018 11:12:44 GMT):
so hf.Registrar.Roles is I thought the most straight-forward as this standard admin user coming with that ibm managed blockchain (version 1.1.0 - starter) is able to register type validator (without attributes) but maybe I am mixing up type/role and attribute/role

ng2dev (Wed, 20 Jun 2018 11:13:40 GMT):
and indeed admin does not have permission to assign any attribute to the user

ng2dev (Wed, 20 Jun 2018 11:13:40 GMT):
and indeed admin does not have permission to assign any attribute to the user. If I do an openssl x509 -in admin.pem -text I see no X509v3 extensions that might indicate attribute stuff

ng2dev (Wed, 20 Jun 2018 11:13:40 GMT):
and indeed admin does not have permission to assign any attribute to the user. If I do an openssl x509 -in admin.pem -text I see no X509v3 extensions that might indicate attribute stuff. But comparing that openssl output with the admin cert from the fabric-go-sdk test that cert does not have anything special encoded either (like a wildcard for attributes or such) nevertehless the enrollment_test.go can create attribute keys at random.

ng2dev (Wed, 20 Jun 2018 11:13:40 GMT):
and indeed admin does not have permission to assign any attribute to the user. If I do an openssl x509 -in admin.pem -text I see no X509v3 extensions that might indicate attribute stuff. But comparing that openssl output with the admin cert from the fabric-go-sdk unit test that cert does not have anything special encoded either (like a wildcard for attributes or such) nevertehless the enrollment_test.go can create attribute keys at random.

Rachit_gaur (Wed, 20 Jun 2018 11:16:38 GMT):
How to endorse the chaincode for signing before transactions? and what parameters will be passed to sign the chaincode?

puneet (Thu, 21 Jun 2018 08:21:34 GMT):
Has joined the channel.

aleksandar.likic (Thu, 21 Jun 2018 13:19:53 GMT):
@ng2dev See http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#registering-a-new-identity

Kyroy (Thu, 21 Jun 2018 14:16:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sstgDC2DPtbQwE4GX) Thank you very much :) Works perfectly fine

Kyroy (Thu, 21 Jun 2018 14:16:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sstgDC2DPtbQwE4GX) Thank you very much :) Works perfectly fine

Kyroy (Thu, 21 Jun 2018 14:16:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sstgDC2DPtbQwE4GX) Thank you very much :) Works perfectly fine

Kyroy (Fri, 22 Jun 2018 10:29:43 GMT):
With the release of fabric 1.2 and the dynamic discovery service. Will it be possible to easily configure the sdk with only very few parameters?

troyronda (Fri, 22 Jun 2018 11:35:27 GMT):
@Kyroy the SDK configured itself based on the channel capabilities in the channel config block, by default

troyronda (Fri, 22 Jun 2018 11:36:09 GMT):
So if you don’t have any overrides and you have the 1.2 capability in channel config then it is automatic :)

Kyroy (Fri, 22 Jun 2018 11:41:07 GMT):
But I need to provide some initial options for connecting to the peer/orderer, right? Do you have an example in the tests?

Kyroy (Fri, 22 Jun 2018 11:41:55 GMT):
That's really cool :D Finally fabric gets dynamic

troyronda (Fri, 22 Jun 2018 11:42:01 GMT):
You need to have some peers configured so the SDK can fetch the channel config

troyronda (Fri, 22 Jun 2018 11:42:01 GMT):
You need to have some peers configured so the SDK can fetch the channel config and discover more peers.

troyronda (Fri, 22 Jun 2018 11:42:01 GMT):
You need to have some peers configured so the SDK can fetch the channel config and discover more peer endpoints.

troyronda (Fri, 22 Jun 2018 11:42:12 GMT):
And the orderer endpoint

troyronda (Fri, 22 Jun 2018 11:42:12 GMT):
And the SDK also fetched the orderer endpoint

troyronda (Fri, 22 Jun 2018 11:42:12 GMT):
And the SDK also fetches the orderer endpoint from channel config block, by default

troyronda (Fri, 22 Jun 2018 11:43:49 GMT):
We use entity matchers to set endpoint configuration from dynamically discovered endpoints.

Kyroy (Fri, 22 Jun 2018 11:52:29 GMT):
But initially, I don't have any channel, right? How are the orderers discovered?

Kyroy (Fri, 22 Jun 2018 11:53:46 GMT):
So I still need to set the `tlsCACerts.path` for every org?

Kyroy (Fri, 22 Jun 2018 11:56:27 GMT):
Because, when I have a CC that's endorsement policy is e.g. majority or 5 orgs, the sdk has to connect to 2 other orgs, right? It would be nice if I don't have to manage configurations for all orgs. Especially not when the network changes frequently

Kyroy (Fri, 22 Jun 2018 11:56:27 GMT):
Because, when I have a CC that's endorsement policy is e.g. majority of 5 orgs, the sdk has to connect to 2 other orgs, right? It would be nice if I don't have to manage configurations for all orgs. Especially not when the network changes frequently

troyronda (Fri, 22 Jun 2018 11:58:26 GMT):
you need to have some peers “configured” for each channel name so the SDK can fetch the channel config (including orderer endpoint)

troyronda (Fri, 22 Jun 2018 11:58:43 GMT):
I have configured in quotes because you don’t need to use a config file

troyronda (Fri, 22 Jun 2018 11:59:13 GMT):
You can progmatically include func handlers to return that configuration

troyronda (Fri, 22 Jun 2018 12:00:13 GMT):
https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/e2e/configless

Kyroy (Fri, 22 Jun 2018 12:00:18 GMT):
Does this all work with the current version of the sdk and fabric 1.2-rc1?

troyronda (Fri, 22 Jun 2018 12:29:24 GMT):
yup

Kyroy (Fri, 22 Jun 2018 16:18:54 GMT):
Is there a way to get the discovered peers & orderers?

yacovm (Fri, 22 Jun 2018 17:22:24 GMT):
@Kyroy yes there is

yacovm (Fri, 22 Jun 2018 17:22:58 GMT):
see https://stackoverflow.com/questions/50970262/peer-discovery-in-multiple-org-network but i'm not sure how to do that in the go SDK... maybe the folks here can say how

pankaj13 (Sat, 23 Jun 2018 05:59:44 GMT):
I am trying to write a simple test application using the Go SDK examples provided but keep running into this error about failed connection. The three key files are as follows: main.go - https://drive.google.com/file/d/1bugK45JjHNJ_hD1pNJnkBMLz0SbZ0qhE/view?usp=sharing config.yaml - https://drive.google.com/open?id=1-R65-9PvtZOFqoaIwKYHlJnydbI5mGj2 docker-compose.yaml - https://drive.google.com/open?id=1keWX232rC3GIhAf8vfNFWxbkSwtpWMPJ anshu@mServer:~/go/src/10-network$ go run main.go 22:50:42.844 main ▶ DEBU 001 ================ STARTING MAIN ================ trying to initialize sdk instance..... 22:50:42.844 main ▶ INFO 002 trying to initialize sdk instance..... 22:50:42.872 main ▶ DEBU 003 Target peers acquired are %v: [peer0.org1.campus.com peer1.org1.campus.com] 22:50:42.872 main ▶ DEBU 004 <<<<<<<<<<<<<<<< C R E A T I N G C H A N N E L >>>>>>>>>>>>>>>>>>> cscc.GetChannels failed: SendProposal failed: Transaction processing for endorser [peer0.org1.campus.com:7051]: Endorser ClientStatus Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.org1.campus.com:7051] failed to query channel for peer 22:50:52.874 main ▶ ERRO 005 cscc.GetChannels failed: SendProposal failed: Transaction processing for endorser [peer0.org1.campus.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.org1.campus.com:7051] failed to query channel for peer panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa0d707] goroutine 1 [running]: main.main() /home/anshu/go/src/10-network/main.go:113 +0x1377 exit status 2 I will appreciate if anyone can point me to any possible error in my code or in the right direction. Thanks.

ck01 (Sun, 24 Jun 2018 19:56:51 GMT):
Hi everyone, I created an example to demonstrate usage of fabric-sdk-go. It actually is [balance-transfer](https://github.com/hyperledger/fabric-samples/tree/release-1.1/balance-transfer) project but using fabric-sdk-go instead. Take a look at https://github.com/khanhnb/balance-transfer-go.

zq350466548 (Mon, 25 Jun 2018 09:46:06 GMT):
Has joined the channel.

RealDeanZhao (Mon, 25 Jun 2018 09:57:55 GMT):
@pankaj13 https://stackoverflow.com/questions/50792520/connection-timeout-when-installing-chaincode-using-fabric-sdk-go Please see this, I met the same error before.

RealDeanZhao (Mon, 25 Jun 2018 10:04:40 GMT):
@pankaj13 The timeout issue was caused by the mutual tls key and cert configuration in my network-config.yaml..

Kyroy (Mon, 25 Jun 2018 14:03:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=i9MHshKDDtHbbD4c6) @troyronda

bstasyszyn (Mon, 25 Jun 2018 15:16:17 GMT):
@Kyroy To get the discovered peers, take a look at: https://github.com/hyperledger/fabric-sdk-go/blob/ed6420081d5d73bef6f88a87718b93e048b4b8e8/test/integration/sdk/sdk_dyndiscovery_test.go#L48

bstasyszyn (Mon, 25 Jun 2018 15:18:05 GMT):
@Kyroy For orderers: https://github.com/hyperledger/fabric-sdk-go/blob/ed6420081d5d73bef6f88a87718b93e048b4b8e8/test/integration/sdk/channel_config_test.go#L62

bstasyszyn (Mon, 25 Jun 2018 15:22:46 GMT):
@Kyroy Actually, easier if you just did cfg, err := cs.ChannelConfig() - this will return a cached channel config and you can get orderers directly (without having to query)

Kyroy (Mon, 25 Jun 2018 15:26:07 GMT):
Ah, cool :) Thank you very much

frustrated-chain (Mon, 25 Jun 2018 17:20:55 GMT):
Has joined the channel.

Kyroy (Tue, 26 Jun 2018 06:05:12 GMT):
Hi, chaincode status 201 now returns an error: `Chaincode status Code: (201) UNKNOWN. Description: Text Created` I think this behaviour was different before, right?

Kyroy (Tue, 26 Jun 2018 09:52:05 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/peer/peerendorser.go#L217 https://github.com/hyperledger/fabric-sdk-go/commit/914555ea01b20882558422279f4421e69a07e6d9#diff-49453963407c3b52e9987a8002b8b865 2xx is always success

absingh0 (Wed, 27 Jun 2018 06:13:32 GMT):
Has joined the channel.

MahimaManik (Wed, 27 Jun 2018 06:23:43 GMT):
Has joined the channel.

MahimaManik (Wed, 27 Jun 2018 06:27:25 GMT):
Hi, I have fabric network running, channel formed and chaincode deployed. Now, I have to submit transaction to fabric from my application to the existing channel. Is there any function to create a client for the existing channel and then perform the transaction?

Kyroy (Wed, 27 Jun 2018 06:33:10 GMT):
CL https://gerrit.hyperledger.org/r/#/c/23717/

Kyroy (Wed, 27 Jun 2018 09:17:09 GMT):
When using this code https://github.com/hyperledger/fabric-sdk-go/blob/ed6420081d5d73bef6f88a87718b93e048b4b8e8/test/integration/sdk/sdk_dyndiscovery_test.go#L87-L147 I get a panic https://gist.github.com/Kyroy/f6eee1c34f32522e62cf6c47383896a9 when doing https://github.com/hyperledger/fabric-sdk-go/blob/ed6420081d5d73bef6f88a87718b93e048b4b8e8/pkg/client/ledger/ledger.go#L127

Kyroy (Wed, 27 Jun 2018 09:17:09 GMT):
When using the `dynamicDiscoveryProviderFactory` from https://github.com/hyperledger/fabric-sdk-go/blob/ed6420081d5d73bef6f88a87718b93e048b4b8e8/test/integration/sdk/sdk_dyndiscovery_test.go#L87-L147 I get a panic https://gist.github.com/Kyroy/f6eee1c34f32522e62cf6c47383896a9 when doing https://github.com/hyperledger/fabric-sdk-go/blob/ed6420081d5d73bef6f88a87718b93e048b4b8e8/pkg/client/ledger/ledger.go#L127

nmarcetic (Wed, 27 Jun 2018 11:06:29 GMT):
Hey folks, question: I can't use environment variables in skd config.yaml for CA url or peer url etc... why ? Only `${GOPATH}` works any idea why ?

nmarcetic (Wed, 27 Jun 2018 11:07:47 GMT):
I want to do something like this ``` certificateAuthorities: ca.org1.example.com: url: ${FABRIC_CA_URL} ```

nmarcetic (Wed, 27 Jun 2018 11:08:27 GMT):
Getting error: ``` enroll failed: enroll failed: Failed posting to http://$%7BFABRIC_CA_URL%7D:/enroll: parse http://$%7BFABRIC_CA_URL%7D:/enroll: invalid URL escape \"%7B\"\n.","ts":"2018-06-27T11:08:03.110734244Z"} ```

nmarcetic (Wed, 27 Jun 2018 11:08:38 GMT):
So `${FABRIC_CA_URL}` is not parsed at all, any idea why ?

Kyroy (Wed, 27 Jun 2018 11:11:10 GMT):
@MahimaManik Take a look at the e2e tests. They helped me a lot. https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L173

MahimaManik (Wed, 27 Jun 2018 11:49:21 GMT):
@Kyroy I am getting error before this step. Channel client could not be formed well with existing channel's orgName. Getting following error: Failed to create new channel client: %s failed to create channel context: failed to get client context to create channel client: invalid options to create identity, invalid org name

Kyroy (Wed, 27 Jun 2018 12:38:10 GMT):
I am trying to use `ChannelContext(channelID string, options ...ContextOption)` to get MSPs and more information of a channel. Which seems to work, but when the channel is updated with a new Organisation, ChannelContext still does not return it. Only when rerunning my application, the information get loaded

Kyroy (Wed, 27 Jun 2018 12:48:20 GMT):
Btw. I am using fabric1.2-rc1 and latest sdk version

troyronda (Wed, 27 Jun 2018 13:43:59 GMT):
@Kyroy @bstasyszyn we have a known issue that we need to clear the SDK caches on config block update (& also chaincode lifecycle event) ^^^.

Kyroy (Wed, 27 Jun 2018 13:45:09 GMT):
Oh okay :D thanks :) Is there currently someone working on?

Kyroy (Wed, 27 Jun 2018 13:45:58 GMT):
@troyronda Do you have an e2e example with multiple required endorsements on different orgs?

Kyroy (Wed, 27 Jun 2018 13:46:21 GMT):
because right know, I get `error getting endorsers from channel response: no endorsement combination can be satisfied` XD

troyronda (Wed, 27 Jun 2018 13:46:52 GMT):
created https://jira.hyperledger.org/browse/FAB-10892 (regarding cache clearing)

troyronda (Wed, 27 Jun 2018 13:47:12 GMT):
not yet :(

troyronda (Wed, 27 Jun 2018 13:47:12 GMT):
for the cache clearing, not yet :(

Kyroy (Wed, 27 Jun 2018 13:47:25 GMT):
Thanks :)

troyronda (Wed, 27 Jun 2018 13:48:38 GMT):
FYI: 23717 failed CI due to linter warning: 07:43:59 Running metalinters... 07:45:10 pkg/fab/txn/txn.go:37::warning: cyclomatic complexity 11 of function New() is high (> 10) (gocyclo) 07:45:10 Makefile:217: recipe for target 'unit-test' failed 07:45:10 make: *** [unit-test] Error 1

troyronda (Wed, 27 Jun 2018 13:48:38 GMT):
FYI: 23717 (FAB-10884) failed CI due to linter warning: 07:43:59 Running metalinters... 07:45:10 pkg/fab/txn/txn.go:37::warning: cyclomatic complexity 11 of function New() is high (> 10) (gocyclo) 07:45:10 Makefile:217: recipe for target 'unit-test' failed 07:45:10 make: *** [unit-test] Error 1

troyronda (Wed, 27 Jun 2018 13:48:53 GMT):
I guess that extra condition pushed it over the complexity edge :P.

Kyroy (Wed, 27 Jun 2018 13:49:38 GMT):
:(

Kyroy (Wed, 27 Jun 2018 13:50:15 GMT):
I would like to create a method that checks if the status is ok. But I don't know where to put it :D

Kyroy (Wed, 27 Jun 2018 13:51:55 GMT):
I have to leave now, I will update the CL later. Also would be nice to also know this: :P [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GbA2859JvSu9WiSt6)

troyronda (Wed, 27 Jun 2018 13:52:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wcvSxic3STuBvnLff) @Kyroy @bstasyszyn ^^^

sudeshrshetty (Wed, 27 Jun 2018 14:24:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GbA2859JvSu9WiSt6) @Kyroy refer mutlti org tests in https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/orgs

sudeshrshetty (Wed, 27 Jun 2018 14:27:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fThyCvwadPRJDB2dN) @MahimaManik You can find samples in below tests https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/fab https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/sdk

frustrated-chain (Wed, 27 Jun 2018 14:41:15 GMT):
@troyronda Hi, I have a fabric network (built by ansible agent) with kuberenets which has my own (Go) chaincode installed on it, I am able to do transaction via CLI (login to peers and run commands). However, I cannot figure how to make calls from outside the fabric into it. How should I proceed? Any documents or information will be great help.

nmarcetic (Wed, 27 Jun 2018 15:11:32 GMT):
@frustrated-chain Here is a great (only app available online in Go) example of App using fabric-sdk-go and interacting with chaincode (what you want "from outside the network"). https://github.com/chainHero/heroes-service/tree/v1.1.0

nmarcetic (Wed, 27 Jun 2018 15:12:48 GMT):
Use this v1.1.0 branch compatible with Fabric v1.1 ^

nmarcetic (Wed, 27 Jun 2018 15:15:18 GMT):
Here is a blog post maybe you will find more info here https://chainhero.io/2018/06/tutorial-build-blockchain-app-v1-1-0/

yacovm (Wed, 27 Jun 2018 15:18:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wcvSxic3STuBvnLff) Because the discovery service treats "empty policies" as invalid policies, by design. I'm not sure why you instantiated the chaincode with an empty policy, but even if the discovery service would have supported such policies then it would have returned a descriptor that is empty, because the minimal combinations to satisfy an empty policy is actually not to endorse at all, and the discovery service "answers" the SDK with the question "what is the minimal set of peers I need to ask endorsements from?" @Kyroy

yacovm (Wed, 27 Jun 2018 15:18:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wcvSxic3STuBvnLff) Because, @Kyroy - the discovery service treats "empty policies" as invalid policies, by design. I'm not sure why you instantiated the chaincode with an empty policy, but even if the discovery service would have supported such policies then it would have returned a descriptor that is empty, because the minimal combinations to satisfy an empty policy is actually not to endorse at all, and the discovery service "answers" the SDK with the question "what is the minimal set of peers I need to ask endorsements from?" Now that raises a question - @bstasyszyn - what would the go SDK do if it gets an empty set of `[]Endorser` from the `Endorsers()` API call when invoking my discovery client?

yacovm (Wed, 27 Jun 2018 15:18:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wcvSxic3STuBvnLff) Because, @Kyroy - the discovery service treats "empty policies" as invalid policies, by design. I'm not sure why you instantiated the chaincode with an empty policy, but even if the discovery service would have supported such policies then it would have returned a descriptor that is empty, because the minimal combinations to satisfy an empty policy is actually not to endorse at all, and the discovery service "answers" the SDK with the question "what is the minimal set of peers I need to ask endorsements from?" Now that raises a question , @bstasyszyn , what would the go SDK do if it gets an empty set of `[]Endorser` from the `Endorsers()` API call when invoking my discovery client?

yacovm (Wed, 27 Jun 2018 15:18:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wcvSxic3STuBvnLff) Because, @Kyroy - the discovery service treats "empty policies" as invalid policies, by design. I'm not sure why you instantiated the chaincode with an empty policy, but even if the discovery service would have supported such policies then it would have returned a descriptor that is empty, because the minimal combinations to satisfy an empty policy is actually not to endorse at all, and the discovery service "answers" the SDK with the question "what is the minimal set of peers I need to ask endorsements from?" Now that raises a question , @bstasyszyn , what would the go SDK do if it gets an empty set of `[]Endorser` from the `Endorsers()` API call when invoking my discovery client?

yacovm (Wed, 27 Jun 2018 15:18:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wcvSxic3STuBvnLff) Because, @Kyroy - the discovery service treats "empty policies" as invalid policies, by design. I'm not sure why you instantiated the chaincode with an empty policy, but even if the discovery service would have supported such policies then it would have returned a descriptor that is empty, because the minimal combinations to satisfy an empty policy is actually not to endorse at all, and the discovery service "answers" the SDK with the question "what is the minimal set of peers I need to ask endorsements from?" @bstasyszyn , what would the go SDK do if it gets an empty set of `[]Endorser` from the `Endorsers()` API call when invoking my discovery client?

frustrated-chain (Wed, 27 Jun 2018 15:23:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=LBJBBuCMpL3yrxf4Z) @nmarcetic Thank you, this looks very promising! checking it now.

nmarcetic (Wed, 27 Jun 2018 15:24:38 GMT):
:+1:

nmarcetic (Wed, 27 Jun 2018 15:24:44 GMT):
Helped me a lot

bstasyszyn (Wed, 27 Jun 2018 16:20:40 GMT):
@yacovm If an empty set of endorsers is returned then the caller would get an error from the SDK - something like "no target peers"

troyronda (Wed, 27 Jun 2018 16:30:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=o57ZHWjNXv29BT6iv) @sudeshrshetty ^^

yacovm (Wed, 27 Jun 2018 16:46:31 GMT):
I don't think a chaincode that checks that the status is OK has any value, @Kyroy . If you want to see if a peer is online there are much better ways to do that - you can query for the list of peers on a single peer and it would return to you all the peers.

Kyroy (Wed, 27 Jun 2018 17:03:25 GMT):
@yacovm this question was regarding FAB-10884

yacovm (Wed, 27 Jun 2018 17:04:58 GMT):
I'm saying in general

Kyroy (Wed, 27 Jun 2018 17:14:59 GMT):
There are multiple packages where I have to add if the returned status of the cc is OK. I would have created a method in the status package. But this is a vendored package from fabric. I never planned to write a CC to check peer statuses xD

sudeshrshetty (Wed, 27 Jun 2018 17:58:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3LJJRE8xhTC4hhAty) @troyronda posted suggestion in gerrit.

Kyroy (Wed, 27 Jun 2018 19:10:13 GMT):
My CC policy was: `cauthdsl.SignedByAnyMember([]string{"Org1MSP"})`. And my sdk was configured for Org2MSP. [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kmfPWpkXPc2BFXbBT)

frustrated-chain (Wed, 27 Jun 2018 19:11:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=efnM7W2CqeADuN9hw) @nmarcetic This is a good guide indeed, however my problem still exist; I cannot figure how to access the nodes (which have internal IP (172.16.x.x) address but are not mapped to external endpoints-as seen in k8s dashboard) from the outside. In the case of this guide for example, I need to figure the addresses of nodes to be be put in config.yaml file.

frustrated-chain (Wed, 27 Jun 2018 19:11:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=efnM7W2CqeADuN9hw) @nmarcetic This is a good guide indeed, however my problem still exists; I cannot figure how to access the nodes (which have internal IP (172.16.x.x) addresses but are not mapped to external endpoints-as seen in k8s dashboard) from the outside. In the case of this guide for example, I need to figure the addresses of nodes to be be put in config.yaml file.

yacovm (Wed, 27 Jun 2018 19:23:01 GMT):
@Kyroy - but you said you were using an accept all policy in the JIRA!

yacovm (Wed, 27 Jun 2018 19:23:08 GMT):
and that's what the logs said...

Kyroy (Wed, 27 Jun 2018 19:26:08 GMT):
@yacovm Oh, you were also looking at my other JIRA issue :D Yes, after I noticed that my policy was the issue, I changed it. I still got the/an error. I will quickly reverify this

yacovm (Wed, 27 Jun 2018 19:27:01 GMT):
yes that was me.

yacovm (Wed, 27 Jun 2018 19:27:01 GMT):
yes that was me. wait, actually - what other JIRA issue? there are 2 of them?

yacovm (Wed, 27 Jun 2018 19:27:24 GMT):
> Yes, after I noticed that my policy was the issue, I changed it. I still got the/an error. I will quickly reverify this that might be because the chaincode isn't installed on the peers

yacovm (Wed, 27 Jun 2018 19:27:30 GMT):
of Org1MSP

yacovm (Wed, 27 Jun 2018 19:28:08 GMT):
but if you see an error please check the logs and then tell me what the logs of the peer say

Kyroy (Wed, 27 Jun 2018 19:44:18 GMT):
@yacovm I query with Org1MSP: The behaviour is actually equal for Invoke and Query: It sometimes works, sometimes not. It does not work when the sdk logged: ``` [fabsdk/fab] 2018/06/27 19:39:11 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [] creator org [Org1SAPMSP]]``` Invoke returns ```error getting endorsers from channel response: no endorsement combination can be satisfied``` Query returns ```Failed to get endorsing peers: error getting endorsers from channel response: no endorsement combination can be satisfied``` No WARN/ERR logs in the peer

Kyroy (Wed, 27 Jun 2018 19:44:18 GMT):
@yacovm I query with Org1MSP: The behaviour is actually equal for Invoke and Query: It sometimes works, sometimes not. It does not work when the sdk logged: ``` [fabsdk/fab] 2018/06/27 19:39:11 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [] creator org [Org1SAPMSP]]``` Invoke returns ``` error getting endorsers from channel response: no endorsement combination can be satisfied``` Query returns ``` Failed to get endorsing peers: error getting endorsers from channel response: no endorsement combination can be satisfied``` No WARN/ERR logs in the peer

Kyroy (Wed, 27 Jun 2018 19:44:18 GMT):
@yacovm I query with Org1MSP: The behaviour is actually equal for Invoke and Query: It sometimes works, sometimes not. It does not work when the sdk logged: ``` [fabsdk/fab] 2018/06/27 19:39:11 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [] creator org [Org1MSP]]``` Invoke returns ``` error getting endorsers from channel response: no endorsement combination can be satisfied``` Query returns ``` Failed to get endorsing peers: error getting endorsers from channel response: no endorsement combination can be satisfied``` No WARN/ERR logs in the peer

Kyroy (Wed, 27 Jun 2018 19:48:03 GMT):
I logged the call of: `func (cr *channelResponse) Endorsers(invocationChain InvocationChain, ps PrioritySelector, ef ExclusionFilter) (Endorsers, error)` And after every 6th call, the sdk ERR is logged (without any request)

yacovm (Wed, 27 Jun 2018 19:48:07 GMT):
if you get access denied then you have to have some logs in the peer

yacovm (Wed, 27 Jun 2018 19:49:26 GMT):
that's really odd though, what you're describing....

yacovm (Wed, 27 Jun 2018 19:50:07 GMT):
as for the "no combination can be satisfied" - you're saying that you sometimes get this, and sometimes not?

Kyroy (Wed, 27 Jun 2018 19:51:02 GMT):
Yes. But maybe it has something to do with my sdk config

yacovm (Wed, 27 Jun 2018 19:51:26 GMT):
Can you please try to use https://hyperledger-fabric.readthedocs.io/en/latest/discovery-cli.html

yacovm (Wed, 27 Jun 2018 19:51:34 GMT):
and tell me if it reproduces the problem?

yacovm (Wed, 27 Jun 2018 19:51:42 GMT):
it's a CLI tool for the discovery service

yacovm (Wed, 27 Jun 2018 19:51:52 GMT):
don't worry, it's friendly to use, unlike the peer cli

yacovm (Wed, 27 Jun 2018 19:52:44 GMT):
you need to use the `endorsers` command

Kyroy (Wed, 27 Jun 2018 19:59:13 GMT):
The problem was my config.yaml for the sdk -.- `channels.my-channel.peers` contained 1 peer from the other org, because I was switching orgs all the time. And the `access denied` error is actually caused by this peer in the config value `peers`. Sorry :facepalm_tone2: Tomorrow, I will continue here and see if I can get it working :D

yacovm (Wed, 27 Jun 2018 19:59:37 GMT):
no no

yacovm (Wed, 27 Jun 2018 19:59:39 GMT):
wait!!!!

Kyroy (Wed, 27 Jun 2018 19:59:49 GMT):
Regarding the 2 JIRA issues. I created one for the Any endorsement policy and 1 for the fabric-sdk-go because e.g. status code 201 was returned as error. Something unrelated

yacovm (Wed, 27 Jun 2018 19:59:56 GMT):
please properly explain what caused the access denied

yacovm (Wed, 27 Jun 2018 20:00:29 GMT):
oh.... you had a peer certificate?

yacovm (Wed, 27 Jun 2018 20:00:37 GMT):
instead of a client certificate?

Kyroy (Wed, 27 Jun 2018 20:07:11 GMT):
I have 2 Orgs. Org1 has 3 peers. 2 of them configured in the config.yaml Org2 has 1 peer. 1 configured in the config.yaml -> this alone is okay But I also configured Org1 and Org2 in the config.yaml and set `client.organization` to Org1 Which I thought is ok. But only when I also configure Org2, the access denied error is logged. (I think when the discovery service is querying)

yacovm (Wed, 27 Jun 2018 20:08:36 GMT):
what is `client.organizations` ?

yacovm (Wed, 27 Jun 2018 20:08:36 GMT):
what is `client.organization` ?

Kyroy (Wed, 27 Jun 2018 20:09:42 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L25

Kyroy (Wed, 27 Jun 2018 20:11:45 GMT):
Going further: When there are Org1 and Org2 configured. And additionally in `channels` I configure Org2's peer for the channel, I sometimes get the `no endorsement combination can be satisfied` when invoking/querying

yacovm (Wed, 27 Jun 2018 20:13:22 GMT):
ok, lets continue this tomorrow

Kyroy (Wed, 27 Jun 2018 20:15:02 GMT):
I agree. Maybe also via PM. Not spamming this channel :D

yacovm (Wed, 27 Jun 2018 20:18:17 GMT):
no, not via PM because I have no clue in go SDK... I just want to know that there is no bug in the peer

yacovm (Wed, 27 Jun 2018 20:18:17 GMT):
no, not via PM because I have no clue in go SDK... I just want to rule out a possibility of a bug in the peer

Kyroy (Wed, 27 Jun 2018 20:19:16 GMT):
Oh, okay :D

troyronda (Wed, 27 Jun 2018 22:49:18 GMT):
@Kyroy thanks for the change - merged.

Ryan2 (Thu, 28 Jun 2018 04:15:06 GMT):
Has joined the channel.

MahimaManik (Thu, 28 Jun 2018 05:16:31 GMT):
@Kyroy `clientChannelContext := ChannelContext(channelID string, options ...ContextOption)` returns without error, but then `channel.New(clientChannelContext)` fails with the same error, i.e. `Failed to create new channel client: %s failed to create channel context: failed to get client context to create channel client: invalid options to create identity, invalid org name`

MahimaManik (Thu, 28 Jun 2018 05:21:34 GMT):
@sudeshrshetty the sample tests created the channels first. I want my client sdk to join the existing blockchain channel

Kyroy (Thu, 28 Jun 2018 06:12:12 GMT):
@MahimaManik I think your config is the problem. Can you send me a link to your config? (e.g. gist)

Kyroy (Thu, 28 Jun 2018 06:34:57 GMT):
@yacovm Workflow: 1. Create channel at org1 2. join org1peer0 3. create channel update to join org2 4. update channel 5. install CC at org1peer0 6. invoke/query works at org1peer0 7. join org2peer0 to channel ```peer0.org2.example.com | 2018-06-28 06:29:11.973 UTC [kvledger] CommitWithPvtData -> INFO 04a Channel [my-channel]: Committed block [4] with 1 transaction(s) ``` 8. install CC at org2peer0 ```peer0.org2.example.com | 2018-06-28 06:29:26.071 UTC [lscc] executeInstall -> INFO 04b Installed Chaincode [my-cc] Version [1] to peer ``` now the org2peer0 keeps logging: ```peer0.org2.example.com | 2018-06-28 06:29:31.436 UTC [gossip/discovery] func1 -> WARN 04c Could not connect to {127.0.0.1:7051 [] [] 127.0.0.1:7051 } : context deadline exceeded ```

yacovm (Thu, 28 Jun 2018 06:36:04 GMT):
that's ok....

Kyroy (Thu, 28 Jun 2018 06:36:52 GMT):
```peer0.org2.example.com | 2018-06-28 06:36:18.988 UTC [discovery/endorsement] PeersForEndorsement -> WARN 063 Principal set computation failed: chaincode isn't installed on sufficient organizations required by the endorsement policy peer0.org2.example.com | 2018-06-28 06:36:18.988 UTC [discovery] chaincodeQuery -> ERRO 064 Failed constructing descriptor for chaincode chaincodes: ,: chaincode isn't installed on sufficient organizations required by the endorsement policy ```

Kyroy (Thu, 28 Jun 2018 06:37:15 GMT):
When trying to query the CC

Kyroy (Thu, 28 Jun 2018 06:37:15 GMT):
When trying to query the CC in org2peer0

yacovm (Thu, 28 Jun 2018 06:37:15 GMT):
what is the endorsement policy?

yacovm (Thu, 28 Jun 2018 06:37:40 GMT):
so - it seems that `org2peer0` doesn't "see" `org1peer0`

yacovm (Thu, 28 Jun 2018 06:37:46 GMT):
you can check if that is true

Kyroy (Thu, 28 Jun 2018 06:37:50 GMT):
```chaincodePolicy := cauthdsl.SignedByAnyMember([]string{"Org1MSP"}) ```

yacovm (Thu, 28 Jun 2018 06:37:51 GMT):
if you use the discovery CLI

yacovm (Thu, 28 Jun 2018 06:37:58 GMT):
and list the peers on `org2peer0`

yacovm (Thu, 28 Jun 2018 06:38:09 GMT):
my guess is that you don't have anchor peers defined in the channel

Kyroy (Thu, 28 Jun 2018 06:38:25 GMT):
Is the binary included in the peer container? Or should I use it from my machine

yacovm (Thu, 28 Jun 2018 06:38:41 GMT):
it's not included in the peer container

yacovm (Thu, 28 Jun 2018 06:38:58 GMT):
you can use it on your machine given that you can resolve the peer's host address

yacovm (Thu, 28 Jun 2018 06:39:14 GMT):
you can download the binary

yacovm (Thu, 28 Jun 2018 06:39:18 GMT):
or just build it yourself

MahimaManik (Thu, 28 Jun 2018 06:39:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=2tSX7KWZqpCfA7TTq) @Kyroy You mean config_test.yaml file?

yacovm (Thu, 28 Jun 2018 06:39:57 GMT):
https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/linux-amd64-1.2.0-rc1/

yacovm (Thu, 28 Jun 2018 06:40:15 GMT):
or if you can clone the v1.2 release of fabric and run `make discover`

Kyroy (Thu, 28 Jun 2018 06:45:31 GMT):
I defined them as org1peer0. But not sure if I did it correctly. Should it appear in the channel config? [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=p6yvrZd4FYMEEAkLD)

yacovm (Thu, 28 Jun 2018 06:45:50 GMT):
yeah

silencily (Thu, 28 Jun 2018 06:51:25 GMT):
Has joined the channel.

Kyroy (Thu, 28 Jun 2018 06:56:26 GMT):
@yacovm ```root@org1peer0:~# ./bin/discover --configFile config.yaml peers --channel my-channel --server peer0.org1.example.com:7051 [ { "MSPID": "Org1MSP", "LedgerHeight": 5, "Endpoint": "peer0.org1.example.com:7051", "Identity": "-----BEGIN CERTIFICATE——\n…\n——END CERTIFICATE-----\n", "Chaincodes": [ "my-cc" ] } ] ```

yacovm (Thu, 28 Jun 2018 07:00:21 GMT):
now do the same for `peer0.org2.example.com`

yacovm (Thu, 28 Jun 2018 07:00:31 GMT):
you can invoke it directly from the same peer

yacovm (Thu, 28 Jun 2018 07:00:35 GMT):
just change the `--server`

Kyroy (Thu, 28 Jun 2018 07:04:55 GMT):
```root@org1peer0:~# ./bin/discover --configFile org2config.yaml peers --channel my-channel --server peer0.org2.example.com:7351 [ { "MSPID": "Org2MSP", "LedgerHeight": 5, "Endpoint": "peer0.org2.example.com:7351", "Identity": "-----BEGIN CERTIFICATE——\n…\n——END CERTIFICATE-----\n", "Chaincodes": [ "my-cc" ] } ] ```

yacovm (Thu, 28 Jun 2018 07:06:20 GMT):
and is the same chaincode version installed on them?

yacovm (Thu, 28 Jun 2018 07:06:36 GMT):
actually, nevermind that

yacovm (Thu, 28 Jun 2018 07:06:45 GMT):
the endorsement policy is `Org1MSP` only right?

Kyroy (Thu, 28 Jun 2018 07:06:57 GMT):
Yes

yacovm (Thu, 28 Jun 2018 07:07:24 GMT):
can you please do an `endorsers` query?

yacovm (Thu, 28 Jun 2018 07:08:39 GMT):
`discover --configFile org2config.yaml endorsers --channel my-channel --server peer0.org2.example.com:7051 --chaincode my-cc`

yacovm (Thu, 28 Jun 2018 07:08:59 GMT):
and same thing on `peer0.org1.example.com`

Kyroy (Thu, 28 Jun 2018 07:09:07 GMT):
```root@peer0:~# ./bin/discover --configFile config.yaml endorsers --channel my-channel --server peer0.org1.example.com:7051 --chaincode my-cc [ { "Chaincode": "my-cc", "EndorsersByGroups": { "G0": [ { "MSPID": "Org1MSP", "LedgerHeight": 5, "Endpoint": "peer0.org1.example.com:7051", "Identity": "-----BEGIN CERTIFICATE-----\nMIICCzCCAbKgAwIBAgIPIiDu9tBjxRqJMyKgB4o/MAoGCCqGSM49BAMCMGsxCzAJ\nBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh\nbmNpc2NvMRUwEwYDVQQKEwxvcmcxLnNhcC5jb20xGDAWBgNVBAMTD2NhLm9yZzEu\nc2FwLmNvbTAeFw0xODA2MjUxNDQwMjVaFw0yODA2MjIxNDQwMjVaMFcxCzAJBgNV\nBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp\nc2NvMRswGQYDVQQDExJwZWVyMC5vcmcxLnNhcC5jb20wWTATBgcqhkjOPQIBBggq\nhkjOPQMBBwNCAARFn7WiNh2iK+ruo+ZNwsAqh+J8EOM3XR3qkc+xwSc3n9XfUWqc\n94HlrnrGyyupqh/NF5vgwu1uwUJaBIUBLvC3o00wSzAOBgNVHQ8BAf8EBAMCB4Aw\nDAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCDw4RhS/iFjSmOiCbN2+gpTns0LQ733\nAkbYJkwj8SUWrTAKBggqhkjOPQQDAgNHADBEAiBg2j6OrWXG3PePg2c4pQaGUJgl\nDm5yxwsUWM6hlQJchwIgfKZO0+xmcXFeQcLw1q4eHDjmMMltKAbKwrDxjopd3M8=\n-----END CERTIFICATE-----\n", "Chaincodes": null } ] }, "Layouts": [ { "quantities_by_group": { "G0": 1 } } ] } ] ```

Kyroy (Thu, 28 Jun 2018 07:09:07 GMT):
```root@peer0:~# ./bin/discover --configFile config.yaml endorsers --channel my-channel --server peer0.org1.example.com:7051 --chaincode my-cc [ { "Chaincode": "my-cc", "EndorsersByGroups": { "G0": [ { "MSPID": "Org1MSP", "LedgerHeight": 5, "Endpoint": "peer0.org1.example.com:7051", "Identity": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n", "Chaincodes": null } ] }, "Layouts": [ { "quantities_by_group": { "G0": 1 } } ] } ] ```

Kyroy (Thu, 28 Jun 2018 07:09:34 GMT):
```root@peer0:~# ./bin/discover --configFile org2config.yaml endorsers --channel my-channel --server peer0.org2.sap.com:7351 --chaincode my-cc [server returned: failed constructing descriptor for chaincodes: ] ```

Kyroy (Thu, 28 Jun 2018 07:09:34 GMT):
```root@peer0:~# ./bin/discover --configFile org2config.yaml endorsers --channel my-channel --server peer0.org2.example.com:7351 --chaincode my-cc [server returned: failed constructing descriptor for chaincodes: ] ```

yacovm (Thu, 28 Jun 2018 07:10:49 GMT):
ok do you have any debug logs in the peer?

yacovm (Thu, 28 Jun 2018 07:11:18 GMT):
on peer2

Kyroy (Thu, 28 Jun 2018 07:12:54 GMT):
Because of the massive amount of logs because of the discovery service, I just enabled info logs. But I can enable them if you want. The only WARN and ERR logs from org2peer0 I already posted here

yacovm (Thu, 28 Jun 2018 07:13:13 GMT):
enable them and then do `grep -v gossip` to filter them out ;)

Kyroy (Thu, 28 Jun 2018 07:18:36 GMT):
multiple times: ```2018-06-28 07:17:42.601 UTC [discovery] validateStructure -> DEBU 64b Received request from 172.18.0.1:50722 2018-06-28 07:17:42.602 UTC [discovery/lifecycle] Metadata -> DEBU 64c Returning metadata for channel my-channel , chaincode my-cc : {my-cc 1 […….] []} 2018-06-28 07:17:42.602 UTC [discovery/lifecycle] Metadata -> DEBU 64d Returning metadata for channel my-channel , chaincode my-cc : {my-cc 1 […….] []} 2018-06-28 07:17:42.602 UTC [discovery/endorsement] computePrincipalSets -> DEBU 64e [principal:"\n\nOrg1MSP" ] filtered out due to chaincodes not being installed on the corresponding organizations 2018-06-28 07:17:42.602 UTC [discovery/endorsement] PeersForEndorsement -> WARN 64f Principal set computation failed: chaincode isn't installed on sufficient organizations required by the endorsement policy 2018-06-28 07:17:42.602 UTC [discovery] chaincodeQuery -> ERRO 650 Failed constructing descriptor for chaincode chaincodes: ,: chaincode isn't installed on sufficient organizations required by the endorsement policy ```

yacovm (Thu, 28 Jun 2018 07:20:18 GMT):
oh... hmmm seems like it's filtering out org1.peer0 :thinking_face:

yacovm (Thu, 28 Jun 2018 07:20:50 GMT):
can you please put the full `Returning metadata for channel my-channel , chaincode my-cc` ?

Kyroy (Thu, 28 Jun 2018 07:21:21 GMT):
```2018-06-28 07:21:07.062 UTC [discovery/lifecycle] Metadata -> DEBU 7ac Returning metadata for channel my-channel , chaincode my-cc : {my-cc 1 [18 8 18 6 8 1 18 2 8 0 26 14 18 12 10 10 79 114 103 49 83 65 80 77 83 80] [8 72 182 161 20 58 55 191 23 236 58 141 160 89 203 98 118 223 28 22 79 124 13 173 79 169 162 182 188 143 170 199] []} 2018-06-28 07:21:07.062 UTC [discovery/lifecycle] Metadata -> DEBU 7ad Returning metadata for channel my-channel , chaincode my-cc : {my-cc 1 [18 8 18 6 8 1 18 2 8 0 26 14 18 12 10 10 79 114 103 49 83 65 80 77 83 80] [8 72 182 161 20 58 55 191 23 236 58 141 160 89 203 98 118 223 28 22 79 124 13 173 79 169 162 182 188 143 170 199] []} ```

yacovm (Thu, 28 Jun 2018 07:24:14 GMT):
and is this metadata the same when you query the peer on org0?

Kyroy (Thu, 28 Jun 2018 07:27:50 GMT):
Yes, in org1peer0 the logs for `Returning metadata for channel my-channel` are exactle the same

Kyroy (Thu, 28 Jun 2018 07:31:58 GMT):
If you think a call would help, we can also do this ;)

yacovm (Thu, 28 Jun 2018 07:34:23 GMT):
hold on @Kyroy ...

yacovm (Thu, 28 Jun 2018 07:34:44 GMT):
I now realized that when you did the `discover peers`

yacovm (Thu, 28 Jun 2018 07:34:54 GMT):
then org1 and org2 peers don't see each other

yacovm (Thu, 28 Jun 2018 07:35:02 GMT):
am I right?

yacovm (Thu, 28 Jun 2018 07:35:40 GMT):
when you query peer0.org1 it tells you only about itself and when you query peer0.org2 it tells you only about itself

yacovm (Thu, 28 Jun 2018 07:35:45 GMT):
so that is the problem

Kyroy (Thu, 28 Jun 2018 07:38:55 GMT):
Yes, indeed. But e.g. the blocks from the channel are send to peer0.org2. (not sure if this is done via gossip or the orderer :thinking: )

yacovm (Thu, 28 Jun 2018 07:43:12 GMT):
via the orderer

yacovm (Thu, 28 Jun 2018 07:43:17 GMT):
anyway... that's the problem

yacovm (Thu, 28 Jun 2018 07:43:30 GMT):
you probably need to add anchor peers

Kyroy (Thu, 28 Jun 2018 07:58:21 GMT):
@yacovm I finally fixed the peer problem. By just making the anchor peer transaction :facepalm_tone2: I just forgot that there is a separate transaction I have to do Now the DEBUG log in the peer is `the identity is a member of a different MSP (expected Org1SAPMSP, got Org2SAPMSP)` Which is quite clear :D

Kyroy (Thu, 28 Jun 2018 07:58:21 GMT):
@yacovm I finally fixed the peer problem. By just making the anchor peer transaction :facepalm_tone2: I just forgot that there is a separate transaction I have to do Now the DEBUG log in the peer is `the identity is a member of a different MSP (expected Org1MSP, got Org2MSP)` Which is quite clear :D

Kyroy (Thu, 28 Jun 2018 07:59:18 GMT):
Now I have to figure out how to tell the sdk to get the endorsement from Org1 when making a TX from Org2

Kyroy (Thu, 28 Jun 2018 08:01:26 GMT):
Thank you for helping me. Sorry for the stupid mistake :(

Kyroy (Thu, 28 Jun 2018 09:24:47 GMT):
@sudeshrshetty @bstasyszyn To get the endorsement from another org (here Org1MSP), I had to do this: ```channels: mappedchannel: peers: peer0.org2.example.com:7351: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true entityMatchers: channel: - pattern: (\w+) mappedName: mappedchannel peer: - pattern: ([\w\.]+):(\d+) urlSubstitutionExp: localhost:$2 sslTargetOverrideUrlSubstitutionExp: $1 mappedHost: peer0.org2.example.com:7351 ``` I can also map it to a peer config that does not have `tlsCACerts.path` configured and it works. But I have to map it because otherwise the sdk says it is not configured and will not connect to it. (1) is there a better way to do this? :D (2) I have to handle a lot of different channels on different peers. So I just map every channel to `mappedchannel`, specify ALL my peers there, and filter them out by using a custom `func (c *CustomEndpointConfig) ChannelPeers(name string)`. Now with fabric1.2, is there a better way to do this?

nmarcetic (Thu, 28 Jun 2018 10:10:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GfABxtFvxKLQg6Emb) @frustrated-chain If your app will be dockerized also you can put container_name in config.yaml I did this with docker-compose in my config.yaml all url's are actually docker container names not hardcoded IP's. If your app is "outside" of Kubernetes and you don't have some way to access this network (its virtual network actually) you must map K8 node's to public IP's (not hard to do). This question is not really related to this channel but hope we can help.

troyronda (Thu, 28 Jun 2018 13:48:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=g9sGGpktizJD4nY26) @Kyroy Also of interest is that the existing cache mechanism already has expiry and refreshing capability... the known issue is that we don't watch for events to expire the cache immediately.

Kyroy (Thu, 28 Jun 2018 14:23:43 GMT):
@troyronda Well, good news :D Do you know this: https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7KYP4tkMEGbwkNGPi ? ;P

Kyroy (Thu, 28 Jun 2018 14:23:43 GMT):
@troyronda Well, good news :D

Kyroy (Thu, 28 Jun 2018 14:23:43 GMT):
@troyronda Well, good news :D

Kyroy (Thu, 28 Jun 2018 14:23:43 GMT):
@troyronda Well, good news :D

Kyroy (Thu, 28 Jun 2018 14:24:24 GMT):
(I don't want it to include the message :/)

Kyroy (Thu, 28 Jun 2018 14:25:13 GMT):
Another question: How to get the CC policy with the sdk?

nmarcetic (Thu, 28 Jun 2018 14:29:45 GMT):
Hey Folks anyone had this problem with `dep ensure` ? ``` dep ensure Solving failure: No versions of github.com/milagro-crypto/amcl met constraints: master: Could not introduce github.com/milagro-crypto/amcl@master due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) add-js-tests: Could not introduce github.com/milagro-crypto/amcl@add-js-tests due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) fix-retval: Could not introduce github.com/milagro-crypto/amcl@fix-retval due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) format-code: Could not introduce github.com/milagro-crypto/amcl@format-code due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) milagro-crypto-c: Could not introduce github.com/milagro-crypto/amcl@milagro-crypto-c due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) milagro-crypto-js: Could not introduce github.com/milagro-crypto/amcl@milagro-crypto-js due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) revert-change: Could not introduce github.com/milagro-crypto/amcl@revert-change due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) sync-milagro-crypto-js: Could not introduce github.com/milagro-crypto/amcl@sync-milagro-crypto-js due to multiple problematic subpackages: Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.) ```

nmarcetic (Thu, 28 Jun 2018 14:30:22 GMT):
@troyronda I understand you that deps are fixed ^

troyronda (Thu, 28 Jun 2018 14:30:27 GMT):
@nmarcetic you can't use dep ensure with Fabric 1.1 due to amcl - works with 1.2 though.

nmarcetic (Thu, 28 Jun 2018 14:31:03 GMT):
Just tried same error

troyronda (Thu, 28 Jun 2018 14:31:33 GMT):
you need to use release-1.2 branch of fabric.

troyronda (Thu, 28 Jun 2018 14:31:33 GMT):
you need to use release-1.2 branch of fabric (the above is showing release-1.1).

troyronda (Thu, 28 Jun 2018 14:31:33 GMT):
you need to use release-1.2 branch of fabric (the above snippet is showing release-1.1).

nmarcetic (Thu, 28 Jun 2018 14:31:37 GMT):
Good to know thanks. 1.2 is RC version you think its stable for production use ? Or any info when release will be official (not RC) ?

nmarcetic (Thu, 28 Jun 2018 14:33:29 GMT):
Not sure even if fabric-sdk latest version supports Fabric v1.2 ?

nmarcetic (Thu, 28 Jun 2018 14:33:39 GMT):
I know for 1.0.5 and 1.1 not sure for 1.2 ?

troyronda (Thu, 28 Jun 2018 14:34:12 GMT):
They announce this information on the fabric-release channel.

troyronda (Thu, 28 Jun 2018 14:34:13 GMT):
Yes SDK supports 1.2.

troyronda (Thu, 28 Jun 2018 14:34:14 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/Makefile#L35

troyronda (Thu, 28 Jun 2018 14:34:14 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/Makefile#L35 (tests are enabled for the 1.2 RC tag)

nmarcetic (Thu, 28 Jun 2018 14:34:46 GMT):
Awesome!

nmarcetic (Thu, 28 Jun 2018 14:35:01 GMT):
Thanks a lot for info @troyronda Really appreciate

sudeshrshetty (Thu, 28 Jun 2018 14:41:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7KYP4tkMEGbwkNGPi) @Kyroy There is mistake here, mappedHost in `entityMatchers.peer` is same as actual peer name. Config will bypass your entity matchers settings in this case. Because, config looks for peers in `peers` section first, if not found then it falls back to `entityMatchers.peer`

sudeshrshetty (Thu, 28 Jun 2018 14:41:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7KYP4tkMEGbwkNGPi) @Kyroy Looks like there is a mistake here, `mappedHost` in `entityMatchers.peer` is same as actual peer name. Config will bypass your entity matchers settings in this case. Because, config looks for peers in `peers` section first, if not found then it falls back to `entityMatchers.peer`

Kyroy (Thu, 28 Jun 2018 14:43:12 GMT):
@sudeshrshetty my peers have ports in their names: ```peers: peer0.org2.example.com:7351: ... ```

Kyroy (Thu, 28 Jun 2018 14:44:14 GMT):
i improved/modified my solution: ```- pattern: ([\w\.]+):(\d+)1 urlSubstitutionExp: localhost:${2}1 eventUrlSubstitutionExp: localhost:${2}3 sslTargetOverrideUrlSubstitutionExp: $1 mappedHost: peer0.org2.example.com:7351 ```

sudeshrshetty (Thu, 28 Jun 2018 14:44:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PfFzEXRy8Ek4pSdzY) @Kyroy `channels.mappedchannel.peers` also has port

Kyroy (Thu, 28 Jun 2018 14:44:56 GMT):
Yes?! :D

sudeshrshetty (Thu, 28 Jun 2018 14:44:56 GMT):
` peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true`

sudeshrshetty (Thu, 28 Jun 2018 14:44:56 GMT):
` peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true`

sudeshrshetty (Thu, 28 Jun 2018 14:47:07 GMT):
Just remove that port from `channels.mappedchannel.peers` and retry

Kyroy (Thu, 28 Jun 2018 14:47:32 GMT):
But this has to be the name of my `peers` entry, right?

sudeshrshetty (Thu, 28 Jun 2018 14:47:59 GMT):
No

sudeshrshetty (Thu, 28 Jun 2018 14:48:10 GMT):
that name will be resolved by entity matchers

Kyroy (Thu, 28 Jun 2018 14:49:22 GMT):
Oh okay. But still. My entity matcher `pattern: ([\w\.]+):(\d+)1` should match

sudeshrshetty (Thu, 28 Jun 2018 14:49:26 GMT):
Suppose: You mentioned `ABC.XYZ.COM` in channel peer name. If proper entity matcher is in place, it will resolve it to peer `peer0.org1.example.com`

sudeshrshetty (Thu, 28 Jun 2018 14:51:57 GMT):
In your case, SDK is able to find peer config in `peers` config section, so it never goes to entity matcher. Entity matchers are not mandatory, so sdk config always looks for orderers, peers, CAs in a conventional way. If it fails, then it goes through entity matchers if any.

Kyroy (Thu, 28 Jun 2018 14:53:48 GMT):
It also works for peers that I have not configured, but anyways. This was not my question ;) To get the endorsement from another org (here Org1MSP), I had to do this: ... I can also map it to a peer config that does not have `tlsCACerts.path` configured and it works. But I have to map it because otherwise the sdk says it is not configured and will not connect to it. (1) is there a better way to do this? :D (2) I have to handle a lot of different channels on different peers. So I just map every channel to `mappedchannel`, specify ALL my peers there, and filter them out by using a custom `func (c *CustomEndpointConfig) ChannelPeers(name string)`. Now with fabric1.2, is there a better way to do this?

Kyroy (Thu, 28 Jun 2018 14:53:48 GMT):
It also works for peers that I have not configured, but anyways. This was not my question ;) To get the endorsement from another org (here Org1MSP), I had to do this: ...(my config)... I can also map it to a peer config that does not have `tlsCACerts.path` configured and it works. But I have to map it because otherwise the sdk says it is not configured and will not connect to it. (1) is there a better way to do this? :D (2) I have to handle a lot of different channels on different peers. So I just map every channel to `mappedchannel`, specify ALL my peers there, and filter them out by using a custom `func (c *CustomEndpointConfig) ChannelPeers(name string)`. Now with fabric1.2, is there a better way to do this?

Kyroy (Thu, 28 Jun 2018 14:57:35 GMT):
The problem is that I need an endorsement from another peer in another org. This peer is not configured in my config.yaml. So I have to create this entity matcher, right?

sudeshrshetty (Thu, 28 Jun 2018 14:58:37 GMT):
Discovery comes into picture here not entity matchers

sudeshrshetty (Thu, 28 Jun 2018 14:58:43 GMT):
let me see

frustrated-chain (Thu, 28 Jun 2018 15:07:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fEyPe46WRsk8eNb2h) @nmarcetic Thank you. I was trying to see if there are other ways of doing it. Yes, conversation went off on a tangent. You helped a lot, thanks.

sudeshrshetty (Thu, 28 Jun 2018 15:15:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wcjTvEvMGyHvpJ3Ac) @Kyroy You should have 2 entries in config `peers` section. one with `tlsCACerts` path and one without needed for discovery peers. Entity matchers should point to one without `tlsCACerts` path.

troyronda (Thu, 28 Jun 2018 15:19:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=vQ32LHLxsRnzGFiov) @sudeshrshetty @bstasyszyn although - I think it's a good topic if entity matchers should override if there is a match, even if there is an entity with the exact name.

sudeshrshetty (Thu, 28 Jun 2018 15:19:43 GMT):
Yes we can do that

Kyroy (Thu, 28 Jun 2018 15:30:27 GMT):
@sudeshrshetty And what about ```(2) I have to handle a lot of different channels on different peers. So I just map every channel to `mappedchannel`, specify ALL my peers there, and filter them out by using a custom `func (c *CustomEndpointConfig) ChannelPeers(name string)`. Now with fabric1.2, is there a better way to do this? ``` I will have a lot of channels on different peers. Created dynamically. So I do not want to add all of them to `channels`. But if I only use 1 `mappedchannel` the sdk thinks all peers are in the channel. (when not using this custom ChannelPeers). And it tries to connect to these peers to get channel info (discovery) and then logs: ``` [fabsdk/client] 2018/06/28 15:27:17 UTC - dynamicdiscovery.(*ChannelService).evaluate -> WARN error getting peers from discovery response: access denied ```

Kyroy (Thu, 28 Jun 2018 15:30:27 GMT):
With the discovery service, it should be possible not to configure `channels` at all, right?

Kyroy (Thu, 28 Jun 2018 15:30:27 GMT):
With the discovery service, it should be possible not to configure `channels` at all, right?

sudeshrshetty (Thu, 28 Jun 2018 15:35:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YuybQsucaC3Yma5F2) @Kyroy There are entity matchers for channels too

sudeshrshetty (Thu, 28 Jun 2018 15:36:12 GMT):
Refer this https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/config_test_entity_matchers.yaml

Kyroy (Thu, 28 Jun 2018 15:38:50 GMT):
Yes, this is what I am writing. I am using them. but I have e.g. 3 peers. And I cannot decide on the name of the channel which peer to call

sudeshrshetty (Thu, 28 Jun 2018 16:19:17 GMT):
there is not better way to do that other than `func (c *CustomEndpointConfig) ChannelPeers(name string)` as I know of, Couldnt see anything better in fabric1.2 to do that

Sisir.Chowdhury (Thu, 28 Jun 2018 20:49:50 GMT):
Has joined the channel.

RealDeanZhao (Fri, 29 Jun 2018 06:08:39 GMT):
Hi All, does fabric-sdk-go master branch support instantiate the chaincode with private data collections now?

RealDeanZhao (Fri, 29 Jun 2018 06:10:18 GMT):
http://hyperledger-fabric.readthedocs.io/en/release-1.2/private-data-arch.html

RealDeanZhao (Fri, 29 Jun 2018 06:22:45 GMT):
It's supported by StaticCollectionConfig.. Thanks all the same.

gen_el (Fri, 29 Jun 2018 12:06:44 GMT):
Please where can we get a release version of the fabric-sdk-go @troyronda I just tried to use it, after a `go get`, and my code isn't building anymore. And we intend to start pilots in 2 weeks.

gen_el (Fri, 29 Jun 2018 12:06:44 GMT):
Please when can we get a release version of the fabric-sdk-go @troyronda I just tried to use it, after a `go get`, and my code isn't building anymore. And we intend to start pilots in 2 weeks.

gen_el (Fri, 29 Jun 2018 12:08:34 GMT):
Our backend stack is golang. We can't tolerate `node.js`, not for that backend.

Kyroy (Fri, 29 Jun 2018 12:13:31 GMT):
@gen_el shouldn't `go get` download the `master` branch?

Kyroy (Fri, 29 Jun 2018 12:13:31 GMT):
@gen_el shouldn't `go get` download the `master` branch?

troyronda (Fri, 29 Jun 2018 12:28:09 GMT):
@gen_el there was a tag not too long ago; we plan to do another once 1.2 pushes out their GA release.

troyronda (Fri, 29 Jun 2018 12:28:09 GMT):
@gen_el there was a tag not too long ago (2 weeks ago); we plan to do another once 1.2 pushes out their GA release.

troyronda (Fri, 29 Jun 2018 12:29:30 GMT):
(which I assume to be soon)

pankaj13 (Sat, 30 Jun 2018 05:04:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YniJnQDW53zNXzRBv) @RealDeanZhao Thanks. I am still new to this stuff so let me try and see how it goes. Thanks for the pointer!

pankaj13 (Sat, 30 Jun 2018 05:04:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YniJnQDW53zNXzRBv) @RealDeanZhao Thanks. It seems that I made one more blunder and did not create network-config.yaml but I recall seeing the implementation in Nodejs SDK examples. I will check and see if these changes work but if you have any known resource or example using network-config.yaml then please point me to it. Thanks!

MahimaManik (Sat, 30 Jun 2018 09:04:11 GMT):
Can anybody please explain that what does `package discovery` implements? Link: https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/fab/discovery

dnguy078 (Mon, 02 Jul 2018 00:58:22 GMT):
Has joined the channel.

burgerfreak (Mon, 02 Jul 2018 06:27:06 GMT):
Has joined the channel.

Hundredwz (Mon, 02 Jul 2018 07:41:57 GMT):
I got this error when I run End_to_end_test.go ```create channel failed: SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050]```I also tried to modify the orderer url in config_test.yaml to `127.0.0.1:7050` or `0.0.0.0:7050` But still failed like the error

Hundredwz (Mon, 02 Jul 2018 07:42:08 GMT):
Coudl any one help me?

amit.chahar (Mon, 02 Jul 2018 10:24:38 GMT):
Has joined the channel.

oqf (Mon, 02 Jul 2018 13:21:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=u5f6zgWsRSkcECmH5) @Hundredwz Issue a docker ps in your shell and put here the output

muralisr (Mon, 02 Jul 2018 13:36:57 GMT):
what's the right level of fabric-go-sdk for use with 1.1 ?

aneb (Tue, 03 Jul 2018 04:52:30 GMT):
Has joined the channel.

Kyroy (Tue, 03 Jul 2018 06:54:39 GMT):
```release-1.2: Could not introduce github.com/hyperledger/fabric@release-1.2, as it has a dependency on github.com/pkg/errors with constraint ^0.8.0, which has no overlap with existing constraint master from github.com/hyperledger/fabric-sdk-go@master```

edevil (Tue, 03 Jul 2018 11:02:46 GMT):
Has joined the channel.

troyronda (Tue, 03 Jul 2018 12:07:05 GMT):
@muralisr current level continues to work with 1.1

troyronda (Tue, 03 Jul 2018 12:10:54 GMT):
@MahimaManik @bstasyszyn it's a client to the Fabric 1.2 service discovery. https://hyperledger-fabric.readthedocs.io/en/release-1.2/discovery-overview.html

troyronda (Tue, 03 Jul 2018 12:10:54 GMT):
@MahimaManik @bstasyszyn it's a client to the Fabric 1.2 service discovery. https://hyperledger-fabric.readthedocs.io/en/release-1.2/discovery-overview.html ... it's used by other components of the SDK automatically.

troyronda (Tue, 03 Jul 2018 12:10:54 GMT):
@MahimaManik @bstasyszyn package discovery is a client to the Fabric 1.2 service discovery. https://hyperledger-fabric.readthedocs.io/en/release-1.2/discovery-overview.html ... it's used by other components of the SDK automatically.

troyronda (Tue, 03 Jul 2018 12:32:08 GMT):
@muralisr (SDK tests are currently against 1.0.6, 1.1, 1.2-prerelease but 1.0.x tests will be retired once 1.2 is GA)

muralisr (Tue, 03 Jul 2018 12:32:54 GMT):
thanks @troyronda

TStream (Tue, 03 Jul 2018 15:32:33 GMT):
Has joined the channel.

troyronda (Tue, 03 Jul 2018 15:52:32 GMT):
@Kyroy fixed: https://github.com/hyperledger/fabric-sdk-go/commit/c11306538f4ef8dc481ad346337798a96ab59b93

Kyroy (Tue, 03 Jul 2018 15:54:00 GMT):
@troyronda thanks:))

yulong12 (Wed, 04 Jul 2018 01:25:26 GMT):
Has joined the channel.

yulong12 (Wed, 04 Jul 2018 01:25:31 GMT):
Hi,everyone. I have a question. I base on this tutorials _https://github.com/hyperledger/fabric-sdk-go_ when I execute the command `make`, there appears problems ``` Running check_license.sh Examining last commit changes All files have SPDX-License-Identifier headers Populating vendor ... Running check_lint_tests.sh Examining last commit changes Test scripts, fixtures or metadata changed - running all tests Directories to lint: test/integration test/integration/e2e test/integration/e2e/configless test/integration/expiredorderer test/integration/expiredpeer test/integration/fab test/integration/msp test/integration/orgs test/integration/pkcs11 test/integration/revoked test/integration/sdk test/metadata Running metalinters... internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:237:3:warning: unused variable or constant NewAttribute not declared by package pkcs11 (varcheck) internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:236:3:warning: unused variable or constant NewAttribute not declared by package pkcs11 internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:354:38:warning: unused variable or constant Mechanism not declared by package pkcs11 (varcheck) make: *** [lint-integration-tests] Error 1 ``` so who can help me>?

yulong12 (Wed, 04 Jul 2018 01:31:13 GMT):
Hi ,everyone.when I base this tutorials _https://github.com/hyperledger/fabric-sdk-go_ to Running the test suite.``` # In the Fabric SDK Go directory cd $GOPATH/src/github.com/hyperledger/fabric-sdk-go/ # Optional - Automatically install Go tools used by test suite # make depend-install # Running test suite make # Clean test suite run artifacts make clean ``` but it appears ``` zhangyuongdeair:fabric-sdk-go zhangyulong$ make Running check_license.sh Examining last commit changes All files have SPDX-License-Identifier headers Populating vendor ... Running check_lint_tests.sh Examining last commit changes Test scripts, fixtures or metadata changed - running all tests Directories to lint: test/integration test/integration/e2e test/integration/e2e/configless test/integration/expiredorderer test/integration/expiredpeer test/integration/fab test/integration/msp test/integration/orgs test/integration/pkcs11 test/integration/revoked test/integration/sdk test/metadata Running metalinters... internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:516:22:warning: unused variable or constant Ctx not declared by package pkcs11 (varcheck)internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:516:42:warning: unused variable or constant SessionHandle not declared by package pkcs11 (varcheck) internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:236:3:warning: unused variable or constant NewAttribute not declared by package pkcs11 (varcheck) internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:401:4:warning: unused variable or constant NewAttribute not declared by package pkcs11 (varcheck) make: *** [lint-integration-tests] Error 1 ```

yulong12 (Wed, 04 Jul 2018 01:31:24 GMT):
so who can help me?

yulong12 (Wed, 04 Jul 2018 01:31:38 GMT):
``` zhangyuongdeair:fabric-sdk-go zhangyulong$ make Running check_license.sh Examining last commit changes All files have SPDX-License-Identifier headers Populating vendor ... Running check_lint_tests.sh Examining last commit changes Test scripts, fixtures or metadata changed - running all tests Directories to lint: test/integration test/integration/e2e test/integration/e2e/configless test/integration/expiredorderer test/integration/expiredpeer test/integration/fab test/integration/msp test/integration/orgs test/integration/pkcs11 test/integration/revoked test/integration/sdk test/metadata Running metalinters... internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:516:22⚠ unused variable or constant Ctx not declared by package pkcs11 (varcheck)internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:516:42⚠ unused variable or constant SessionHandle not declared by package pkcs11 (varcheck) internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:236:3⚠ unused variable or constant NewAttribute not declared by package pkcs11 (varcheck) internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:401:4⚠ unused variable or constant NewAttribute not declared by package pkcs11 (varcheck) make: *** [lint-integration-tests] Error 1 ```

MahimaManik (Wed, 04 Jul 2018 04:46:28 GMT):
Would really appreciate if somebody can help with this problem: https://stackoverflow.com/questions/51076449/discover-and-join-existing-channel-by-client-sdk/

yulong12 (Wed, 04 Jul 2018 05:15:34 GMT):
Hi ,everyone.when I base this tutorials _https://github.com/hyperledger/fabric-sdk-go_ to Running the test suite. ``` # In the Fabric SDK Go directory cd $GOPATH/src/github.com/hyperledger/fabric-sdk-go/ # Optional - Automatically install Go tools used by test suite # make depend-install # Running test suite make # Clean test suite run artifacts make clean ```

yulong12 (Wed, 04 Jul 2018 05:15:44 GMT):
zhangyuongdeair:fabric-sdk-go zhangyulong$ make Running check_license.sh Examining last commit changes All files have SPDX-License-Identifier headers Populating vendor ... Running check_lint_tests.sh Examining last commit changes Test scripts, fixtures or metadata changed - running all tests Directories to lint: test/integration test/integration/e2e test/integration/e2e/configless test/integration/expiredorderer test/integration/expiredpeer test/integration/fab test/integration/msp test/integration/orgs test/integration/pkcs11 test/integration/revoked test/integration/sdk test/metadata Running metalinters... internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:516:22⚠ unused variable or constant Ctx not declared by package pkcs11 (varcheck)internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:516:42⚠ unused variable or constant SessionHandle not declared by package pkcs11 (varcheck) internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:236:3⚠ unused variable or constant NewAttribute not declared by package pkcs11 (varcheck) internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:401:4⚠ unused variable or constant NewAttribute not declared by package pkcs11 (varcheck) make: *** [lint-integration-tests] Error 1

connect2b (Wed, 04 Jul 2018 06:19:11 GMT):
Has joined the channel.

troyronda (Wed, 04 Jul 2018 22:48:35 GMT):
@yulong12 I wasn’t getting that problem but I just now updated the scripts to ignore those warnings anyways.

troyronda (Wed, 04 Jul 2018 22:49:10 GMT):
Btw - you don’t need to run tests to use the SDK. They are more intended for those developing the SDK.

firozmi (Thu, 05 Jul 2018 05:37:03 GMT):
Has joined the channel.

praveentalari (Thu, 05 Jul 2018 09:03:54 GMT):
is there a doc listing/explaining the available API ? Need to check if a particular channel already exists on the network.

troyronda (Thu, 05 Jul 2018 10:48:13 GMT):
@praveentalari https://godoc.org/github.com/hyperledger/fabric-sdk-go

Kyroy (Thu, 05 Jul 2018 11:54:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KgxvhRc6thykfJNRx) Anyone knows?

yacovm (Thu, 05 Jul 2018 11:59:50 GMT):
Why do you need that @Kyroy ?

Kyroy (Thu, 05 Jul 2018 12:40:48 GMT):
a) I want to show it to the user b) If someone instantiates a CC and I only installed it on my peer, I want to check if the policy is ok, or whatever

Kyroy (Thu, 05 Jul 2018 12:40:48 GMT):
@yacovm a) I want to show it to the user b) If someone instantiates a CC and I only installed it on my peer, I want to check if the policy is ok, or whatever

Rachit_gaur (Thu, 05 Jul 2018 12:53:20 GMT):
I have been using hyperledger fabric to develop my chaincode and have successfully instantiated on a channel with multiple organizations. The endorsement policies have been set to be signed by all the organization using the consensus protocol, but I am not able to understand how would I accept the transaction when I call the invoke function Do I have to pass some parameters in the arguments for the same? Please help me understand how to enable signing in the case of all the organizations agreeing to the transaction

Kyroy (Thu, 05 Jul 2018 13:54:59 GMT):
@yacovm I see there is a `GetChaincodePolicy` method (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/common/selection/dynamicselection/ccpolicyprovider.go#L39) ) But I don't think I can access it, in any exported service, can I?

yacovm (Thu, 05 Jul 2018 13:55:28 GMT):
I don't know... Bob should know that

oreg (Thu, 05 Jul 2018 14:16:03 GMT):
Has joined the channel.

oreg (Thu, 05 Jul 2018 14:20:13 GMT):
Hi, I'm trying to get the CLI to work, following the instructions at https://github.com/securekey/fabric-examples/tree/master/fabric-cli/ . I've run _make example-network_ and that worked but the command to create a channel, _go run fabric-cli.go channel create --cid mychannel --txfile ../../fabric-sdk-go/test/fixtures/fabric/v1.1/channel/mychannel.tx --config ../../test/fixtures/config/config_test_local.yaml_ fails with

oreg (Thu, 05 Jul 2018 14:21:05 GMT):
_[fabriccli] 2018/07/05 12:08:59 UTC - channel.glob..func2 -> ERRO Error while running channelCreateAction: GetSigningIdentity returned error: user not found_ Any advice how to debug this?

adave (Thu, 05 Jul 2018 16:28:54 GMT):
Has joined the channel.

elli-androulaki (Thu, 05 Jul 2018 17:12:18 GMT):
Has joined the channel.

troyronda (Thu, 05 Jul 2018 19:28:57 GMT):
@bstasyszyn ^^

bstasyszyn (Thu, 05 Jul 2018 19:51:34 GMT):
@Kyroy You can easily retrieve the chaincode policy from the "lscc" system chaincode - function "getccdata"

muralisr (Thu, 05 Jul 2018 19:52:21 GMT):
running into ` unable to find MSP ID for peer ` when configuring (reading config.yaml ?) ...

bstasyszyn (Thu, 05 Jul 2018 19:59:23 GMT):
@oreg Can you try adding the option --user Admin

gen_el (Thu, 05 Jul 2018 20:00:45 GMT):
I upgraded the sdk, for a working rest server. After fixing changed imports and other issues, now i am getting this error: `failed to load channel orderers: Could not find Orderer Config for channel orderer []`

troyronda (Thu, 05 Jul 2018 21:45:48 GMT):
@sudeshrshetty ^^

pankaj13 (Thu, 05 Jul 2018 22:09:48 GMT):
I have a network of two orgs (with two peers each), one orderer and two CA (one for each org). The code is working for enrolling users, creation of channel, org joining the channel, installation of chaincode but when I try to instantiate the chaincode, I get following error. Installing chaincode......... 15:04:32.043 InstallChainCode ▶ INFO 032 Installing chaincode......... ::1 - - [05/Jul/2018:15:04:32 -0700] "POST /chaincodes HTTP/1.1" 200 43 Instantiating chain code......... 15:04:33.064 InstantiateChainCode ▶ INFO 033 Instantiating chain code......... [fabsdk/fab] 2018/07/05 22:04:33 UTC - channel.orderersFromChannelCfg -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration [fabsdk/fab] 2018/07/05 22:04:33 UTC - channel.orderersFromChannelCfg -> WARN visit https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml for samples [fabsdk/fab] 2018/07/05 22:04:34 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = transaction returned with failure: Incorrect number of arguments. Expecting 4] [fabsdk/fab] 2018/07/05 22:04:35 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = transaction returned with failure: Incorrect number of arguments. Expecting 4] [fabsdk/fab] 2018/07/05 22:04:35 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = transaction returned with failure: Incorrect number of arguments. Expecting 4] [fabsdk/fab] 2018/07/05 22:04:35 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = transaction returned with failure: Incorrect number of arguments. Expecting 4] sending deploy transaction proposal failed: Multiple errors occurred: Transaction processing for endorser [peer1.org1.example.com:8051]: gRPC Transport Status Code: (2) Unknown. Description: transaction returned with failure: Incorrect number of arguments. Expecting 4 Transaction processing for endorser [peer0.org1.example.com:7051]: gRPC Transport Status Code: (2) Unknown. Description: transaction returned with failure: Incorrect number of arguments. Expecting 4 Transaction processing for endorser [peer1.org2.example.com:10051]: gRPC Transport Status Code: (2) Unknown. Description: transaction returned with failure: Incorrect number of arguments. Expecting 4 Transaction processing for endorser [peer0.org2.example.com:9051]: gRPC Transport Status Code: (2) Unknown. Description: transaction returned with failure: Incorrect number of arguments. Expecting 4 The code for Instantiation function ias as follows: // InstantiateChainCode instantiates the installed chaincode on the network func (hfc *FabricSetup) InstantiateChainCode(user string, orgName string, channelName string, chainCodeName string, chainCodePath string, chainCodeVersion string, args [][]byte) []byte { logger.Info("Instantiating chain code.........") clientContext := hfc.Sdk.Context(fabsdk.WithUser(hfc.AdminUser), fabsdk.WithOrg(orgName)) resMgmtClient, err := resmgmt.New(clientContext) if err != nil { logger.Error(err) return []byte("Failed to create new resource management client") } target := []string{"Org1", "Org2"} ccPolicy := cauthdsl.SignedByAnyMember(target) //create instantiate request instantiateReq := resmgmt.InstantiateCCRequest{ Name: chainCodeName, Path: chainCodePath, Version: chainCodeVersion, Args: args, Policy: ccPolicy, //CollConfig: } res, err := resMgmtClient.InstantiateCC(channelName, instantiateReq, resmgmt.WithRetry(retry.DefaultResMgmtOpts)) if err != nil { logger.Error(err) return []byte("Unable to instantiate chaincode") } if res.TransactionID == "" { return []byte("Failed to instantiate chaincode") } return []byte("Chain code instantiated successfully........") } I have tried tweaking ccPolicy with various options but keep getting the same error so guessing that I am not even looking at the right place. Any pointers would be helpful. Thanks.

bstasyszyn (Thu, 05 Jul 2018 23:06:42 GMT):
@pankaj13 The error "Incorrect number of arguments. Expecting 4]" is returned from the "Init" function of the chaincode that you're instantiating. When you instantiate a chaincode you need to specify the arguments that the chaincode expects. I believe that this error is coming from https://github.com/hyperledger/fabric-sdk-go/blob/22a0f775f826bf3a9bf7364e9b8ab0a7686cf711/test/fixtures/testdata/src/github.com/example_cc/example_cc.go#L42

pankaj13 (Thu, 05 Jul 2018 23:39:29 GMT):
thanks, I just figured it out too and rushed here to update!! The fix was simple and only had to add "Init" at the beginning of arguments passed to chaincode. Thanks for pointing it out.

troyronda (Fri, 06 Jul 2018 00:26:08 GMT):
@gen_el The SDK discovers the orderers from the channel config block. Do you have that endpoint configured in the SDK configuration either directly or via entityMatchers? fyi: @sudeshrshetty is working on enhancements to this logic to enable default endpoint configurations.

troyronda (Fri, 06 Jul 2018 00:26:08 GMT):
@gen_el The SDK discovers the orderer endpoints from the channel config block. Do you have that endpoint configured in the SDK configuration either directly or via entityMatchers? fyi: @sudeshrshetty is working on enhancements to this logic to enable default endpoint configurations.

sudeshrshetty (Fri, 06 Jul 2018 01:09:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uKvK7kz9JwtNTmXXS) @gen_el Do you have orderer declared in your config under `channels`?

gen_el (Fri, 06 Jul 2018 07:28:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8HEi6NySN96LzhzqE) @sudeshrshetty Yes. ``` orderers: - orderer.zonenet # Required. list of peers from participating orgs peers:```

gen_el (Fri, 06 Jul 2018 07:30:45 GMT):
@sudeshrshetty Am i missing out some key info?

gen_el (Fri, 06 Jul 2018 07:30:53 GMT):
It worked before now.

gen_el (Fri, 06 Jul 2018 07:30:53 GMT):
It worked before the update.

Kyroy (Fri, 06 Jul 2018 07:38:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YRwLqwmEgSQFvy8Gr) @bstasyszyn Thank you :) When unmarshaling the policy, I cannot get the original policy. I use: https://github.com/hyperledger/fabric-sdk-go/blob/master/third_party/github.com/hyperledger/fabric/common/cauthdsl/cauthdsl_builder.go#L165 But when I unmarshal with the following code, I get: ```resp, err := QueryChaincode(channelID, "lscc", "getccdata", /*args*/[]string{channelID, cc.Name}) if err != nil { ... } var ccData ccprovider.ChaincodeData if err := proto.Unmarshal(resp, &ccData); err != nil { ... } var sigPolicyEnv common2.SignaturePolicyEnvelope if err := proto.Unmarshal(ccData.Policy, &sigPolicyEnv); err != nil { ... } fmt.Println(sigPolicyEnv.Rule.Type) // nil ```

david_w (Fri, 06 Jul 2018 08:04:22 GMT):
Has joined the channel.

david_w (Fri, 06 Jul 2018 08:07:05 GMT):
create channel failed: SendEnvelope failed: calling orderer 'orderer.VG.SC.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.VG.SC.com:7050]

praveentalari (Fri, 06 Jul 2018 08:09:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CafQtQMgJg3WdLDBi) @david_w check if order orderer.VG.SC.com:7050 is up in "docker ps" command output

david_w (Fri, 06 Jul 2018 08:11:31 GMT):
hyperledger/fabric-orderer:x86_64-1.1.0 "orderer" 21 minutes ago Up 21 minutes 0.0.0.0:7050->7050/tcp

david_w (Fri, 06 Jul 2018 08:13:12 GMT):
is that means the docker name is "orderer" , "not orderer.VG.SC.com" . so i can not connect to orderer.vg.sc.com?

praveentalari (Fri, 06 Jul 2018 08:13:41 GMT):
check logs using "docker exec -it *CONTAINER_NAME* bash" name here is "orderer"

david_w (Fri, 06 Jul 2018 08:16:08 GMT):
8a0999de185b hyperledger/fabric-orderer:x86_64-1.1.0 "orderer" 21 minutes ago Up 21 minutes 0.0.0.0:7050->7050/tcp vg_orderer1_1

david_w (Fri, 06 Jul 2018 08:16:28 GMT):
Error: No such container: orderer

praveentalari (Fri, 06 Jul 2018 08:16:48 GMT):
I think "orderer" is under "COMMAND" column of your "docker ps" command output

praveentalari (Fri, 06 Jul 2018 08:17:06 GMT):
so Error: No such container: orderer

david_w (Fri, 06 Jul 2018 08:17:15 GMT):
yes...

praveentalari (Fri, 06 Jul 2018 08:18:04 GMT):
"docker exec -it orderer.VG.SC.com bash" should be fine I guess.

david_w (Fri, 06 Jul 2018 08:18:47 GMT):
Error: No such container: orderer.VG.SC.com

praveentalari (Fri, 06 Jul 2018 08:19:10 GMT):
"docker exec -it *CONTAINER_NAME* bash" or "docker exec -it *CONTAINER_ID* bash" *CONTAINER_NAME* is the last column of "docker ps" *CONTAINER_ID* is the first

david_w (Fri, 06 Jul 2018 08:20:27 GMT):
you mean 'vg_orderer1_1' ?

david_w (Fri, 06 Jul 2018 08:21:02 GMT):
8a0999de185b hyperledger/fabric-orderer:x86_64-1.1.0 "orderer" 21 minutes ago Up 21 minutes 0.0.0.0:7050->7050/tcp vg_orderer1_1

praveentalari (Fri, 06 Jul 2018 08:21:23 GMT):
yes

david_w (Fri, 06 Jul 2018 08:22:44 GMT):
orderer1: image: ${FABRIC_DOCKER_REGISTRY}${FABRIC_ORDERER_FIXTURE_IMAGE}:${ARCH}${ARCH_SEP}${FABRIC_ORDERER_FIXTURE_TAG} environment: - ORDERER_GENERAL_LOGLEVEL=debug - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - ORDERER_GENERAL_GENESISMETHOD=file - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer - ORDERER_GENERAL_TLS_ENABLED=true - ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/tls/orderer/server.key - ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/tls/orderer/server.crt - ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/tls/orderer/ca.crt] - ORDERER_GENERAL_TLS_CLIENTAUTHENABLED - ORDERER_GENERAL_TLS_CLIENTROOTCAS #comment out logging.driver in order to render the debug logs logging: driver: none working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer command: orderer ports: - 7050:7050 volumes: - ./config/channel-artifacts:/etc/hyperledger/configtx - ../../config/crypto-config/ordererOrganizations/VG.SC.com/orderers/orderer.VG.SC.com/msp:/etc/hyperledger/msp/orderer - ../../config/crypto-config/ordererOrganizations/VG.SC.com/orderers/orderer.VG.SC.com/tls:/etc/hyperledger/tls/orderer - ../../config/crypto-config/mutual_tls:/etc/hyperledger/mutual_tls/orderer networks: default: aliases: - orderer.VG.SC.com

david_w (Fri, 06 Jul 2018 08:25:34 GMT):
do i need config CONTAINER_NAME vg_orderer1_1 in docker-compose.yaml ?

david_w (Fri, 06 Jul 2018 08:26:02 GMT):
i don't understand

praveentalari (Fri, 06 Jul 2018 08:36:25 GMT):
1.search for "vg_orderer1_1" in your project to find where it is mentioned. the following aren't necessary if you can figure out from above 2.it's better not to use aliases or if you use try to keep the same name. 3. Delete existing container docker stop $(docker ps -a -q) is the command for removing all the containers(BE CAREFUL) and try to run again,see if vg_orderer1_1 is being created again

praveentalari (Fri, 06 Jul 2018 08:36:25 GMT):
1.search for "vg_orderer1_1" in your project to find where it is mentioned. the following aren't necessary if you can figure out from above 2.it's better not to use aliases or if you use, try to keep the same name. 3. Delete existing container docker stop $(docker ps -a -q) is the command for removing all the containers(BE CAREFUL) and try to run again,see if vg_orderer1_1 is being created again

praveentalari (Fri, 06 Jul 2018 08:36:25 GMT):
1.search for "vg_orderer1_1" in your project to find where it is mentioned. the following aren't necessary if you can figure out from above 2.it's better not to use aliases or if you use, try to keep the same name. 3. Delete all existing containers docker stop $(docker ps -a -q) is the command for removing all the containers(BE CAREFUL) and try to run again,see if vg_orderer1_1 is being created again

praveentalari (Fri, 06 Jul 2018 08:40:59 GMT):
sorry, "docker logs *CONTAINER_ID*" is for seeing logs of that container..

david_w (Fri, 06 Jul 2018 08:43:43 GMT):
thank you very much. In fact, I do not understand the meaning of all attributes. Where is the relevant information?

david_w (Fri, 06 Jul 2018 08:44:28 GMT):
attributes about fabric docker config

david_w (Fri, 06 Jul 2018 08:46:24 GMT):
I just modified the docker-compose.yaml in fabric-sdk-go/test

praveentalari (Fri, 06 Jul 2018 08:47:41 GMT):
when you are just starting , it's better not to edit anything and try running

david_w (Fri, 06 Jul 2018 08:50:35 GMT):
i did that and run well... So i remove the e2e project to someplace else and made it run well again...

david_w (Fri, 06 Jul 2018 08:51:41 GMT):
so i try to chang the domain about orderer and peers, and error occured

david_w (Fri, 06 Jul 2018 08:53:12 GMT):
i made new msp and new configtxgen for the change

santegoeds (Fri, 06 Jul 2018 09:03:42 GMT):
Has joined the channel.

FaizulHassan (Fri, 06 Jul 2018 12:06:15 GMT):
Has joined the channel.

FaizulHassan (Fri, 06 Jul 2018 12:08:59 GMT):
Hi people, Rather than writing all the Network configuration logic in a Shell Script , Will that be possible to achieve it using GoLang SDK ? Example , Creating a channel , making peers to join the channel , doing all the Certificate verification using SDKs ? Also can someone please demonstrate how could we make the chaincode interact with front-end. How could we make RestAPIs using Go SDK ? share us some sample program..

bstasyszyn (Fri, 06 Jul 2018 12:14:56 GMT):
@Kyroy Not sure what the problem is. What policy did you provide when the chaincode was instantiated?

Kyroy (Fri, 06 Jul 2018 12:16:41 GMT):
@bstasyszyn I used `cauthdsl.SignedByAnyMember([]string{"Org1MSP"})` - https://github.com/hyperledger/fabric-sdk-go/blob/master/third_party/github.com/hyperledger/fabric/common/cauthdsl/cauthdsl_builder.go#L165

bstasyszyn (Fri, 06 Jul 2018 12:34:09 GMT):
@Kyroy Can you try using the CLI to display the CC policy: https://github.com/securekey/fabric-examples/tree/master/fabric-cli. Command: go run fabric-cli.go chaincode info --ccid mychaincode --cid mychannel --config ../../test/fixtures/config/config_test_local.yaml --peer localhost:7051

oreg (Fri, 06 Jul 2018 12:35:49 GMT):
@bstasyszyn Thanks for the hint. The code does use the right user name (admin) but it seems the UserStore isn't there. It's looking for /tmp/state-store but that doesn't exist.

seshanthS (Fri, 06 Jul 2018 12:36:09 GMT):
Has joined the channel.

oreg (Fri, 06 Jul 2018 12:37:45 GMT):
No, wait. The user flag does change something.

Kyroy (Fri, 06 Jul 2018 12:42:19 GMT):
@bstasyszyn ```~/go/src/github.com/securekey/fabric-examples/fabric-cli(master) » go run cmd/fabric-cli/fabric-cli.go chaincode info --ccid my-cc --cid my-channel --config /my/config.yaml --peer localhost:7051 querying chaincode info for my-cc on peer: localhost:7051... **************************************************************************************************** ***** Id: 濡�uJ��ǡ�sbe<[؆�q�f�1A��� ***** Name: my-cc ***** Version: 1 ***** Escc: escc ***** Vscc: vscc ***** Data: ***** | CodeHash: PmBuFkpwNwRRS7PCB7HF9rPhvPQ0xriyrBYJCtMJcPc ***** | MetaDataHash: wR7R5v1GH8a8b6VPY2ZwvpLvjw14Ttx2ms-K-sLreBQ ***** Policy: ***** | Rule: ***** | | SignaturePolicy_NOutOf ***** | | N: 1 ***** | | Rules: ***** | | | Rule[0]: ***** | | | | SignaturePolicy_SignedBy: 0 ***** | Identities: ***** | | Identity[0]: ***** | | | PrincipalClassification: ROLE ***** | | | Principal: ***** | | | | Role: MEMBER ***** | | | | MspIdentifier: Org1MSP ***** InstantiationPolicy: ***** | Rule: ***** | | SignaturePolicy_NOutOf ***** | | N: 1 ***** | | Rules: ***** | | | Rule[0]: ***** | | | | SignaturePolicy_SignedBy: 0 ***** | Identities: ***** | | Identity[0]: ***** | | | PrincipalClassification: ROLE ***** | | | Principal: ***** | | | | Role: ADMIN ***** | | | | MspIdentifier: Org1MSP **************************************************************************************************** ```

oreg (Fri, 06 Jul 2018 12:42:48 GMT):
@bstasyszyn Ha, that works -- thanks! Now does this mean the example command in the CLI readme is incomplete or why do I need to add this flag?

bstasyszyn (Fri, 06 Jul 2018 12:45:01 GMT):
@oreg I believe there's a bug in the CLI: the default admin user in the CLI is "admin" when it should be "Admin". I'll be fixing it shortly.

oreg (Fri, 06 Jul 2018 12:45:31 GMT):
OK, that makes sense. Many thanks!

oreg (Fri, 06 Jul 2018 12:45:31 GMT):
@bstasyszyn OK, that makes sense. Many thanks!

bstasyszyn (Fri, 06 Jul 2018 12:46:43 GMT):
@Kyroy The CLI uses exactly the same code that you posted to display the policy - I don't know why you're getting nil

oreg (Fri, 06 Jul 2018 12:48:45 GMT):
Does the SDK support Fabric 1.2 ?

Naseer03 (Fri, 06 Jul 2018 13:09:07 GMT):
Has joined the channel.

troyronda (Fri, 06 Jul 2018 13:28:05 GMT):
@oreg yes SDK supports 1.2

troyronda (Fri, 06 Jul 2018 13:29:27 GMT):
(and of yesterday, 1.2 is now the stable target for SDK tests; 1.1 is now the prev target for SDK tests; 1.0 is now retired from SDK tests).

troyronda (Fri, 06 Jul 2018 13:54:28 GMT):
@muralisr FYI ^^

Kyroy (Fri, 06 Jul 2018 14:14:43 GMT):
@bstasyszyn The problem was a wrong import of proto > `"github.com/gogo/protobuf/proto"` =.=

gen_el (Fri, 06 Jul 2018 14:15:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=K3jMT3yaEAjYBWqTL) Can anyone share a working config.yaml for a multi-org solo orderer network?

gen_el (Fri, 06 Jul 2018 14:15:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=K3jMT3yaEAjYBWqTL) Can anyone share a working config.yaml for a multi-org kafka orderer network?

oreg (Fri, 06 Jul 2018 15:06:19 GMT):
@troyronda Great, thanks!

jriachi (Fri, 06 Jul 2018 16:55:44 GMT):
I am getting the following message when I query the ledger, and the result set is large

jriachi (Fri, 06 Jul 2018 16:55:48 GMT):
[fabric_sdk_go] 2018/07/05 12:34:16 UTC - txn.SendProposal.func1 -> DEBU Received error response from txn proposal processing: Transaction processor (localhost:7051) returned error for txID 'c30d5f6541e1b92ea4267ea9303ef735a6f0ec3e3f5d2a41d85ba6a7d987d9fc': gRPC Transport Status Code: (14) Unavailable. Description: transport is closing

jriachi (Fri, 06 Jul 2018 16:56:13 GMT):
This happens 30% of the times. 3 out of 10 requests fail, 7 succeed.

jriachi (Fri, 06 Jul 2018 16:56:20 GMT):
Any ideas why?

gen_el (Fri, 06 Jul 2018 16:56:47 GMT):
@troyronda I need help with my config.yaml file. Still isn't working after the upgrade to the recent fabric-sdk-go

sudeshrshetty (Fri, 06 Jul 2018 17:52:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gmaTfsX6gR4LmXKyd) @gen_el I Do you have entity matchers in place? what about your `orderers` section? Can't help much without seeing your config file, atleast orderers, peers, channels, entity matchers section

sudeshrshetty (Fri, 06 Jul 2018 17:52:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gmaTfsX6gR4LmXKyd) @gen_el Do you have entity matchers in place? what about your `orderers` section? Can't help much without seeing your config file, atleast orderers, peers, channels, entity matchers section

divyank (Fri, 06 Jul 2018 17:55:19 GMT):
Hi @jriachi, what version of the SDK and fabric are you using?

gen_el (Fri, 06 Jul 2018 17:57:19 GMT):
@sudeshrshetty Thanks. Resolved.

troyronda (Fri, 06 Jul 2018 18:03:55 GMT):
@jriachi - FYI: @divyank has seen this problem on Fabric 1.0

muralisr (Fri, 06 Jul 2018 18:26:37 GMT):
@troyronda (or any good samaritan :-) )... trying to get the event (deliver type) working with TLS. can you point me to the knobs pretty please ?

sudeshrshetty (Fri, 06 Jul 2018 20:44:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PCRdTC4483YnYRx53) @gen_el Good to know, what was the issue btw,

troyronda (Sat, 07 Jul 2018 01:35:00 GMT):
@muralisr no extra knobs - uses the same TLS settings as usual.

troyronda (Sat, 07 Jul 2018 01:35:00 GMT):
@muralisr no extra knobs in the SDK - uses the same configured TLS settings that are used to connect to the peer generally.

troyronda (Sat, 07 Jul 2018 01:37:16 GMT):
the tests normally configure the peer to require TLS mutual auth (https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/dockerenv/.env#L40)

troyronda (Sat, 07 Jul 2018 01:37:16 GMT):
btw - the tests normally configure the peer & orderer to require TLS mutual auth (https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/dockerenv/.env#L40)

troyronda (Sat, 07 Jul 2018 01:37:35 GMT):
(lines 40-43)

troyronda (Sat, 07 Jul 2018 01:38:46 GMT):
TLS cert setting in the client: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L97

troyronda (Sat, 07 Jul 2018 01:38:46 GMT):
TLS client cert setting in the client: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L97

troyronda (Sat, 07 Jul 2018 01:39:42 GMT):
@sudeshrshetty anything else?

jriachi (Sat, 07 Jul 2018 05:09:43 GMT):
@divyank @troyronda I am using Fabric Version 1.0, and The SDK version is v1.0.0.0-alpha2. Hmmm this could be the issue. I am going to upgrade Fabric to version 1.1 Which SDK version is recommended?

troyronda (Sat, 07 Jul 2018 11:13:34 GMT):
@jriachi latest

jriachi (Sat, 07 Jul 2018 13:46:53 GMT):
@troyronda Thanks.

muralisr (Sun, 08 Jul 2018 11:52:37 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8cs8ftufPPRqCEHqe

muralisr (Sun, 08 Jul 2018 11:52:52 GMT):
thanks for that @troyronda . Worked well

aaronchipper (Mon, 09 Jul 2018 04:53:44 GMT):
Has joined the channel.

Kyroy (Mon, 09 Jul 2018 09:46:44 GMT):
```v1.2.0: Could not introduce github.com/hyperledger/fabric@v1.2.0, as it has a dependency on github.com/spf13/viper with constraint 1967d93db724f4a5c0e101307e96d82ff520a067, which has no overlap with existing constraint master from github.com/hyperledger/fabric-sdk-go@master```

troyronda (Mon, 09 Jul 2018 10:30:03 GMT):
@Kyroy suggest using a dep override for that one - since fabric went to a specfic revision.

troyronda (Mon, 09 Jul 2018 10:35:11 GMT):
example: https://github.com/securekey/fabric-snaps/blob/v0.2.3/Gopkg.toml#L62

troyronda (Mon, 09 Jul 2018 10:35:42 GMT):
[[override]] name = "github.com/spf13/viper" revision="aafc9e6bc7b7bb53ddaa75a5ef49a17d6e654be5"

EricYang (Mon, 09 Jul 2018 11:05:35 GMT):
Has joined the channel.

sudeshrshetty (Mon, 09 Jul 2018 13:56:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Qb6pRHHwH6exqJob8) @troyronda thats it

Kyroy (Mon, 09 Jul 2018 15:09:44 GMT):
@troyronda Thanks :) I just forgot about override :D

tian (Tue, 10 Jul 2018 02:58:02 GMT):
Hi guys, what is the best way to set the logging level? I have tried `logging.SetLevel("", logging.DEBUG)` at the very begin, but it seems does't work.

rAnand (Tue, 10 Jul 2018 06:23:27 GMT):
Has joined the channel.

MahimaManik (Tue, 10 Jul 2018 06:25:03 GMT):
Hey, Has anybody faced this error? `Failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051]`

tian (Tue, 10 Jul 2018 06:46:17 GMT):
It looks like your peer is not running, so nobody is listening at localhost:7051

MahimaManik (Tue, 10 Jul 2018 06:48:28 GMT):
I checked by running 'docker ps'. Network is up

MahimaManik (Tue, 10 Jul 2018 06:48:42 GMT):

Screenshot from 2018-07-10 12-17-51.png

tian (Tue, 10 Jul 2018 06:52:02 GMT):
Does `telnet localhost 7051` success?

MahimaManik (Tue, 10 Jul 2018 06:54:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yv7xtF2zsFHShuGAa) @tian It shows `Connected to localhost.localdomain`

MahimaManik (Tue, 10 Jul 2018 06:57:12 GMT):
I have created network, deployed chaincode from fabric-sdk-java client application, and now trying to create a new fabric-sdk-go client. Fabric-sdk-go client to be able to submit transactions on existing channel

yacovm (Tue, 10 Jul 2018 06:57:40 GMT):
if you have connectivity, but you can't connect - then probably you're running with TLS, and the peer's TLS certificate doesn't have the localhost as its DNS SAN

yacovm (Tue, 10 Jul 2018 06:58:31 GMT):
what you can do, to test - is edit on your local computer the `/etc/hosts` file and put there the peer's DNS name - `peer0.org1.bla.bla.bla` as `127.0.0.1`

yacovm (Tue, 10 Jul 2018 06:58:34 GMT):
and then see if it works

MahimaManik (Tue, 10 Jul 2018 06:59:02 GMT):
Okay thanks, let me try

MahimaManik (Tue, 10 Jul 2018 07:08:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gcw8E2MHGFRR7ennQ) @yacovm I tried this, but the problem still persists..

yacovm (Tue, 10 Jul 2018 07:08:41 GMT):
hmmm you should try then to capture the output via tcpdump

yacovm (Tue, 10 Jul 2018 07:08:53 GMT):
and then use wireshark to look at what happens

MahimaManik (Tue, 10 Jul 2018 07:10:10 GMT):
@yacovm It should be feasible right to have one java-client and the other go-client?

MahimaManik (Tue, 10 Jul 2018 07:11:37 GMT):
I updated config_test.yaml for org, channel, ca, client details

yacovm (Tue, 10 Jul 2018 07:11:37 GMT):
obviously... fabric is language independant ;)

yacovm (Tue, 10 Jul 2018 07:11:53 GMT):
but i think golang SDK is the best in terms of features

MahimaManik (Tue, 10 Jul 2018 07:12:27 GMT):
Yes, it has very clear separation for Run and RunWithoutSetup. Works like charm!

MahimaManik (Tue, 10 Jul 2018 09:32:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8jXSWjmrpKxNuRwPG) @yacovm I tried tcpdump, there were no packets received on 7051 port

yacovm (Tue, 10 Jul 2018 09:33:42 GMT):
that might be problematic... ensure you're listening to the right interface

MahimaManik (Tue, 10 Jul 2018 09:34:28 GMT):
We tried 'any' interface. Command used: `tcpdump -n -i any "port 7051" -v`

yacovm (Tue, 10 Jul 2018 09:34:59 GMT):
so I don't know further than that... wait for the go SDK guys to wake up

Kyroy (Tue, 10 Jul 2018 10:57:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=WvAfdkJWDLztAke8b) @troyronda commit ea5e32e8 > - if provided, entitiy matcher lookup will take precedence over exact match. @troyronda @sudeshrshetty So if I have a very general entity matcher for peers without a `tlsCACerts`, I have to add another one that matches to my specified peers, e.g.: ```- pattern: (\w).org1.example.com:(\d+)1 mappedHost: $1.org1.example.com:${2}1 # for endorsements on other peers - pattern: ([\w\.]+):(\d+)1 ... ... ```

Kyroy (Tue, 10 Jul 2018 10:57:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=WvAfdkJWDLztAke8b) @troyronda commit ea5e32e8 > - if provided, entitiy matcher lookup will take precedence over exact match. @troyronda @sudeshrshetty So if I have a very general entity matcher for peers without a `tlsCACerts`, I have to add another one that matches to my specified peers, e.g.: ``` - pattern: (\w).org1.example.com:(\d+)1 mappedHost: $1.org1.example.com:${2}1 # for endorsements on other peers - pattern: ([\w\.]+):(\d+)1 ... ... ```

Kyroy (Tue, 10 Jul 2018 10:57:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=WvAfdkJWDLztAke8b) @troyronda commit ea5e32e8 > - if provided, entitiy matcher lookup will take precedence over exact match. @troyronda @sudeshrshetty So if I have a very general entity matcher for peers without a `tlsCACerts`, I have to add another one that matches to my specified peers, e.g.: ``` - pattern: (\w).org1.example.com:(\d+)1 mappedHost: $1.org1.example.com:${2}1 # for endorsements on other peers - pattern: ([\w\.]+):(\d+)1 urlSubstitutionExp: ... eventUrlSubstitutionExp: ... sslTargetOverrideUrlSubstitutionExp: ... mappedHost: mapped.peer:7051 ```

troyronda (Tue, 10 Jul 2018 13:01:36 GMT):
@yacovm @MahimaManik @tian The usual culprit for this error are (1) Peer is actually down; (2) Network / Docker mapping problems; (3) TLS problems... as you guys have been discussing above.

troyronda (Tue, 10 Jul 2018 13:01:36 GMT):
@yacovm @MahimaManik @tian The usual culprit for this error are (1) Peer is actually down; (2) Network issues or incorrect docker port mappings; (3) TLS problems... as you guys have been discussing above.

troyronda (Tue, 10 Jul 2018 13:02:22 GMT):
With TLS, you need to make sure the name being used to dial matches the name in the certificate.

troyronda (Tue, 10 Jul 2018 13:02:22 GMT):
With TLS, you need to make sure the name being used by the client (to dial) matches the name in the certificate.

troyronda (Tue, 10 Jul 2018 13:03:11 GMT):
Note: the entity matchers section of the configuration allows you to override the names and mappings.

troyronda (Tue, 10 Jul 2018 13:04:21 GMT):
The SDK also has a set of tests to allow you to run the integration test client outside of docker. You can also try that out and see how it was configured.

troyronda (Tue, 10 Jul 2018 13:05:20 GMT):
make dockerenv-stable-up ---- starts the fabric network docker containers along with port mappings to the host machine.

troyronda (Tue, 10 Jul 2018 13:06:07 GMT):
make integration-tests-local ---- runs the integration tests on the host machine (not in docker) against the docker containers started above.

troyronda (Tue, 10 Jul 2018 13:09:54 GMT):
example of matchers : https://github.com/hyperledger/fabric-sdk-go/blob/88455b489c5f7dfe710e9147cea309ba240d5303/test/fixtures/config/overrides/local_entity_matchers_bootstrap.yaml

sudeshrshetty (Tue, 10 Jul 2018 13:56:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PuSdXQcFziA95Huwd) @Kyroy Yes,we already did that and that commit is in progress b3e2a6775472fb382b84890369807a94b32fbcfd

sudeshrshetty (Tue, 10 Jul 2018 14:01:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=h4aTMfeATvRWsitRh) @Kyroy patterns will be taken into in the order they are defined in config, make sure pattern at the beginning of the list doesn't shadow the ones at the end.

sudeshrshetty (Tue, 10 Jul 2018 14:01:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=h4aTMfeATvRWsitRh) @Kyroy patterns will be matched in the order they are defined in config, make sure pattern at the beginning of the list doesn't shadow the ones at the end.

Kyroy (Tue, 10 Jul 2018 14:56:04 GMT):
@sudeshrshetty The commit in the master that I mentioned already does this, right? At least I experience this behaviour when I use master.

sudeshrshetty (Tue, 10 Jul 2018 14:57:46 GMT):
@Kyroy Yes

david_w (Wed, 11 Jul 2018 02:14:31 GMT):
I'm not very clear about the meaning of these two parameters : CORE_PEER_GOSSIP_BOOTSTRAP and CORE_PEER_GOSSIP_EXTERNALENDPOINT. who can tell me the meaning? thank you!

david_w (Wed, 11 Jul 2018 02:22:52 GMT):
:thinking: hello guys...

Kyroy (Wed, 11 Jul 2018 06:34:37 GMT):
@sudeshrshetty I have the following peers: - peer0.org1.example.com:7051 - peer1.org1.example.com:7151 - peer0.org2.example.com:7351 running on localhost on the same ports. All of these peers are joined to my channel. But only the peers from org1 are configured in my sdk. I use the entityMatcher from my previous post. I also have implemented a custom `ChannelPeers` method that only returns the peers from org1. But e.g. when I instantiate CC, the sdk tries to get the tx event from the peer in org2. I guess because of the discovery, right? Is this a bug or a misconfiguration from my side? ```{"level":"debug","msg":"CustomEndpointConfig.ChannelPeers(my-test-channel): [peer1.org1.example.com:7151 peer0.org1.example.com:7051]","time":"2018-07-11T08:25:57+02:00"} [fabsdk/fab] 2018/07/11 06:25:57 UTC - dispatcher.(*Dispatcher).HandleConnectEvent -> WARN error creating connection: could not connect to localhost:7351: dialing connection timed out [localhost:7351] error instantiating chaincode my-test-chaincode:my-test-chaincode-version on channel my-test-channel: error registering for TxStatus event: could not create client conn: could not connect to localhost:7351: dialing connection timed out [localhost:7351] ``` PS: The connection timeout is because the `mapped.peer` does not have a `tlsCACerts.path` defined.

Kyroy (Wed, 11 Jul 2018 06:36:41 GMT):
@david_w a) this is not a sdk question, but this may help you https://github.com/hyperledger/fabric/blob/release-1.2/sampleconfig/core.yaml b) you should not expect an answer within minutes. People are living all over the world an may be in bed or somewhere else ;)

jayeshjawale95 (Wed, 11 Jul 2018 07:32:50 GMT):
Has joined the channel.

Kyroy (Wed, 11 Jul 2018 07:52:15 GMT):
@sudeshrshetty the latest commit in master breaks the ability to specify the `mappedHost` like this: `mappedHost: $1.org1.example.com:${2}1` (`$1`, etc. not working anymore)

Kyroy (Wed, 11 Jul 2018 07:52:15 GMT):
@sudeshrshetty the latest commit in master breaks the ability to specify the `mappedHost` like this: `mappedHost: $1.org1.example.com:${2}1` ($1, etc. not working anymore)

david_w (Wed, 11 Jul 2018 08:11:54 GMT):
@Kyroy it is not really a sdk question... I just not sure if i have more than 2 peers in one org, how to set CORE_PEER_GOSSIP_BOOTSTRAP thank you

burgerfreak (Wed, 11 Jul 2018 09:30:03 GMT):
hello guys. has anybody faced this kind of error? ``` Unable to instantiate the chaincode: Failed to instantiate the chaincode: failed to get discovery service: could not get chConfig cache reference: QueryBlockConfig failed: target(s) required ``` Fabric v1.1

praveentalari (Wed, 11 Jul 2018 10:35:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fDWMBwET8p3G34myr) @bstasyszyn is the github.com/securekey/fabric-examples official CLI by Hypeledger team ?

praveentalari (Wed, 11 Jul 2018 10:41:17 GMT):
Followed Downloaded https://github.com/hyperledger/fabric-samples/tree/release-1.2/first-network docker rm -f $(docker ps -a -q) docker rmi -f $(docker images -q) As syggested in http://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html ./byfn.sh -m generate ./byfn.sh -m up Failed showing 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 047 parsed scheme: "" 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 048 scheme "" not registered, fallback to default scheme 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 049 ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 }] 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 04a ClientConn switching balancer to "pick_first" 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 04b pickfirstBalancer: HandleSubConnStateChange: 0xc4202a9f00, CONNECTING 2018-07-11 10:33:22.457 UTC [grpc] Printf -> DEBU 04c pickfirstBalancer: HandleSubConnStateChange: 0xc4202a9f00, READY Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!! ========= ERROR !!! FAILED to execute End-2-End Scenario ===========

praveentalari (Wed, 11 Jul 2018 10:41:17 GMT):
Followed Downloaded https://github.com/hyperledger/fabric-samples/tree/release-1.2/first-network docker rm -f $(docker ps -a -q) docker rmi -f $(docker images -q) As suggested in http://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html ./byfn.sh -m generate ./byfn.sh -m up Failed showing 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 047 parsed scheme: "" 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 048 scheme "" not registered, fallback to default scheme 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 049 ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 }] 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 04a ClientConn switching balancer to "pick_first" 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 04b pickfirstBalancer: HandleSubConnStateChange: 0xc4202a9f00, CONNECTING 2018-07-11 10:33:22.457 UTC [grpc] Printf -> DEBU 04c pickfirstBalancer: HandleSubConnStateChange: 0xc4202a9f00, READY Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!! ========= ERROR !!! FAILED to execute End-2-End Scenario ===========

praveentalari (Wed, 11 Jul 2018 10:41:17 GMT):
Followed Downloaded https://github.com/hyperledger/fabric-samples/tree/release-1.2/first-network docker rm -f $(docker ps -a -q) docker rmi -f $(docker images -q) As suggested in http://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html ./byfn.sh -m generate ./byfn.sh -m up *Failed showing* 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 047 parsed scheme: "" 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 048 scheme "" not registered, fallback to default scheme 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 049 ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 }] 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 04a ClientConn switching balancer to "pick_first" 2018-07-11 10:33:22.453 UTC [grpc] Printf -> DEBU 04b pickfirstBalancer: HandleSubConnStateChange: 0xc4202a9f00, CONNECTING 2018-07-11 10:33:22.457 UTC [grpc] Printf -> DEBU 04c pickfirstBalancer: HandleSubConnStateChange: 0xc4202a9f00, READY Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!! ========= ERROR !!! FAILED to execute End-2-End Scenario ===========

praveentalari (Wed, 11 Jul 2018 10:41:17 GMT):
Followed Downloaded https://github.com/hyperledger/fabric-samples/tree/release-1.2/first-network docker rm -f $(docker ps -a -q) docker rmi -f $(docker images -q) As suggested in http://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html ./byfn.sh -m generate ./byfn.sh -m up *Failed showing* -----END CERTIFICATE----- 2018-07-12 06:23:37.840 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-07-09 06:16:09 +0000 UTC 2018-07-12 06:23:37.840 UTC [msp] Validate -> DEBU 036 MSP Org1MSP validating identity 2018-07-12 06:23:37.842 UTC [grpc] Printf -> DEBU 037 parsed scheme: "" 2018-07-12 06:23:37.842 UTC [grpc] Printf -> DEBU 038 scheme "" not registered, fallback to default scheme 2018-07-12 06:23:37.842 UTC [grpc] Printf -> DEBU 039 ccResolverWrapper: sending new addresses to cc: [{peer0.org1.example.com:7051 0 }] 2018-07-12 06:23:37.842 UTC [grpc] Printf -> DEBU 03a ClientConn switching balancer to "pick_first" 2018-07-12 06:23:37.842 UTC [grpc] Printf -> DEBU 03b pickfirstBalancer: HandleSubConnStateChange: 0xc4203b5a00, CONNECTING 2018-07-12 06:23:37.845 UTC [grpc] Printf -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4203b5a00, READY 2018-07-12 06:23:37.846 UTC [grpc] Printf -> DEBU 03d parsed scheme: "" 2018-07-12 06:23:37.846 UTC [grpc] Printf -> DEBU 03e scheme "" not registered, fallback to default scheme 2018-07-12 06:23:37.846 UTC [grpc] Printf -> DEBU 03f ccResolverWrapper: sending new addresses to cc: [{peer0.org1.example.com:7051 0 }] 2018-07-12 06:23:37.846 UTC [grpc] Printf -> DEBU 040 ClientConn switching balancer to "pick_first" 2018-07-12 06:23:37.846 UTC [grpc] Printf -> DEBU 041 pickfirstBalancer: HandleSubConnStateChange: 0xc420435a90, CONNECTING 2018-07-12 06:23:37.848 UTC [grpc] Printf -> DEBU 042 pickfirstBalancer: HandleSubConnStateChange: 0xc420435a90, READY 2018-07-12 06:23:37.850 UTC [msp] GetDefaultSigningIdentity -> DEBU 043 Obtaining default signing identity 2018-07-12 06:23:37.850 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 044 java chaincode disabled 2018-07-12 06:23:37.851 UTC [msp/identity] Sign -> DEBU 045 Sign: plaintext: 0AAB070A6708031A0C08E9E79BDA0510...6D7963631A0A0A0571756572790A0161 2018-07-12 06:23:37.851 UTC [msp/identity] Sign -> DEBU 046 Sign: digest: AB72685C2D51B67FF48D38D7B896DB3598C8693AF3BC01BA1C8C16DD17595739 100 !!!!!!!!!!!!!!! Query result on PEER0 is INVALID !!!!!!!!!!!!!!!! ================== ERROR !!! FAILED to execute End-2-End Scenario =================

MahimaManik (Wed, 11 Jul 2018 11:50:03 GMT):
Is there any example in fabric-sdk-go where client wants to submit transaction to remote channel (`docker ps` on client's machine is empty) ?

troyronda (Wed, 11 Jul 2018 13:40:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4YMvxg94qohc3zow5) @praveentalari It is not official CLI - it's an example of creating a CLI using Go SDK.

sudeshrshetty (Wed, 11 Jul 2018 13:55:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Yhx4PDj7CwbADAJTo) @Kyroy Looking in to this

sudeshrshetty (Wed, 11 Jul 2018 13:59:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=K2NH9sXAug4EQQce3) @Kyroy For this entity matcher config, it should not happen Do you have any other pattern defined here? `- pattern: (\w).org1.example.com:(\d+)1 mappedHost: $1.org1.example.com:${2}1 # for endorsements on other peers - pattern: ([\w\.]+):(\d+)1 urlSubstitutionExp: ... eventUrlSubstitutionExp: ... sslTargetOverrideUrlSubstitutionExp: ... mappedHost: mapped.peer:7051`

Kyroy (Wed, 11 Jul 2018 14:00:03 GMT):
@sudeshrshetty no, I only have these 2. And it is working with the commit before

Kyroy (Wed, 11 Jul 2018 14:00:14 GMT):
But it doesn't work with the refactor commit

sudeshrshetty (Wed, 11 Jul 2018 14:17:53 GMT):
@Kyroy Will look into this too

Kyroy (Wed, 11 Jul 2018 14:25:54 GMT):
@sudeshrshetty Oh, wait. I was looking at something else. So the peer from the other org thing was also before. It is caused by the entityMatcher `pattern: ([\w\.]+):(\d+)1`. But if I do not use this matcher, I am not able to get endorsements from other orgs.

sudeshrshetty (Wed, 11 Jul 2018 14:30:54 GMT):
@Kyroy I am not sure if we had `$` support for mapped host before. Are you sure about that? I ran few tests with old code and it never worked. It is nice to have feature though, anyway I am going to put `$` mapped host in upcoming commit

Kyroy (Wed, 11 Jul 2018 14:34:00 GMT):
It works with this commit `b5453c1d86b35772c78e103907512d9a6a706fc7`

Kyroy (Wed, 11 Jul 2018 14:34:18 GMT):
And it worked before ;) @sudeshrshetty

sudeshrshetty (Wed, 11 Jul 2018 15:09:29 GMT):
@Kyroy here we go 333c1b92cf94124ca4872d9cfd8c7ee7cbe23474

Kyroy (Wed, 11 Jul 2018 15:12:23 GMT):
Cool thank YouTube @sudeshrshetty i will look into this later :)

Kyroy (Wed, 11 Jul 2018 15:12:23 GMT):
Cool thank you @sudeshrshetty i will look into this later :)

swetha (Wed, 11 Jul 2018 20:12:51 GMT):
Hello! I am having an issue when using the go sdk when running an query or invoking a system chaincode. I get an error like this: ``` failed constructing descriptor for chaincodes:

swetha (Wed, 11 Jul 2018 20:12:51 GMT):
Hello! I am having an issue when using the go sdk when running an query or invoking a system chaincode. I get an error like this: ``` Failed constructing descriptor for chaincode chaincodes: ,: No metadata was found for chaincode qscc in channel mychannel ``` I am using the channel client instead of the ledger. Is that a problem?

yacovm (Wed, 11 Jul 2018 20:13:48 GMT):
oh....I think I know why that happens

yacovm (Wed, 11 Jul 2018 20:13:53 GMT):
but I don't know how to fix it

yacovm (Wed, 11 Jul 2018 20:14:09 GMT):
@troyronda why do you guys use discovery for QSCC? :/

yacovm (Wed, 11 Jul 2018 20:14:22 GMT):
or did she use the go SDK in a wrong way?

swetha (Wed, 11 Jul 2018 20:15:04 GMT):
I am planning on using the sdk for some custom system chaincodes. I had it working, but once I updated Fabric to 1.2 I started getting these errors. Is this an effect of the new release?

yacovm (Wed, 11 Jul 2018 20:17:09 GMT):
It is related to the new release

yacovm (Wed, 11 Jul 2018 20:17:28 GMT):
though I don't know if it's something you're doing wrong or not

yacovm (Wed, 11 Jul 2018 20:17:45 GMT):
but - you're *not* supposed to query service discovery for system chaincodes

swetha (Wed, 11 Jul 2018 20:19:52 GMT):
I agree. I think the sdk provides a special implementation for the typical system chaincodes like `qscc` so it doesn't go through the discovery service. My real problem is that I have a system chaincode plugin which I would need to use the regular query process. My question then becomes is there a way to bypass the discovery service

yacovm (Wed, 11 Jul 2018 20:20:48 GMT):
I don't understand even why it goes for SD - since it's not a transaction.... it's a query

yacovm (Wed, 11 Jul 2018 20:21:22 GMT):
if you want to query a peer - what I'd do as an SDK writer - is do a peer membership query, get the chaincodes, and select those that contain the chaincode i need

yacovm (Wed, 11 Jul 2018 20:21:36 GMT):
though - everyone has QSCC installed on them.....

yacovm (Wed, 11 Jul 2018 20:24:14 GMT):
@swetha maybe you can bypass that by having a regular chaincode that just calls the system chaincode

swetha (Wed, 11 Jul 2018 20:28:30 GMT):
I am developing a fabproxy for the `evmscc`. Having to deploy another chaincode to be able to interact with the evm seems like step too much. Deploying the `evmscc` as a regular chaincode seems like a better solution at that point. But I am sure this will become a common problem if you can't use the sdk to interact with custom system chaincodes

yacovm (Wed, 11 Jul 2018 20:29:30 GMT):
This will not become a common problem since it's uncommon to do anything that isn't in the fabric samples

swetha (Wed, 11 Jul 2018 20:38:24 GMT):
Is the expectation then as more system chaincodes are developed they should be added to the SDK?

troyronda (Wed, 11 Jul 2018 20:39:36 GMT):
@swetha are you calling QSCC from your chaincode?

swetha (Wed, 11 Jul 2018 20:40:22 GMT):
No, I am not doing chaincode invocation from a chaincode

troyronda (Wed, 11 Jul 2018 20:40:57 GMT):
ah - so qscc was something you tried.

swetha (Wed, 11 Jul 2018 20:40:59 GMT):
I am trying to call a system chaincode through the channel client's `Query` or `Execute` methods

swetha (Wed, 11 Jul 2018 20:41:14 GMT):
Yes the qscc was me verifying that it is a problem with all system chaincodes

swetha (Wed, 11 Jul 2018 20:41:48 GMT):
I am trying to interact with a custom system chaincode so I can't use the ledger querier

troyronda (Wed, 11 Jul 2018 20:43:51 GMT):
So the short answer is that we have used a custom invocation handler for this type of query

troyronda (Wed, 11 Jul 2018 20:43:51 GMT):
So the short answer is that we have used a custom invocation handler for this type of query

troyronda (Wed, 11 Jul 2018 20:44:02 GMT):
(I mean in our projects)

troyronda (Wed, 11 Jul 2018 20:44:02 GMT):
(but this hasn't been put into the SDK as of yet)

troyronda (Wed, 11 Jul 2018 20:45:26 GMT):
This custom invocation handler is basically choosing a random channel peer instead of using discovery

troyronda (Wed, 11 Jul 2018 20:45:55 GMT):
(whenever we have done something "special", we have used these custom handler... it makes things quite flexible)

yacovm (Wed, 11 Jul 2018 20:46:01 GMT):
Sounds to me like a solid resolution

troyronda (Wed, 11 Jul 2018 20:47:40 GMT):
here is the out-of-the-box handler for execute: https://github.com/hyperledger/fabric-sdk-go/blob/c32f0e14f463dc13cda25eb4446d0135d9944f12/pkg/client/channel/invoke/txnhandler.go#L199

swetha (Wed, 11 Jul 2018 20:49:53 GMT):
Okay so if I understand correctly I should use a custom handler instead of that one to bypass discovery. I can use something like the ledger querier as an example?

troyronda (Wed, 11 Jul 2018 20:54:27 GMT):
@swetha yes you should use a custom handler for now and pass it to InvokeHandler (https://github.com/hyperledger/fabric-sdk-go/blob/c32f0e14f463dc13cda25eb4446d0135d9944f12/pkg/client/channel/chclient.go#L146)

swetha (Wed, 11 Jul 2018 20:55:17 GMT):
@yacovm & @troyronda Thanks so much! This was all very helpful

huy.tranibm (Wed, 11 Jul 2018 21:01:44 GMT):
Has joined the channel.

troyronda (Wed, 11 Jul 2018 21:06:29 GMT):
@Kyroy @sudeshrshetty Merged 333c1b92cf94124ca4872d9cfd8c7ee7cbe23474

huy.tranibm (Wed, 11 Jul 2018 21:07:23 GMT):
hello guys, what version of the go sdk is in master branch? Also im checking the tags, are there no 1.1 or 1.2 go sdk versions?

huy.tranibm (Wed, 11 Jul 2018 21:07:26 GMT):
thank you

troyronda (Wed, 11 Jul 2018 21:46:55 GMT):
@huy.tranibm master currently supports both 1.1 and 1.2

huy.tranibm (Wed, 11 Jul 2018 22:38:18 GMT):
thanks! @troyronda

noif (Thu, 12 Jul 2018 05:56:55 GMT):
Has joined the channel.

WadeLu (Thu, 12 Jul 2018 07:34:51 GMT):
Has joined the channel.

praveentalari (Thu, 12 Jul 2018 07:57:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=LejteE25N6WixmPjg) Are the tests are not up to date in first-network ? Is this why it is failing ?

praveentalari (Thu, 12 Jul 2018 08:22:54 GMT):
If the following doesn't work in official sample,one should understand what kind of hurdles Hyperledger Fabric provides when you dive deep in. cd fabric-samples/first-network/ docker rm -f $(docker ps -a -q) docker rmi -f $(docker images -q) ./byfn.sh -m down ./byfn.sh -m generate ./byfn.sh -m up http://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html

praveentalari (Thu, 12 Jul 2018 08:28:24 GMT):
CORE_PEER_ADDRESS=peer0.org1.example.com:7051 Attempting to Query PEER0 ...3 secs Attempting to Query PEER0 ...25 secs Attempting to Query PEER0 ...28 secs Attempting to Query PEER0 ...31 secs Attempting to Query PEER0 ...34 secs Attempting to Query PEER0 ...37 secs Attempting to Query PEER0 ...41 secs Attempting to Query PEER0 ...44 secs Attempting to Query PEER0 ...47 secs Attempting to Query PEER0 ...50 secs Attempting to Query PEER0 ...53 secs Attempting to Query PEER0 ...56 secs Attempting to Query PEER0 ...59 secs Attempting to Query PEER0 ...62 secs 2018-07-12 08:18:55.965 UTC [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP 2018-07-12 08:18:55.965 UTC [viperutil] unmarshalJSON -> DEBU 002 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value 2018-07-12 08:18:55.965 UTC [viperutil] getKeysRecursively -> DEBU 003 Found real value for peer.BCCSP.Default setting to string SW 2018-07-12 08:18:55.965 UTC [viperutil] getKeysRecursively -> DEBU 004 Found map[string]interface{} value for peer.BCCSP.SW 2018-07-12 08:18:55.966 UTC [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value 2018-07-12 08:18:55.966 UTC [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Hash setting to string SHA2 2018-07-12 08:18:55.966 UTC [viperutil] unmarshalJSON -> DEBU 007 Unmarshal JSON: value is not a string: 256 2018-07-12 08:18:55.966 UTC [viperutil] getKeysRecursively -> DEBU 008 Found real value for peer.BCCSP.SW.Security setting to int 256 2018-07-12 08:18:55.966 UTC [viperutil] getKeysRecursively -> DEBU 009 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore 2018-07-12 08:18:55.966 UTC [viperutil] unmarshalJSON -> DEBU 00a Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input 2018-07-12 08:18:55.966 UTC [viperutil] getKeysRecursively -> DEBU 00b Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string 2018-07-12 08:18:55.966 UTC [viperutil] getKeysRecursively -> DEBU 00c Found map[string]interface{} value for peer.BCCSP.PKCS11 2018-07-12 08:18:55.966 UTC [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: 2018-07-12 08:18:55.966 UTC [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Label setting to 2018-07-12 08:18:55.966 UTC [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: 2018-07-12 08:18:55.966 UTC [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Pin setting to 2018-07-12 08:18:55.967 UTC [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: 2018-07-12 08:18:55.967 UTC [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Hash setting to 2018-07-12 08:18:55.967 UTC [viperutil] unmarshalJSON -> DEBU 013 Unmarshal JSON: value is not a string: 2018-07-12 08:18:55.967 UTC [viperutil] getKeysRecursively -> DEBU 014 Found real value for peer.BCCSP.PKCS11.Security setting to 2018-07-12 08:18:55.967 UTC [viperutil] getKeysRecursively -> DEBU 015 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore 2018-07-12 08:18:55.967 UTC [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: 2018-07-12 08:18:55.967 UTC [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to 2018-07-12 08:18:55.967 UTC [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value is not a string:

troyronda (Thu, 12 Jul 2018 13:44:40 GMT):
@praveentalari This doesn't appear to be related to the client Go SDK - perhaps you might find more discussion in a more general fabric channel?

troyronda (Thu, 12 Jul 2018 13:44:40 GMT):
@praveentalari This doesn't appear to be related to the client Go SDK, but I could be missing something :) Perhaps you might find more discussion on general fabric tutorials and byfn in a more general fabric channel?

troyronda (Thu, 12 Jul 2018 13:44:40 GMT):
@praveentalari This doesn't appear to be related to the client Go SDK, but I could be missing something :). Perhaps you might find more discussion on general fabric tutorials and byfn in a more general fabric channel?

KevinBai (Fri, 13 Jul 2018 03:11:14 GMT):
Has left the channel.

praveentalari (Fri, 13 Jul 2018 04:52:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zJ2qdChGBnLAivKf6) @troyronda seeing "viperutil Unmarshal JSON" I thought this is definitely related to Go code

swetha (Fri, 13 Jul 2018 21:41:37 GMT):
Hello! I have a question in terms of initializing the fabsdk and customizing it using the Options functions. Is that not a feature we should be using? If I understand correctly Option is a function that takes in `*fabsdk.options` as a parameter, but that is an unexported struct.

troyronda (Sat, 14 Jul 2018 00:37:12 GMT):
@swetha you should be using the Options functions. fabsdk.options does not need to be exported to use them.

troyronda (Sat, 14 Jul 2018 00:37:41 GMT):
the sdk initialization passed the options type into the func when it calls it.

swetha (Sat, 14 Jul 2018 01:09:11 GMT):
@troyronda, we can't create a function that takes that type in though

swetha (Sat, 14 Jul 2018 01:09:11 GMT):
@troyronda, we can't create a function that takes that type in though

troyronda (Sat, 14 Jul 2018 11:48:43 GMT):
@swetha the options functions are already provided in the package - what functionality is missing for you?

troyronda (Sat, 14 Jul 2018 11:52:20 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#Option

troyronda (Sat, 14 Jul 2018 11:52:39 GMT):
You can use any of these functions

swetha (Sat, 14 Jul 2018 16:12:22 GMT):
@troyronda, thanks! Sorry I misunderstood what those functions were there for. They will solve my problem

maksimfedin (Mon, 16 Jul 2018 05:54:17 GMT):
Has joined the channel.

xixuejia (Mon, 16 Jul 2018 08:20:06 GMT):
Has joined the channel.

tfls08 (Mon, 16 Jul 2018 09:06:11 GMT):
Has joined the channel.

titasp (Mon, 16 Jul 2018 13:02:37 GMT):
Has joined the channel.

Kyroy (Mon, 16 Jul 2018 15:02:05 GMT):
```[FAB-11063] default peer and orderer config - default peer and orderer config to define common grpc and other options between all config peers and orderers. - if mapped host in entity matcher is missing, then options will be derived from default peer and orderer configs. - any missing values in mapped hosts will be taken from default peer and orderer configs //TODO : peerconfig and ordererconfig search by unmatched URL to return default peer and orderer with search key as URL``` When is this TODO implemented? It is really critical for getting endorsements, right?

troyronda (Mon, 16 Jul 2018 15:36:51 GMT):
@sudeshrshetty is working on it now

troyronda (Mon, 16 Jul 2018 15:37:08 GMT):
perhaps he has an update?

yacovm (Mon, 16 Jul 2018 15:51:29 GMT):
@troyronda @bstasyszyn heads up - https://gerrit.hyperledger.org/r/#/c/24031/ has been merged, and as a result the constructor now has an additional parameter - max number of signatures to cache.

sudeshrshetty (Mon, 16 Jul 2018 17:11:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hpWo5foCCfLLHB3T8) @Kyroy it is inprogress, will be pushed shortly

sudeshrshetty (Mon, 16 Jul 2018 17:11:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hpWo5foCCfLLHB3T8) @Kyroy it is inprogress, will be pushed shortly https://gerrit.hyperledger.org/r/#/c/24411/

huy.tranibm (Mon, 16 Jul 2018 19:18:40 GMT):
Hello team, im fairly new to the go sdk but i have experiences in node and java sdk. I've noticed that channel.Request has chaincodeID, but no way of specifying chaincode version. Is this intended and the request will automatically invoke/execute the latest chaincode?

huy.tranibm (Mon, 16 Jul 2018 19:19:36 GMT):
thanks, just trying to understand this sdk better

Russ.corsha (Mon, 16 Jul 2018 20:22:11 GMT):
Has joined the channel.

Russ.corsha (Mon, 16 Jul 2018 20:22:28 GMT):
Hey Guys, I'm new to Chaincode dev. I'm currently using `fabric-sdk-go`. I need a way to call `invoke` or `query` without storing the private key in a file. I currently have the privatekey in a variable and I do not want to store it locally before an invoke call. Is this possible? If its helpful, these paths are where invoke expects my keys: ``` // The fabric user private key is saved to the following file: // /crypto-config/allorgs/omitted/@omitted/msp/keystore/_sk // The fabric user public key is saved to the following path: // /crypto-config/allorgs/omitted/@omitted/msp/signcerts/@omitted-cert.pem ```

Russ.corsha (Mon, 16 Jul 2018 20:22:28 GMT):
Hey Guys, I'm new to Chaincode dev. I'm currently using `fabric-sdk-go`. I need a way to call `invoke` or `query` without storing the private key *in the filesystem*. I currently have the privatekey in a variable and I do not want to store it locally before an invoke call. Is this possible? If its helpful, these paths are where invoke expects my keys: ``` // The fabric user private key is saved to the following file: // /crypto-config/allorgs/omitted/@omitted/msp/keystore/_sk // The fabric user public key is saved to the following path: // /crypto-config/allorgs/omitted/@omitted/msp/signcerts/@omitted-cert.pem ```

huy.tranibm (Mon, 16 Jul 2018 20:35:20 GMT):
you have to use the users enrollment

Russ.corsha (Mon, 16 Jul 2018 21:07:47 GMT):
could you elaborate @huy.tranibm? I'm not following. Users are already enrolled, and I have their Certificates, but I dont know how to "use the users enrollment" .

huy.tranibm (Mon, 16 Jul 2018 21:12:44 GMT):
ideally in a client application, u shouldn't be storing those certs. a user object has enrollment(priv key and certs). When u register a user, u get back from the ca the privkey/cert, its up to you how you manage those materials

Russ.corsha (Mon, 16 Jul 2018 21:18:35 GMT):
@huy.tranibm I receive the cert, and have it secured in a keystore. Unfortunately the invoke command does not seem to allow me to "manage those materials". It seems to require the certs be stored at a specific location. Here Is the specific file in the repo that forces me to do: https://github.com/hyperledger/fabric-sdk-go/blob/81694dd6232d5b0c9721c1da1e5bdf331f77d15b/pkg/msp/filekeystore.go

Russ.corsha (Mon, 16 Jul 2018 21:18:35 GMT):
@huy.tranibm I receive the cert, and have it secured in a keystore. Unfortunately the invoke command does not seem to allow me to "manage those materials" however I want. It seems to require the certs be stored at a specific location. Here Is the specific file in the repo that forces me to do: https://github.com/hyperledger/fabric-sdk-go/blob/81694dd6232d5b0c9721c1da1e5bdf331f77d15b/pkg/msp/filekeystore.go Also thanks for taking the time to talk to me, its really helpful

Russ.corsha (Mon, 16 Jul 2018 21:18:35 GMT):
@huy.tranibm I receive the cert, and have it secured in a keystore. Unfortunately the invoke command does not seem to allow me to "manage those materials" however I want. It seems to require the certs be stored at a specific location. Here Is the specific file in the repo that forces me to use those filepaths: https://github.com/hyperledger/fabric-sdk-go/blob/81694dd6232d5b0c9721c1da1e5bdf331f77d15b/pkg/msp/filekeystore.go Also thanks for taking the time to talk to me, its really helpful

pgarneau (Mon, 16 Jul 2018 21:39:08 GMT):
Has joined the channel.

pgarneau (Mon, 16 Jul 2018 21:40:49 GMT):
Hey everyone, recently got started with Fabric and Fabric-sdk-go and I have a 4 organization / 1 channel network going. I tested my network using the cli and everything worked correctly and I'm now working on a client that uses fabric-sdk-go. For some reason, when I query my ledger, I'

pgarneau (Mon, 16 Jul 2018 21:40:49 GMT):
Hey everyone, recently got started with Fabric and Fabric-sdk-go and I have a 4 organization / 1 channel network going. I tested my network using the cli and everything worked correctly and I'm now working on a client that uses fabric-sdk-go. For some reason, when I query my ledger, I'll sometimes get an error code (11) where the sdk cannot find a suitable endorsement for my query, but it works 90% of the time. Any ideas what's causing this flakyness?

pgarneau (Tue, 17 Jul 2018 12:32:40 GMT):
This is the exact error message I'm getting: `Failed to query: Failed to get endorsing peers: Discovery status Code: (11) UNKNOWN. Description: error getting endorsers: no endorsement combination can be satisfied`. The weird thing, is that this error doesn't happen all the time. Could it be certain connections within the network timing out?

Kyroy (Tue, 17 Jul 2018 14:54:05 GMT):
Can I somehow get the txID before the tx is commited to the peer? And afterwards get notified before it is send to the orderer?

troyronda (Tue, 17 Jul 2018 14:56:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YNu5xqdicJmhiGLFm) @Kyroy You can create invocation handlers to customize the logic.

troyronda (Tue, 17 Jul 2018 14:56:47 GMT):
The defaults are here: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go

troyronda (Tue, 17 Jul 2018 14:57:29 GMT):
You can then pass your customized handler chain into the client using this func: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Client.InvokeHandler

troyronda (Tue, 17 Jul 2018 14:58:07 GMT):
btw - Execute and Query do the same. e.g., https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/chclient.go#L111

troyronda (Tue, 17 Jul 2018 14:58:07 GMT):
btw - Execute and Query do the same under the covers. e.g., https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/chclient.go#L111

Kyroy (Tue, 17 Jul 2018 14:58:33 GMT):
Yes I saw the handler. But I hoped there is an easy way :D

troyronda (Tue, 17 Jul 2018 14:59:33 GMT):
:)

Kyroy (Tue, 17 Jul 2018 14:59:46 GMT):
Because I want to use the sdk implementations and only get notified about the intermediate stept :D

troyronda (Tue, 17 Jul 2018 14:59:52 GMT):
It's likely a good improvement to add additional invocation chains into the SDK but there is only these ones at the moment.

troyronda (Tue, 17 Jul 2018 15:00:23 GMT):
(we also have some customized invocation chains in our own projects)

Kyroy (Tue, 17 Jul 2018 15:01:39 GMT):
Is there some example code? :D

Kyroy (Tue, 17 Jul 2018 15:01:48 GMT):
I am looking for the cleanest way to do this

troyronda (Tue, 17 Jul 2018 15:02:41 GMT):
Only the the existing Query and Execute AFAIK.

Kyroy (Tue, 17 Jul 2018 15:07:21 GMT):
So did you reimplement the channel.Client or did you override some of the functions?

troyronda (Tue, 17 Jul 2018 15:15:02 GMT):
No, we pass a custom invocation handler in.

troyronda (Tue, 17 Jul 2018 15:15:02 GMT):
No we didn't reimplement, we pass a custom invocation handler in.

troyronda (Tue, 17 Jul 2018 15:15:30 GMT):
(when needed for custom behavior)

troyronda (Tue, 17 Jul 2018 15:16:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BWi4Yg3WWdSz7WxZz) @huy.tranibm Yes. FYI: https://github.com/hyperledger/fabric/blob/77c3aa6ce5b0cfba93bfda009095886dbcadff91/core/chaincode/handler.go#L807

Kyroy (Tue, 17 Jul 2018 15:16:51 GMT):
@troyronda How to pass this? :sweat_smile:

troyronda (Tue, 17 Jul 2018 15:17:15 GMT):
@Kyroy first argument of InvokeHandler func

troyronda (Tue, 17 Jul 2018 15:17:16 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Client.InvokeHandler

Kyroy (Tue, 17 Jul 2018 15:18:07 GMT):
Ohhh, oops, thanks :sweat_smile:

pgarneau (Tue, 17 Jul 2018 15:20:20 GMT):
@troyronda Could you take a look at my post earlier?

troyronda (Tue, 17 Jul 2018 15:21:40 GMT):
@pgarneau are you on the latest SDK?

pgarneau (Tue, 17 Jul 2018 15:21:50 GMT):
Im on master, running a Fabric 1.2 network

troyronda (Tue, 17 Jul 2018 15:21:58 GMT):
what commit of SDK?

pgarneau (Tue, 17 Jul 2018 15:22:15 GMT):
did a dep ensure like 30 minutes ago so prolly latest commit, lemme verify

troyronda (Tue, 17 Jul 2018 15:22:37 GMT):
dep ensure -update? :)

pgarneau (Tue, 17 Jul 2018 15:23:24 GMT):
haha nope forgot about that one, but still, I was on master branch from maybe last thursday?

pgarneau (Tue, 17 Jul 2018 15:24:43 GMT):
It's just the flakyness that's bothering me, I tried using the vscode debugger to try and see the path the sdk takes to extract endorsers and I couldn't get any valuable info. Im doing the `dep ensure -update` atm and I'll try it out. Have you seen the error I posted before?

troyronda (Tue, 17 Jul 2018 15:24:54 GMT):
ok.. are you using private data or chaincode to chaincode invocations?

pgarneau (Tue, 17 Jul 2018 15:25:58 GMT):
Not entirely sure I understand the question, but I created a really simply chaincode that puts "world" in the key "hello" and I'm querying that key

pgarneau (Tue, 17 Jul 2018 15:25:58 GMT):
Not entirely sure I understand the question, but I created a really simple chaincode that puts "world" in the key "hello" and I'm querying that key

troyronda (Tue, 17 Jul 2018 15:26:44 GMT):
ok - then you are not :)

troyronda (Tue, 17 Jul 2018 15:26:52 GMT):
btw private data means this: https://hyperledger-fabric.readthedocs.io/en/release-1.2/private_data_tutorial.html#pd-store-private-data

troyronda (Tue, 17 Jul 2018 15:26:52 GMT):
btw private data means this: https://hyperledger-fabric.readthedocs.io/en/release-1.2/private_data_tutorial.html

troyronda (Tue, 17 Jul 2018 15:26:52 GMT):
btw private data means this: https://hyperledger-fabric.readthedocs.io/en/release-1.2/private-data/private-data.html / https://hyperledger-fabric.readthedocs.io/en/release-1.2/private_data_tutorial.html

troyronda (Tue, 17 Jul 2018 15:29:18 GMT):
So the SDK uses the Fabric Peer's service discovery to select peers for endorsement. If a peer or network is flaky, then you can get these errors if that peer is needed to satisfy your endorsement policy.

troyronda (Tue, 17 Jul 2018 15:29:48 GMT):
but it's pretty hard to say just from an error message, of course.

pgarneau (Tue, 17 Jul 2018 15:30:06 GMT):
Thing is, I have a total of 8 peers running and I'm using a "SignedByAnyPeer" from 4 organizations. I don't get how it can be that flaky

pgarneau (Tue, 17 Jul 2018 15:30:39 GMT):
Works well maybe 60-70% of the time

troyronda (Tue, 17 Jul 2018 15:31:35 GMT):
@bstasyszyn might have more thoughts

pgarneau (Tue, 17 Jul 2018 15:32:28 GMT):
Also when I check the logs form my orderer and my peers, nothing shows up when the SDK fails

pgarneau (Tue, 17 Jul 2018 15:34:47 GMT):
Is it normal that chaincode instantiates and queries launch random peer chaincodes btw? @troyronda

pgarneau (Tue, 17 Jul 2018 15:42:07 GMT):
@troyronda I downsized my SDK config to 2orgs with 2 peers each and it is much more stable. Could it be an issue with timeouts because my computer is having a hard time managing 8 peers?

troyronda (Tue, 17 Jul 2018 15:46:14 GMT):
@pgarneau it can take sometime for chaincode to build when being used for the first time on a peer.

troyronda (Tue, 17 Jul 2018 15:47:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sWsd6oZPHgKdqa5mH) @pgarneau Yes in the default case, the SDK uses whichever peer satisfies the endorsement policy

troyronda (Tue, 17 Jul 2018 15:48:09 GMT):
This can be overridden if you pass an explicit list of peers into the client.

pgarneau (Tue, 17 Jul 2018 15:50:47 GMT):
Thing is, when I was running 8 peers, at some point I had all 8 chaincode containers running and I was still running into my issue so it doesn't seem to be related to the time it takes to init a new chaincode container

troyronda (Tue, 17 Jul 2018 16:04:58 GMT):
@pgarneau it can also take sometime for the discovery information to propagate between the peers after startup.

troyronda (Tue, 17 Jul 2018 16:04:58 GMT):
@pgarneau it can also take some time for the discovery information to propagate between the peers after startup.

pgarneau (Tue, 17 Jul 2018 16:06:01 GMT):
@troyronda This is a SS of 11 queries. This is with 6 peers from different orgs. https://imgur.com/aXw46at As soon as I go over 4 peers, I start to get issues

pgarneau (Tue, 17 Jul 2018 16:07:43 GMT):
And this is my `docker ps` after those 11 queries https://imgur.com/3mI5Tbn

troyronda (Tue, 17 Jul 2018 16:08:31 GMT):
so only 4 peers have started the chaincode

pgarneau (Tue, 17 Jul 2018 16:08:57 GMT):
If I keep querying, should start more

troyronda (Tue, 17 Jul 2018 16:09:44 GMT):
Maybe try waiting after instantiating the chaincode before attempting the queries

pgarneau (Tue, 17 Jul 2018 16:10:18 GMT):
Queries done 10+ minutes after initial instantiation can generate the same error message

pgarneau (Tue, 17 Jul 2018 16:12:03 GMT):
My chaincode policy: `chaincodePolicy := cauthdsl.SignedByAnyMember([]string{"RukaStoreMSP", "DynaFreshMSP", "MountainPulpMSP"})`

troyronda (Tue, 17 Jul 2018 16:12:16 GMT):
do you have gossip bootstrap set in your peers? https://github.com/hyperledger/fabric/blob/release-1.2/sampleconfig/core.yaml#L136

pgarneau (Tue, 17 Jul 2018 16:13:48 GMT):
Only in the second peers of my orgs: https://imgur.com/YpZW1gI

huy.tranibm (Tue, 17 Jul 2018 16:17:11 GMT):
np

Russ.corsha (Tue, 17 Jul 2018 16:22:18 GMT):
@pgarneau Im no expert, but from what I'm seeing this error tends to come up when a channel is attempted to be made b4 the peer is ready. (Alot of people seem to jump on the chaincode isnt initialized yet but you seem to have that covered) . I suggest 1) taking a look at ports, like in this stack overflow https://stackoverflow.com/questions/45453405/unable-to-connect-peer-to-channel-in-hyperledger-fabric 2) or maybe its a concurrency issue where you are bombarding the peers with requests and you cpu has to handle all the chaincode running at the same time. Maybe slow down ur testing?

Russ.corsha (Tue, 17 Jul 2018 16:22:18 GMT):
@pgarneau Im no expert, but from what I'm seeing this error tends to come up when a channel is attempted to be made b4 the peer is ready or even exists. (Alot of people seem to jump on the chaincode isnt initialized yet but you seem to have that covered) . I suggest 1) taking a look at ports, like in this stack overflow https://stackoverflow.com/questions/45453405/unable-to-connect-peer-to-channel-in-hyperledger-fabric 2) or maybe its a concurrency issue where you are bombarding the peers with requests and you cpu has to handle all the chaincode running at the same time. Maybe slow down ur testing?

pgarneau (Tue, 17 Jul 2018 16:24:27 GMT):
@Russ.corsha I think it's more related to point #2, but I'm initiating queries through a rest API so the queries are coming as slowly as I want. Even when taking my time, I can get the error. But it is weird that I only get that error once I go to 3+ orgs with 6+ peers

pgarneau (Tue, 17 Jul 2018 16:25:42 GMT):
I also made sure I could run my network with the CLI first. I made sure it worked with CLI before attempting to convert it to SDK

troyronda (Tue, 17 Jul 2018 16:26:54 GMT):
@pgarneau do you have anchor peers set in your channel block config?

troyronda (Tue, 17 Jul 2018 16:27:27 GMT):
https://github.com/hyperledger/fabric/blob/release-1.2/sampleconfig/configtx.yaml#L52

pgarneau (Tue, 17 Jul 2018 16:27:42 GMT):
@troyronda yes https://imgur.com/wYdIbqN

Russ.corsha (Tue, 17 Jul 2018 16:28:56 GMT):
Its a longshot, but how many peers are you hitting when asking for endorsements? If one of the org ips your requesting has a typo, it could be as simple as you dont get enough endorsements when you hit the bad org's peers. That would cause it to only fail once in a while.

Russ.corsha (Tue, 17 Jul 2018 16:28:56 GMT):
Its a longshot, but how many peers are you hitting when asking for endorsements? If one of the org ips your requesting has a typo, it could be as simple as you dont get enough endorsements when you hit the bad org's peers. That would cause it to only fail once in a while.

pgarneau (Tue, 17 Jul 2018 16:29:33 GMT):
@Russ.corsha I'm not entirely sure how many I'm hitting, but I'm guessing that I'm hitting a single one because of my chaincodePolicy

pgarneau (Tue, 17 Jul 2018 16:30:21 GMT):
I also kept querying till all 8 peer chaincodes where instantiated and I was still getting the error. Considering they instantiated, I'm guessing their IPs are good

pgarneau (Tue, 17 Jul 2018 16:30:21 GMT):
I also kept querying till all 8 peer chaincodes were instantiated and I was still getting the error. Considering they instantiated, I'm guessing their IPs are good

pgarneau (Tue, 17 Jul 2018 16:33:42 GMT):
I dont fully understand how the endorsers are fetched by the SDK, but maybe a retry mechanic could be useful ?

troyronda (Tue, 17 Jul 2018 16:42:37 GMT):
@pgarneau it has a retry mechanism

troyronda (Tue, 17 Jul 2018 16:45:47 GMT):
do the debug logs show anything?

pgarneau (Tue, 17 Jul 2018 16:47:41 GMT):
Nothing shows up on peers / orderer

troyronda (Tue, 17 Jul 2018 16:47:50 GMT):
and SDK?

pgarneau (Tue, 17 Jul 2018 16:48:03 GMT):
Only the error message you saw earlier

troyronda (Tue, 17 Jul 2018 16:48:21 GMT):
no debug messages?

pgarneau (Tue, 17 Jul 2018 16:49:17 GMT):
Can I increase the log level in `config.yaml` ?

troyronda (Tue, 17 Jul 2018 16:50:10 GMT):
yes. https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L28

troyronda (Tue, 17 Jul 2018 16:50:13 GMT):
set to debug

pgarneau (Tue, 17 Jul 2018 16:50:58 GMT):
Gimme a sec, relaunching network with 3 orgs again with debug leve

pgarneau (Tue, 17 Jul 2018 16:53:22 GMT):
@troyronda Could this be culprit? ``` [fabsdk/fab] 2018/07/17 16:53:06 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer0.mountainpulp.com:7051] did not match using matcher [(\w*)peer0.rukastore.com(\w*)] [fabsdk/fab] 2018/07/17 16:53:06 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer0.mountainpulp.com:7051] did not match using matcher [(\w*)peer1.rukastore.com(\w*)] [fabsdk/fab] 2018/07/17 16:53:06 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer0.mountainpulp.com:7051] did not match using matcher [(\w*)peer0.dynafresh.com(\w*)] [fabsdk/fab] 2018/07/17 16:53:06 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer0.mountainpulp.com:7051] did not match using matcher [(\w*)peer1.dynafresh.com(\w*)] [fabsdk/client] 2018/07/17 16:53:06 UTC - dynamicdiscovery.asPeers -> DEBU Adding endpoint [peer1.mountainpulp.com:7051] [fabsdk/fab] 2018/07/17 16:53:06 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer1.mountainpulp.com:7051] did not match using matcher [(\w*)peer0.rukastore.com(\w*)] [fabsdk/fab] 2018/07/17 16:53:06 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer1.mountainpulp.com:7051] did not match using matcher [(\w*)peer1.rukastore.com(\w*)] [fabsdk/fab] 2018/07/17 16:53:06 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer1.mountainpulp.com:7051] did not match using matcher [(\w*)peer0.dynafresh.com(\w*)] [fabsdk/fab] 2018/07/17 16:53:06 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer1.mountainpulp.com:7051] did not match using matcher [(\w*)peer1.dynafresh.com(\w*)] [fabsdk/fab] 2018/07/17 16:53:06 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer1.mountainpulp.com:7051] did not match using matcher [(\w*)peer0.mountainpulp.com(\w*)] ```

pgarneau (Tue, 17 Jul 2018 16:53:22 GMT):
@troyronda Could this be culprit? ``` [fabsdk/fab] 2018/07/17 16:53:41 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer0.mountainpulp.com:7051] did not match using matcher [(\w*)peer0.rukastore.com(\w*)] [fabsdk/fab] 2018/07/17 16:53:41 UTC - fab.(*EndpointConfig).tryMatchingPeerConfig -> DEBU Peer [peer0.mountainpulp.com:7051] did not match using matcher [(\w*)peer1.rukastore.com(\w*)] ```

troyronda (Tue, 17 Jul 2018 16:54:09 GMT):
do you have the peer explicitly defined in your config.yaml?

pgarneau (Tue, 17 Jul 2018 16:54:15 GMT):
Yes

troyronda (Tue, 17 Jul 2018 16:54:17 GMT):
then no

troyronda (Tue, 17 Jul 2018 16:54:32 GMT):
Matchers are for matching a regular expression to a peer config.

troyronda (Tue, 17 Jul 2018 16:54:32 GMT):
Matchers are for matching a regular expression peer name/url to a peer config.

troyronda (Tue, 17 Jul 2018 16:55:23 GMT):
you should see some debug statements right before the error?

pgarneau (Tue, 17 Jul 2018 16:56:35 GMT):
Im trying to get the error atm

pgarneau (Tue, 17 Jul 2018 16:56:37 GMT):
not happening

pgarneau (Tue, 17 Jul 2018 16:56:42 GMT):
there just got it

pgarneau (Tue, 17 Jul 2018 16:57:46 GMT):
lost the logs.. gimme a sec

pgarneau (Tue, 17 Jul 2018 17:01:22 GMT):
@troyronda can I PM you the log? This thing is big

troyronda (Tue, 17 Jul 2018 17:01:45 GMT):
ok

louisliu2048 (Wed, 18 Jul 2018 02:19:35 GMT):
Has joined the channel.

yulong12 (Wed, 18 Jul 2018 08:09:32 GMT):
Hi everyone. I wan to ask a question.where is the fabric-ca'tlsCacerts in byfn? In the fabric-sdk-go test config,it is in ``` path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabricca/tls/certs/ca_root.pem ``` but I don't know in byfn?

yulong12 (Wed, 18 Jul 2018 08:11:22 GMT):
who can help me?

qubing (Wed, 18 Jul 2018 16:12:54 GMT):
Has joined the channel.

huy.tranibm (Wed, 18 Jul 2018 18:53:19 GMT):
check your cypto dir

yulong12 (Thu, 19 Jul 2018 01:51:22 GMT):
@huy.tranibm I know in cryto dir,but I don't know which is the correct? I try some cert, but is appears```` Unable to initialize the Fabric SDK: failed to create SDK: failed to initialize configuration: unable to load config backend: loading config file failed: While parsing config: yaml: line 164: did not find expected key ``` `and my config.yaml's164 line is ``` certificateAuthorities: - ca0-org1.1530081632652.svc.cluster.local ```

yulong12 (Thu, 19 Jul 2018 08:11:41 GMT):
Hi everyone.when I use `go build `command,there appears:``` ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking. ```

yulong12 (Thu, 19 Jul 2018 08:11:58 GMT):
How can I solve it?

Rachit_gaur (Thu, 19 Jul 2018 12:04:20 GMT):
Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response: payload:"\n X\242\350j\220\2708u\003Q\3710\032\276n_\3222\026\245\252m\301>\371]\337:\201\010A|\022Y\nE\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\003\022-\n\004mycc\022%\n\007\n\001a\022\002\010\003\n\007\n\001b\022\002\010\003\032\007\n\001a\032\00290\032\010\n\001b\032\003210\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement: Can someone help me resolve this error?

pgarneau (Thu, 19 Jul 2018 12:22:01 GMT):
I was getting this error when I had an error in my Fabric network configuration. I had the setting `EnableNodeOUs: true` set to `EnableNodeOUS: true` in one of the orgs / peers that was included in the chaincode policy

troyronda (Thu, 19 Jul 2018 14:50:08 GMT):
@yulong12 this appears to be an issue with Go on Mac: https://github.com/golang/go/issues/26073

troyronda (Thu, 19 Jul 2018 14:50:08 GMT):
@yulong12 this appears to be an issue with Go on Mac (for the crypto/x509 package, which we use): https://github.com/golang/go/issues/26073

troyronda (Thu, 19 Jul 2018 14:50:08 GMT):
@yulong12 this appears to be a warning with Go on Mac (for the crypto/x509 package, which we use): https://github.com/golang/go/issues/26073

troyronda (Thu, 19 Jul 2018 14:50:08 GMT):
@yulong12 this appears to be a warning with Go on Mac for the crypto/x509 package (which we use in the SDK): https://github.com/golang/go/issues/26073

pgarneau (Thu, 19 Jul 2018 18:43:12 GMT):
@troyronda Are there any special procedures required to instantiate a couchDB enabled chaincode from the go sdk? My instantiate command starts my `hyperledger/fabric-ccenv` container, but it hangs there while my CPU usage goes through the roof. Any tips? Thanks

troyronda (Thu, 19 Jul 2018 18:46:31 GMT):
@pgarneau one reason this happens is that Fabric is building a chaincode image containing the compiled binary from the Go source code that was "installed". This isn't specific to CouchDB though.

troyronda (Thu, 19 Jul 2018 18:47:13 GMT):
(or the SDK)

pgarneau (Thu, 19 Jul 2018 18:47:27 GMT):
Yeah but it hangs there forever, it never finshes and the sdk ends up timing out its request. ``` Unable to install and instantiate CC: Failed to instantiate chaincode: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:8051]: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded panic: runtime error: invalid memory address or nil pointer dereference ```

troyronda (Thu, 19 Jul 2018 18:48:00 GMT):
yup - so when you try this one a single box with a lot of peers, the box struggles to build all these chaincodes.

pgarneau (Thu, 19 Jul 2018 18:48:28 GMT):
Reduced my number of peers to 2 to test that theory

troyronda (Thu, 19 Jul 2018 18:48:38 GMT):
In some of our CI tests, we "warm up" the CC by triggering builds more slowly :).

troyronda (Thu, 19 Jul 2018 18:48:38 GMT):
In some of our internalmCI tests, we "warm up" the CC by triggering builds more slowly :).

troyronda (Thu, 19 Jul 2018 18:48:38 GMT):
In some of our internal CI tests, we "warm up" the CC by triggering builds more slowly :).

troyronda (Thu, 19 Jul 2018 18:48:51 GMT):
(i.e., calling peers one at a time)

pgarneau (Thu, 19 Jul 2018 18:49:12 GMT):
hmm so if my install is successful, then I should possibly try to give the instantiate more time?

troyronda (Thu, 19 Jul 2018 18:49:24 GMT):
you can increase the timeouts.

troyronda (Thu, 19 Jul 2018 18:49:58 GMT):
you may have to increase the timeouts on the peer's core.yaml too

troyronda (Thu, 19 Jul 2018 18:50:19 GMT):
also make sure you are giving your docker daemon lots of RAM and CPUs.

troyronda (Thu, 19 Jul 2018 18:50:30 GMT):
The defaults don't work well in this situation.

pgarneau (Thu, 19 Jul 2018 18:52:38 GMT):
Ill try and bump up the RAM and CPU

pgarneau (Thu, 19 Jul 2018 18:52:43 GMT):
and keep scaling down till it works

pgarneau (Thu, 19 Jul 2018 18:53:41 GMT):
This is going on a beefy compute engine later, but want to try and get it to work locally first

troyronda (Thu, 19 Jul 2018 18:53:56 GMT):
cool.

troyronda (Thu, 19 Jul 2018 18:54:46 GMT):
as a side-note, in the SDK CI tests, I mocked out ccenv to enable faster tests since we install many CCs and policies :P.

troyronda (Thu, 19 Jul 2018 18:54:55 GMT):
obviously not a good idea outside tests.

pgarneau (Thu, 19 Jul 2018 18:55:01 GMT):
haha :P

pgarneau (Thu, 19 Jul 2018 18:55:41 GMT):
wow ok @troyronda giving it more ram, it spawned immediately

troyronda (Thu, 19 Jul 2018 18:55:54 GMT):
yup :)

pgarneau (Thu, 19 Jul 2018 18:55:55 GMT):
gave it 6gigs instead of 2

troyronda (Thu, 19 Jul 2018 18:55:58 GMT):
been there ;)

pgarneau (Thu, 19 Jul 2018 18:56:16 GMT):
glad its not some other config issue FeelsGoodMan

pgarneau (Thu, 19 Jul 2018 20:18:00 GMT):
@troyronda Does using couchdb change the way ChaincodeEvents are created / generated?

pgarneau (Thu, 19 Jul 2018 20:18:56 GMT):
I can successfully query / invoke my chaincode with correct data while using couchdb, however the part of my client that verifies that a chaincode event was received is not working anymore

troyronda (Thu, 19 Jul 2018 20:19:43 GMT):
@pgarneau I'm not aware of CouchDB changing chaincode events behavior.

troyronda (Thu, 19 Jul 2018 20:20:07 GMT):
I assume your chaincodes are not taking a long time to run?

pgarneau (Thu, 19 Jul 2018 20:20:16 GMT):
Nope, working very well

troyronda (Thu, 19 Jul 2018 20:20:36 GMT):
odd :(.

pgarneau (Thu, 19 Jul 2018 20:22:15 GMT):
on my fabric containers, where could I possibly see this event being triggered? Orderer?

pgarneau (Thu, 19 Jul 2018 20:23:18 GMT):
Im re-enabling debug level logging to see if maybe something pops up

troyronda (Thu, 19 Jul 2018 20:23:23 GMT):
chaincode events come from the peers

troyronda (Thu, 19 Jul 2018 20:23:46 GMT):
(after they commit the transactions received from the orderer)

Russ.corsha (Thu, 19 Jul 2018 20:27:39 GMT):
@pgarneau ur only running one event a chaincode invoke call right?

Russ.corsha (Thu, 19 Jul 2018 20:28:05 GMT):
also if you return shim.error, events dont run.

Russ.corsha (Thu, 19 Jul 2018 20:28:05 GMT):
also if you return shim.error, events dont get sent

pgarneau (Thu, 19 Jul 2018 20:29:32 GMT):
well i'm returning shim.Success with data in it

pgarneau (Thu, 19 Jul 2018 20:30:17 GMT):
and from the debug logs, I'm getting: ``` [fabsdk/fab] 2018/07/19 20:26:30 UTC - dispatcher.(*Dispatcher).publishFilteredBlockEvents -> DEBU Publishing filtered block event: &peer.FilteredBlock{ChannelId:"firstchannel", Number:0x7, FilteredTransactions:[]*peer.FilteredTransaction{(*peer.FilteredTransaction)(0xc4203ab800)}} [fabsdk/fab] 2018/07/19 20:26:30 UTC - dispatcher.(*Dispatcher).publishTxStatusEvents -> DEBU Publishing Tx Status event for TxID [dcfcc8996c32758d5228428f9c213590ea91d53f3a6508b24485914a9444b43e]... [fabsdk/fab] 2018/07/19 20:26:30 UTC - dispatcher.(*Dispatcher).publishTxStatusEvents -> DEBU Sending Tx Status event for TxID [dcfcc8996c32758d5228428f9c213590ea91d53f3a6508b24485914a9444b43e] to registrant... ```

pgarneau (Thu, 19 Jul 2018 20:30:38 GMT):
so looks like its sending an event?

pgarneau (Thu, 19 Jul 2018 20:34:46 GMT):
Actually more interesting logs: ``` [fabsdk/fab] 2018/07/19 20:26:30 UTC - dispatcher.(*Dispatcher).Start.func1 -> DEBU Listening for events... [fabsdk/fab] 2018/07/19 20:26:30 UTC - dispatcher.(*Dispatcher).Start.func1 -> DEBU Received event: *dispatcher.UnregisterEvent [fabsdk/fab] 2018/07/19 20:26:30 UTC - dispatcher.(*Dispatcher).Start.func1 -> DEBU Dispatching event: *dispatcher.UnregisterEvent [fabsdk/fab] 2018/07/19 20:26:30 UTC - dispatcher.(*Dispatcher).unregisterTXEvents -> DEBU Unregistering Tx Status event for TxID [dcfcc8996c32758d5228428f9c213590ea91d53f3a6508b24485914a9444b43e]... ```

pgarneau (Thu, 19 Jul 2018 20:35:35 GMT):
Unregister event is supposed to be defered and looks like it's happening before I starting reading from a created channel

pgarneau (Thu, 19 Jul 2018 20:35:35 GMT):
Unregister event is supposed to be defered and looks like it's happening before I starting reading from a created golang channel

troyronda (Thu, 19 Jul 2018 20:36:34 GMT):
Any chance you are calling Close on the client prematurely?

pgarneau (Thu, 19 Jul 2018 20:36:54 GMT):
possibly, but I wouldn't know how / why

pgarneau (Thu, 19 Jul 2018 20:37:20 GMT):
This is the piece of code that does the invoke: ``` reg, notifier, err := bc.Event.RegisterChaincodeEvent(bc.Config.ChainCodeID, eventID) if err != nil { return "", "", err } defer bc.Event.Unregister(reg) // Create a request (proposal) and send it fmt.Println("Asking the chaincode...") response, err := bc.Client.Execute(channel.Request{ChaincodeID: bc.Config.ChainCodeID, Fcn: args[0], Args: [][]byte{[]byte(args[1]), []byte(args[2]), []byte(args[3])}, TransientMap: transientDataMap}) if err != nil { return "", "", fmt.Errorf("failed to move funds: %v", err) } fmt.Println("Got an answer from the chaincode...") fmt.Println("Response payload: " + string(response.Payload)) // Wait for the result of the submission select { case ccEvent := <-notifier: fmt.Printf("Received CC event: %v\n", ccEvent) case <-time.After(time.Second * 20): fmt.Println("event error") return "", "", fmt.Errorf("did NOT receive CC event for eventId(%s)", eventID) } ```

pgarneau (Thu, 19 Jul 2018 20:37:58 GMT):
So right after that `Println("response payload: " + string(response.Payload))`, it's unregistering

troyronda (Thu, 19 Jul 2018 20:38:55 GMT):
sdk.Close()

pgarneau (Thu, 19 Jul 2018 20:39:34 GMT):
Not called anywhere

troyronda (Thu, 19 Jul 2018 20:40:40 GMT):
TX Status events != Chaincode Events

pgarneau (Thu, 19 Jul 2018 20:41:03 GMT):
Mkay

troyronda (Thu, 19 Jul 2018 20:41:28 GMT):
chaincode events are set by your chaincode code.

troyronda (Thu, 19 Jul 2018 20:43:18 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/event provides a more extensive event client

troyronda (Thu, 19 Jul 2018 20:43:18 GMT):
FYI: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/event provides a more extensive event client

pgarneau (Thu, 19 Jul 2018 20:43:52 GMT):
Found my issue

troyronda (Thu, 19 Jul 2018 20:43:55 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel listens for TX status itself.

troyronda (Thu, 19 Jul 2018 20:44:02 GMT):
ah cool. what was it?

pgarneau (Thu, 19 Jul 2018 20:44:31 GMT):
Upgrading my chaincode to couchdb, I remove 2 lines that were triggering the event. My bad :P

pgarneau (Thu, 19 Jul 2018 20:44:31 GMT):
Upgrading my chaincode to couchdb, I removed 2 lines that were triggering the event. My bad :P

troyronda (Thu, 19 Jul 2018 20:44:37 GMT):
hah. nice.

pgarneau (Thu, 19 Jul 2018 20:44:59 GMT):
git blame -> only me :(

Russ.corsha (Thu, 19 Jul 2018 20:46:58 GMT):
https://github.com/jayphelps/git-blame-someone-else

yacovm (Thu, 19 Jul 2018 21:25:10 GMT):
https://gerrit.hyperledger.org/r/#/c/24593/ FYI

troyronda (Thu, 19 Jul 2018 21:45:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=2NcoPvFCXBqWiQ3T5) @pgarneau FYI - sdk.Close cleans up when you the SDK object is no longer needed (e.g., caches and connections).

troyronda (Thu, 19 Jul 2018 21:46:17 GMT):
https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#FabricSDK.Close

troyronda (Thu, 19 Jul 2018 21:48:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kMGFAaSR9gkxyvstM) @yacovm nice. this SDK already defaults to delivery client and abstracted the event stream interface... so nice and transparent here :)

troyronda (Thu, 19 Jul 2018 21:48:59 GMT):
it will be nice to have the peer not have that extra endpoint :)

yacovm (Thu, 19 Jul 2018 21:49:25 GMT):
One of the biggest architectural mistakes, if you ask me...

yacovm (Thu, 19 Jul 2018 21:49:25 GMT):
One of the biggest architectural and implementation wise mistakes, if you ask me...

david8 (Fri, 20 Jul 2018 01:44:40 GMT):
Has joined the channel.

david8 (Fri, 20 Jul 2018 01:48:10 GMT):
is there a doc for java/go sdk ?

pandagopal (Fri, 20 Jul 2018 05:15:17 GMT):
Has joined the channel.

yulong12 (Fri, 20 Jul 2018 08:55:09 GMT):
Hi everyone. I have a problem . when I go run main.go.there appears :``` [fabsdk/fab] 2018/07/20 08:37:54 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [mychannel] creator org [Org1MSP]] Failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (2) Unknown. Description: access denied: channel [mychannel] creator org [Org1MSP] [fabsdk/fab] 2018/07/20 08:37:54 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [mychannel] creator org [Org1MSP]] [fabsdk/util] 2018/07/20 08:37:54 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (2) Unknown. Description: access denied: channel [mychannel] creator org [Org1MSP]. Will retry again later panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x4474f83] goroutine 1 [running]: github.com/hyperledger/fabric-sdk-go/pkg/client/channel.(*Client).Query(0x0, 0x4735285, 0x4, 0x4736347, 0x6, 0xc4203a62d0, 0x2, 0x2, 0x0, 0x0, ...) /Users/jiangnan/Documents/GOPATH/src/github.com/hyperledger/fabric-sdk-go/pkg/client/channel/chclient.go:99 +0xc3 main.main() /Users/jiangnan/Documents/GOPATH/src/github.com/hyperledger/gotest/main.go:41 +0x494 exit status 2 ~/Documents/GOPATH/src/github.com/hyperledger/gotest$ ```

yulong12 (Fri, 20 Jul 2018 08:55:32 GMT):
my main.go is ``` package main import ( "fmt" "time" "github.com/hyperledger/fabric-sdk-go/pkg/client/channel" "github.com/hyperledger/fabric-sdk-go/pkg/core/config" "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk" ) const ( channelID = "mychannel" orgName = "Org1" orgAdmin = "Admin" //ordererOrgName = "Orderer" ccID = "mycc" ) func main() { configPath := "./config2.yaml" configOpt := config.FromFile(configPath) sdk, err := fabsdk.New(configOpt) if err != nil { fmt.Println("Failed to create new SDK: %s", err) } defer sdk.Close() org1ChannelClientContext := sdk.ChannelContext(channelID, fabsdk.WithUser("Admin"), fabsdk.WithOrg("Org1")) channelClient, err := channel.New(org1ChannelClientContext) if err != nil { fmt.Printf("Failed to create new channel client: %s\n", err) } var args = [][]byte{[]byte("query"), []byte("a"), } res, err := channelClient.Query(channel.Request{ ChaincodeID: ccID, Fcn: "Invoke", Args: args, }) if err != nil { fmt.Printf("Failed to query: %s\n", err) } fmt.Println(string(res.Payload)) ```

yulong12 (Fri, 20 Jul 2018 08:56:04 GMT):
so who can help me how can I do?

pgarneau (Fri, 20 Jul 2018 12:08:41 GMT):
Your chaincode installed and instantiated?

sean (Sat, 21 Jul 2018 10:30:20 GMT):
Has joined the channel.

sean (Sun, 22 Jul 2018 19:35:42 GMT):

tx_flow_client.png

sean (Sun, 22 Jul 2018 19:38:45 GMT):

tx_flow_client.png

sean (Sun, 22 Jul 2018 19:44:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6aLBHsJ3fsjb6xQhP) 1) Client Frontend sends transaction data to Client backend (REST, gRPC, websocket, etc.) 2) Client backend sends transaction proposal to endorsing peers (SDK) 3) Peers endorse and send back updated values and sig 4) Client backend checks responses and endorsement policy, sends transaction message to Orderer (SDK) 5) Orderer adds transaction to blocks and sends to Peers (which then validate and add to ledger) 6-7) Client backend sends update to Client frontend for user From Transaction Flow docs [1], but I'm trying to clear up the "Client" setup. [1] https://hyperledger-fabric.readthedocs.io/en/latest/txflow.html

sean (Sun, 22 Jul 2018 19:44:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6aLBHsJ3fsjb6xQhP) 1) Client Frontend sends transaction data to Client backend (REST, gRPC, websocket, etc.) 2) Client backend sends transaction proposal to endorsing peers (SDK) 3) Peers endorse and send back updated values and sig 4) Client backend checks responses and endorsement policy, sends transaction message to Orderer (SDK) 5) Orderer adds transaction to blocks and sends to Peers (which then validate and add to ledger) From Transaction Flow docs [1], but I'm trying to clear up the "Client" setup. [1] https://hyperledger-fabric.readthedocs.io/en/latest/txflow.html

yacovm (Sun, 22 Jul 2018 19:47:31 GMT):
There isn't a client docker image available, from a simple reason

yacovm (Sun, 22 Jul 2018 19:47:55 GMT):
the peer and the orderer are basically naked binaries, running inside their containers, and you don't need to care how they work, or what is inside of the containers

yacovm (Sun, 22 Jul 2018 19:47:59 GMT):
it's like a black box

yacovm (Sun, 22 Jul 2018 19:48:14 GMT):
however - the client, is actually an SDK (most likely... unless it's a CLI)

yacovm (Sun, 22 Jul 2018 19:48:27 GMT):
that SDK can't live on its own, it's embedded in an application that drives business logic

yacovm (Sun, 22 Jul 2018 19:48:39 GMT):
so obviously there is no docker image for the SDK, since it's a library - not a binary

sean (Sun, 22 Jul 2018 19:49:36 GMT):
ah, that makes a lot of sense. I was thinking it would be nice to have a preconfigured one as a sample, but that wouldn't help much, you're right

yacovm (Sun, 22 Jul 2018 19:50:47 GMT):
But keep in mind it's not that simple as it looks... because the production orderer is kafka, which means it uses Zookeeper and Kafka

yacovm (Sun, 22 Jul 2018 19:50:47 GMT):
But keep in mind it's not that simple as it looks... because the production orderer uses kafka, which means it uses Zookeeper and Kafka

yacovm (Sun, 22 Jul 2018 19:51:01 GMT):
so the maintenance, security patching, etc. of these both servers is up to you as a user

yacovm (Sun, 22 Jul 2018 19:51:15 GMT):
There are docker images available, and you can connect to Kafka with TLS, etc.

yacovm (Sun, 22 Jul 2018 19:51:26 GMT):
but it's not really a black box as the peer binary is

sean (Sun, 22 Jul 2018 19:52:11 GMT):
understood, I was simplifying it for the example - I was focused on the client

yacovm (Sun, 22 Jul 2018 19:52:19 GMT):
Hopefully though, in 2019 we'll have a new ordering service that is plug&play ;)

yacovm (Sun, 22 Jul 2018 19:52:29 GMT):
just put batteries and you're all set

sean (Sun, 22 Jul 2018 19:52:59 GMT):
oh wow, that would be nice - using PBFT?

yacovm (Sun, 22 Jul 2018 19:53:17 GMT):
first Raft then PBFT

yacovm (Sun, 22 Jul 2018 19:53:43 GMT):
Raft is using the Raft library of coreos's etcd

sean (Sun, 22 Jul 2018 19:54:37 GMT):
ah, is that the only Go library for that?

yacovm (Sun, 22 Jul 2018 19:54:49 GMT):
no but it's the most battle tested

sean (Sun, 22 Jul 2018 19:55:10 GMT):
looking forward to it

Yuanye (Mon, 23 Jul 2018 03:48:18 GMT):
Has joined the channel.

yulong12 (Mon, 23 Jul 2018 07:06:02 GMT):
Hi every one I have a question.

yulong12 (Mon, 23 Jul 2018 07:06:14 GMT):
``` Failed to invoke: CreateAndSendTransaction failed: SendTransaction failed: calling orderer 'orderer0.1530081632652.svc.cluster.local:32567' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer0.1530081632652.svc.cluster.local:32567] ```

yulong12 (Mon, 23 Jul 2018 07:06:50 GMT):
when I call invoke function, it appears a question

yulong12 (Mon, 23 Jul 2018 07:06:59 GMT):
so who can help me?

GopalPanda (Mon, 23 Jul 2018 14:03:01 GMT):
Has joined the channel.

sean (Mon, 23 Jul 2018 21:28:28 GMT):
I need a bit of help with handling identity management. All of the Fabric / Fabric SDK docs / examples seem to place all the crypto material in the same place, which is fine for development but not good for production. I don't have identity management experience, and am having trouble understanding how to separate this material. For example, in the config.yaml for the SDK, the section below seems to indicate that the entire MSP directories should be included at the respective paths, but that can't be possible because the user's private keys should remain on their local machine, correct? *Can anyone help me understand the best practice around handling the private keys for admins / users and what should be in the _production_ version of the SDK MSP paths?* Thanks! ``` cryptoconfig: path: credentialStore: #I am assuming my user enrollments go through this client, so this should be included path: cryptoStore: path: ```

yulong12 (Tue, 24 Jul 2018 05:06:59 GMT):
Hi who can help me in this problem ?

yulong12 (Tue, 24 Jul 2018 05:07:01 GMT):
https://stackoverflow.com/questions/51490818/fabric-sdk-go-dialing-connection-timed-out

yulong12 (Tue, 24 Jul 2018 06:30:23 GMT):
Hi every one I have a question. ``` Failed to invoke: CreateAndSendTransaction failed: SendTransaction failed: calling orderer 'orderer0.1530081632652.svc.cluster.local:32567' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer0.1530081632652.svc.cluster.local:32567] ``` when I call invoke function, it appears a question so who can help me?

antitoine (Tue, 24 Jul 2018 06:37:01 GMT):
Hey, I just answered https://stackoverflow.com/questions/51490818/fabric-sdk-go-dialing-connection-timed-out/51491966#51491966

yulong12 (Tue, 24 Jul 2018 06:41:37 GMT):
thank you @antitoine ,but I try it as you said,but it appears``` Failed to invoke: CreateAndSendTransaction failed: SendTransaction failed: calling orderer '9.115.76.16:32567' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [9.115.76.16:32567] ```

antitoine (Tue, 24 Jul 2018 06:48:39 GMT):
Check logs of the orderer to see if your client try to connect or not

yulong12 (Tue, 24 Jul 2018 07:08:57 GMT):
I have solved it, thank you . @antitoine

AleksandarNovakovic (Tue, 24 Jul 2018 14:13:39 GMT):
Has joined the channel.

AleksandarNovakovic (Tue, 24 Jul 2018 14:24:24 GMT):
Hello, can someone help me with this problem. When I try to query chaincode, it works normally, but when I try to invoke I get this error: https://pastebin.com/Hu24h7ZC

AleksandarNovakovic (Tue, 24 Jul 2018 14:24:24 GMT):
Hello, can someone help me with this problem? When I try to query chaincode, it works normally, but when I try to invoke I get this error: https://pastebin.com/Hu24h7ZC

troyronda (Tue, 24 Jul 2018 14:38:59 GMT):
@sean FYI: the Go SDK can also use PKCS11 for storing keys or usage of environment variables. You can also manually define users in the SDK config rather than using the cryptoconfig convention.

troyronda (Tue, 24 Jul 2018 14:39:46 GMT):
Beyond that, you can override the implementation. There has also been a proposal and some work into integrating with hashicorp vault.

troyronda (Tue, 24 Jul 2018 14:40:37 GMT):
(I’m actually away right now so not able to give extensive anawers).

Ratnakar (Tue, 24 Jul 2018 18:26:26 GMT):
Has joined the channel.

PaulStuart (Tue, 24 Jul 2018 20:23:37 GMT):
Has joined the channel.

bjwswang (Wed, 25 Jul 2018 05:55:05 GMT):
Anyone knows which commit level should be used for fabric 1.1 ?

Kyroy (Wed, 25 Jul 2018 06:59:23 GMT):
@bjwswang I think current master is supporting fabric 1.1 and 1.2 and the last tag, too :)

Kyroy (Wed, 25 Jul 2018 06:59:42 GMT):
Not sure about 1.0.6 :D

bjwswang (Wed, 25 Jul 2018 06:59:57 GMT):
@Kyroy Thank you! I will have a try by using the latest code :grinning:

jakereps (Wed, 25 Jul 2018 15:48:28 GMT):
Has joined the channel.

oreg (Wed, 25 Jul 2018 16:20:25 GMT):
Hi, running `make` executes all tests. Is there a way to run individual tests as well?

kgeorgiou (Wed, 25 Jul 2018 18:45:51 GMT):
Has joined the channel.

sudeshrshetty (Wed, 25 Jul 2018 19:10:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RgTniK7RQhXi56xch) @oreg For integration tests, run docker sepately using `make dockerenv-stable-up` or others and just run tests directly using `go test -run `

sudeshrshetty (Wed, 25 Jul 2018 19:10:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RgTniK7RQhXi56xch) @oreg For integration tests, run docker sepately using `make dockerenv-stable-up` or others and just run tests directly using `go test -run `

sudeshrshetty (Wed, 25 Jul 2018 19:10:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RgTniK7RQhXi56xch) @oreg For integration tests, run docker sepately using `make dockerenv-stable-up` or others and just run tests directly in test directory using `go test -run `

sudeshrshetty (Wed, 25 Jul 2018 19:11:09 GMT):
there are many more targets for which kind of environment `dockerenv-XXX-up`

sudeshrshetty (Wed, 25 Jul 2018 19:11:09 GMT):
there are many more targets for each kind of environment `dockerenv-XXX-up`

Russ.corsha (Thu, 26 Jul 2018 21:37:14 GMT):
Hey Guys i keep getting `timeout expired while executing transaction`` when calling invoke from a client. Is there a simple config change i can do to increase my timeout window?

WoleCharles (Fri, 27 Jul 2018 08:18:12 GMT):
Has joined the channel.

antitoine (Fri, 27 Jul 2018 08:51:13 GMT):
Hi, I've been trying for several days to migrate to HF v1.2, I've been using network testing and configuration in the SDK Go, but I'm still stuck on the same error: `Orderer Server Status Code: (400) BAD_REQUEST. Description: error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/Org1MSP but was in the read set` Sometimes it's more like `existing config does not contain element for [Group] /Channel/Application but was in the read set` or `error validating ReadSet: existing config does not contain element for [Value] /Channel/Consortium but was in the read set` Does anyone have a suggestion?

antitoine (Fri, 27 Jul 2018 08:51:13 GMT):
Hi, I've been trying for several days to migrate to HF v1.2, I've been using network testing and configuration in the SDK Go, but I'm still stuck on the same error (when I want to create a channel): `Orderer Server Status Code: (400) BAD_REQUEST. Description: error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/Org1MSP but was in the read set` Sometimes it's more like `existing config does not contain element for [Group] /Channel/Application but was in the read set` or `error validating ReadSet: existing config does not contain element for [Value] /Channel/Consortium but was in the read set` Does anyone have a suggestion?

antitoine (Fri, 27 Jul 2018 08:51:13 GMT):
Hi, I've been trying for several days to migrate to HF v1.2, I've been using network testing and configuration in the SDK Go, but I'm still stuck on the same error (when I want to create a channel): `Orderer Server Status Code: (400) BAD_REQUEST. Description: error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/Org1MSP but was in the read set` Sometimes it's more like `error validating ReadSet: existing config does not contain element for [Group] /Channel/Application but was in the read set` or `error validating ReadSet: existing config does not contain element for [Value] /Channel/Consortium but was in the read set` Does anyone have a suggestion?

oreg (Fri, 27 Jul 2018 09:47:45 GMT):
@sudeshrshetty That's great advice. Thanks a lot!\

oreg (Fri, 27 Jul 2018 09:47:45 GMT):
@sudeshrshetty That's great advice. Thanks a lot!

oreg (Fri, 27 Jul 2018 09:50:05 GMT):
Could you give an example as well how to run a test once the docker containers are up?

Kyroy (Fri, 27 Jul 2018 11:44:34 GMT):
When I use the `_default` options, are they also applied to my other hosts? So are these options applied to `peer0.org1.example.com`? ```peers: _default: grpcOptions: keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: false peer0.org1.example.com: url: localhost:7051 eventUrl: localhost:7053 grpcOptions: ssl-target-name-override: peer0.org1.example.com tlsCACerts: path: ${GOPATH}/src/xxxx/test/fixtures/node1/crypto/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem ```

sudeshrshetty (Fri, 27 Jul 2018 14:17:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=i5CtXtYHvdxbb5ExK) @oreg I already did, after docker-compose run tests directly in test directory using `go test -run

sudeshrshetty (Fri, 27 Jul 2018 14:20:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Ngoa3ghF7GSynFp7x) @Kyroy `_default` is fallback configuration for all the peer configs. In your case, `ssl-target-name-override` will be taken from `peer0.org1.example.com`, reset will be taken from `_default.grpcOptions`

sudeshrshetty (Fri, 27 Jul 2018 14:20:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Ngoa3ghF7GSynFp7x) @Kyroy `_default` is fallback configuration for all the peer configs. In your case, `ssl-target-name-override` will be taken from `peer0.org1.example.com`, rest will be taken from `_default.grpcOptions`

sudeshrshetty (Fri, 27 Jul 2018 14:21:27 GMT):
You can skip `mappedhost` too in in entitymatchers, that one will use `_default` as default mapped host

Kyroy (Fri, 27 Jul 2018 14:22:21 GMT):
@sudeshrshetty Thanks :) Yes is removed my mappedhost, too. Just to clarify, the result of the above config is: ```peer0.org1.example.com: url: localhost:7051 eventUrl: localhost:7053 grpcOptions: ssl-target-name-override: peer0.org1.example.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: false tlsCACerts: path: ${GOPATH}/src/xxxx/test/fixtures/node1/crypto/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem ```

Kyroy (Fri, 27 Jul 2018 14:23:05 GMT):
In fact, I do not use `peers` in the entityMatchers at all now :)

sudeshrshetty (Fri, 27 Jul 2018 14:38:40 GMT):
Thats right

gen_el (Fri, 27 Jul 2018 19:13:30 GMT):
How do i discover all mspID/orgs on my channel?

Kyroy (Fri, 27 Jul 2018 20:31:28 GMT):
@gen_el One way is to query the latest config block with https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/ledger#Client.QueryBlock Another one would be to use dynamic discovery: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#FabricSDK.ChannelContext ```chCfg, err := chCtx.ChannelService().ChannelConfig() for _, m := range chCfg.MSPs() { var mspCfg fabricMsp.FabricMSPConfig if err := proto.Unmarshal(m.Config, &mspCfg); err != nil { ... } ```

Kyroy (Fri, 27 Jul 2018 20:31:28 GMT):
@gen_el One way is to query the latest config block with https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/ledger#Client.QueryBlock Another one would be to use dynamic discovery: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#FabricSDK.ChannelContext ```chCfg, err := chCtx.ChannelService().ChannelConfig() for _, m := range chCfg.MSPs() { var mspCfg fabricMsp.FabricMSPConfig if err := proto.Unmarshal(m.Config, &mspCfg); err != nil { ... } } ```

Kyroy (Fri, 27 Jul 2018 20:31:28 GMT):
@gen_el One way is to query the latest config block with https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/ledger#Client.QueryBlock Another one would be to use dynamic discovery: 1. https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#FabricSDK.ChannelContext 2. ```chCfg, err := chCtx.ChannelService().ChannelConfig() for _, m := range chCfg.MSPs() { var mspCfg fabricMsp.FabricMSPConfig if err := proto.Unmarshal(m.Config, &mspCfg); err != nil { ... } } ```

Kyroy (Fri, 27 Jul 2018 20:36:52 GMT):
with https://github.com/hyperledger/fabric/blob/release-1.2/protos/msp/msp_config.pb.go#L53

gen_el (Fri, 27 Jul 2018 22:43:34 GMT):
Thanks @Kyroy

gen_el (Fri, 27 Jul 2018 22:47:52 GMT):
I pulled master a while ago and i must say, the updates are great!

yacovm (Fri, 27 Jul 2018 22:51:13 GMT):
The node.js and java SDKs are implementing the more advanced discovery features - cc2cc and collections. 1) Please feel free to give ideas of what the SDK should do and how the cc2cc and collections support should be designed in https://jira.hyperledger.org/browse/FAB-11374 since the go SDK already did that. 2) How does the golang SDK handle collections? Does it simply give the user an ability to pass the collections?

pankaj13 (Sat, 28 Jul 2018 03:01:24 GMT):
I had a code that was working fine till last week but for some reasons started giving this error when I call the "instantiate chaincode" function. Instantiating chain code......... 19:58:46.425 InstantiateChainCode ▶ INFO 02a Instantiating chain code......... [fabsdk/fab] 2018/07/28 02:58:46 UTC - channel.orderersFromChannelCfg -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration [fabsdk/fab] 2018/07/28 02:58:46 UTC - channel.orderersFromChannelCfg -> WARN visit https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml for samples Any pointers about above error would be helpful.

pankaj13 (Sat, 28 Jul 2018 03:01:24 GMT):
I had a code that was working fine till last week but for some reasons started giving this error when I call the "instantiate chaincode" function. Instantiating chain code......... 19:58:46.425 InstantiateChainCode ▶ INFO 02a Instantiating chain code......... [fabsdk/fab] 2018/07/28 02:58:46 UTC - channel.orderersFromChannelCfg -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration [fabsdk/fab] 2018/07/28 02:58:46 UTC - channel.orderersFromChannelCfg -> WARN visit https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml for samples Any pointers about above error would be helpful.

pankaj13 (Sat, 28 Jul 2018 03:01:24 GMT):
I had a code that was working fine till last week but for some reasons started giving this error when I call the "instantiate chaincode" function. Instantiating chain code......... 19:58:46.425 InstantiateChainCode ▶ INFO 02a Instantiating chain code......... [fabsdk/fab] 2018/07/28 02:58:46 UTC - channel.orderersFromChannelCfg -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration [fabsdk/fab] 2018/07/28 02:58:46 UTC - channel.orderersFromChannelCfg -> WARN visit https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml for samples I looked at the above URL but could not make much sense out of it. Any pointers about above error would be helpful.

ping40 (Sat, 28 Jul 2018 08:14:46 GMT):
When I open a jira, I get a FABG-xxx. How can I get FAB-xxx ? Does it need mainainter's/someone's approvement ? thanks.

ping40 (Sat, 28 Jul 2018 08:14:46 GMT):
When I open a jira, I get a FABG-xxx. How can I get FAB-xxx ? Does it need mainainter's/someone's approval? thanks.

zjubfd (Sat, 28 Jul 2018 10:14:47 GMT):
Has joined the channel.

zjubfd (Mon, 30 Jul 2018 02:11:41 GMT):
Hi , i am reading souce code of fabric-sdk-go. The part of eventhub seems complicated,three disptchers and so many event type and channels..

zjubfd (Mon, 30 Jul 2018 02:12:19 GMT):
Is there any design proposal that i can read first?

praveentalari (Mon, 30 Jul 2018 08:02:31 GMT):
Getting the following error failed to query: failed to create transactor: Channel_Cfg_Cache - cache is closed *https://github.com/hyperledger/fabric-sdk-go/blob/72bc6c648abdc3baf2da05922832df8b57e52fa2/pkg/client/channel/chclient.go#L223* Under what conditions I get this ?

praveentalari (Mon, 30 Jul 2018 08:02:31 GMT):
Getting the following error failed to query: failed to create transactor: Channel_Cfg_Cache - cache is closed *https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/chclient.go#L223* Under what conditions I get this ?

antitoine (Mon, 30 Jul 2018 08:52:33 GMT):
If someone can help me on this : https://stackoverflow.com/questions/51590202/channel-creation-fails-in-hyperledger-fabric-v1-2 Any help would be greatly appreciated.

sureshtedla (Mon, 30 Jul 2018 10:01:12 GMT):
Has joined the channel.

renji (Mon, 30 Jul 2018 15:25:14 GMT):
Has joined the channel.

muralisr (Mon, 30 Jul 2018 20:46:12 GMT):
Getting `Failed to get endorsing peers: error getting endorsers from channel response: no endorsement combination can be satisfied` on invoke. It could be something I'm doing wrong wrt configuration. A bit of digging shows that the discovery fails because of mismatch of peer "name" when attempting to find matching peers `grpc://:7051` vs `:7051` ... appreciate any help!

muralisr (Mon, 30 Jul 2018 20:46:12 GMT):
Getting `Failed to get endorsing peers: error getting endorsers from channel response: no endorsement combination can be satisfied` on invoke. It could be something I'm doing wrong wrt configuration. A bit of digging shows that the discovery fails because of mismatch of peer "name" when attempting to find matching peers (the match is between `grpc://:7051` vs `:7051`) ... appreciate any help!

muralisr (Mon, 30 Jul 2018 20:46:12 GMT):
Getting `Failed to get endorsing peers: error getting endorsers from channel response: no endorsement combination can be satisfied` on invoke. I could be something I'm doing wrong wrt configuration. A bit of digging shows that the discovery fails because of mismatch of peer "name" when attempting to find matching peers (the match is between `grpc://:7051` vs `:7051`) ... appreciate any help!

muralisr (Mon, 30 Jul 2018 20:57:27 GMT):
just figured out... the `peer:` urls should not have grpc:// in them

tongli (Tue, 31 Jul 2018 02:28:32 GMT):
Has joined the channel.

tongli (Tue, 31 Jul 2018 02:50:03 GMT):
Getting nil when I do this ``` resMgmtClient, _ := resmgmt.New(clientContext) ```

tongli (Tue, 31 Jul 2018 02:50:13 GMT):
anyone know why that is? Thanks.

tongli (Tue, 31 Jul 2018 02:51:33 GMT):
the error says that due to context error: user not found.

tongli (Tue, 31 Jul 2018 03:26:35 GMT):
can I use the Admin user for this?

rAnand (Tue, 31 Jul 2018 06:15:59 GMT):
Hello folks, I am receiving this following error on installation of chaincode on peer: Error: Error getting chaincode code chaincode: path to chaincode does not exist: /opt/gopath/src/chaincode/CreatAsset My Command: peer chaincode install -n CreateAsset -v 1.0 -p /chaincode/CreateAsset "Volumes" for chaincode as defined in cli container in docker-compose-cli.yaml file ./chaincode/CreateAsset/go:/opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/ So how do I get around this issue and install the created ".go file" in peer?

david_dornseifer (Tue, 31 Jul 2018 08:10:29 GMT):
Hi, I'm facing a grpc problem using the SDK right now. The SDK is able to connect to a bunch of peers but it fails with and `dialing connection timed out` error when I try to connect to the orderer. The orderer can see the connection handshake and logs an ``` grpc: Server.Serve failed to complete security handshake from "172.21.0.1:45832": remote error: tls: bad certificate``` error. Using ```openssl s_client -CAfile``` i can verify the key chain for the orderer TLS setup. Using ```godebug=http2debug=2``` i cannot see anything related to a rejected cert of other TLS issue.

david_dornseifer (Tue, 31 Jul 2018 08:10:29 GMT):
Hi, I'm facing a grpc problem using the SDK right now. The SDK is able to connect to a bunch of peers but it fails with and `dialing connection timed out` error when I try to connect to the orderer. The orderer can see the connection handshake and logs an ``` grpc: Server.Serve failed to complete security handshake from "172.21.0.1:45832": remote error: tls: bad certificate``` error. Using ```openssl s_client -CAfile``` i can verify the key chain for the orderer TLS setup. Using ```godebug=http2debug=2``` i cannot see anything related to a rejected cert of other TLS issue.

david_dornseifer (Tue, 31 Jul 2018 08:10:29 GMT):
Hi, I'm facing a grpc problem using the SDK right now. The SDK is able to connect to a bunch of peers but it fails with and `dialing connection timed out` error when I try to connect to the orderer. The orderer can see the connection handshake and logs an ` grpc: Server.Serve failed to complete security handshake from "172.21.0.1:45832": remote error: tls: bad certificate` error. Using `openssl s_client -CAfile` i can verify the key chain for the orderer TLS setup. Using `godebug=http2debug=2` i cannot see anything related to a rejected cert of other TLS issue.

david_dornseifer (Tue, 31 Jul 2018 08:10:29 GMT):
@sudeshrshetty Hi, I'm facing a grpc problem using the SDK right now. The SDK is able to connect to a bunch of peers but it fails with and `dialing connection timed out` error when I try to connect to the orderer. The orderer can see the connection handshake and logs an ` grpc: Server.Serve failed to complete security handshake from "172.21.0.1:45832": remote error: tls: bad certificate` error. Using `openssl s_client -CAfile` i can verify the key chain for the orderer TLS setup. Using `godebug=http2debug=2` i cannot see anything related to a rejected cert of other TLS issue.

david_dornseifer (Tue, 31 Jul 2018 08:11:16 GMT):
Any idea out there how to debug the grpc TLS handshake or what could be wrong with the setup?

zerppen (Tue, 31 Jul 2018 08:36:49 GMT):
Has joined the channel.

rAnand (Tue, 31 Jul 2018 10:16:10 GMT):
Hello there, what does this error mean: Error: Error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode CreateAsset:1.0(networkid:dev,peerid:peer0.Org1.example.com,tx:a062523.....) I am receiving this error while instantiating the chaincode. To curb this issue, I added the below in peer-base.yaml file: - CORE_CHAINCODE_EXECUTETIMEOUT=6000s I am still receiving the error message though.

xixuejia (Tue, 31 Jul 2018 10:24:22 GMT):
Hello, when I call `InstantiateCC` function of resMgmtClient, the chaincode was successfully instantiated, but that function still returned error ```error registering for TxStatus event: no peers to connect to``` Did anyone encounter this issue? I followed the e2e test here->> https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L206

xixuejia (Tue, 31 Jul 2018 10:26:24 GMT):
I was using the latest code in master branch

zerppen (Tue, 31 Jul 2018 10:58:40 GMT):
Hi,everyone. I have question that fabric-sdk-go supports fabric-ca-release-1.2.0? I have tested fabric-sdk-go `Excute` and `Query` to fabric-release-1.2.0 successfully,but fabric-ca-release-1.2.0 is bad . However,fabric-sdk-node can do that including fabric-ca. If fabric-sdk-go can connect fabric-ca-release-1.2.0,please give me a example. ths in the front.

tian (Tue, 31 Jul 2018 11:21:44 GMT):
@sudeshrshetty I found that the `certificateAuthorities.ca1.tlsCACerts.pem` is a list of string in endpoint configuration, but in peers and orders the `tlsCACerts.pem` is a string, and I also found that in java and node sdk the config `certificateAuthorities.ca1.tlsCACerts.pem` is also a string. So I am wondering why we set `tlsCACerts.pem` to a list of string for certificateAuthorities? Do we need to make it be compatible with other sdk?

tongli (Tue, 31 Jul 2018 12:50:06 GMT):
@troyronda good morning, can you confirm if an orderer org admin create a channel with no peers?

tongli (Tue, 31 Jul 2018 12:50:23 GMT):
or anyone with knowledge. thanks in advance.

sudeshrshetty (Tue, 31 Jul 2018 14:10:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=XZB6DRJ3cvqXPLtyY) @tian As of now we are taking only first one in the list into account. Others are being ignored.

tian (Tue, 31 Jul 2018 14:43:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BwfJ7jMkxR76cJEae) @sudeshrshetty It there a plan to convert `tlsCACerts.pem` to a string rather than a list to be compatible with other sdks?

sudeshrshetty (Tue, 31 Jul 2018 14:52:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tY9k9FgAYRXhR3q9k) @tian Not anytime soon, will create a task for this

sudeshrshetty (Tue, 31 Jul 2018 14:55:20 GMT):
https://jira.hyperledger.org/browse/FABG-695 created

tian (Tue, 31 Jul 2018 15:03:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CNpMBfz7MP7ePMNW8) @sudeshrshetty Thanks for creating the task, I'm watching on it :smile:

Russ.corsha (Tue, 31 Jul 2018 18:00:36 GMT):
Hey Guys, What happens if I call PutState multiple times in the same chaincode Invoke call, with the same key? Will the calls overwrite each other in the transaction's writeset?

Russ.corsha (Tue, 31 Jul 2018 18:00:36 GMT):
Hey Guys, What happens if I call PutState multiple times in the same chaincode Invoke call, with the same key? Will the calls overwrite each other in the transaction's writeset? SOLVED: it overwrites the old edit. check out writeset here for more intel: https://hyperledger-fabric.readthedocs.io/en/release-1.1/readwrite.html

Russ.corsha (Tue, 31 Jul 2018 18:03:57 GMT):
@troyronda ^

bjwswang (Wed, 01 Aug 2018 02:55:50 GMT):
Hello . Is there anyone using the source code from both fabric-sdk-go and fabric ? I met troubles with importing the project with golang/dep . Seems there are some version conflicts like `release-1.2: Could not introduce github.com/hyperledger/fabric@release-1.2, as it has a dependency on github.com/spf13/viper with constraint 1967d93db724f4a5c0e101307e96d82ff520a067, which has no overlap with existing constraint master from github.com/hyperledger/fabric-sdk-go@39d47d68f0c329a80d52a1e614ed107ca3d06062`

bjwswang (Wed, 01 Aug 2018 02:55:50 GMT):
Hello . Is there anyone using the source code from both fabric-sdk-go and fabric ? I met troubles with importing the project with golang/dep . Seems there are some version conflicts like `release-1.2: Could not introduce github.com/hyperledger/fabric@release-1.2, as it has a dependency on github.com/spf13/viper with constraint 1967d93db724f4a5c0e101307e96d82ff520a067, which has no overlap with existing constraint master from github.com/hyperledger/fabric-sdk-go@39d47d68f0c329a80d52a1e614ed107ca3d06062` Thanks !

zerppen (Wed, 01 Aug 2018 03:24:06 GMT):
Hi Guys, Is anyone using fabric-sdk-go connection to fabric-ca-release-1.2-0 successfully?

bjwswang (Wed, 01 Aug 2018 03:53:07 GMT):
I find fabric-sdk-go is using the fabric code by directly copying code into sdk-go itself . Can anyone explain why ? @tian @troyronda

bjwswang (Wed, 01 Aug 2018 03:53:07 GMT):
I find fabric-sdk-go is using the fabric code by directly copying code into sdk-go itself . Can anyone explain why ? @tian @troyronda Thanks!

Rachit_gaur (Wed, 01 Aug 2018 09:03:44 GMT):
How to create a new user using fabric sdk for node?

bkseo (Thu, 02 Aug 2018 04:58:12 GMT):
Has joined the channel.

antitoine (Thu, 02 Aug 2018 06:52:49 GMT):
Anyone can help me on this error ? `Orderer Server Status Code: (400) BAD_REQUEST. Description: error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/Org1MSP but was in the read set` https://stackoverflow.com/questions/51590202/channel-creation-fails-in-hyperledger-fabric-v1-2

sarah (Thu, 02 Aug 2018 18:33:49 GMT):
Has joined the channel.

sarah (Thu, 02 Aug 2018 18:34:48 GMT):
Just posted this in `fabric-chaincode-dev` as well: Hey everyone, I've been facing an error while using the `InstantiateCC` method provided by the `fabric-sdk-go/pkg/client/resmgmt` package (https://github.com/hyperledger/fabric-sdk-go/blob/55ab46a8c2a69288dda370dd335a85a300d15aa5/pkg/client/resmgmt/resmgmt.go#L121:6) and am hoping to get some help. I have two orgs (Org0, Org1), each with two peers (peer0, peer1) who have joined a common channel and I've installed the same cc onto all 4 peers. The description for `InstantiateCC` states that instantiation will happen for *all* peers in the channel. In reality, instantiation only happens for the peers belonging to the org whose context is calling `InstantiateCC`. The dev containers for those 2 peers are launched fine and I'm able to invoke methods through any peer on that one org. I then try to instantiate through the client context for the other org, but the peers believe the chaincode has already been launched on the channel (which is has, but not for the peers of this org), so an error is thrown (`Chaincode status Code: (500) UNKNOWN. Description: chaincode with name 'exchangeCC' already exists`). Has anyone successfully made a similar scenario happen or have any ideas how to solve this?

sarah (Thu, 02 Aug 2018 18:34:48 GMT):
{{ISSUE RESOLVED: endorsement policy orgs were listed simply in format "Org0" instead of "Org0MSP"}} Just posted this in `fabric-chaincode-dev` as well: Hey everyone, I've been facing an error while using the `InstantiateCC` method provided by the `fabric-sdk-go/pkg/client/resmgmt` package (https://github.com/hyperledger/fabric-sdk-go/blob/55ab46a8c2a69288dda370dd335a85a300d15aa5/pkg/client/resmgmt/resmgmt.go#L121:6) and am hoping to get some help. I have two orgs (Org0, Org1), each with two peers (peer0, peer1) who have joined a common channel and I've installed the same cc onto all 4 peers. The description for `InstantiateCC` states that instantiation will happen for *all* peers in the channel. In reality, instantiation only happens for the peers belonging to the org whose context is calling `InstantiateCC`. The dev containers for those 2 peers are launched fine and I'm able to invoke methods through any peer on that one org. I then try to instantiate through the client context for the other org, but the peers believe the chaincode has already been launched on the channel (which is has, but not for the peers of this org), so an error is thrown (`Chaincode status Code: (500) UNKNOWN. Description: chaincode with name 'exchangeCC' already exists`). Has anyone successfully made a similar scenario happen or have any ideas how to solve this?

sarah (Thu, 02 Aug 2018 18:37:09 GMT):
@xixuejia I think your problem re: `no peers to connect to` is related to my issue ^. Have you made any progress?

pvrbharg (Fri, 03 Aug 2018 00:46:18 GMT):
Has joined the channel.

xixuejia (Fri, 03 Aug 2018 02:53:42 GMT):
@sarah your problem is different with mine. When you instantiate cc, you can add all peers as options to `InstantiateCC` function then all 4 peers should be able to instantiate the chaincode container

AbhinandanDarbey (Fri, 03 Aug 2018 09:53:16 GMT):
Has joined the channel.

AbhinandanDarbey (Fri, 03 Aug 2018 09:53:22 GMT):
Need a little help here. I am getting an error while installing chaincode on the peer Error: error getting chaincode code cc2: error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/common/util: : failed with error: "exit status 1" can't load package: package github.com/hyperledger/fabric/common/util: cannot find package "github.com/hyperledger/fabric/common/util" in any of: /opt/go/src/github.com/hyperledger/fabric/common/util (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/common/util (from $GOPATH)

sarah (Fri, 03 Aug 2018 13:52:02 GMT):
I have tried listing target peers and still am not able to instantiate the CC on two of the peers

zmaro (Fri, 03 Aug 2018 15:27:04 GMT):
Has joined the channel.

akshay.sood (Sat, 04 Aug 2018 06:48:58 GMT):
Has joined the channel.

Ammu (Sat, 04 Aug 2018 07:51:17 GMT):
if i am using node.js as my smart contract, then i need to go for composer?

giovanniconte (Mon, 06 Aug 2018 08:40:12 GMT):
Has joined the channel.

mogarg (Mon, 06 Aug 2018 23:19:40 GMT):
Has joined the channel.

bjwswang (Tue, 07 Aug 2018 10:06:26 GMT):
Can anyone take a look at https://jira.hyperledger.org/browse/FABG-702 ?

bjwswang (Tue, 07 Aug 2018 10:06:26 GMT):
Can anyone take a look at https://jira.hyperledger.org/browse/FABG-702 ? I found that sdk-go is not using same version go packages like "viper" and "protobuf" as fabric. That will lead to failures when importing both sdk-go and fabric into project.

ping40 (Tue, 07 Aug 2018 11:09:23 GMT):
@bjwswang why to import both fabric and fabric-sdk-go ?

antitoine (Tue, 07 Aug 2018 13:15:49 GMT):
Hi, after switching from eventhub to deliver, the event I receive contains no payload. I'm using Hyperledger Fabric v1.2. Anybody know why? I didn't find anything on Jira.

firas.qutishat (Tue, 07 Aug 2018 13:50:13 GMT):
@bjwswang https://github.com/securekey/fabric-snaps/blob/master/Gopkg.toml

firas.qutishat (Tue, 07 Aug 2018 13:50:57 GMT):
You can use override feature in go dep

troyronda (Tue, 07 Aug 2018 15:21:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ox3oj3gpPLhtWETCh) @yulong12 http://sd.jtimothyking.com/2018/07/26/stub-file-and-library-file-out-of-sync/#solution

bstasyszyn (Tue, 07 Aug 2018 21:52:06 GMT):
@antitoine By default the SDK uses filtered block events, which omits the payload. You need to enable block events to get payload. See https://github.com/hyperledger/fabric-sdk-go/blob/72a486f3a43e70cedec3bfbe3fd4347782f9b97a/test/integration/pkg/client/event/events_client_test.go#L73

bjwswang (Wed, 08 Aug 2018 03:32:08 GMT):
@ping40 Because I want to use the code of configtxgen to generate channel tx file directly in my project. @firas.qutishat Thank you ! BTW ... do we have the plan to implement the channel tx file in sdk-go ?

bjwswang (Wed, 08 Aug 2018 03:32:08 GMT):
@ping40 Because I want to use the code of configtxgen to generate channel tx file directly in my project. @firas.qutishat Thank you ! BTW ... do we have the plan to generate the channel tx file in sdk-go ?

antitoine (Wed, 08 Aug 2018 06:41:43 GMT):
@bstasyszyn Thank you very much!

zhuxubin01 (Wed, 08 Aug 2018 07:55:12 GMT):
Has joined the channel.

zhuxubin01 (Wed, 08 Aug 2018 07:56:50 GMT):
hi,all who can kindly tell me what is the usage of container "chaincoded",i never saw it when i use node-sdk before.

mulser (Wed, 08 Aug 2018 11:14:32 GMT):
Has joined the channel.

mulser (Wed, 08 Aug 2018 11:22:22 GMT):
general question: is the go sdk (https://github.com/hyperledger/fabric-sdk-go) or why the sdk is not stated in the docs (https://hyperledger-fabric.readthedocs.io/en/release-1.2/fabric-sdks.html)? furthermore, we could use the link to the repo as description for this channel. see for example #fabric-chaintool.

mulser (Wed, 08 Aug 2018 11:22:22 GMT):
general question: is the go sdk (https://github.com/hyperledger/fabric-sdk-go) not stable/offical yet or why the sdk is not stated in the docs (https://hyperledger-fabric.readthedocs.io/en/release-1.2/fabric-sdks.html)? furthermore, we could use the link to the repo as description for this channel. see for example #fabric-chaintool.

mulser (Wed, 08 Aug 2018 11:22:22 GMT):
general question: is the go sdk (https://github.com/hyperledger/fabric-sdk-go) not stable/offical yet or why is the sdk not stated in the docs (https://hyperledger-fabric.readthedocs.io/en/release-1.2/fabric-sdks.html)? furthermore, we could use the link to the repo as description for this channel. see for example #fabric-chaintool.

mulser (Wed, 08 Aug 2018 11:22:22 GMT):
general question: is the go sdk (https://github.com/hyperledger/fabric-sdk-go) not stable/offical yet or why is the sdk not stated in the docs (https://hyperledger-fabric.readthedocs.io/en/release-1.2/fabric-sdks.html)? furthermore, we could use the link to the repo as description for this channel. see for example #fabric-chaintool .

troyronda (Wed, 08 Aug 2018 12:44:07 GMT):
@zhuxubin01 the chaincoded container runs the chaincode in the CI tests. You can look at it as mocking the chaincode to speed up the test execution and conserve resources. This is accomplished by running all the test chaincode in one container and pre-building it.

troyronda (Wed, 08 Aug 2018 12:46:21 GMT):
@mulser the Go SDK hasn’t been officially released. Although it is fairly stable at this point.

antitoine (Wed, 08 Aug 2018 12:50:08 GMT):
@troyronda Why don't you want to do it?

troyronda (Wed, 08 Aug 2018 13:58:37 GMT):
@antitoine are you asking about official release? We do want this, of course :).

troyronda (Wed, 08 Aug 2018 14:00:57 GMT):
I think we need to collectively discuss readiness. Did you have thoughts?

pgarneau (Wed, 08 Aug 2018 15:04:53 GMT):
Hey @troyronda , is there a way for me to query the organizations present in my network from the SDK?

antitoine (Wed, 08 Aug 2018 15:16:11 GMT):
Hi, I just saw that there is a problem with the management of the MSP in the SDK. Indeed, it is impossible to use entityMatchers for certification authorities. I thought it came from my side, but the problem is also present in local integration tests. The problem is that the SSL override is not done and therefore the certificate is invalid. See errors of the MSP integration tests: ``` --- FAIL: TestRegisterEnroll (0.44s) enrollment_test.go:54: Enroll failed: enroll failed: enroll failed: POST failure of request: POST https://localhost:7054/enroll {"hosts":null,"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIHsMIGUAgEAMBAxDjAMBgNVBAMTBWFkbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEdrpGiL/qkH9TJcFnS46U6kKClaAOMxTcIbfKlY+fNM0gBqIz8xzL8jTI\n4NUIKzqXSkzxGWAT5l2K2sxVwzJPVaAiMCAGCSqGSIb3DQEJDjETMBEwDwYDVR0R\nBAgwBoIEeW1pcjAKBggqhkjOPQQDAgNHADBEAiAmCPKCgd41vZlZueS5ctARe1j5\nevYYaVSDUlxyRs9T0wIgF1bnDmTXZ+Dmwra+VHdjg28Rb0+NFD/wZtEwqRV4X5I=\n-----END CERTIFICATE REQUEST-----\n","profile":"","crl_override":"","label":"","NotBefore":"0001-01-01T00:00:00Z","NotAfter":"0001-01-01T00:00:00Z","CAName":"ca.org1.example.com"}: Post https://localhost:7054/enroll: x509: certificate is valid for ca.org1.example.com, ca, not localhost ```

antitoine (Wed, 08 Aug 2018 15:16:11 GMT):
Hi, I just saw that there is a problem with the management of the MSP in the SDK. Indeed, it is impossible to use entityMatchers for certification authorities. I thought it came from my side, but the problem is also present in local integration tests. The problem is that the SSL override is not done and therefore the certificate is invalid. See errors of the MSP integration tests: ``` --- FAIL: TestRegisterEnroll (0.44s) enrollment_test.go:54: Enroll failed: enroll failed: enroll failed: POST failure of request: POST https://localhost:7054/enroll {"hosts":null,"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIHsMIGUAgEAMBAxDjAMBgNVBAMTBWFkbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEdrpGiL/qkH9TJcFnS46U6kKClaAOMxTcIbfKlY+fNM0gBqIz8xzL8jTI\n4NUIKzqXSkzxGWAT5l2K2sxVwzJPVaAiMCAGCSqGSIb3DQEJDjETMBEwDwYDVR0R\nBAgwBoIEeW1pcjAKBggqhkjOPQQDAgNHADBEAiAmCPKCgd41vZlZueS5ctARe1j5\nevYYaVSDUlxyRs9T0wIgF1bnDmTXZ+Dmwra+VHdjg28Rb0+NFD/wZtEwqRV4X5I=\n-----END CERTIFICATE REQUEST-----\n","profile":"","crl_override":"","label":"","NotBefore":"0001-01-01T00:00:00Z","NotAfter":"0001-01-01T00:00:00Z","CAName":"ca.org1.example.com"}: Post https://localhost:7054/enroll: x509: certificate is valid for ca.org1.example.com, ca, not localhost [...] FAIL github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/msp 2.259s ```

troyronda (Wed, 08 Aug 2018 15:40:26 GMT):
@sudeshrshetty ^^

sudeshrshetty (Wed, 08 Aug 2018 15:44:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ZzHZudrh2u5JToNXB) @antitoine looking into this

sudeshrshetty (Wed, 08 Aug 2018 16:12:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SCAisP2wqSwBZGTow) YOu are right, ssl override is not done for CA in SDK. Created a ticket for this. --> https://jira.hyperledger.org/browse/FABG-703

sudeshrshetty (Wed, 08 Aug 2018 16:12:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SCAisP2wqSwBZGTow) You are right, ssl override is not done for CA in SDK config. Created a ticket for this. --> https://jira.hyperledger.org/browse/FABG-703

kostas (Wed, 08 Aug 2018 18:58:05 GMT):
Has joined the channel.

kostas (Wed, 08 Aug 2018 19:10:18 GMT):
Hi everyone, a quick question. Where can I find the most up-to-date schema of the config file?

sudeshrshetty (Wed, 08 Aug 2018 19:11:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=b5Y5bNxP7qbq3Aof5) @kostas https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/template/config.yaml

sudeshrshetty (Wed, 08 Aug 2018 19:11:46 GMT):
sample: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml

kostas (Wed, 08 Aug 2018 19:11:52 GMT):
[This YAML](https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/config_test.yaml) under `testdata` has a version value of `1.0.0` but this tutorial references a `2` version.

kostas (Wed, 08 Aug 2018 19:11:52 GMT):
[This YAML](https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/config_test.yaml) under `testdata` has a version value of `1.0.0` but [this tutorial](https://chainhero.io/2018/03/tutorial-build-blockchain-app-2/#use-the-fabric-sdk-go) references a `2` version.

kostas (Wed, 08 Aug 2018 19:12:06 GMT):
Ah, you beat me to it @sudeshrshetty. See comment above ^^?

kostas (Wed, 08 Aug 2018 19:12:18 GMT):
https://chainhero.io/2018/03/tutorial-build-blockchain-app-2/#use-the-fabric-sdk-go

Kyroy (Wed, 08 Aug 2018 20:04:59 GMT):
normally, my `orderer.timeout.response` is set to `15s`. I just tried to use the default value which is `defaultOrdererResponseTimeout = time.Minute * 2` and got: ```updatChannel returned error: error from create channel: SendEnvelope failed: calling orderer 'localhost:7050' failed: NewAtomicBroadcastClient failed: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded ``` Any idea why a larger timeout results in an error?

sudeshrshetty (Wed, 08 Aug 2018 20:21:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oggZmb8K9SYL66aw6) @Kyroy May be fallback didn't happen, you just changed config file right?

Kyroy (Wed, 08 Aug 2018 20:21:57 GMT):
@sudeshrshetty Yes, I just changes my config and removed the default timout values

Kyroy (Wed, 08 Aug 2018 20:21:57 GMT):
@sudeshrshetty Yes, I just changed my config and removed the default timout values

Kyroy (Wed, 08 Aug 2018 20:21:57 GMT):
@sudeshrshetty Yes, I just changed my config and removed the default timeout values

sudeshrshetty (Wed, 08 Aug 2018 20:25:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=EHLnLEXbzFHxgsvc5) @kostas I am not sure about this tutorial, but this version doesn't do anything as of now. It just for tracking. we never bumped it up from 1.0.0.

sudeshrshetty (Wed, 08 Aug 2018 20:27:24 GMT):
the one in fabric-sdk-go/master will always be latest.

kostas (Thu, 09 Aug 2018 00:30:07 GMT):
A few quick questions as I'm going over the config template.

kostas (Thu, 09 Aug 2018 00:30:23 GMT):
(If you'd rather I take this discussion elsewhere, please let me know!)

kostas (Thu, 09 Aug 2018 00:30:34 GMT):
1. Who's using the "name" K/V? Can it be skipped? 2. Who's using the "description" K/V? Can it be skipped? 3. What is the client.organization set to? The org's name or the org's MSP ID? 4. Let's talk about client.cryptoconfig.path. Does this imply a hard dependency on cryptogen? Put it differently, what should the folder that I point this to contain? I see the description (users' crypto keys and certs), but would it work if I were to dump everything (all users) into a single flat folder? Is some sort of hierarchy expected? 5. Assume I'm an actual application developer for a Fabric network. How do I figure out what to set the BCCSP values to? Do I match the orderer's BCCSP values, or the peer's? Should the "pin" and "label" keys be set if the default BCCSP is not PKCS11? What do I set "library" to?

kostas (Thu, 09 Aug 2018 00:30:34 GMT):
1. Who's using the "name" K/V? Can it be skipped? 2. Who's using the "description" K/V? Can it be skipped? 3. Let's talk about client.cryptoconfig.path. Does this imply a hard dependency on cryptogen? Put it differently, what should the folder that I point this to contain? I see the description (users' crypto keys and certs), but would it work if I were to dump everything (all users) into a single flat folder? Is some sort of hierarchy expected? 4. Assume I'm an actual application developer for a Fabric network. How do I figure out what to set the BCCSP values to? Do I match the orderer's BCCSP values, or the peer's? Should the "pin" and "label" keys be set if the default BCCSP is not PKCS11? What do I set "library" to?

shailaja.mahara (Thu, 09 Aug 2018 10:09:57 GMT):
can anyone refer example of building fabric application front-end using the go-SDK?

troyronda (Thu, 09 Aug 2018 11:55:10 GMT):
@kostas 1) skipable 2) skipable 3) skipable 4) bccs

troyronda (Thu, 09 Aug 2018 11:55:10 GMT):
@kostas 1) skipable 2) skipable 3) skipable 4) bccsp settings for pkcs11 not needed if using sw

troyronda (Thu, 09 Aug 2018 12:02:16 GMT):
for 3) you can alternately use embedded users - eg https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/config_test_embedded_pems.yaml

kostas (Thu, 09 Aug 2018 12:02:25 GMT):
@troyronda: Thanks for the quick answers. Can you expand on what 3 being skippable means?

troyronda (Thu, 09 Aug 2018 12:03:27 GMT):
you can use the cryptogen folder structure or define users in the config

troyronda (Thu, 09 Aug 2018 12:03:54 GMT):
if you define users then you do not need to include the cryptogen field

troyronda (Thu, 09 Aug 2018 12:03:54 GMT):
if you define users then you do not need to include the cryptopath field

troyronda (Thu, 09 Aug 2018 12:04:38 GMT):
you can also override the user loading mechanism for additional customization

troyronda (Thu, 09 Aug 2018 12:05:23 GMT):
the 1,2 fields dont do anything ... they are there due to the connection profile

troyronda (Thu, 09 Aug 2018 12:05:54 GMT):
for 4) which settings can be different between peer and orderer?

troyronda (Thu, 09 Aug 2018 12:06:29 GMT):
right now, i guess we assume they are the same

troyronda (Thu, 09 Aug 2018 12:08:34 GMT):
@aleksandar.likic anything to add regarding user folder structure and optional cryptogen field? ^^^

troyronda (Thu, 09 Aug 2018 12:08:34 GMT):
@aleksandar.likic anything to add regarding user definition, user folder structure and optional cryptopath field? ^^^

troyronda (Thu, 09 Aug 2018 12:51:28 GMT):
(and enrolling users structure)

troyronda (Fri, 10 Aug 2018 13:28:30 GMT):
@sarah it looks like you solved the issue in the fabric-chaincode-dev channel?

pgarneau (Fri, 10 Aug 2018 13:30:43 GMT):
hey @troyronda , is there any way for me to query the active organizations in the channel from the sdk?

troyronda (Fri, 10 Aug 2018 13:31:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9ioYp8MfJb8xcqvNp) @bjwswang To reduce dependencies and to enable patching of the code (it's not a direct copy but rather a patched copy). FYI: we initially had to patch the code to remove server-based dependencies like docker from creeping into the SDK.

troyronda (Fri, 10 Aug 2018 13:32:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=WdKwmumPHi3qy8q9j) @zerppen The SDK integration tests connect to Fabric CA 1.2

troyronda (Fri, 10 Aug 2018 13:35:52 GMT):
@pgarneau well, I'm not sure about a direct way but you can get the channel config via https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/ledger#Client.QueryConfig

troyronda (Fri, 10 Aug 2018 13:36:25 GMT):
which contains the MSPs

pgarneau (Fri, 10 Aug 2018 13:37:15 GMT):
I guess that could work. Trying to apply verifications on the values people input in my client application for organizations by querying the network itself instead of having values set in the ledger or something

pgarneau (Fri, 10 Aug 2018 13:37:19 GMT):
Thx @troyronda

troyronda (Fri, 10 Aug 2018 13:39:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bJChhdWWppZNFnQcb) @antitoine I guess you found the problem to be related to the channel name?

sarah (Fri, 10 Aug 2018 15:15:35 GMT):
@troyronda re: `it looks like you solved the issue in the fabric-chaincode-dev channel?` yes that issue is solved! thanks

sarah (Fri, 10 Aug 2018 15:15:35 GMT):
@troyronda re: ```it looks like you solved the issue in the fabric-chaincode-dev channel?``` yes that issue is solved! thanks

kostas (Sun, 12 Aug 2018 20:44:00 GMT):
Is there a well-documented example on `entityMatchers`?

kostas (Sun, 12 Aug 2018 20:44:00 GMT):
Hi everyone. Is there a well-documented example anywhere on `entityMatchers`?

kostas (Sun, 12 Aug 2018 20:44:00 GMT):
Hi everyone. Is there a well-documented example anywhere on `entityMatchers`? (I'm aware of this directory: https://github.com/hyperledger/fabric-sdk-go/tree/02ba89a7414c60a968637abadf8a6b8a6feefe5b/pkg/core/config/testdata/matcher-samples but I'm afraid I'm still lost :grin:)

kostas (Sun, 12 Aug 2018 20:44:00 GMT):
Hi everyone. Q1: Is there a well-documented example anywhere on `entityMatchers`? (I'm aware of this directory: https://github.com/hyperledger/fabric-sdk-go/tree/02ba89a7414c60a968637abadf8a6b8a6feefe5b/pkg/core/config/testdata/matcher-samples but I'm afraid I'm still lost :grin:)

kostas (Sun, 12 Aug 2018 21:35:11 GMT):
Another question. In `organizations.orgName.cryptoPath` we are to point to the org's MSP store, but [the example](https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L245) points to the user MSP directory. I get that the admin, CA, and TLS CA certs between `peerOrganizations/org1.example.com/users/{username}@org1.example.com/msp` and `peerOrganizations/org1.example.com/msp` are the same, but shouldn't we be pointing to the latter location for correctness?

kostas (Sun, 12 Aug 2018 21:35:11 GMT):
Q2: In `organizations.orgName.cryptoPath` we are to point to the org's MSP store, but [the example](https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml#L245) points to the user MSP directory. I get that the admin, CA, and TLS CA certs between `peerOrganizations/org1.example.com/users/{username}@org1.example.com/msp` and `peerOrganizations/org1.example.com/msp` are the same, but shouldn't we be pointing to the latter location for correctness?

kostas (Mon, 13 Aug 2018 00:04:03 GMT):
When reading this line:

kostas (Mon, 13 Aug 2018 00:04:03 GMT):
Q3: When reading this line:

kostas (Mon, 13 Aug 2018 00:04:03 GMT):
Q3: When reading [this line](https://github.com/hyperledger/fabric-sdk-go/blob/708bb63981b66c1b6e9bb42a36a181dcef5c8644/test/fixtures/config/config_test.yaml#L144):

kostas (Mon, 13 Aug 2018 00:04:04 GMT):
> # deprecated: not recommended, to override any orderer configuration items, entity matchers should be used.

kostas (Mon, 13 Aug 2018 00:05:47 GMT):
I am under the impression that _using_ entity matchers is deprecated. But it seems like I'm reading it wrong? Because I am getting the following error message:

kostas (Mon, 13 Aug 2018 00:05:49 GMT):
> fab.detectDeprecatedNetworkConfig -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration

kostas (Mon, 13 Aug 2018 00:05:58 GMT):
Which means I _should_ be using entity matchers?

kostas (Mon, 13 Aug 2018 00:11:27 GMT):
Q4. I get the following error message:

kostas (Mon, 13 Aug 2018 00:11:27 GMT):
Q4: I get the following error message:

kostas (Mon, 13 Aug 2018 00:11:29 GMT):
> cannot setup the SDK: failed to create state store: CreateNewFileKeyValueStore failed: FileKeyValueStore path is empty

kostas (Mon, 13 Aug 2018 00:11:59 GMT):
I am however unable to find `FileKeyValueStore` key in [the config template](https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/template/config.yaml). What am I missing?

kostas (Mon, 13 Aug 2018 00:13:35 GMT):
The closest think I can find to it is `credentialStore.path` but the description of that key makes it sound like I don't need it, since I'm operating on a "static" network with keys pre-generated by `cryptogen`.

kostas (Mon, 13 Aug 2018 00:13:35 GMT):
The closest think I can find to it is `credentialStore.path` (and indeed, some debugging shows that [this is indeed it](https://github.com/hyperledger/fabric-sdk-go/blob/6c18d00eddb16e2734ae4e32706774af89fc07c1/pkg/fabsdk/factory/defmsp/mspfactory.go#L32)) but the description of that key makes it sound like I don't need it, since I'm operating on a "static" network with keys pre-generated by `cryptogen`.

kostas (Mon, 13 Aug 2018 00:24:12 GMT):
Q5: [This is my current configuration file](https://gist.github.com/kchristidis/ca38c7caf556b1571e02b521f8a60ba7). (I am trying to fill it up with just the bare minimum information to run my network.) Attempting to instantiate a `FabricSDK` instance gives me this error:

kostas (Mon, 13 Aug 2018 00:24:39 GMT):
> cannot setup the SDK: failed to create identity manager provider: failed to initialize identity manager for organization: Clark: org config retrieval failed exit status 1

kostas (Mon, 13 Aug 2018 00:24:39 GMT):
> cannot setup the SDK: failed to create identity manager provider: failed to initialize identity manager for organization: Clark: org config retrieval failed

kostas (Mon, 13 Aug 2018 00:24:45 GMT):
Any idea why that is?

wingsweaver (Mon, 13 Aug 2018 01:32:56 GMT):
Has joined the channel.

zerppen (Mon, 13 Aug 2018 03:41:08 GMT):
@troyronda thanks,I did it by older commit

antitoine (Mon, 13 Aug 2018 06:39:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Dp8dH9t7NLaYXGpJJ) @troyronda Yes, but I wish I'd found the cause of the problem. Why some channel names cannot be used.

Kyroy (Mon, 13 Aug 2018 06:46:32 GMT):
I'd like to call `WithIdentity` with my cert and key that I have in plaintext. Somehow similar to the `Users: map[string]fab.CertKeyPair` attribute in `fab.OrganizationConfig`. Is there an easy way to achieve this? https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabsdk/context.go#L32

zhuxubin01 (Mon, 13 Aug 2018 13:11:28 GMT):
hi,everyone ,I have some questions about fabric-go-sdk,who can kindly help to answer me 1.In end_to_end.go file,there is a “eventID := "testEvent"”,when i modify the eventID,it can not return successfully. how to set the eventID.I found it in chaincode example_cc.but when I comment the excute of the chaincode,it also can not return seccessfully(based on modified eventID).who can tell me how to use the eventID 2.when i invoke the transaction , which event should I use, blockevent or chaincode event ?. or each of the can reach the correct result

baoyangc (Mon, 13 Aug 2018 13:54:19 GMT):
@antitoine what's the cause of the channel creation failure?

antitoine (Mon, 13 Aug 2018 13:56:15 GMT):
@baoyangc when I use some channel names, I get some errors, see details here : https://stackoverflow.com/questions/51590202/channel-creation-fails-in-hyperledger-fabric-v1-2

baoyangc (Mon, 13 Aug 2018 14:00:24 GMT):
you did write out that what's the channel name before solved and after solved

antitoine (Mon, 13 Aug 2018 14:02:26 GMT):
@baoyangc before `chainhero` after `chainhero-go-lib`

baoyangc (Mon, 13 Aug 2018 14:33:36 GMT):
I tried to create a channel, failed with error:`Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied`

baoyangc (Mon, 13 Aug 2018 14:33:36 GMT):
I tried to create a channel, failed with error:```Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied```

baoyangc (Mon, 13 Aug 2018 14:34:03 GMT):
@antitoine did you meet this error

sudeshrshetty (Mon, 13 Aug 2018 14:39:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=HhXQn6JWYfveh48mG) @kostas Here we go, Samples : https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/core/config/testdata/matcher-samples Tests: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/matchers_test.go https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/matchers_test.go

sudeshrshetty (Mon, 13 Aug 2018 14:46:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=K4pq6kbEtKQyutKuD) @kostas `FileKeyValueStore` is error thrown by bccsp initialization. It is location of *client.credentialStore.cryptoStore.path* https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/cryptosuite/cryptoconfig.go#L86

kostas (Mon, 13 Aug 2018 14:47:04 GMT):
@sudeshrshetty see: https://chat.hyperledger.org/channel/fabric-sdk-go?msg=LchJfMGxtPDbH6ZpS

pankaj9310 (Mon, 13 Aug 2018 14:48:47 GMT):
Has joined the channel.

sudeshrshetty (Mon, 13 Aug 2018 14:52:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=cLiTcwtKzAHJiEm2a) @kostas viper keys are case insensitive, but still change your org name (`Clark`) to lowercase and retry

sudeshrshetty (Mon, 13 Aug 2018 14:53:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=s8zWxhXJYrJ9qMRc9) @kostas Yes, instead of channel.orderer

sudeshrshetty (Mon, 13 Aug 2018 14:55:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=e5KDqnqPmFEMpEMsr) @kostas let me check

sudeshrshetty (Mon, 13 Aug 2018 14:57:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=e5KDqnqPmFEMpEMsr) @kostas You need this https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L79 Used by user store. Not needed if all credentials are embedded in configuration and enrollments are performed elswhere.

sudeshrshetty (Mon, 13 Aug 2018 14:57:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=e5KDqnqPmFEMpEMsr) @kostas You need this https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L79 Used by user store. Not needed if all credentials are embedded in configuration and enrollments are performed elswhere. As I can see you have it already

zhuxubin01 (Mon, 13 Aug 2018 14:59:32 GMT):
hi,everyone .Who encountered such a situation when i test the end_to_end.go,first time test the executeCC is no problem,but from second time,the returned ccEvent's txid is always the previous transaction's txid.(for example,first time invoke the cc,returned txid is 123(no problem),second return 123(wrong,correct is 456),third time returned 456(wrong,correct is 789) .......)

helpsolution (Mon, 13 Aug 2018 14:59:39 GMT):
Has joined the channel.

kostas (Mon, 13 Aug 2018 14:59:56 GMT):
@sudeshrshetty: First of all, thanks for the help. Yes, I added this later on, in an effort to resolve the issue. I think my error was in thinking that "embedded" also means: "I'm pointing you to my cert files".

kostas (Mon, 13 Aug 2018 15:00:08 GMT):
Any temp dir will work for `credentialStore.path`?

helpsolution (Mon, 13 Aug 2018 15:06:33 GMT):
Hello! I have problem with events. I am using go sdk and fabric 1.1 . When I execute "RegisterTxStatusEvent(txID)", I receive in logs: [fabsdk/fab] 2018/08/13 13:04:47 UTC - connection.(*EventHubConnection).Receive -> ERRO Received error from stream: [rpc error: code = Unimplemented desc = unknown service protos.EventClients]. Sending disconnected event. [fabsdk/fab] 2018/08/13 13:04:47 UTC - eventhubclient.(*Client).registerInterests -> ERRO unable to send register interests request: timeout waiting for register interests response I did not change configs. I can connect to eventUrlSubstitutionExp with telnet. Before current day all worked well. Can you help me? I not found solution in google.

helpsolution (Mon, 13 Aug 2018 15:06:33 GMT):
Hello! I have problem with events. I am using go sdk and fabric 1.1 . When I execute "RegisterTxStatusEvent(txID)", I receive in logs: [fabsdk/fab] 2018/08/13 13:04:47 UTC - connection.(*EventHubConnection).Receive -> ERRO Received error from stream: [rpc error: code = Unimplemented desc = unknown service protos.EventClients]. Sending disconnected event. [fabsdk/fab] 2018/08/13 13:04:47 UTC - eventhubclient.(*Client).registerInterests -> ERRO unable to send register interests request: timeout waiting for register interests response [fabsdk/fab] 2018/08/13 14:58:40 UTC - eventhubclient.(*Client).registerInterests -> ERRO unable to send register interests request: connection terminated [fabsdk/fab] 2018/08/13 14:58:40 UTC - client.(*Client).t -> WARN Error invoking afterConnect handler: connection terminated. Disconnecting... [fabsdk/fab] 2018/08/13 14:58:40 UTC - client.(*Client).t -> WARN Received error from disconnect request: connection already closed I did not change configs. I can connect to eventUrlSubstitutionExp with telnet. Before current day all worked well. Can you help me? I not found solution in google.

sudeshrshetty (Mon, 13 Aug 2018 15:23:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CieSAqqzzkGTXZQbd) @kostas Yes

sudeshrshetty (Mon, 13 Aug 2018 15:24:01 GMT):
embedded means : https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/config_test_embedded_pems.yaml#L156

sudeshrshetty (Mon, 13 Aug 2018 15:33:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xrTf2tKDajTgq3vvf) @Kyroy As of now you have to create msp.SigningIdentity object based on your cert & key pair.

Kyroy (Mon, 13 Aug 2018 15:41:03 GMT):
@sudeshrshetty Yes, this is what I want to do :D But is there a helper function to do this? I found a lot of unexported functions in the IdentityManager. I know it depends on the CryptoSuite, but I can get this from the sdk.Context

Kyroy (Mon, 13 Aug 2018 15:41:34 GMT):
Also, the msp.User is exported, but does not have exported fields :/ and there is no `NewUser` function

sudeshrshetty (Mon, 13 Aug 2018 15:53:23 GMT):
as of now we don't have any exported functions for that, You may have to use IdentityManager to create one. this one may help : https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/identitymgr.go#L33

sudeshrshetty (Mon, 13 Aug 2018 15:53:23 GMT):
@Kyroy as of now we don't have any exported functions for that, You may have to use IdentityManager to create one. this one may help : https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/identitymgr.go#L33

sudeshrshetty (Mon, 13 Aug 2018 15:54:10 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/msp/client.go#L416

kostas (Mon, 13 Aug 2018 16:10:37 GMT):
@sudeshrshetty: https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sDbQQWB8o6DE6bYZB

kostas (Mon, 13 Aug 2018 16:10:43 GMT):
Thanks for sharing this.

kostas (Mon, 13 Aug 2018 16:11:09 GMT):
My follow-up questions are as follows. Consider this fragment for instance:

kostas (Mon, 13 Aug 2018 16:11:24 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/6c18d00eddb16e2734ae4e32706774af89fc07c1/pkg/core/config/testdata/matcher-samples/matchers_sample1.yaml#L23..L27

kostas (Mon, 13 Aug 2018 16:12:11 GMT):
Is there any reason why the pattern is not `peer0.org1.example.com`?

kostas (Mon, 13 Aug 2018 16:13:13 GMT):
I understand that several patterns may work, but _if_ I'm reading the regex correctly, it runs the risk of turning even `peer1.org1.example.com` (if one such peer existed) into `peer0.org1.example.com:8888`.

kostas (Mon, 13 Aug 2018 16:13:33 GMT):
So I'd expect an expression that's more correct, semantically.

kostas (Mon, 13 Aug 2018 16:13:37 GMT):
Am I overthinking this?

kostas (Mon, 13 Aug 2018 16:14:22 GMT):
(I don't even know whether I'm parsing this fragment above right.)

sudeshrshetty (Mon, 13 Aug 2018 16:33:22 GMT):
Ignore the regex patterns in matchers test, they are just written to prove the concept/unit-test

sudeshrshetty (Mon, 13 Aug 2018 16:34:38 GMT):
Actual pattern usage for integration test environment can be found here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml

kostas (Mon, 13 Aug 2018 16:37:59 GMT):
> @kostas viper keys are case insensitive, but still change your org name (`Clark`) to lowercase and retry

kostas (Mon, 13 Aug 2018 16:38:06 GMT):
Strangely enough, this worked. (Thanks!)

kostas (Mon, 13 Aug 2018 16:38:54 GMT):
@sudeshrshetty: [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=s8zWxhXJYrJ9qMRc9) @kostas Yes, instead of channel.orderer

kostas (Mon, 13 Aug 2018 16:39:19 GMT):
Not sure how to proceed here. Delete lines 18-19? https://gist.github.com/kchristidis/ca38c7caf556b1571e02b521f8a60ba7#file-sdk-config-yaml-L18..L19

kostas (Mon, 13 Aug 2018 16:40:56 GMT):
Any why is entity matcher encouraged there? What is the rationale behind this?

sudeshrshetty (Mon, 13 Aug 2018 16:44:27 GMT):
Just to make sure people use entity matchers to override orderer not `channel.orderer`. If none provided, orderer from config block will be used.

kostas (Mon, 13 Aug 2018 17:22:08 GMT):
I'm confused. So do I delete my channel.orderer entry, and call it a day?

kostas (Mon, 13 Aug 2018 17:22:33 GMT):
(And what happens if a channel has multiple orderer nodes listed in the config block and I have a preference for a certain one?)

zhuxubin01 (Mon, 13 Aug 2018 17:31:26 GMT):
@sudeshrshetty would you kindly help to see about my problem about the incorrect txid. mycode: case ccEvent = <-notifier: fmt.Println("Received CC event", ccEvent) output: Received CC event &{6a6279ae99412f1f6b67b95176b0e2ada15d4d07a99960aed39543eb21a68504 example_cc_e2e testEvent [] 24 localhost:7151} problem: 6a6279ae99412f1f6b67b95176b0e2ada15d4d07a99960aed39543eb21a68504 is not the correct txid. the correct txid is faf11fe561c31d38d10d0c164f54f3fb6425c4eb6bfa7c8e66122fb12e92d8bc in peer container.6a6279ae99412f1f6b67b95176b0e2ada15d4d07a99960aed39543eb21a68504 is the last transaction's txid

sudeshrshetty (Mon, 13 Aug 2018 17:36:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=pQrZGBNBnt7WQnJ3b) @kostas Yes and rely on channel block orderers (if you have it confugured)

sudeshrshetty (Mon, 13 Aug 2018 17:37:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xDrwpmc4CYznJHYEY) @kostas multiple orderers under channel.orderer(not recommended) or multiple entity matchers

sudeshrshetty (Mon, 13 Aug 2018 17:37:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tNST3B3Wwbnao9nYR) @zhuxubin01 let me see

sudeshrshetty (Mon, 13 Aug 2018 17:39:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fDdEZH5cGTHgEWdxE) @zhuxubin01 which sdk version you are using?

zhuxubin01 (Mon, 13 Aug 2018 17:40:32 GMT):
@sudeshrshetty 1.2

sudeshrshetty (Mon, 13 Aug 2018 17:41:14 GMT):
and commit id?

zhuxubin01 (Mon, 13 Aug 2018 17:42:29 GMT):
@sudeshrshetty where can i see the commit id

kostas (Mon, 13 Aug 2018 17:43:59 GMT):
> Yes and rely on channel block orderers (if you have it confugured) @sudeshrshetty: How do I configure this? Isn't this what `channel.orderer` is for?

sudeshrshetty (Mon, 13 Aug 2018 17:44:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GzyD7nGKXfj7S6Gfw) @zhuxubin01 I meant, are you using latest from master?

zhuxubin01 (Mon, 13 Aug 2018 17:44:36 GMT):
@sudeshrshetty yes

zhuxubin01 (Mon, 13 Aug 2018 17:44:43 GMT):
i use the master

sudeshrshetty (Mon, 13 Aug 2018 17:52:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ipk5GJpgFqcRem89W) @kostas 'channel.orderer` is for client side to override orderer for that channel (in some unusual usecases if you want to override it)

sudeshrshetty (Mon, 13 Aug 2018 18:04:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fDdEZH5cGTHgEWdxE) @zhuxubin01 How are you running your test? make integration-test?

troyronda (Mon, 13 Aug 2018 18:08:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xDrwpmc4CYznJHYEY) @kostas good point - this scenario might need an explanation on how to accomplish.

troyronda (Mon, 13 Aug 2018 18:08:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xDrwpmc4CYznJHYEY) @kostas @sudeshrshetty good point - this scenario might need an explanation on how to accomplish.

troyronda (Mon, 13 Aug 2018 18:09:35 GMT):
@kostas in general, we have wanted to minimize what comes from a static config and rely on service discovery or channel config blocks as much as possible.

sudeshrshetty (Mon, 13 Aug 2018 18:09:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=e336GxDsGMBLrsKPh) missed the 'preference' part, you may have to override orderer function in endpoint config for that.

troyronda (Mon, 13 Aug 2018 18:10:25 GMT):
entity matchers was a mechanism to remap the information from discovery

troyronda (Mon, 13 Aug 2018 18:10:25 GMT):
entity matchers was a mechanism to remap the information from discovery and channel config block.

troyronda (Mon, 13 Aug 2018 18:12:08 GMT):
(e.g., from a real URL to localhost for testing; or to handle internal/external URLs etc)

troyronda (Mon, 13 Aug 2018 18:13:08 GMT):
on top of this, we tried to make it easy to override configuration behaviors in a fine-grained manner to enable preferences or more custom behavior.

troyronda (Mon, 13 Aug 2018 18:13:27 GMT):
@sudeshrshetty is mentioning one of them above (btw perhaps a line # would help @kostas)

troyronda (Mon, 13 Aug 2018 18:16:49 GMT):
@kostas https://github.com/hyperledger/fabric-sdk-go/blob/d2e3b479a76b188de272cbcbce281b15a299fa6d/pkg/fab/opts.go#L88

troyronda (Mon, 13 Aug 2018 18:17:51 GMT):
this is the default version: https://github.com/hyperledger/fabric-sdk-go/blob/d2e3b479a76b188de272cbcbce281b15a299fa6d/pkg/fab/endpointconfig.go#L221

troyronda (Mon, 13 Aug 2018 18:27:09 GMT):
@sudeshrshetty @kostas although I'm not sure that is more satisfactory since it's just overriding (rather than allowing for a preference)

troyronda (Mon, 13 Aug 2018 18:27:09 GMT):
@sudeshrshetty @kostas although I'm not sure that is more satisfactory since it's just overriding (rather than allowing for a preference) ... in the same code path as the config file entry.

troyronda (Mon, 13 Aug 2018 18:27:09 GMT):
@sudeshrshetty @kostas although I'm not sure that is more satisfactory since it's just overriding (rather than allowing for a preference) ... in the same code path / manner as the config file entry.

troyronda (Mon, 13 Aug 2018 18:38:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xDrwpmc4CYznJHYEY) @kostas btw - current behavior is to pick at random when multiple orderer nodes are listed

troyronda (Mon, 13 Aug 2018 18:38:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xDrwpmc4CYznJHYEY) @kostas btw - current behavior is to pick at random when multiple orderer nodes are listed & iterate in case of error

troyronda (Mon, 13 Aug 2018 18:39:49 GMT):
e.g., https://github.com/hyperledger/fabric-sdk-go/blob/f429640fa00f66a31c1bdfe90ccb1daa01ea9b8a/pkg/fab/txn/txn.go#L175

troyronda (Mon, 13 Aug 2018 18:41:52 GMT):
so there isn't really great support for specifying your own preference ordering :(

troyronda (Mon, 13 Aug 2018 18:41:52 GMT):
so there isn't really great support for specifying your own preference ordering :( (other than overriding with a single entry)

troyronda (Mon, 13 Aug 2018 18:41:52 GMT):
so there currently isn't really great support for specifying your own preference ordering :( (other than overriding with a single entry)

troyronda (Mon, 13 Aug 2018 18:43:43 GMT):
it would be a good feature to have though.

zhuxubin01 (Mon, 13 Aug 2018 18:49:45 GMT):
@sudeshrshetty I run as follows 1.in dir fabric-go-sdk, make crypto-gen 2.in dir fabric-go-sdk, make channel-config-stable-gen 3.in dir fabric-go-sdk,make dockerenv-stable-up 4.in dir fabric-go-sdk,make populate-vendor 5.in dir e2e,go test --args testLocal=true 6.modify end_to_end_test.go,first comment runWithNoOrdererConfig,then modify end_to_end.go,comment createChannelAndCC,value := queryCC(client, t),and verifyFundsIsMoved,just run executeCC,and println the ccEvent,finaly,in dir e2e,go test --args testLocal=true,and compare the txid that printout and the txid in the peer0.org1 container logs.

kostas (Mon, 13 Aug 2018 18:51:15 GMT):
> @kostas in general, we have wanted to minimize what comes from a static config and rely on service discovery or channel config blocks as much as possible. @troyronda: That makes a ton of sense, thank you both.

zhuxubin01 (Mon, 13 Aug 2018 18:52:25 GMT):
@sudeshrshetty you can find the ccEvent's txid are the same in step 5 and step 6

zhuxubin01 (Mon, 13 Aug 2018 18:52:57 GMT):
but not the same in the container log

zhuxubin01 (Mon, 13 Aug 2018 18:56:44 GMT):
@sudeshrshetty and you can run it again as step6 ,this time the ccEvent's Txid will the step6's actual txid,not this time's txid

sudeshrshetty (Mon, 13 Aug 2018 19:00:36 GMT):
You may have to restart docker for re-running e2e tests, e2e tests are not made for re-runs. I can see you updated tests to run them again and again within same container. In that case you may have to update verify functions too. Refer `test/integration/pkg` tests which runs inside same containers

sudeshrshetty (Mon, 13 Aug 2018 19:00:36 GMT):
@zhuxubin01 You may have to restart docker for re-running e2e tests, e2e tests are not made for re-runs. I can see you updated tests to run them again and again within same container. In that case you may have to update verify functions too. Refer `test/integration/pkg` tests which runs inside same containers

zhuxubin01 (Mon, 13 Aug 2018 19:04:37 GMT):
@sudeshrshetty what is your mean,restart docker? which docker? you means remove all started dockers and do make dockerenv-stable-up ?

zhuxubin01 (Mon, 13 Aug 2018 19:07:03 GMT):
i written my owner function and test it , the result is the same

zhuxubin01 (Mon, 13 Aug 2018 19:07:05 GMT):
func (c *ChannelController) QueryCC() { //获取input参数 c.getTransctionInput() fmt.Println(input) //获取网络配置信息 configfile := beego.AppConfig.String("FabricNetWorkConfigFile") var testa = 1 fmt.Println("局部变量地址测试开始") fmt.Printf("%v", &testa) configprovider := config.FromFile(configfile) //添加替换信息配置文件 configprovider = utils.AddLocalEntityMapping(configprovider) sdk, err := fabsdk.New(configprovider) if err != nil { c.responsefunc(false, "fabsdk.New() error", err.Error()) return } defer sdk.Close() //prepare channel client context using client context clientChannelContext := sdk.ChannelContext(input.ChannelID, fabsdk.WithUser(input.UserName), fabsdk.WithOrg(input.OrgName)) // Channel client is used to query and execute transactions (Org1 is default org) client, err := channel.New(clientChannelContext) if err != nil { c.responsefunc(false, "channel.New() error", err.Error()) return } //将输入参数转化成[][]byte var args = make([][]byte, len(input.Args)) for index, val := range input.Args { args[index] = []byte(val) } response, err := client.Query(channel.Request{ChaincodeID: input.ChaincodeID, Fcn: input.FuncID, Args: args}, channel.WithRetry(retry.DefaultChannelOpts), channel.WithTargetEndpoints(input.Targets...), ) if err != nil { c.responsefunc(false, "client.Query() error", err.Error()) } c.responsefunc(true, "query successfully", string(response.Payload)) }

zhuxubin01 (Mon, 13 Aug 2018 19:07:26 GMT):
func (c *ChannelController) InvokeCC() { //获取input参数 c.getTransctionInput() //获取网络配置信息 configfile := beego.AppConfig.String("FabricNetWorkConfigFile") configprovider := config.FromFile(configfile) //添加替换信息配置文件 configprovider = utils.AddLocalEntityMapping(configprovider) sdk, err := fabsdk.New(configprovider) if err != nil { c.responsefunc(false, "fabsdk.New() error", err.Error()) return } defer sdk.Close() //prepare channel client context using client context clientChannelContext := sdk.ChannelContext(input.ChannelID, fabsdk.WithUser(input.UserName), fabsdk.WithOrg(input.OrgName)) // Channel client is used to query and execute transactions (Org1 is default org) client, err := channel.New(clientChannelContext) if err != nil { c.responsefunc(false, "channel.New() error", err.Error()) return } eventID := "testEvent" // Register chaincode event (pass in channel which receives event details when the event is complete) reg, notifier, err := client.RegisterChaincodeEvent(input.ChaincodeID, eventID) if err != nil { c.responsefunc(false, "Failed to register cc event", err.Error()) } defer client.UnregisterChaincodeEvent(reg) var args = make([][]byte, len(input.Args)) for index, val := range input.Args { args[index] = []byte(val) } _, err = client.Execute(channel.Request{ChaincodeID: input.ChaincodeID, Fcn: input.FuncID, Args: args}, channel.WithRetry(retry.DefaultChannelOpts)) if err != nil { c.responsefunc(false, "Failed to invoke chaincode", err.Error()) } if flag == "1" { time.Sleep(time.Second * 10) } var ccEvent *fab.CCEvent select { case ccEvent = <-notifier: fmt.Println("Received CC event", ccEvent) // t.Logf("Received CC event: %#v\n", ccEvent) case <-time.After(time.Second * 20): c.responsefunc(false, "Did NOT receive CC event for eventID", eventID) // t.Fatalf("Did NOT receive CC event for eventId(%s)\n", eventID) } // select { // case ccEvent = <-notifier: // fmt.Println("Received CC event", ccEvent) // // t.Logf("Received CC event: %#v\n", ccEvent) // case <-time.After(time.Second * 20): // c.responsefunc(false, "Did NOT receive CC event for eventID", eventID) // // t.Fatalf("Did NOT receive CC event for eventId(%s)\n", eventID) // } // c.responsefunc(true, "query successfully", string(response.Payload)) }

zhuxubin01 (Mon, 13 Aug 2018 19:10:12 GMT):
InvokeCC is my own function , i tested it with postman, the result is the same @sudeshrshetty

sudeshrshetty (Mon, 13 Aug 2018 19:11:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=LmFLLBM7QGn74RKbb) @zhuxubin01 make dockerenv-stable-up

zhuxubin01 (Mon, 13 Aug 2018 19:16:48 GMT):
@sudeshrshetty i think that is not problem. I did my own fuction,result is the same

sudeshrshetty (Mon, 13 Aug 2018 19:19:15 GMT):
@zhuxubin01 If I understood correctly, you are getting previous to previous event id everytime>

sudeshrshetty (Mon, 13 Aug 2018 19:19:15 GMT):
@zhuxubin01 If I understood correctly, you are getting previous to previous event everytime>

zhuxubin01 (Mon, 13 Aug 2018 19:21:56 GMT):
@sudeshrshetty yes,but what is the problem ,what's wrong in my own fuction.

zhuxubin01 (Mon, 13 Aug 2018 19:22:46 GMT):
if i don't want to restart docker , how should i modify

sudeshrshetty (Mon, 13 Aug 2018 20:09:26 GMT):
Probably a bug from ourside, creating a ticket to investigate. Meanwhile, in your local version can you comment below line and retry. Also, let me know if it works https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/events/deliverclient/deliverclient.go#L72

sudeshrshetty (Mon, 13 Aug 2018 20:09:26 GMT):
@zhuxubin01 Probably a bug from ourside, creating a ticket to investigate. Meanwhile, in your local version can you comment below line and retry. Also, let me know if it works https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/events/deliverclient/deliverclient.go#L72

sudeshrshetty (Mon, 13 Aug 2018 20:09:32 GMT):
Just a guess

zhuxubin01 (Mon, 13 Aug 2018 20:30:43 GMT):
@sudeshrshetty tried,after commented that line ,client.Execute will not over

sudeshrshetty (Mon, 13 Aug 2018 20:39:41 GMT):
may need a proper fix then, https://jira.hyperledger.org/browse/FABG-717 created

sudeshrshetty (Mon, 13 Aug 2018 20:42:35 GMT):
@zhuxubin01 https://jira.hyperledger.org/browse/FABG-718 created.

sudeshrshetty (Mon, 13 Aug 2018 20:43:18 GMT):
as of now, try to stick with same sdk/chclient instance. You may get this problem everytime you create new one

troyronda (Mon, 13 Aug 2018 21:13:57 GMT):
@here Hi all- FYI, the old eventhub client is being removed the Go SDK. This means that only the new deliver service that was introduced in Fabric 1.1 will work going forward (and Fabric 1.0 will not be compatible with this SDK). Please see the higher-level Fabric ticket for background: https://jira.hyperledger.org/browse/FAB-11122

troyronda (Mon, 13 Aug 2018 21:13:57 GMT):
@here Hi all- FYI, the old eventhub client is being removed from the Go SDK. This means that only the new deliver service that was introduced in Fabric 1.1 will work going forward (and Fabric 1.0 will not be compatible with this SDK). Please see the higher-level Fabric ticket for background: https://jira.hyperledger.org/browse/FAB-11122

troyronda (Mon, 13 Aug 2018 21:15:01 GMT):
(the commit with this change is here: https://gerrit.hyperledger.org/r/c/25495/)

sudeshrshetty (Mon, 13 Aug 2018 21:16:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SCAisP2wqSwBZGTow) @antitoine fixed this issue in https://gerrit.hyperledger.org/r/#/c/25503/

JaccobSmith (Tue, 14 Aug 2018 03:07:49 GMT):
Has joined the channel.

JaccobSmith (Tue, 14 Aug 2018 03:07:53 GMT):
Did anyone use the fabric-go-cli ? https://github.com/securekey/fabric-examples/tree/master/fabric-cli When I tried to create a channel , there's an error : user not found

JaccobSmith (Tue, 14 Aug 2018 03:36:23 GMT):

Clipboard - August 14, 2018 11:36 AM

antitoine (Tue, 14 Aug 2018 06:59:26 GMT):
@sudeshrshetty Thanks !!

Kyroy (Tue, 14 Aug 2018 07:47:45 GMT):
Found a panic in the sdk. Probably because I misconfigured it. But I think there should be a proper error :D ```2018/08/14 09:43:59 http: panic serving [::1]:54540: runtime error: invalid memory address or nil pointer dereference goroutine 7 [running]: net/http.(*conn).serve.func1(0xc000474140) /Users/xxxxxxx/sdk/go1.11beta3/src/net/http/server.go:1746 +0xd0 panic(0x48463a0, 0x507b270) /Users/xxxxxxx/sdk/go1.11beta3/src/runtime/panic.go:513 +0x1b9 github.com/hyperledger/fabric-sdk-go/pkg/fabsdk.(*FabricSDK).newIdentity(0x0, 0xc000367ca0, 0x2, 0x2, 0x28, 0xc0004deb10, 0x0, 0xc00006ac00) /Users/xxxxxxx/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v0.0.0-20180810202845-708bb63981b6/pkg/fabsdk/context.go:53 +0x36 github.com/hyperledger/fabric-sdk-go/pkg/fabsdk.(*FabricSDK).Context.func1(0xc00035d640, 0x400e568, 0x30, 0x48b01e0) /Users/xxxxxxx/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v0.0.0-20180810202845-708bb63981b6/pkg/fabsdk/fabsdk.go:313 +0x4e github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt.New(0xc0004deb10, 0x0, 0x0, 0x0, 0xc0004deb10, 0x0, 0x0) /Users/xxxxxxx/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v0.0.0-20180810202845-708bb63981b6/pkg/client/resmgmt/resmgmt.go:156 +0x2b .... (my code) ```

zhuxubin01 (Tue, 14 Aug 2018 09:35:56 GMT):
@sudeshrshetty About the config_e2e.yaml ,there are not default config such as grpcoptions,by default,grpc keep-alive is not permitted,and actully for example,in production env,what is this should be set(grpcoptions)

troyronda (Tue, 14 Aug 2018 11:05:53 GMT):
@antitoine @sudeshrshetty merged 25503

troyronda (Tue, 14 Aug 2018 14:43:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7CEtnfcpy676EGwcW) This is now merged. Please ensure that you update to Fabric 1.1 or higher before using the updated SDK.

aleksandar.likic (Tue, 14 Aug 2018 17:52:44 GMT):
@JaccobSmith Are you able to execute "make example-network" and "Create channel 'mychannel'" command, as described at the beginning of the Quick Tour in README? They should work.

aleksandar.likic (Tue, 14 Aug 2018 17:52:44 GMT):
@JaccobSmith Are you able to execute "make example-network" and "Create channel 'mychannel'" command, as described at the beginning of the Quick Tour in README? They should work. You should be able to use it as the starting point.

JaccobSmith (Wed, 15 Aug 2018 00:44:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SwH7F4xwmZSvjwpbt) @aleksandar.likic Yes,"make example-network" command works, but "Create channel 'mychnanel'" dose not

JaccobSmith (Wed, 15 Aug 2018 00:44:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sAPkHxCzR93fcBkWs) it just repliyed the error as the picture says

zhuxubin01 (Wed, 15 Aug 2018 10:04:34 GMT):
hi,everyone. I have a question about the following source in /fabric-sdk-go/pkg/fab/txn/txn.go,who can kindly help to answer me. var errResp error for _, i := range rand.Perm(len(randOrderers)) { resp, err := sendBroadcast(reqCtx, envelope, randOrderers[i]) if err != nil { errResp = err } else { return resp, nil } } question 1 if there are more than one orderers, according this source the response from endorser peer will be sent to all of the orderers. According to my understanding,each orderer will send the message to the kafka, the first time that be sent to kafka will be valid transaction,and the second time will be invalid.is it right question 2 if the first time send to the orderer1 returns no problem,and the second time send to the orderer2 returns error(for example orderer2 container stopped),what will happen in this case. the transaction of this time returned is success ?

zhuxubin01 (Wed, 15 Aug 2018 13:40:33 GMT):
@sudeshrshetty hi,I had following test.for peer0.org1 and pee1.org1 container,anyone stop,the query can not excute

zhuxubin01 (Wed, 15 Aug 2018 13:40:33 GMT):
@sudeshrshetty hi,I had following test.for peer0.org1 and pee1.org1 container,anyone stop,the query can not excute mytarget is peer1.org1 error message is following: \"response\":\"event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051]\"}"

zhuxubin01 (Wed, 15 Aug 2018 13:40:33 GMT):
@sudeshrshetty hi,I had following test.for peer0.org1 and pee1.org1 container,anyone stop,the query can not excute mytarget is peer1.org1 error message is following: \"response\":\"event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051]\"}"

zhuxubin01 (Wed, 15 Aug 2018 13:40:33 GMT):
@sudeshrshetty hi,I had following test.for peer0.org1 and pee1.org1 container,anyone stop,the query can not excute mytarget is peer1.org1 error message is following: \"response\":\"event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051]\"}" according to my understand, for query chaincode , if one peer stopped,the other one also can query as a target

troyronda (Wed, 15 Aug 2018 14:00:46 GMT):
@zhuxubin01 if err == nil, the loop is terminated by the return statement.

troyronda (Wed, 15 Aug 2018 14:01:49 GMT):
(the intention being to try another orderer if the first one failed, but don't try another orderer if the first one succeeded).

zhuxubin01 (Wed, 15 Aug 2018 14:46:26 GMT):
@troyronda thanks ,and would you help to check another problem. when I stop the peer0.org1 container, I did a query to peer1.org1 with param target,it returns dialing error,but i start the container peer0.org1,and also query to peer1.org1 with param target it returns ok.Why peer0.org1 container shoulder be running when query target peer1.org1

zhuxubin01 (Wed, 15 Aug 2018 14:46:26 GMT):
@troyronda thanks ,and would you help to check another problem. when I stop the peer0.org1 container, I did a query to peer1.org1 with param target,it returns dialing error,but i start the container peer0.org1,and also query to peer1.org1 with param target it returns ok.Why peer0.org1 container shoulder be running when query target peer1.org1 I use the config_e2e.yaml

zhuxubin01 (Wed, 15 Aug 2018 14:46:26 GMT):
@troyronda thanks ,and would you help to check another problem. when I stop the peer0.org1 container, I did a query to peer1.org1 with param target,it returns dialing error,but i start the container peer0.org1,and also query to peer1.org1 with param target it returns ok.Why peer0.org1 container shoulder be running when query target peer1.org1 I use the config_e2e.yaml

zhuxubin01 (Wed, 15 Aug 2018 14:46:26 GMT):
@troyronda thanks ,and would you help to check another problem. when I stop the peer0.org1 container, I did a query to peer1.org1 with param target,it returns dialing error,but i start the container peer0.org1,and also query to peer1.org1 with param target it returns ok.Why peer0.org1 container shoulder be running when query target peer1.org1 I use the config_e2e.yaml err message "{\"success\":false,\"message\":\"channel.New() error\",\"response\":\"event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051]\"}"

sudeshrshetty (Wed, 15 Aug 2018 22:25:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3GLAp6ayBirxY2GvG) @zhuxubin01 problem is fixed. Try with latest master now. https://gerrit.hyperledger.org/r/#/c/25553/

troyronda (Wed, 15 Aug 2018 23:12:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=k4m2cmapyaLhBN66L) @zhuxubin01 The SDK uses the peers defined in config_e2e.yaml as boostrap - a subset of these peers are queryed to determine channel configuration from the channel's config block.

troyronda (Wed, 15 Aug 2018 23:12:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=k4m2cmapyaLhBN66L) @zhuxubin01 The SDK uses the peers defined in config_e2e.yaml as boostrap - a subset of these peers are queryed to discover peers and a subset of peers is used to determine channel configuration from the channel's config block.

troyronda (Wed, 15 Aug 2018 23:12:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=k4m2cmapyaLhBN66L) @zhuxubin01 The SDK uses the peers defined in config_e2e.yaml as boostrap - a subset of these peers are queryed to discover peers and a subset of discovered peers is used to determine channel configuration from the channel's config block.

zhuxubin01 (Thu, 16 Aug 2018 00:51:28 GMT):
@troyronda I just want to do a query to the target peer1.org1,why it need to get channel configuration ? Is there any method that don't excute this query when I just want to query on a certain peer(because I think it is possible that the peer0.org1 downed in actual environment.In this case ,all the query will be unsuccessful,this is a serious problem for some system ).

zhuxubin01 (Thu, 16 Aug 2018 00:51:28 GMT):
@troyronda I just want to do a query to the target peer1.org1,why it need to get channel configuration ? Is there any method that don't get channel configuration with a param when I just want to query on a certain peer(because I think it is possible that the peer0.org1 downed in actual environment.In this case ,all the query will be unsuccessful,this is a serious problem for some system ).

bjwswang (Thu, 16 Aug 2018 05:02:02 GMT):
@troyronda When i use sdk-go query channel configurations with orgClient.QueryConfigFromOrderer(channelID, resmgmt.WithOrdererEndpoint(c.OrdererName)) I found I got empty content in config.Versions().Channel . Do you have any idea on this ?

bjwswang (Thu, 16 Aug 2018 07:08:15 GMT):
@troyronda I just tried to query channel config block by using ledger client ` // Initialize sdk,mspClient,orgClient... sdk, err := fabsdk.New(config.FromFile(c.Base.ConnectionProfile)) if err != nil { fmt.Printf("Loading config file failure: %s\n", err) return err } defer sdk.Close() channelClientCtx := sdk.ChannelContext(channelID, fabsdk.WithUser("Admin"), fabsdk.WithOrg("org1")) // Get a ledger client. ledgerClient, err := ledger.New(channelClientCtx) if err != nil{ fmt.Println(err) } // Retrieve current channel configuration fmt.Printf("peer target point : %s \n",connection.Organizations[c.PeerOrgName].Peers[0]) var peerTargets = connection.Organizations[c.PeerOrgName].Peers // Test Query Info - retrieve values before transaction cfgEnvelope, err := ledgerClient.QueryConfig(ledger.WithTargetEndpoints(peerTargets[0:1]...))` But I got errors :smirk: `could not get chConfig cache reference: read configuration for channel peers failed` Any ideas on this problem ? Thanks in advance!

bjwswang (Thu, 16 Aug 2018 07:08:15 GMT):
@troyronda I just tried to query channel config block by using ledger client ` // Initialize sdk,mspClient,orgClient... sdk, err := fabsdk.New(config.FromFile(c.Base.ConnectionProfile)) if err != nil { fmt.Printf("Loading config file failure: %s\n", err) return err } defer sdk.Close() channelClientCtx := sdk.ChannelContext(channelID, fabsdk.WithUser("Admin"), fabsdk.WithOrg("org1")) // Get a ledger client. ledgerClient, err := ledger.New(channelClientCtx) if err != nil{ fmt.Println(err) } // Retrieve current channel configuration fmt.Printf("peer target point : %s \n",connection.Organizations[c.PeerOrgName].Peers[0]) var peerTargets = connection.Organizations[c.PeerOrgName].Peers // Test Query Info - retrieve values before transaction cfgEnvelope, err := ledgerClient.QueryConfig(ledger.WithTargetEndpoints(peerTargets[0:1]...)) But I got errors :smirk: `could not get chConfig cache reference: read configuration for channel peers failed` Any ideas on this problem ? Thanks in advance!

bjwswang (Thu, 16 Aug 2018 07:08:15 GMT):
@troyronda I just tried to query channel config block by using ledger client ` // Initialize sdk,mspClient,orgClient... sdk, err := fabsdk.New(config.FromFile(c.Base.ConnectionProfile)) if err != nil { fmt.Printf("Loading config file failure: %s\n", err) return err } defer sdk.Close() channelClientCtx := sdk.ChannelContext(channelID, fabsdk.WithUser("Admin"), fabsdk.WithOrg("org1")) // Get a ledger client. ledgerClient, err := ledger.New(channelClientCtx) if err != nil{ fmt.Println(err) } // Retrieve current channel configuration fmt.Printf("peer target point : %s \n",connection.Organizations[c.PeerOrgName].Peers[0]) var peerTargets = connection.Organizations[c.PeerOrgName].Peers // Test Query Info - retrieve values before transaction cfgEnvelope, err := ledgerClient.QueryConfig(ledger.WithTargetEndpoints(peerTargets[0:1]...)) But I got errors :smirk: `could not get chConfig cache reference: read configuration for channel peers failed` Any ideas on this problem ? Thanks in advance!

bjwswang (Thu, 16 Aug 2018 07:08:15 GMT):
@troyronda I just tried to query channel config block by using ledger client ` // Initialize sdk,mspClient,orgClient... sdk, err := fabsdk.New(config.FromFile(c.Base.ConnectionProfile)) if err != nil { fmt.Printf("Loading config file failure: %s\n", err) return err } defer sdk.Close() channelClientCtx := sdk.ChannelContext(channelID, fabsdk.WithUser("Admin"), fabsdk.WithOrg("org1")) // Get a ledger client. ledgerClient, err := ledger.New(channelClientCtx) if err != nil{ fmt.Println(err) } // Retrieve current channel configuration fmt.Printf("peer target point : %s \n",connection.Organizations[c.PeerOrgName].Peers[0]) var peerTargets = connection.Organizations[c.PeerOrgName].Peers // Test Query Info - retrieve values before transaction cfgEnvelope, err := ledgerClient.QueryConfig(ledger.WithTargetEndpoints(peerTargets[0:1]...)) But I got errors `could not get chConfig cache reference: read configuration for channel peers failed` Any ideas on this problem ? Thanks in advance!

bjwswang (Thu, 16 Aug 2018 07:08:15 GMT):
@troyronda I just tried to query channel config block by using ledger client ` // Initialize sdk,mspClient,orgClient... sdk, err := fabsdk.New(config.FromFile(c.Base.ConnectionProfile)) if err != nil { fmt.Printf("Loading config file failure: %s\n", err) return err } defer sdk.Close() channelClientCtx := sdk.ChannelContext(channelID, fabsdk.WithUser("Admin"), fabsdk.WithOrg("org1")) // Get a ledger client. ledgerClient, err := ledger.New(channelClientCtx) if err != nil{ fmt.Println(err) } // Retrieve current channel configuration fmt.Printf("peer target point : %s \n",connection.Organizations[c.PeerOrgName].Peers[0]) var peerTargets = connection.Organizations[c.PeerOrgName].Peers // Test Query Info - retrieve values before transaction cfgEnvelope, err := ledgerClient.QueryConfig(ledger.WithTargetEndpoints(peerTargets[0:1]...)) But I got errors `could not get chConfig cache reference: read configuration for channel peers failed` Any ideas on this problem ? Thanks in advance!

bjwswang (Thu, 16 Aug 2018 07:08:15 GMT):
@troyronda I just tried to query channel config block by using ledger client ` // Initialize sdk,mspClient,orgClient... sdk, err := fabsdk.New(config.FromFile(c.Base.ConnectionProfile)) if err != nil { fmt.Printf("Loading config file failure: %s\n", err) return err } defer sdk.Close() channelClientCtx := sdk.ChannelContext(channelID, fabsdk.WithUser("Admin"), fabsdk.WithOrg("org1")) // Get a ledger client. ledgerClient, err := ledger.New(channelClientCtx) if err != nil{ fmt.Println(err) } // Retrieve current channel configuration fmt.Printf("peer target point : %s \n",connection.Organizations[c.PeerOrgName].Peers[0]) var peerTargets = connection.Organizations[c.PeerOrgName].Peers // Test Query Info - retrieve values before transaction cfgEnvelope, err := ledgerClient.QueryConfig(ledger.WithTargetEndpoints(peerTargets[0:1]...)) But I got errors `could not get chConfig cache reference: read configuration for channel peers failed` Any ideas on this problem ? Thanks in advance! I am following this example : https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/ledger/channel_ledger_test.go#L135

antitoine (Thu, 16 Aug 2018 09:08:04 GMT):
Hi everyone, Since my update this morning to the latest SDK revision, I have this random error: `Failed to get endorsing peers: Discovery status Code: (11) UNKNOWN. Description: error getting endorsers: no endorsement combination can be satisfied` Why does it sometimes work and sometimes it doesn't? How to correct the problem?

kelvinzhong (Thu, 16 Aug 2018 10:55:25 GMT):
@troyronda hi, is there any example on update the anchor peer config through fabrc-sdk-go?

troyronda (Thu, 16 Aug 2018 11:47:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mWnaryeEuHzzNvwBJ) @antitoine Have you verified that you have anchor peers properly setup in your channel config block?

troyronda (Thu, 16 Aug 2018 11:49:14 GMT):
@kelvinzhong https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L309

troyronda (Thu, 16 Aug 2018 11:50:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=F54ZAPXfwjR7GEu9t) @zhuxubin01 Maintaining local configurations in a distributed system is brittle - the SDK strives to maximize usage of service discovery and fetched configuration blocks rather than local configuration.

troyronda (Thu, 16 Aug 2018 11:50:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=F54ZAPXfwjR7GEu9t) @zhuxubin01 Maintaining local configurations in a distributed system is brittle - the SDK strives to maximize usage of service discovery and fetched configuration blocks rather than local configuration. The SDK should be retrying in case of an issue with a peer so we will need to check what's going on there.

troyronda (Thu, 16 Aug 2018 11:53:46 GMT):
note: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L146 controls the policy for fetching channel config for the example channel (mychannel). minresponses is how many matches successful responses are required; maxtargets is how many peers to attempt to query at once.

troyronda (Thu, 16 Aug 2018 11:54:27 GMT):
e.g., if you put minresponses=1 and maxtargets=2 then the SDK should query 2 peers for channel config but only require one successful response.

troyronda (Thu, 16 Aug 2018 11:59:05 GMT):
retryOpts.attempts controls how many retries to do

newthinker (Thu, 16 Aug 2018 11:59:12 GMT):
Has joined the channel.

antitoine (Thu, 16 Aug 2018 12:48:48 GMT):
@troyronda Thanks for the help! I found the source of my problem. The two peers didn't communicate between them (I didn't specify a bootstrap peer) and so as soon as the SDK initialized the channel and the chaincode on the peer that wasn't specified in the configuration block, I had this error.

zhuxubin01 (Thu, 16 Aug 2018 15:13:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=QWeMH74m9TMoEbNb7) @troyronda i try to add peer1.org1 to the channles.mychannel.peers,and modify policies.querychannelconfig.maxTargets to 2, then stop container peer0.org1 ,query with target peer1.org1, it can returns successfully. as a query it is no problem,but it spent a little long time.I think it wait for the connection to the peer0.org1. so it is possible when one of the two peers returns config,then continue the process,do not wait for another one. just my guess

zhuxubin01 (Thu, 16 Aug 2018 15:13:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=QWeMH74m9TMoEbNb7) @troyronda i try to add peer1.org1 to the channles.mychannel.peers,and modify policies.querychannelconfig.maxTargets to 2, then stop container peer0.org1 ,query with target peer1.org1, it can returns successfully. as a query it is no problem,but it spent a little long time.I think it wait for the connection to the peer0.org1. so is it possible when one of the two peers returns config,then continue the process,do not wait for another one. just my guess

muralisr (Thu, 16 Aug 2018 22:56:05 GMT):
how can I pass a transaction ID in a proposal than have the SDK generate one for me (trying to find a simple mechanism that does not involve a heavyweight provider implementation)

muralisr (Thu, 16 Aug 2018 22:56:05 GMT):
how can I pass a transaction ID in a proposal than have the SDK generate one for me (trying to find a simple mechanism that does not involve a heavyweight provider implementation) ? Thanks in advance!

muralisr (Thu, 16 Aug 2018 22:56:05 GMT):
how can I pass a transaction ID in channel.Execute than have the SDK generate one for me (trying to find a simple mechanism that does not involve a heavyweight provider implementation) ? Thanks in advance!

oqf (Fri, 17 Aug 2018 09:59:35 GMT):
Hi all! Just a quick question. In the basic set up of 1 OrdererOrg and 2 Orgs. Which is the best approach for SDK Go? 1 SDK for OrdererOrg and 1 SDK for each organization ? Thanks

oqf (Fri, 17 Aug 2018 10:01:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oYDXREMqWArLP2JEo) In the golang SDK examples, it uses just 1 SDK for all stuff (ordererOrg and individual orgs). But in a real deployment, each Org (ordererOrg and Org1/Org2) should have their own SDK implementation.

prashantsingh (Fri, 17 Aug 2018 13:29:51 GMT):
Has joined the channel.

sudeshrshetty (Fri, 17 Aug 2018 18:53:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CZ7dJFJ9cPHnrPmx5) @muralisr may be by providing your own implementation of TransactionHeader, https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/channel/transactor.go#L150

muralisr (Fri, 17 Aug 2018 21:04:28 GMT):
@sudeshrshetty ` may be by providing your own implementation of TransactionHeader` as in replacing the TransactionHeader code with my own ?

sudeshrshetty (Fri, 17 Aug 2018 21:04:42 GMT):
Yes

muralisr (Fri, 17 Aug 2018 21:05:42 GMT):
that's a thought... and simpler than replacing handler in the chain (which was another suggestion I got.. not my own!)

muralisr (Fri, 17 Aug 2018 21:06:13 GMT):
I think both are viable actually

troyronda (Fri, 17 Aug 2018 21:15:17 GMT):
@muralisr @sudeshrshetty I don't recall an option that allows you to pass-in the transactor interace

troyronda (Fri, 17 Aug 2018 21:15:33 GMT):
(that has the TransactionHeader)

troyronda (Fri, 17 Aug 2018 21:15:33 GMT):
(that has the CreateTransactionHeader func)

muralisr (Fri, 17 Aug 2018 21:16:38 GMT):
@troyronda I took Sudesh's suggestion to mean replacing modifying existing TransactionHeader

muralisr (Fri, 17 Aug 2018 21:16:38 GMT):
@troyronda I took Sudesh's suggestion to mean replacing existing TransactionHeader

troyronda (Fri, 17 Aug 2018 22:29:42 GMT):
(you could indirectly override by passing a modified service factory impl into sdk.New)

jakereps (Fri, 17 Aug 2018 22:52:01 GMT):
1.2

tylerwince (Sat, 18 Aug 2018 03:32:13 GMT):
Has joined the channel.

davidkhala (Sat, 18 Aug 2018 04:56:09 GMT):
Has joined the channel.

davidkhala (Sat, 18 Aug 2018 04:56:18 GMT):
Hi, gophers

davidkhala (Sat, 18 Aug 2018 04:57:41 GMT):
There are continuous demanding for version label from customers. Is there plan or milestone to do that?

khushboo_goel (Sat, 18 Aug 2018 16:27:06 GMT):
Has joined the channel.

khushboo_goel (Sat, 18 Aug 2018 16:29:58 GMT):

39441491_496340347445076_1903828534095249408_n.png

tylerwince (Sat, 18 Aug 2018 21:22:15 GMT):
Any help is appreciated: We are having the same issue as @xixuejia with the event client returning `no peers to connect to` using fabric 1.2. Anyone figure this out yet?

Baha-sk (Sun, 19 Aug 2018 04:29:48 GMT):
@khushboo_goel call `make depend` then try to do `dep ensure`, the Go SDK now uses dep version 0.5.0

Baha-sk (Sun, 19 Aug 2018 04:40:05 GMT):
@tylerwince have you updated your client config lately? Refer to `fabric-sdk-go/test/fixtures/config/config_e2e.yaml` for latest updates..

Baha-sk (Sun, 19 Aug 2018 04:40:05 GMT):
@tylerwince have you updated your client config lately? Refer to `fabric-sdk-go/test/fixtures/config/config_e2e.yaml` for latest updates.. more specifically, verify this update is done in your client config: https://github.com/hyperledger/fabric-sdk-go/commit/5754d2671c5c57f2eb33987a2663e55ed58ef237#diff-5c1553b541127b21ed5c02747a01fe58

larry618 (Sun, 19 Aug 2018 07:44:48 GMT):
Has joined the channel.

kostas (Sun, 19 Aug 2018 16:20:28 GMT):
When should one expect the path specified in `credentialStore.path` to be populated with certificates? i.e. what is the SDK call that populates this directory?

kostas (Sun, 19 Aug 2018 16:21:59 GMT):
I keep getting `failed to create channel context: failed to get client context to create channel client: user not foundexit status 1` error messages.

kostas (Sun, 19 Aug 2018 16:22:41 GMT):
Debugging shows that the SDK is trying to find a certificate in `credentialStore.path` but that folder is empty.

kostas (Sun, 19 Aug 2018 17:28:39 GMT):
A config.yaml that looks like this (following @sudeshrshetty's [advice](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tTzxJdhQRcBykwMdk)): ``` credentialStore: cryptoStore: path: /tmp/fabric-example-2 ``` Gives an `failed to create state store: CreateNewFileKeyValueStore failed: FileKeyValueStore path is emptyexit status 1` error. Can anyone help me figure out why?

kostas (Sun, 19 Aug 2018 18:56:42 GMT):
`credentialStore.path` [is described as optional](https://github.com/hyperledger/fabric-sdk-go/blob/5f9228a48662995608576b7e9aa3fdd548892679/pkg/core/config/testdata/template/config.yaml#L107). In the template config file, [its value](https://github.com/hyperledger/fabric-sdk-go/blob/5f9228a48662995608576b7e9aa3fdd548892679/pkg/core/config/testdata/template/config.yaml#L109) is set to `unused/by/sdk/go` when the `cryptoconfig.path` [value](https://github.com/hyperledger/fabric-sdk-go/blob/5f9228a48662995608576b7e9aa3fdd548892679/pkg/core/config/testdata/template/config.yaml#L102) is set to `path/to/cryptoconfig`. As someone who wishes to use the SDK, I mimic this setup by setting `cryptoconfig.path` to the parent directory of `cryptogen`'s output for my network, and I omit `credentialStore.path`. When I do that, I get the following error upon instantiating the SDK: `failed to create state store: CreateNewFileKeyValueStore failed: FileKeyValueStore path is emptyexit status 1`. Debugging this shows the FileKeyValueStore actually _needs_ a value fro `credentialStore.path`, contradicting the `unused/by/sdk/go` hint in your template. Even when this is set however, my victory in trying to tame the SDK is only short-lived. When I attempt to create a channel context, I get the following error: `failed to create channel context: failed to get client context to create channel client: user not foundexit status 1`. Debugging it leads me to the `FileKeyValueStore`'s key serializer. This function is programmed to look for my user's cert (`Admin@ClarksMSP-cert.pem`) in `credentialstore.path`. However, this directory is empty. So my question is: hen should one expect the path specified in `credentialStore.path` to be populated with certificates?

kostas (Sun, 19 Aug 2018 18:56:42 GMT):
`credentialStore.path` [is described as optional](https://github.com/hyperledger/fabric-sdk-go/blob/5f9228a48662995608576b7e9aa3fdd548892679/pkg/core/config/testdata/template/config.yaml#L107). In the template config file, [its value](https://github.com/hyperledger/fabric-sdk-go/blob/5f9228a48662995608576b7e9aa3fdd548892679/pkg/core/config/testdata/template/config.yaml#L109) is set to `unused/by/sdk/go` when the `cryptoconfig.path` [value](https://github.com/hyperledger/fabric-sdk-go/blob/5f9228a48662995608576b7e9aa3fdd548892679/pkg/core/config/testdata/template/config.yaml#L102) is set to `path/to/cryptoconfig`. As someone who wishes to use the SDK, I mimic this setup by setting `cryptoconfig.path` to the parent directory of `cryptogen`'s output for my network, and I omit `credentialStore.path`.

kostas (Sun, 19 Aug 2018 18:57:21 GMT):
When I do that, I get the following error upon instantiating the SDK: `failed to create state store: CreateNewFileKeyValueStore failed: FileKeyValueStore path is emptyexit status 1`.

kostas (Sun, 19 Aug 2018 18:57:33 GMT):
Debugging this shows that the FileKeyValueStore actually _needs_ a value fro `credentialStore.path`, contradicting the `unused/by/sdk/go` hint in your template.

kostas (Sun, 19 Aug 2018 18:57:45 GMT):
Even when this is set however, my victory in trying to tame the SDK is only short-lived. When I attempt to create a channel context, I get the following error: `failed to create channel context: failed to get client context to create channel client: user not foundexit status 1`.

kostas (Sun, 19 Aug 2018 18:57:55 GMT):
Debugging it leads me to the `FileKeyValueStore`'s key serializer. This function is programmed to look for my user's cert (`Admin@ClarksMSP-cert.pem`) in `credentialstore.path`. However, this directory is empty. So my question is: hen should one expect the path specified in `credentialStore.path` to be populated with certificates?

kostas (Sun, 19 Aug 2018 18:59:45 GMT):
I am incredibly confused.

kostas (Sun, 19 Aug 2018 18:59:45 GMT):
I am incredibly confused. Thanks in advance for any help you can send my way.

parsiya (Sun, 19 Aug 2018 23:32:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yCBsgJoS2FbecY6qx) @kostas Are you already enrolled? Do you have certificates for Admin?

parsiya (Sun, 19 Aug 2018 23:32:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yCBsgJoS2FbecY6qx) @kostas Are you already enrolled? Do you have a certificate for Admin?

kostas (Sun, 19 Aug 2018 23:40:58 GMT):
@parsiya: I already have a certificate for an `Admin` user. Remember that I run cryptogen and I get its full output. See: https://gist.github.com/kchristidis/72ab08df40b4da0ac48daea09732ff89

parsiya (Mon, 20 Aug 2018 00:13:10 GMT):
Ok, I did not that. I use a config file to setup the Go SDK and I had to pass the cert and key for admin user manually under `organizations` like this ``` yaml organizations: insurance-org: mspid: insurance-org # cryptoPath: peerOrganizations/insurance-org/users/{userName}@insurance-org/msp # [Optional]. Certificate Authorities issue certificates for identification purposes in a Fabric based # network. Typically certificates provisioning is done in a separate process outside of the # runtime network. Fabric-CA is a special certificate authority that provides a REST APIs for # dynamic certificate management (enroll, revoke, re-enroll). The following section is only for # Fabric-CA servers. certificateAuthorities: - insurance-ca users: admin: Key: Path: "crypto-config-2/key.pem" Cert: Path: "crypto-config-2/cert.pem" # cryptopath: ${GOPATH}/src/tin2/crypto-config-2 ```

parsiya (Mon, 20 Aug 2018 00:13:10 GMT):
Ok, I did not know that. I use a config file to setup the Go SDK and I had to pass the cert and key for admin user manually under `organizations` like this ``` yaml organizations: insurance-org: mspid: insurance-org # cryptoPath: peerOrganizations/insurance-org/users/{userName}@insurance-org/msp # [Optional]. Certificate Authorities issue certificates for identification purposes in a Fabric based # network. Typically certificates provisioning is done in a separate process outside of the # runtime network. Fabric-CA is a special certificate authority that provides a REST APIs for # dynamic certificate management (enroll, revoke, re-enroll). The following section is only for # Fabric-CA servers. certificateAuthorities: - insurance-ca users: admin: Key: Path: "crypto-config-2/key.pem" Cert: Path: "crypto-config-2/cert.pem" # cryptopath: ${GOPATH}/src/tin2/crypto-config-2 ```

parsiya (Mon, 20 Aug 2018 00:14:11 GMT):
Although my user has not enrolled in anything yet, when initializing Go SDK I have to either set `cryptopath` or pass keys manually. (see under `users`).

parsiya (Mon, 20 Aug 2018 00:14:11 GMT):
Those are dummy keys in my case because my user has not enrolled yet. But when initializing Go SDK I have to either set `cryptopath` or pass keys manually. (see under `users`).

rajanashutosh (Mon, 20 Aug 2018 05:12:59 GMT):
Has joined the channel.

Kyroy (Mon, 20 Aug 2018 11:27:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jrGuAuACpKeog3f2h) @sudeshrshetty I honestly can't figure out how to do this properly. All the important and interesting functions are in `/internal` and they are not compatible with the fabric bccsp packages -.- Why isn't there an easy way to dynamically create a SigningIdentity from a keypair?

sudeshrshetty (Mon, 20 Aug 2018 14:58:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rTPimQBxzpBcypZwL) @Kyroy What all are the functions you need to reuse from internal/bccsp?

Kyroy (Mon, 20 Aug 2018 15:02:52 GMT):
@sudeshrshetty I am not yet 100% sure, but e.g. there is `ImportBCCSPKeyFromPEMBytes` which returns a `core.Key`. I cannot just copy&paste the method because `GetECDSAPrivateKeyImportOpts` is required, which returns a internel bccsp option. But in the function, you use reflect which only supports this internal type

Kyroy (Mon, 20 Aug 2018 15:06:51 GMT):
With this `core.Key` it should be pretty straight forward to implement the SingingIdentity (I hope :D)

sudeshrshetty (Mon, 20 Aug 2018 15:15:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=T9c92SKPXxrguRhG3) @Kyroy GetECDSAPrivateKeyImportOpts returns `core.KeyImportOpts` if I am correct

Kyroy (Mon, 20 Aug 2018 15:18:04 GMT):
@sudeshrshetty `.../go/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/sdkpatch/cryptosuitebridge/cryptosuitebridge.go`

Kyroy (Mon, 20 Aug 2018 15:18:10 GMT):
It's internal

sudeshrshetty (Mon, 20 Aug 2018 15:27:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ibvdPpM93ZwiPz5cH) @Kyroy ok, we will possibly give you a wrapper which exposes all these internal utility functions.

Kyroy (Mon, 20 Aug 2018 15:29:43 GMT):
Would also be okay to just add a function that returns a SigningIdentity based on a keypair and the CryptoSuite =)

Kyroy (Mon, 20 Aug 2018 15:29:43 GMT):
@sudeshrshetty Cool. Would also be okay to just add a function that returns a SigningIdentity based on a keypair and the CryptoSuite =)

sudeshrshetty (Mon, 20 Aug 2018 15:39:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=MF56QLbdd28bLRQrN) @Kyroy @troyronda ^^

aleksandar.likic (Mon, 20 Aug 2018 16:58:49 GMT):
@Kyroy This is from my older post, I think It's still correct: SDK supports three use cases: embedded credentials in client configuration, pre-enrolled users in the org's MSP directory, and dynamically enrolled users - when the cert is in the user store and the key in the crypto provider's key store. User identity is resolved by looking up the user enrollment cert first, and then looking up the matching private key. When resolving the cert, SDK first looks at the user store (@client.credentialStore.path); if cert is found, the key is looked up in the crypto provider key store (HSM or @client.credentialStore.cryptoStore.path). If the identity is not resolved, SDK looks up embedded certs in client configuration; if not found, it looks up the org's MSP directory (@organizations..cryptoPath). If not found, "user not found" is reported. Otherwise, the matching private key is first searched in embedded keys in client configuration, then in the crypto provider key store, and finally in the org's MSP directory.

aleksandar.likic (Mon, 20 Aug 2018 16:59:57 GMT):
@Kyroy See https://jira.hyperledger.org/browse/FABG-563, I think you are asking for one of the scenarios that are yet to be implemented

aleksandar.likic (Mon, 20 Aug 2018 16:59:57 GMT):
@Kyroy See https://jira.hyperledger.org/browse/FABG-563, I think you are asking for one of the scenarios that are yet to be implemented: scenario 2?

Kyroy (Tue, 21 Aug 2018 05:28:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KPP9JXSxdFYYcmEPi) @aleksandar.likic Exactly :D

tylerwince (Tue, 21 Aug 2018 05:40:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jR9PbnzsXAEv36SXJ) @Baha-sk Thanks -- it was a combination of this and Anchor Peers not being able to communicate with the endpoint of other Anchor Peers. We got it all figured out after updating the config and setting up our endpoints correctly :face_palm_tone1: Thanks for the point in the right direction

Kyroy (Tue, 21 Aug 2018 07:12:12 GMT):
@sudeshrshetty @aleksandar.likic https://gerrit.hyperledger.org/r/#/c/25747/ is a very first draft what would be required. Naming probably needs improvements and tests are missing. But I first want to get your feedback :)

kostas (Tue, 21 Aug 2018 13:23:04 GMT):
Any luck on the question posted here on Sunday? https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Mb3sovnSvn2hvbRx2

DerekC (Tue, 21 Aug 2018 13:38:49 GMT):
I am testing private collection right now. There are two peerOrg in the network. Org1 and Org2. Org1 peer: peer0.org1.example.com peer1.org1.example.com Org2 peer; peer0.org2.example.com peer1.org2.example.com The collection config is as follow: ``` [{ "name": "collection1", "policy": "OR('Org1MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 2, "blockToLive": 60 }] ``` collection1 only can be accessed by Org1 peer. I installed chaincode on both peerOrg peers. Then I used sdk to invoke chaincode. SDK select two random peers to invoke the chaincode. Since only peers in Org1 have the collection, it return error when sdk picks peers in org2 to execute the chaincode. Is it possible to dynamically select peers which have the collection stored in the ledger? Or do we have to config it by ourselves when invoking chaincode?

dave.enyeart (Tue, 21 Aug 2018 14:44:31 GMT):
@DerekC The SelectionService (aka Service Discovery) supports identifying potential endorsers based on a collection. See https://gerrit.hyperledger.org/r/#/c/22805/ . @troyronda is there doc for this?

zhuxubin01 (Tue, 21 Aug 2018 14:52:57 GMT):
@dave.enyeart Is there any examples that add new org to the exist fabric network by fabric-sdk-go

dave.enyeart (Tue, 21 Aug 2018 14:54:36 GMT):
Don't know, will leave that question for the fabric-sdk-go experts. (I assume you have seen the related fabric tutorial: https://hyperledger-fabric.readthedocs.io/en/latest/channel_update_tutorial.html)

zhuxubin01 (Tue, 21 Aug 2018 14:58:08 GMT):
ok,thanks,i have did it by the turorial,but so inconvenience

zhuxubin01 (Tue, 21 Aug 2018 16:22:14 GMT):
@sudeshrshetty For 2 orgs 4 peers network,how to set the anchorpeer, for one org only set one anchor or both the peers need to be set to anchorpeer. which is the suggested method

sudeshrshetty (Tue, 21 Aug 2018 18:20:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hmoSM3v76YkpLsKCp) @zhuxubin01 this one may help you https://github.com/hyperledger/fabric-sdk-go/blob/a18ca13249bf55644c9d04b3f300c634d871a992/test/integration/base_test_setup.go#L188

sudeshrshetty (Tue, 21 Aug 2018 18:24:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=m4Kc3iBmqqbGdRyAw) by the way, easiest way is to add it through `configtx.yaml`

stevehooperjr (Tue, 21 Aug 2018 21:25:20 GMT):
Has joined the channel.

stevehooperjr (Tue, 21 Aug 2018 21:25:31 GMT):
network

bdjidi (Tue, 21 Aug 2018 22:49:08 GMT):
Has joined the channel.

aleksandar.likic (Tue, 21 Aug 2018 23:31:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Mb3sovnSvn2hvbRx2) @kostas This is from my older post, I think It's still correct: SDK supports three use cases: embedded credentials in client configuration, pre-enrolled users in the org's MSP directory, and dynamically enrolled users - when the cert is in the user store and the key in the crypto provider's key store. User identity is resolved by looking up the user enrollment cert first, and then looking up the matching private key. When resolving the cert, SDK first looks at the user store (@client.credentialStore.path); if cert is found, the key is looked up in the crypto provider key store (HSM or @client.credentialStore.cryptoStore.path). If the identity is not resolved, SDK looks up embedded certs in client configuration; if not found, it looks up the org's MSP directory (@organizations..cryptoPath). If not found, "user not found" is reported. Otherwise, the matching private key is first searched in embedded keys in client configuration, then in the crypto provider key store, and finally in the org's MSP directory.

aleksandar.likic (Tue, 21 Aug 2018 23:34:43 GMT):
@kostas credentialStore.path should not be needed if the certs are embedded in configuration. The error you reported is a bug, if credentialStore.path is not specified SDK shouldn't look for it and would just try to find the used elsewhere and report user not found if it cannot find it.

aleksandar.likic (Tue, 21 Aug 2018 23:34:43 GMT):
@kostas credentialStore.path should not be needed if the certs are embedded in configuration. The error you reported is a bug, if credentialStore.path is not specified SDK shouldn't look for it and should just try to find the used elsewhere and report user not found if it cannot find it

aleksandar.likic (Tue, 21 Aug 2018 23:34:43 GMT):
@kostas credentialStore.path should be optional. The error you reported is a bug, if credentialStore.path is not specified SDK shouldn't look for it and should just try to find the used elsewhere and report user not found if it cannot find it

aleksandar.likic (Tue, 21 Aug 2018 23:37:53 GMT):
@kostas cert is normally stored to this directory when a user is enrolled; at the same time, the private key is stored into the key store (HSM or file)

aleksandar.likic (Tue, 21 Aug 2018 23:39:42 GMT):
@kostas There is an outstanding ticket to support more authentication use cases: https://jira.hyperledger.org/browse/FABG-563

aleksandar.likic (Wed, 22 Aug 2018 00:22:01 GMT):
@kostas In the meantime, if you need more control, you can inject into SDK your own MSPProviderFactory using: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#WithMSPPkg. See an example at https://github.com/hyperledger/fabric-sdk-go/blob/27e0fd88f7b9a6607a39eae634a4a1275756c39d/test/integration/pkg/client/msp/user_data_mgmt_test.go#L84

aleksandar.likic (Wed, 22 Aug 2018 00:22:01 GMT):
@kostas If you need more control, you can inject into SDK your own MSPProviderFactory using: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#WithMSPPkg. See an example at https://github.com/hyperledger/fabric-sdk-go/blob/27e0fd88f7b9a6607a39eae634a4a1275756c39d/test/integration/pkg/client/msp/user_data_mgmt_test.go#L84

kostas (Wed, 22 Aug 2018 00:45:56 GMT):
@aleksandar.likic: Thanks for explaining how cert lookup works - that certainly helps.

kostas (Wed, 22 Aug 2018 00:47:46 GMT):
If I get you right, you claim that if someone relies solely on cryptogen to generate certificates, then they can omit the `@client.credentialStore.path` and `@client.credentialStore.cryptoStore.path` settings entirely, and simply rely on `@organizations..cryptoPath`.

kostas (Wed, 22 Aug 2018 00:47:46 GMT):
If I get you right, you claim that if someone relies solely on cryptogen to generate certificates, then they can omit the `@client.credentialStore.path` and `@client.credentialStore.cryptoStore.path` settings entirely, and simply rely on `@organizations..cryptoPath`. Is this correct?

kostas (Wed, 22 Aug 2018 00:47:53 GMT):
Would the above be correct?

kostas (Wed, 22 Aug 2018 00:49:45 GMT):
If the above is correct, is `@organizations..cryptoPath` a path _relative_ to `@client.cryptoconfig`?

kostas (Wed, 22 Aug 2018 00:49:45 GMT):
If the above is correct, is `@organizations..cryptoPath` a path _relative_ to `@client.cryptoconfig`? ([A sample that I found](https://github.com/chainHero/heroes-service/blob/v1.1.0/config.yaml) makes it seems as if this is the case.)

kostas (Wed, 22 Aug 2018 00:49:45 GMT):
If the above is correct, is `@organizations..cryptoPath` a path _relative_ to `@client.cryptoconfig`? ([A sample that I found](https://github.com/chainHero/heroes-service/blob/v1.1.0/config.yaml) makes it seems as if this is the case.) Or are these two keys irrelevant?

kostas (Wed, 22 Aug 2018 00:50:03 GMT):
Or are these two keys irrelevant?

kostas (Wed, 22 Aug 2018 00:54:44 GMT):
Where I'm at right now: I've removed the `credentialStore.path` and `credentialStore.cryptoStore.path` settings, and simply relied on `@client.cryptoconfig` (setting it to the parent directory of cryptogen's output -- this is an absolute path) and `@organizations..cryptopath` (setting it to a path relative to `@client.cryptoconfig`: `peerOrganizations/org.example.com/msp`). Here's what I get:

kostas (Wed, 22 Aug 2018 00:54:46 GMT):
`failed to create state store: CreateNewFileKeyValueStore failed: FileKeyValueStore path is empty`

kostas (Wed, 22 Aug 2018 00:54:57 GMT):
So, back to square one. Help?

aleksandar.likic (Wed, 22 Aug 2018 04:00:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=x9ZceX9RYQ3EwN8pf) @kostas credentialStore.path should not be required, but it looks like it is (it's a bug, as I mentioned above). For now, as a workaround, just have it in your configuration.

aleksandar.likic (Wed, 22 Aug 2018 04:01:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5ktWTjQ5hzZCxSXyk) @kostas This should be correct, but it seems it doesn't work for you so there must be a bug. For now keep it in configuration.

aleksandar.likic (Wed, 22 Aug 2018 04:01:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5ktWTjQ5hzZCxSXyk) @kostas This should be correct, but it seems it doesn't work for you so there must be a bug. For now keep it in configuration, SDK will never find anything there, but that's fine as you want to rely on organization..cryptoPath anyways.

ohori (Wed, 22 Aug 2018 04:27:23 GMT):
Has joined the channel.

zhuxubin01 (Wed, 22 Aug 2018 04:42:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=m4Kc3iBmqqbGdRyAw) @sudeshrshetty soryy, I means how many ahchorpeers should be set in one org in the actual situation,just one peer for org or all of the peers should be set to anchorpeer

JaccobSmith (Wed, 22 Aug 2018 04:59:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oHT9T5YfzNQeuLjwj) @zhuxubin01 One or more anchor peers just decide the HA level of your network,means high availbility

zhuxubin01 (Wed, 22 Aug 2018 05:10:02 GMT):
@JaccobSmith I am a little confused no. would you give a example to explain how anchor peers Influence high avaibility

zhuxubin01 (Wed, 22 Aug 2018 05:10:02 GMT):
@JaccobSmith I am a little confused . would you give a example to explain how anchor peers Influence high avaibility

JaccobSmith (Wed, 22 Aug 2018 05:17:09 GMT):
eg: Imagine, when the only anchor peer of an ORG crashed because of some reason, and at the same time none of the nodes in this ORG kept the whole block

zhuxubin01 (Wed, 22 Aug 2018 05:40:56 GMT):
anchor peer is used to communicate with the other orgs,you means if the peer of other orgs updated its block,then the org with crashed anchor peer in your case will not get the new block ? but I remember leader peer for the org will get the block from orderer,and distribute the block to the other peers of this org. Is it right?

zhuxubin01 (Wed, 22 Aug 2018 05:42:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=eT8ngqH8KaC4G4J4a) @JaccobSmith anchor peer is used to communicate with the other orgs,you means if the peer of other orgs updated its block,then the org with crashed anchor peer in your case will not get the new block ? but I remember leader peer for the org will get the block from orderer,and distribute the block to the other peers of this org. Is it right?

JaccobSmith (Wed, 22 Aug 2018 05:45:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ZgJDvFRCTdtfGmDhJ) @zhuxubin01 not the situation as you said, it happens when the ORG is a new-joined org,and its peers need sync data from other orgs

JaccobSmith (Wed, 22 Aug 2018 05:46:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zZvETCPLLNRwFhA3h) by the way the orderer node dosen't guarantee keeping the whole blocks

zhuxubin01 (Wed, 22 Aug 2018 05:48:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wYJGDYpcK4jRZ5f4p) @JaccobSmith the orderer node dosen't guarantee keeping the whole blocks ? what kind of blocks the orderer will not keep?

JaccobSmith (Wed, 22 Aug 2018 05:49:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=onXYbb96LKxBqwLkk) @zhuxubin01 very old blocks,it's in the config of order

zhuxubin01 (Wed, 22 Aug 2018 05:51:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dGAjJYDDkzt2tq9ox) @JaccobSmith is it the HistorySize?

JaccobSmith (Wed, 22 Aug 2018 05:56:43 GMT):
Yes when you use RAM ledger

zhuxubin01 (Wed, 22 Aug 2018 06:18:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=HoH8gAuj7XG7GnEQb) @JaccobSmith thanks

meilier (Wed, 22 Aug 2018 08:24:39 GMT):
Has joined the channel.

meilier (Wed, 22 Aug 2018 08:26:39 GMT):
hello everyone , i wanna to ask a simple question. How can i run E2E Test example in fabric-sdk-go ? which docker-compose file should i run first to start containers? thanks!

kostas (Wed, 22 Aug 2018 12:23:18 GMT):
> credentialStore.path should not be required, but it looks like it is (it's a bug, as I mentioned above). For now, as a workaround, just have it in your configuration.

kostas (Wed, 22 Aug 2018 12:25:14 GMT):
@aleksandar.likic: I hear you when you say it's a bug. If I follow your workaround, I'm back to the message I posted on Sunday; the SDK is looking for a cert in the wrong path. I _must_ be missing something given that my setup is not exotic; I simply have a network with cryptogen artifacts and wish to set up the SDK with it. Are all of you guys here working with a different set up?

DerekC (Wed, 22 Aug 2018 12:33:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=C7CBQuCCRSCXq3MuA) @dave.enyeart Thanks a lot. I will have a look into this. So far, I did not find any detail document related to this.

troyronda (Wed, 22 Aug 2018 13:55:56 GMT):
@DerekC @dave.enyeart You can specify the collections in the Execute call using the InvocationChain parameter: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/api.go#L51

troyronda (Wed, 22 Aug 2018 13:55:56 GMT):
@DerekC @dave.enyeart You can specify the collections in the Execute call using the InvocationChain parameter. See https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Request (& https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/api.go#L51)

troyronda (Wed, 22 Aug 2018 13:56:38 GMT):
The parameter is this struct: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab#ChaincodeCall

troyronda (Wed, 22 Aug 2018 13:56:38 GMT):
The parameter is typed as this struct: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab#ChaincodeCall

troyronda (Wed, 22 Aug 2018 13:59:50 GMT):
@DerekC @dave.enyeart @bstasyszyn (note: the SDK also tries to figure this out automatically if any Peer could have satisfied the request but if a Peer needs to be excluded from the beginning then the collection must be specified).

troyronda (Wed, 22 Aug 2018 13:59:50 GMT):
@DerekC @dave.enyeart @bstasyszyn (note: the SDK also tries to figure this out automatically if any Peer could have satisfied the request but if a Peer needs to be excluded, then the collection must be specified)... Guessing you are in the case where you need to specify manually.

Kyroy (Wed, 22 Aug 2018 14:52:01 GMT):
@troyronda Here the collections are ignored https://sourcegraph.com/github.com/hyperledger/fabric-sdk-go@master/-/blob/pkg/client/common/selection/dynamicselection/dynamicselection.go#L102:28 Or is this the wrong place? :D

DerekC (Wed, 22 Aug 2018 14:57:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=q7y6tWFTL7FcL6kAu) @troyronda Thanks a lot. I instantiate a chincode with policy `"OR('Org1MSP.member', 'Org2MSP.member')"` collection policy: `"OR('Org1MSP.member')"` However, SDK sometime still execute the chaincode on peers of Org2. Does the SDK consider collection policy?

DerekC (Wed, 22 Aug 2018 14:57:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=q7y6tWFTL7FcL6kAu) @troyronda Thanks a lot. I instantiate a chincode with policy `"OR('Org1MSP.member', 'Org2MSP.member')"` collection policy: `"OR('Org1MSP.member')"` However, SDK sometime still execute the chaincode on peers of Org2. Does the SDK consider collection policy?

DerekC (Wed, 22 Aug 2018 14:57:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=q7y6tWFTL7FcL6kAu) @troyronda Thanks a lot. I instantiate a chincode with policy `"OR('Org1MSP.member', 'Org2MSP.member')"` collection policy: `"OR('Org1MSP.member')"` However, SDK sometimes still execute the chaincode on peers of Org2. Does the SDK consider collection policy?

troyronda (Wed, 22 Aug 2018 15:04:07 GMT):
@DerekC I assume you used the InvocationChain parameter and specified the collection and chaincode ID?

troyronda (Wed, 22 Aug 2018 15:04:21 GMT):
@bstasyszyn ^^^

aleksandar.likic (Wed, 22 Aug 2018 15:07:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=LbWgBmT9CukdDBivz) @kostas Sorry you are having this much trouble. It is true that the SDK will look for the cert in location configured by credentialStore.path, but only as a part of a broader search. Obviously, as you don't have any certs there, it won't find any, but then it should proceed by looking up any certs embedded in the configuration file, and finally under organizations..cryptoPath. Only when all these are exhausted the SDK will report user not found. I understand you expect the cert to be found in organizations..cryptoPath, so I am guessing it is not setup correctly. You can clone fabric-go-sdk master and run 'make crypto-gen'. This will generate test data under test/fixtures/fabric/v1/crypto-config. Then you can see how this location is referenced at https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/fixtures/config/config_test.yaml#L92 and https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/fixtures/config/config_test.yaml#L265. Hope this helps.

bstasyszyn (Wed, 22 Aug 2018 15:07:52 GMT):
@DerekC Take a look at https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/integration/pkg/client/channel/channel_client_pvt_test.go#L52 - This only works with Fabric 1.2+

zhuxubin01 (Thu, 23 Aug 2018 07:55:20 GMT):
@sudeshrshetty what's the mean of "UrlSubstitutionExp can be empty which means the same network hostname will be used",if i want to set this filed to empty,which hostname and which hostname should be the same

aleksandar.likic (Thu, 23 Aug 2018 12:38:14 GMT):
@kostas Couldn't reproduce your issue when credentialStore.path is missing. I added a test for exactly your case (users only under organizations..cryptoPath), see https://gerrit.hyperledger.org/r/#/c/25813/

DerekC (Thu, 23 Aug 2018 14:02:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8yWPhtttHBSgrSnaA) @bstasyszyn Thanks. It worked as expected now.

DerekC (Thu, 23 Aug 2018 14:54:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8yWPhtttHBSgrSnaA) @bstasyszyn I also saw that the SDK can Auto-detect Invocation Chain. https://github.com/hyperledger/fabric-sdk-go/blob/6c18d00eddb16e2734ae4e32706774af89fc07c1/test/integration/pkg/client/channel/channel_client_pvt_test.go#L68 How can I enable the auto-detect for invocation chain?

DerekC (Thu, 23 Aug 2018 14:54:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8yWPhtttHBSgrSnaA) @bstasyszyn I also saw that the SDK can Auto-detect Invocation Chain. https://github.com/hyperledger/fabric-sdk-go/blob/6c18d00eddb16e2734ae4e32706774af89fc07c1/test/integration/pkg/client/channel/channel_client_pvt_test.go#L68 How can I enable the auto-detect for invocation chain?

DerekC (Thu, 23 Aug 2018 14:54:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8yWPhtttHBSgrSnaA) @bstasyszyn I also see that the SDK can Auto-detect Invocation Chain. https://github.com/hyperledger/fabric-sdk-go/blob/6c18d00eddb16e2734ae4e32706774af89fc07c1/test/integration/pkg/client/channel/channel_client_pvt_test.go#L68 How can I enable the auto-detect for invocation chain?

bstasyszyn (Thu, 23 Aug 2018 15:04:33 GMT):
@DerekC Auto-detect is the default behavior of client.Execute(...). Although, it may (initially) choose an endorser that doesn't have access to the pvt collection and then your endorsement may fail.

sudeshrshetty (Thu, 23 Aug 2018 15:10:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xxtMzQJifk5x5LP2G) @zhuxubin01 if search key is a URL then search URL will be used

osmola (Thu, 23 Aug 2018 15:38:43 GMT):
Has joined the channel.

osmola (Thu, 23 Aug 2018 16:41:07 GMT):
Hi guys, is there possibility to have Pem certs from external kv store and use them in GetSigningIdentity instead of storing them on local filesystem in sdk keystore path?

troyronda (Thu, 23 Aug 2018 17:12:16 GMT):
@aleksandar.likic ^^^

aleksandar.likic (Thu, 23 Aug 2018 17:42:42 GMT):
@osmola will be available soon, I am guessing in the next couple of days - https://gerrit.hyperledger.org/r/#/c/25747/

aleksandar.likic (Thu, 23 Aug 2018 17:48:47 GMT):
@osmola sorry, this change is the ability to create SigningIdentity from cert (SDK will lookup private key) for from both cert and PK. You will be able to manage certs outside the SDK. The other option is to inject into SDK your own MSPProviderFactory using: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#WithMSPPkg. See an example at https://github.com/hyperledger/fabric-sdk-go/blob/27e0fd88f7b9a6607a39eae634a4a1275756c39d/test/integration/pkg/client/msp/user_data_mgmt_test.go#L84

aleksandar.likic (Thu, 23 Aug 2018 17:48:47 GMT):
@osmola sorry, this change is the ability to create SigningIdentity from cert (SDK will lookup private key) or from both cert and PK. You will be able to manage certs outside the SDK. The other option is to inject into SDK your own MSPProviderFactory using: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk#WithMSPPkg. See an example at https://github.com/hyperledger/fabric-sdk-go/blob/27e0fd88f7b9a6607a39eae634a4a1275756c39d/test/integration/pkg/client/msp/user_data_mgmt_test.go#L84

troyronda (Fri, 24 Aug 2018 00:06:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CZ7dJFJ9cPHnrPmx5) @muralisr An option has been added to the Endorsement invocation handler to allow for this scenario: https://gerrit.hyperledger.org/r/c/25828/

troyronda (Fri, 24 Aug 2018 00:06:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CZ7dJFJ9cPHnrPmx5) @muralisr An option has been added to the Endorsement invocation handler to allow for this scenario: https://gerrit.hyperledger.org/r/c/25828/ . This requires a custom invocation chain (InvokeHandler) but you don't need to replace the endorsement code now.

troyronda (Fri, 24 Aug 2018 00:06:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CZ7dJFJ9cPHnrPmx5) @muralisr An option has been added to the Endorsement invocation handler to allow for this scenario: https://gerrit.hyperledger.org/r/c/25828/ . This requires a custom invocation chain (InvokeHandler) but you don't need to replace the endorsement nor transaction header creation code now.

xuchenhao001 (Fri, 24 Aug 2018 06:25:43 GMT):
Hi, I have some questions about event hub in node sdk. Is event hub necessary during invoking/instantiating?

xuchenhao001 (Fri, 24 Aug 2018 06:27:42 GMT):
I mean, when I do `sendTransaction()`, there is an response indicate that my tx has been accepted, so must the tx be appended to the ledger?

xuchenhao001 (Fri, 24 Aug 2018 07:09:30 GMT):
Has left the channel.

Kyroy (Fri, 24 Aug 2018 08:20:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=AmC8yhZfSTy9g8Lq2) @xuchenhao001 #fabric-sdk-node

xuchenhao001 (Fri, 24 Aug 2018 08:20:25 GMT):
Has joined the channel.

xuchenhao001 (Fri, 24 Aug 2018 08:22:26 GMT):
@Kyroy I'm sorry, but I notice that fabric-sdk-go also has a event hub, so should I use that during invoking?

Kyroy (Fri, 24 Aug 2018 08:24:16 GMT):
@xuchenhao001 The go sdk handles the eventhub for you if you just want to make an invoke. However, the eventhub was removed in the latest version of the go sdk because it is "deprecated' in newer fabric versions (and will be removed)

xuchenhao001 (Fri, 24 Aug 2018 08:24:50 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L145-L151

xuchenhao001 (Fri, 24 Aug 2018 08:26:01 GMT):
So why is that deprecated? What we use to verify the tx has been committed to the ledger without event hub?

Kyroy (Fri, 24 Aug 2018 08:29:54 GMT):
there is another thing for events, but I don't know the details

xuchenhao001 (Fri, 24 Aug 2018 08:30:52 GMT):
thanks, but can you give me some docs about this problem?

Kyroy (Fri, 24 Aug 2018 08:31:30 GMT):
I would have to search them, too

zhuxubin01 (Fri, 24 Aug 2018 09:32:13 GMT):
hi,everybody,if I want to create Noutof Poilcy with FromString,how should I write the string.Is there an examples

troyronda (Fri, 24 Aug 2018 10:55:44 GMT):
@xuchenhao001 event hub was replaced by deliver service in Fabric 1.1. The deliver service is now used to determine if a transaction was committed.

troyronda (Fri, 24 Aug 2018 10:57:24 GMT):
(event hub was removed from Fabric master so will not be in 1.3 - only deliver service now)

troyronda (Fri, 24 Aug 2018 10:58:44 GMT):
SDK (master) now only supports Fabric 1.1 and higher

Rachit_gaur (Fri, 24 Aug 2018 10:59:50 GMT):
Hi, I have added anchor peers to a channel, do i have to add the other peers as well if they will also be querying the chaincode ?

Rachit_gaur (Fri, 24 Aug 2018 11:12:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=pRxrddH6WRQdhswzQ) @meilier start with the byfn.sh script that can be found in the first-network folder, it contains default network settings

kostas (Fri, 24 Aug 2018 16:29:55 GMT):
> Then you can see how this location is referenced at https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/fixtures/config/config_test.yaml#L92 and https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/fixtures/config/config_test.yaml#L265. Hope this helps. @aleksandar.likic: Thanks for posting this. What is the value of `${CRYPTOCONFIG_FIXTURES_PATH}`?

kostas (Fri, 24 Aug 2018 16:29:55 GMT):
> Then you can see how this location is referenced at https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/fixtures/config/config_test.yaml#L92 and https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/fixtures/config/config_test.yaml#L265. Hope this helps. @aleksandar.likic - Thanks for posting this. What is the value of `${CRYPTOCONFIG_FIXTURES_PATH}`?

kostas (Fri, 24 Aug 2018 16:29:55 GMT):
> Then you can see how this location is referenced at https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/fixtures/config/config_test.yaml#L92 and https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/fixtures/config/config_test.yaml#L265. Hope this helps. @aleksandar.likic Thanks for posting this. What is the value of `${CRYPTOCONFIG_FIXTURES_PATH}`?

kostas (Fri, 24 Aug 2018 16:29:55 GMT):
> Then you can see how this location is referenced at https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/fixtures/config/config_test.yaml#L92 and https://github.com/hyperledger/fabric-sdk-go/blob/fa3c843d7b773521bbd56d0f429c87c8f6271195/test/fixtures/config/config_test.yaml#L265. Hope this helps. @aleksandar.likic: Thanks for posting this. What is the value of `${CRYPTOCONFIG_FIXTURES_PATH}`?

Baha-sk (Fri, 24 Aug 2018 19:39:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=2TcE3GawHFYPGYhkH) @kostas it should be the value of `client.cryptoconfig.path` in your config file

Baha-sk (Fri, 24 Aug 2018 19:39:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=2TcE3GawHFYPGYhkH) @kostas it should be the `crypto-config` folder found under the fabric release folder ie: `test/fixtures/fabric/v1/crypto-config`

troyronda (Fri, 24 Aug 2018 20:15:18 GMT):
@kostas @Baha-sk this is a special variable that the SDK sets to the content of metadata.CryptoConfigPath (https://github.com/hyperledger/fabric-sdk-go/blob/2ad5906cb2aa138f8ee01d2df3d2b5b3c26f13c7/test/metadata/metadata.go)

troyronda (Fri, 24 Aug 2018 20:16:35 GMT):
The test scripts set this variable using the -X argument. E.g., https://github.com/hyperledger/fabric-sdk-go/blob/2ad5906cb2aa138f8ee01d2df3d2b5b3c26f13c7/test/scripts/integration.sh#L117

troyronda (Fri, 24 Aug 2018 20:16:44 GMT):
Non-test applications don't need to worry about it.

troyronda (Fri, 24 Aug 2018 20:16:44 GMT):
Non-test applications don't need to worry about using this special variable.

troyronda (Fri, 24 Aug 2018 20:17:14 GMT):
(fyi: the SDK will substitute environment variables as well... not just this special variable)

muralisr (Fri, 24 Aug 2018 22:54:31 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hdYxwja7BzFrdD7oR

muralisr (Fri, 24 Aug 2018 22:55:01 GMT):
This is an extremely useful/needed/welcome addition @troyronda ...thank you!

kostas (Sat, 25 Aug 2018 12:52:06 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jbXJAZgd8tGnFqKgY

kostas (Sat, 25 Aug 2018 12:52:44 GMT):
@aleksandar.likic: I am unfortunately still getting this issue. I've added a list of steps here: https://jira.hyperledger.org/browse/FABG-730

troyronda (Sat, 25 Aug 2018 13:12:28 GMT):
thanks @kostas

Rachit_gaur (Mon, 27 Aug 2018 05:29:04 GMT):
Is there a way to define the keys dynamically? I want to invoke a json structure such that i am able to perform key level query later on

parsiya (Mon, 27 Aug 2018 15:16:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uy38QLxCo7ZShFyXi) @Rachit_gaur If you use CouchDB as your peer stateDB, you can use the RichQueryInterface to query individual JSON keys in the value payload. I learned from this example: https://medium.com/wearetheledger/hyperledger-fabric-couchdb-fantastic-queries-and-where-to-find-them-f8a3aecef767

bandreghetti (Mon, 27 Aug 2018 19:21:38 GMT):
Has joined the channel.

bandreghetti (Mon, 27 Aug 2018 20:32:59 GMT):
hey guys! what is the standard way to dynamically get peers from network?

aleksandar.likic (Mon, 27 Aug 2018 20:39:07 GMT):
@bandreghetti What is your use case? If you need it only to figure out where to send endorsement requests to, go-sdk will do it for you by default. You only need to specify one (anchor) peer in your client configuration and the SDK will take it from there - discover other peers and select correct peers for endorsement based on the chaincode endorsement policy and many other factors.

aleksandar.likic (Mon, 27 Aug 2018 20:39:07 GMT):
@bandreghetti What is your use case? If you need it only to figure out where to send endorsement requests to, go-sdk will do it for you by default. You only need to specify one (anchor) peer in your client configuration and the SDK will take it from there - discover other peers on the channel and select correct peers for endorsement based on the chaincode endorsement policy and many other factors.

bandreghetti (Mon, 27 Aug 2018 20:51:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uefJFejfzjMxCXKsA) @aleksandar.likic @aleksandar.likic Right now I have a demo network with 2 peers, 1 org and I would like to join them to a new channel. I managed to create the channel using the SDK but when I try to join the peers to it I believe I have to specify the peers I'm pointing to, right? What is the method I have to call to get the fab.Peer-type instance with the peer configurations?

bandreghetti (Mon, 27 Aug 2018 20:51:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uefJFejfzjMxCXKsA) @aleksandar.likic Right now I have a demo network with 2 peers, 1 org and I would like to join them to a new channel. I managed to create the channel using the SDK but when I try to join the peers to it I believe I have to specify the peers I'm pointing to, right? What is the method I have to call to get the fab.Peer-type instance with the peer configurations?

venzi (Mon, 27 Aug 2018 22:08:53 GMT):
Has joined the channel.

qiangjiyi (Tue, 28 Aug 2018 02:11:37 GMT):
Has joined the channel.

aleksandar.likic (Tue, 28 Aug 2018 02:13:49 GMT):
@bandreghetti Check out https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt#Client.JoinChannel and https://github.com/hyperledger/fabric-sdk-go/blob/0628c3fe720c45a500f25fd99f7b8875f58e3906/test/integration/e2e/end_to_end.go#L123

aleksandar.likic (Tue, 28 Aug 2018 02:13:49 GMT):
@bandreghetti See https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt#Client.JoinChannel and https://github.com/hyperledger/fabric-sdk-go/blob/0628c3fe720c45a500f25fd99f7b8875f58e3906/test/integration/e2e/end_to_end.go#L123

Rachit_gaur (Tue, 28 Aug 2018 05:16:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=eqjFxMNAu3sYTc4hk) @parsiya But this tutorial also have a statically defined structure, i want my keys to be dynamic

jamesruan (Tue, 28 Aug 2018 06:07:44 GMT):
Has joined the channel.

jamesruan (Tue, 28 Aug 2018 06:15:18 GMT):
@aleksandar.likic Hi, Is this issue (https://jira.hyperledger.org/browse/FABG-427 )be discussed? We desperately need an external storage for key.

Rachit_gaur (Tue, 28 Aug 2018 06:23:42 GMT):
I want to save my key values dynamically from my JSON response , Is there a way to do so?

FaizulHassan (Tue, 28 Aug 2018 07:14:10 GMT):
Hi guys , Greetings :) We had made use of hyperledger-composer & created a simple application but now we would love to use go-sdk for our new blockchain development. Kindly suggest us a blogs/projects so that we can go through it & start our development. Does go-sdk support creation of channels, validate peers, issue certificates, add new peers and other activities that makes up the application ? Had gone through various resources & didn't find any good documentations for it. Please advice , thank you :)

FaizulHassan (Tue, 28 Aug 2018 07:14:10 GMT):
Hi guys , Greetings :) We had made use of hyperledger-composer & created a simple application but now we would love to use go-sdk for our new blockchain development. Kindly suggest us a blogs/projects so that we can go through it & start our development. Does go-sdk support creation of channels, validate peers, issue certificates, add new peers and other activities that makes up the application ? I want all this to happen from a front-end application & not through manual network configurations, does go-sdk has such support ? Had gone through various resources & didn't find any good documentations for it. Please advice , thank you :)

sean (Tue, 28 Aug 2018 14:37:20 GMT):
I am encountering inconsistencies in how the MSP tree should be constructed. In the `fabric-ca` library, the `lib` package [1] shows that the `Client` structure requires that the certFile be stored as `/signcerts/cert.pem`: ``` func (c *Client) Init() error { . . . certDir := path.Join(mspDir, "signcerts") . . . c.certFile = path.Join(certDir, "cert.pem") . . . } ``` However, the `fabric-sdk-go` library requires two different MSP tree structures: `filekeyvaluestore` [2] requires the certFile format `/signcerts/{userName}@{orgName}-cert.pem`: ``` func NewFileCertStore(cryptoConfigMSPPath string) (core.KVStore, error) { _, orgName := path.Split(path.Dir(path.Dir(path.Dir(cryptoConfigMSPPath)))) . . . r := strings.NewReplacer("{userName}", ck.ID, "{username}", ck.ID) certDir := path.Join(r.Replace(cryptoConfigMSPPath), "signcerts") return path.Join(certDir, fmt.Sprintf("%s@%s-cert.pem", ck.ID, orgName)), nil . . . } ``` The above path Split to find the orgName requires the MSP tree to be in the format e.g.: `/orgs/org1/users/{userName}/msp/signcerts/{userName}@{orgName}-cert.pem`, otherwise the orgName will not be found. `certfileuserstore` [3] requires the certFile format `/signcerts/{userName}@{MSPID}-cert.pem`: ``` func storeKeyFromUserIdentifier(key msp.IdentityIdentifier) string { return key.ID + "@" + key.MSPID + "-cert.pem" } ``` The most obvious solution would be to maintain multiple certFiles in the `signcerts` folders, each with the needed naming structure. However, this seems excessively complicated. Are there plans to simplify the MSP tree, or at least clarify the required structure in the notes? These limitations were only found when combing through the library code. [1] github.com/hyperledger/fabric-ca/lib/client.go [2] github.com/hyperledger/fabric-sdk-go/pkg/msp/filecertstore.go [3] github.com/hyperledger/fabric-sdk-go/pkg/msp/certfileuserstore.go

aleksandar.likic (Tue, 28 Aug 2018 15:58:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5jjAHBEkGLHz6wi9X) @jamesruan What is your use case? Is a simple file key store good enough or you?

bandreghetti (Tue, 28 Aug 2018 21:49:29 GMT):
Is there any way to get a list of all peers in the network **before** they join any channel? the section of code that is working is here: ``` chCtx, err := sdk.ChannelContext("mainchannel", fabsdk.WithUser("Admin"), fabsdk.WithOrg("org1"))() discoveryService, err := chCtx.ChannelService().Discovery() peerList, err := discoveryService.GetPeers() if err != nil { fmt.Printf("Failed to Get Peers: %s\n", err) } for _, peer := range peerList { log.Printf("Found peer: %s", peer.URL()) } ``` but it only gets the peers which have already joined the channel I'd like to get a full list of an organization's peers or, even better, of all peers connected to the network

yacovm (Tue, 28 Aug 2018 22:49:57 GMT):
@bandreghetti there should be a way, I think. The server side supports that

Kyroy (Wed, 29 Aug 2018 06:06:19 GMT):
Hi again :D It seems there is a problem with the endorsement handler. I have 6 orgs with 1 peer each. And the following endorsement policy: ```{ "n": 4, "out_of": [ { "signed_by": "backboneMSP.MEMBER" }, { "signed_by": "node1MSP.MEMBER" }, { "signed_by": "node2MSP.MEMBER" }, { "signed_by": "node3MSP.MEMBER" }, { "signed_by": "node4MSP.MEMBER" }, { "signed_by": "node5MSP.MEMBER" } ] } ``` peer from node5 went down and ALL invokes and queries failed because no endorsement policy could be satisfied. I am sending invokes and queries to all org/peers

jamesruan (Wed, 29 Aug 2018 08:25:54 GMT):
@aleksandar.likic I need to deploy multiple instance of client's (build with SDK) across machines. If keystore is a file-based one, I need to copy/paste keys to multiple instance whenever a new key is generated. Another solution to this keystore sharing problem is to build a reliable distributed filesystem and mount the same endpoint to serve as keystore for multiple instance, which cost a lot to our team. We want for example, a DB-based keystore.

Kyroy (Wed, 29 Aug 2018 11:10:35 GMT):
regarding my issue: ```Failed to get endorsing peers: Discovery status Code: (11) UNKNOWN. Description: error getting endorsers: no endorsement combination can be satisfied ```

Kyroy (Wed, 29 Aug 2018 12:25:29 GMT):
Another question: Is there a bug in `QueryInstantiatedChaincodes`? When I have 2 private collections, it returns this: ```chaincodes:" escc:"escc" vscc:"vscc" > chaincodes: chaincodes:" escc:"escc" vscc:"vscc" > ``` a) it returns private collections b) it only returns 1 of 2

Kyroy (Wed, 29 Aug 2018 12:25:29 GMT):
Another question: Is there a bug in `QueryInstantiatedChaincodes`? When I have 2 private collections, it returns this: ```chaincodes:" escc:"escc" vscc:"vscc" > chaincodes: chaincodes:" escc:"escc" vscc:"vscc" > ``` a) it returns private collections b) it only returns 1 of 2

venzi (Wed, 29 Aug 2018 12:36:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9Ndy82ZWgQg4PBxb4) @bandreghetti @yacovm does anybody have more information on this problem?

yacovm (Wed, 29 Aug 2018 13:42:56 GMT):
@bstasyszyn should know - how do you list the peers without a channel context?

bandreghetti (Wed, 29 Aug 2018 17:52:18 GMT):
how can I ping a peer to check if it's working using the sdk?

MHBauer (Wed, 29 Aug 2018 22:17:27 GMT):
Has joined the channel.

tyhtao1990 (Thu, 30 Aug 2018 02:22:44 GMT):
Has joined the channel.

tyhtao1990 (Thu, 30 Aug 2018 02:23:50 GMT):
hi,every body. I met a problem these days. when I try to instantiate a chaincode in one channel. it returns the problem lile this

tyhtao1990 (Thu, 30 Aug 2018 02:24:11 GMT):
error when instantiate CC failed to get discovery service: could not get chConfig cache reference: load config items from config group failed: unsupported MSP type (1)

tyhtao1990 (Thu, 30 Aug 2018 02:24:40 GMT):
I am using e2e example docker file

tyhtao1990 (Thu, 30 Aug 2018 02:25:17 GMT):
and my config file is config-e2e.yaml

tyhtao1990 (Thu, 30 Aug 2018 02:26:51 GMT):
my problem is `failed to get discovery service: could not get chConfig cache reference: load config items from config group failed: unsupported MSP type (1)`

jiangyaoguo (Thu, 30 Aug 2018 03:40:01 GMT):
Has joined the channel.

aleksandar.likic (Thu, 30 Aug 2018 13:05:34 GMT):
@jamesruan Your use case typically requires HSM. Is there a reason you don't want to use it?

aleksandar.likic (Thu, 30 Aug 2018 13:05:34 GMT):
@jamesruan Your use case typically requires an HSM. Is there a reason you don't want to use it?

aleksandar.likic (Thu, 30 Aug 2018 13:05:34 GMT):
@jamesruan Your use case typically requires an HSM. Is there a reason you don't want to use it? It's fully supported by the SDK.

cca88 (Thu, 30 Aug 2018 16:46:23 GMT):
Has left the channel.

jamesruan (Fri, 31 Aug 2018 02:29:11 GMT):
@aleksandar.likic HSM seems like a very expensive solution if your want security, reliability and flexibility. We don't have experience with any HSM providers. For now, our test bed is virtualized, using HSM require the access to bare metal machine.

jamesruan (Fri, 31 Aug 2018 02:46:44 GMT):
@aleksandar.likic Could we have, for example, a DB-based key store that is flexible to network connected virtualized client?

aleksandar.likic (Fri, 31 Aug 2018 03:02:05 GMT):
@jamesruan Yes, but it is not straightforward. You'll find at https://github.com/hyperledger/fabric-sdk-go/blob/dcb2645139205ca2f39550ad8c4fc159cb0f2082/test/integration/pkg/client/msp/user_data_mgmt_test.go#L59 an example of a custom key store. Unfortunately, at the moment it has to be in-memory, as current BCCSP SW implementation (used internally by the SDK) allows serialization/deserialization of private keys only within the go package where the key implementation types are defined. The BCCSP files-based key store is in that package, so this is why it works. So, what you need would require a BCCSP patch. A good think is that the SDK uses a copy of BCCSP under its internal package (instead of normally vendoring the "real" BCCSP), so we might be able to patch it. Let me think about it and I'll get back to you.

aleksandar.likic (Fri, 31 Aug 2018 03:02:05 GMT):
@jamesruan Yes, but it is not straightforward. You'll find at https://github.com/hyperledger/fabric-sdk-go/blob/dcb2645139205ca2f39550ad8c4fc159cb0f2082/test/integration/pkg/client/msp/user_data_mgmt_test.go#L59 an example of a custom key store. Unfortunately, at the moment it has to be in-memory, as current BCCSP SW implementation (used internally by the SDK) allows serialization/deserialization of private keys only within the go package where the key implementation types are defined. The BCCSP files-based key store is in that package, so this is why it works. So, what you need would require a BCCSP patch. A good thing is that the SDK uses a copy of BCCSP under its internal package (instead of normally vendoring the "real" BCCSP), so we might be able to patch it. Let me think about it and I'll get back to you.

aleksandar.likic (Fri, 31 Aug 2018 03:07:10 GMT):
BTW, there is another way, you can implement your own CryptoSuite interface (https://github.com/hyperledger/fabric-sdk-go/blob/cb4ad138c14fd98039c56ab6301e665254a930bc/pkg/common/providers/core/cryptosuite.go#L32) and do whatever you want there, but it might be more work that one would want to do to solve this.

jamesruan (Fri, 31 Aug 2018 03:13:39 GMT):
@aleksandar.likic True. I was patching the fabric for that: https://gerrit.hyperledger.org/r/#/c/25333/, However a strange unit test fail reported by the CI (not fail in the BCCSP).

jamesruan (Fri, 31 Aug 2018 03:14:25 GMT):
The issue is now move to fabric-sdk-go. So is it OK to patch it only in go SDK?

aleksandar.likic (Fri, 31 Aug 2018 03:16:22 GMT):
@jamesruan This is probably the most economic solution. If we go that route it would have to be the in the least intrusive way.

aleksandar.likic (Fri, 31 Aug 2018 03:16:22 GMT):
@jamesruan This is probably the most economic solution. If we go that route it would have to be done in the least intrusive way.

jamesruan (Fri, 31 Aug 2018 03:17:10 GMT):
Ok. Looking forward for your reply.

aleksandar.likic (Fri, 31 Aug 2018 03:17:32 GMT):
:wink:

govinda-attal (Fri, 31 Aug 2018 05:10:53 GMT):
Hi All, We are using sdk go I am not sure of this error, I didn't get this error when working with 1.0 Fabric Please advise if I am missing anything. Help is appreciated. ``` [fabsdk/client] 2018/08/31 05:08:28 UTC - pgresolver.(*randomLBP).Choose -> WARN No available peer groups 2018/08/30 22:08:28 Error: {"code":500,"msg":"Failed to invoke/query on fabric channel: Client Status Code: (6) NO_PEERS_FOUND. Description: targets were not provided"} Result: map[] ```

govinda-attal (Fri, 31 Aug 2018 05:12:27 GMT):

fab-config.yaml

govinda-attal (Fri, 31 Aug 2018 05:13:37 GMT):
We are now on Fabric 1.1

connect2b (Fri, 31 Aug 2018 06:40:50 GMT):
Hi, Anyone knows what happens to this message?

connect2b (Fri, 31 Aug 2018 06:43:44 GMT):
Hi, Anyone knows what happens to this message? ``` Error: Error endorsing invoke: rpc error: code = Unknown desc = Instantiation policy mismatch for cc kisa-kakaopaycc/1.0 - ```

connect2b (Fri, 31 Aug 2018 06:44:46 GMT):
Hi, Anyone knows what happen to this message? ``` Error: Error endorsing invoke: rpc error: code = Unknown desc = Instantiation policy mismatch for cc {name}/{version} - ```

govinda-attal (Fri, 31 Aug 2018 07:14:52 GMT):

error.txt

Rachit_gaur (Fri, 31 Aug 2018 10:43:02 GMT):
block is created after every transaction even when the orderer settings are modified to support more size and timeouts Can someone help me with this?

bandreghetti (Fri, 31 Aug 2018 14:20:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ayqCmJu2Zkbk2A9hL) @Rachit_gaur this might belong in #fabric-orderer or #fabric-questions but can you show us your config.tx file?

govinda-attal (Fri, 31 Aug 2018 15:15:15 GMT):
I am not exactly sure of the fix that accidently occurred for the problem mentioned above. I thing some-where chain code implementation was nor right... Chaincode installation, instantiation and invokes worked ... but it didn't create blocks (when I called chaincode via fab-cli) ... But the go sdk always gave error on unable to find peers for that chaincode... I am not sure of what change I did on chaincode but it worked for me. I started with samples simple asset chaincode and slowly added our application code - chaincode implementation to it. I did so because there are usually no problems reported against samples chaincode :-)

bandreghetti (Fri, 31 Aug 2018 17:30:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tYHMN8PHJAJ2ddCJw) guys?

aleksandar.likic (Sat, 01 Sep 2018 14:22:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dxiHLKD8ftvzNDQF3) @bandreghetti The SDK just uses the fabric APIs. I don't think there is currently an API dedicated to the system health check.

Rachit_gaur (Mon, 03 Sep 2018 05:12:13 GMT):

config.tx

Rachit_gaur (Mon, 03 Sep 2018 05:12:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=MJaNaTvGqxhode9vf) @bandreghetti Here is my configtx

jiribroulik (Mon, 03 Sep 2018 12:23:37 GMT):
Has joined the channel.

jiribroulik (Mon, 03 Sep 2018 12:24:47 GMT):
Hello guys, how would you reccommend to fetch current readset from channel config to be able to for example add org to existing channel? Thank you

bandreghetti (Mon, 03 Sep 2018 16:33:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=XBuvm7jWzoQb5p39b) @Rachit_gaur it seems like it should accept more than one transaction per block are you sure you are submitting the transactions less than 50s apart? also, make sure the transaction occupies less than the value set in PreferredMaxBytes

aleksandar.likic (Tue, 04 Sep 2018 00:06:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TeWgcHTSy5SJMiDB7) @kostas This issue should be resolved now. Please see https://gerrit.hyperledger.org/r/#/c/26022/

Rachit_gaur (Tue, 04 Sep 2018 04:58:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5jADwrNn8je5Hojvm) @bandreghetti I have made a script for invoke commands so it executes as soon as one is completed but new blocks are formed and yes even the transaction occupies less space then the PerferredMaxBytes

Rachit_gaur (Tue, 04 Sep 2018 10:26:51 GMT):
I have a scenario where i am calling stub GetHistoryForKey from another chaincode using stub.InvokeChaincode() but it returns value only when on same channel else empty response is returned without error..can someone help??

daviorocha (Tue, 04 Sep 2018 14:14:37 GMT):
Has joined the channel.

aleksandar.likic (Tue, 04 Sep 2018 14:35:08 GMT):
@Rachit_gaur @bandreghetti It seems that your conversation is not related to Go SDK. You would get much better help posting it to some other fabric channel.

Kyroy (Wed, 05 Sep 2018 07:08:43 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KWzE65hCFBfu5p57P https://chat.hyperledger.org/channel/fabric-sdk-go?msg=MGtWoJ8dRxi6wsanY

Kyroy (Wed, 05 Sep 2018 07:09:04 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5XWRTzXQjLGH5dYv4

zshwei (Wed, 05 Sep 2018 10:49:42 GMT):
Has joined the channel.

bstasyszyn (Wed, 05 Sep 2018 14:47:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4iLFtfS5TH2jwmxuN) @yacovm @Kyroy @yacovm Here's an example of retrieving a list of org peers: https://github.com/hyperledger/fabric-sdk-go/blob/33034df7807ab33a50d088e9188b5f6d4c864520/test/integration/base_test_setup.go#L324

yacovm (Wed, 05 Sep 2018 14:49:45 GMT):
thanks

bstasyszyn (Wed, 05 Sep 2018 14:52:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sdBx8kfGG7XGzRNK7) @bandreghetti Sorry, I should have replied to you :)

bstasyszyn (Wed, 05 Sep 2018 14:57:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8RrGHPXbxiZp6wci6) @Kyroy The SDK should have retried on this error. Can you enable debug logging?

sean (Thu, 06 Sep 2018 01:28:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GdA8QN5S2mNsGyek3) @yacovm Actually, I'm having issues with this one since it's not signed by the Fabric-CA service. How did you get the self-signed cert work with the peer (rejecting my self-signed cert). I also tried `NewServerCertKeyPair` with my fabric-ca service name, which also does not work.

sean (Thu, 06 Sep 2018 02:53:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hKrDNkcJPgs7qXAKq) Actually it looks like I need to add the root cert, but all those functions are private so I'll need to use the fabric-ca library directly. Will have to make those SDK functions manually.

sean (Thu, 06 Sep 2018 20:40:46 GMT):
Does anyone know of an SDK equivalent to the CLI command `fabric-ca-client enroll -d --enrollment.profile tls . . .` ?

kostas (Fri, 07 Sep 2018 00:35:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Y34Si6p9EniM8Mvpy) @aleksandar.likic I can confirm this is no longer an issue - thanks for fixing it! /cc @troyronda

kostas (Fri, 07 Sep 2018 01:39:39 GMT):
I am trying to create a `channel.Client` via the `channel.New(instantiatedSDKgoesHere.ChannelContext(channelNameGoesHere, fabsdk.WithUser(userNameGoesHere))` construct.

kostas (Fri, 07 Sep 2018 01:39:39 GMT):
I am trying to create a `channel.Client` via the `channel.New(sdkInstanceGoesHere.ChannelContext(channelNameGoesHere, fabsdk.WithUser(userNameGoesHere))` construct.

kostas (Fri, 07 Sep 2018 01:39:39 GMT):
I am trying to create a `channel.Client` via the `channel.New(sdkInstanceGoesHere.ChannelContext(channelNameGoesHere, fabsdk.WithUser(userNameGoesHere))` construct. It fails with the following message:

kostas (Fri, 07 Sep 2018 01:40:11 GMT):
This fails with the following message:

kostas (Fri, 07 Sep 2018 01:40:13 GMT):
> event service creation failed: could not get chConfig cache reference: read configuration for channel peers failedexit status 1

kostas (Fri, 07 Sep 2018 01:40:35 GMT):
Can someone help me figure out what I'm doing wrong? I can provide any artifacts are necessary.

kostas (Fri, 07 Sep 2018 01:40:35 GMT):
Can someone help me figure out what I'm doing wrong? I can provide any artifacts deemed necessary.

kostas (Fri, 07 Sep 2018 01:55:30 GMT):
A chaincode query for "clarkschaincode" via the SDK references the "cscc" system chaincode in the peer and ultimately fails. A chaincode query for "clarkschaincode" via the "peer chaincode query" CLI references the "clarkschaincode" chaincode and succeeds.

kostas (Fri, 07 Sep 2018 01:55:38 GMT):
I am using the following snippet for the SDK:

kostas (Fri, 07 Sep 2018 01:55:57 GMT):
```resp, err := sc.channel.Query(channel.Request{ ChaincodeID: "clarkschaincode", Fcn: "invoke", Args: [][]byte{[]byte("query"), []byte("a")}, })```

kostas (Fri, 07 Sep 2018 01:56:31 GMT):
And the following peer CLI command respectively: `peer chaincode query --channelID clarkschannel --name clarkschaincode --ctor '{"Args":["query", "a"]}'`

kostas (Fri, 07 Sep 2018 01:57:00 GMT):
When using the SDK, the peer logs show: `validateChaincodeProposalMessage -> DEBU 8c2a validateChaincodeProposalMessage info: header extension references chaincode name:"clarkschaincode"`

kostas (Fri, 07 Sep 2018 01:57:25 GMT):
Whereas with the peer CLI, they show: `validateChaincodeProposalMessage -> DEBU 8c6f validateChaincodeProposalMessage info: header extension references chaincode name:"cscc"`

kostas (Fri, 07 Sep 2018 01:57:55 GMT):
Any idea what's going on? (Paging @muralisr who has used the SDK and has written code on the peer side as well.)

yacovm (Fri, 07 Sep 2018 07:20:54 GMT):
https://gerrit.hyperledger.org/r/#/c/26154/ @bstasyszyn so you're diverging now from the fabric repository ? :thinking_face:

yacovm (Fri, 07 Sep 2018 07:20:54 GMT):
https://gerrit.hyperledger.org/r/#/c/26154/ @bstasyszyn so you're diverging now from the fabric repository ? :thinking_face:

yacovm (Fri, 07 Sep 2018 07:21:54 GMT):
I don't understand why the priority selector was deleted from `selectPeersForLayout`

Sahith (Fri, 07 Sep 2018 09:13:11 GMT):
Has joined the channel.

Sahith (Fri, 07 Sep 2018 09:13:51 GMT):
I am getting make failed with error

Sahith (Fri, 07 Sep 2018 09:14:12 GMT):
Can someome suggest which version of sdk - go should I use

Sahith (Fri, 07 Sep 2018 09:16:08 GMT):
For both master and release1.2 I'm getting unit-tests failed

bstasyszyn (Fri, 07 Sep 2018 12:02:46 GMT):
@yacovm I'll be adding the patch to the fabric repo today - I just didn't have time to do it last night. The priority selector didn't give me the full picture of all the peers - it just gave two peers at a time. I needed to take the maximum block height of all peers and then prioritize based on a threshold. After I add the patch, please add comments if you have a better way.

yacovm (Fri, 07 Sep 2018 12:53:17 GMT):
@bstasyszyn - but can't you just feed into your custom priority selector, a state where it will put the "previously selected" peers to the end of the list?

yacovm (Fri, 07 Sep 2018 12:53:25 GMT):
and after a selection, you just update its state

yacovm (Fri, 07 Sep 2018 12:53:28 GMT):
or something like that.... ?

yacovm (Fri, 07 Sep 2018 12:54:03 GMT):
I don't really understand how your change helps you :thinking_face:

yacovm (Fri, 07 Sep 2018 12:55:23 GMT):
also another thing I don't understand is... if you need a round-robin selection

yacovm (Fri, 07 Sep 2018 12:55:34 GMT):
why not implement it in fabric's discovery client directly?

yacovm (Fri, 07 Sep 2018 12:55:52 GMT):
I guess you want that to work for your SCC based discovery too or something?

yacovm (Fri, 07 Sep 2018 12:56:49 GMT):
or do you just want fast merges and no arguments in code review? ;)

bstasyszyn (Fri, 07 Sep 2018 13:23:30 GMT):
@yacovm I needed a way to have a complete picture of the block heights of all of the peers so that I can load-balance (either random or round-robin) between the ones with an acceptable block height and demote the others to a lower priority. I'm not sure I understand your suggestion about 'previously selected' peer.

bstasyszyn (Fri, 07 Sep 2018 13:37:38 GMT):
@yacovm https://gerrit.hyperledger.org/r/26163

binhn (Fri, 07 Sep 2018 20:24:23 GMT):
In the Client>InvokeHandler, I see options for timeout and retry, and I found the timeout specified in the sample test config for `query` and `execute`. I assume these would be used by InvokeHandler if not specified in the call options. A couple of questions: 1) is my assumption above correct? 2) where is `retry` specified and what is the default? Thanks.

binhn (Fri, 07 Sep 2018 20:24:23 GMT):
In the Client>InvokeHandler, I see options for timeout and retry, and I found the timeout specified in the sample test config for `query` and `execute`. I assume these would be used by InvokeHandler if not specified in the call options. I don't see `retry` in the sample config. A couple of questions: 1) is my assumption above correct? 2) where can `retry` be specified and what is the default if not specified? Thanks.

binhn (Fri, 07 Sep 2018 20:24:23 GMT):
In the Client>InvokeHandler, I see options for timeout and retry, and I found the timeout specified in the sample test config for `query` and `execute`. I assume these would be used by InvokeHandler if not specified in the call options. I don't see `retry` in the sample config but part of channel policy. A couple of questions: 1) is my assumption above correct? 2) where can `retry` be specified and what is the default if not specified? Thanks.

binhn (Fri, 07 Sep 2018 20:24:23 GMT):
In the Client>InvokeHandler, I see options for timeout and retry, and I found the timeout specified in the sample test config for `query` and `execute` https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_test.yaml. I assume these would be used by InvokeHandler if not specified in the call options. I don't see `retry` in the sample config but part of channel policy. A couple of questions: 1) is my assumption above correct? 2) where can `retry` be specified and what is the default if not specified? Thanks.

muralisr (Fri, 07 Sep 2018 23:33:27 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nKWJ9Nh3NkK2No7L2

muralisr (Fri, 07 Sep 2018 23:38:23 GMT):
@kostas (taking a guess here but @troyronda or someone would know for sure) ... I think SDK does other queries besides the "user query" and also uses other mechanisms such as peer discovery. None of which the CLI does. So some of those extra moving parts could fail in SDK. One thing that bit me (`caveat emptor!`) was failures due to what look like failing discovery mechanisms. thanks to suggestion from @troyronda did an anchor peer update to faciliate smoother discovery processes and it worked well afterwards

muralisr (Fri, 07 Sep 2018 23:38:23 GMT):
@kostas (taking a guess here but @troyronda or someone would know for sure) ... I think SDK does other queries besides the "user query" and also uses other mechanisms such as peer discovery. None of which the CLI does. So some of those extra moving parts could fail in SDK. One thing that bit me ( `caveat emptor!` ) was failures due to what look like failing discovery mechanisms. thanks to suggestion from @troyronda did an anchor peer update to faciliate smoother discovery processes and it worked well afterwards

muralisr (Fri, 07 Sep 2018 23:38:23 GMT):
@kostas (taking a guess here but @troyronda or someone would know for sure) ... I think SDK does other queries besides the "user query" and also uses other mechanisms such as peer discovery. None of which the CLI does. So some of those extra moving parts could fail in SDK. One thing that bit me ( `caveat emptor!` ) were failures due to what look like failing discovery mechanisms. thanks to suggestion from @troyronda did an anchor peer update to faciliate smoother discovery processes and it worked well afterwards

troyronda (Sat, 08 Sep 2018 11:45:09 GMT):
@binhn retry is specified using the WithRetry option. Eg https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L174

troyronda (Sat, 08 Sep 2018 11:45:57 GMT):
this example passes in a set of default retry option.

troyronda (Sat, 08 Sep 2018 11:46:49 GMT):
the channel policy holds retries for underlying mechanisms

troyronda (Sat, 08 Sep 2018 11:48:16 GMT):
(such as service discovery and querying for channel config)

troyronda (Sat, 08 Sep 2018 11:51:35 GMT):
you can specify request timeouts using the WithTimeout option or in the timeout config sections under client.

troyronda (Sat, 08 Sep 2018 11:58:21 GMT):
@muralisr @kostas in one of the underlying mechanisms, cscc is used to fetch the channel config block from a subset of peers.

troyronda (Sat, 08 Sep 2018 12:00:35 GMT):
(btw the configuration for that mechanism is the queryChannelConfig channel policy that @binhn referenced earlier).

kostas (Sat, 08 Sep 2018 13:28:03 GMT):
@troyronda: I am seeing references to cscc when I do:

kostas (Sat, 08 Sep 2018 13:28:06 GMT):
```resp, err := sc.channel.Query(channel.Request{ ChaincodeID: sc.chaincodeName, Fcn: "invoke", Args: [][]byte{[]byte("query"), []byte("a")}, })```

kostas (Sat, 08 Sep 2018 13:28:37 GMT):
Which is not a request for fetching the config block.

troyronda (Sat, 08 Sep 2018 14:36:51 GMT):
@kostas The SDK automatically fetches config blocks

troyronda (Sat, 08 Sep 2018 14:36:51 GMT):
@kostas The SDK automatically fetches config blocks (to enable underlying validation and to determine channel configuration dynamically)

troyronda (Sat, 08 Sep 2018 14:36:51 GMT):
@kostas The SDK automatically fetches config blocks (to enable underlying validation and to determine current channel configuration dynamically)

troyronda (Sat, 08 Sep 2018 14:41:08 GMT):
(fyi: this is handled by the channel provider that was instantiated by the default SDK service factory implementation: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabsdk/factory/defsvc/svcfactory.go)

troyronda (Sat, 08 Sep 2018 14:41:08 GMT):
(fyi: this is handled by the channel provider that was instantiated by the default SDK service factory implementation: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabsdk/factory/defsvc/svcfactory.go)... btw, the entire service factory can be overridden with the SDK option WithServicePkg

troyronda (Sat, 08 Sep 2018 14:41:08 GMT):
(fyi: this is handled by the channel provider that was instantiated by the default SDK service factory implementation: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabsdk/factory/defsvc/svcfactory.go)... note: the entire service factory can be overridden with the SDK option WithServicePkg

troyronda (Sat, 08 Sep 2018 14:41:08 GMT):
(fyi: this is handled by the channel provider that was instantiated by the default SDK service factory implementation: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fabsdk/factory/defsvc/svcfactory.go)... side-note: the entire service factory can be overridden with the SDK option WithServicePkg (but that is only for special circumstances).

troyronda (Sat, 08 Sep 2018 14:43:43 GMT):
btw - is something failing or you are curious about what is happening?

raviyelleni (Sun, 09 Sep 2018 04:41:36 GMT):
Has joined the channel.

raviyelleni (Mon, 10 Sep 2018 02:31:05 GMT):
Hello , do you have any tutorial to build the fabric network from scratch using go SDK?

raviyelleni (Mon, 10 Sep 2018 02:32:09 GMT):
Hi, anyone does have a link or pdf to a tutorial for building fabric network from scratch using go SDK with all available features?

jamesruan (Mon, 10 Sep 2018 03:46:02 GMT):
@troyronda It seems the CI use a different version of gometalinter.

jamesruan (Mon, 10 Sep 2018 03:47:22 GMT):
@bstasyszyn @troyronda Is this patch ok to merge? https://gerrit.hyperledger.org/r/#/c/26126/

Alvin455024780 (Mon, 10 Sep 2018 10:27:39 GMT):
Has joined the channel.

binhn (Mon, 10 Sep 2018 17:38:40 GMT):
@troyronda thanks Troy!

Baha-sk (Mon, 10 Sep 2018 18:58:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YFRptbidSjLZJYPK9) @jamesruan @jamesruan most probably you have an outdated version of gometalinter, you can backup/rename/remove the copy in $GOPATH/bin then run `make depend` to install the most recent version

Baha-sk (Mon, 10 Sep 2018 18:58:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YFRptbidSjLZJYPK9) @jamesruan most probably you have an outdated version of gometalinter, you can backup/rename/remove the copy in $GOPATH/bin then run `make depend` to install the most recent version

bandreghetti (Mon, 10 Sep 2018 20:01:01 GMT):
Hey guys! How do I pass a TLS cert for communicating with an instance of Fabric-CA via Go SDK? I can't find anything like WithTLS() in https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp :c

bandreghetti (Mon, 10 Sep 2018 20:01:01 GMT):
Hey guys! How do I pass a TLS cert for communicating with an instance of Fabric-CA via Go SDK? All my connections are being refused. I can't find anything like WithTLS() in https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp :c

troyronda (Mon, 10 Sep 2018 23:31:52 GMT):
@jamesruan @Baha-sk and you need to use the go version in CI properties

troyronda (Mon, 10 Sep 2018 23:32:56 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/ci.properties

troyronda (Tue, 11 Sep 2018 10:09:12 GMT):
@jamesruan I updated your change (https://gerrit.hyperledger.org/r/c/26126/) by running go 1.10 gofmt and goimports.

troyronda (Tue, 11 Sep 2018 10:09:12 GMT):
@jamesruan I updated your change (https://gerrit.hyperledger.org/r/c/26126/) by running go 1.10.4 gofmt and goimports.

troyronda (Tue, 11 Sep 2018 10:11:27 GMT):
(i.e., gofmt -s -w & goimports -w )

troyronda (Tue, 11 Sep 2018 10:15:38 GMT):
(after installing go@1.10 using homebrew and then running make depend)

troyronda (Tue, 11 Sep 2018 10:15:38 GMT):
(after installing go@1.10 using homebrew, updating path to go@1.10, and then running make depend)

troyronda (Tue, 11 Sep 2018 10:15:48 GMT):
it passes metalinters now.

troyronda (Tue, 11 Sep 2018 10:15:48 GMT):
it passes metalinters now (https://jenkins.hyperledger.org/job/fabric-sdk-go-tests-verify-x86_64/3865/console).

troyronda (Tue, 11 Sep 2018 10:15:48 GMT):
@jamesruan it passes metalinters now (https://jenkins.hyperledger.org/job/fabric-sdk-go-tests-verify-x86_64/3865/console).

troyronda (Tue, 11 Sep 2018 11:30:19 GMT):
@bandreghetti https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L359

john.d.sheehan (Tue, 11 Sep 2018 13:40:07 GMT):
Hi, why would I see the following error? ``` vagrant@fabric:~/golang/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli$ ./fabric-cli chaincode instantiate --cid mychannel --ccp=github.com/hyperledger/fabric/examples/chaincode/go/example02/cmd --ccid mycc --v 1.0 --args '{"Args":["A","1","B","2"]}' --policy "AND('Org0MSP.member')" --config cfg.yaml [fabriccli] 2018/09/11 13:34:01 UTC - chaincode.glob..func4 -> ERRO Error while running instantiateAction: error instantiating chaincode: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Chaincode status Code: (500) UNKNOWN. Description: failed to execute transaction 2c7e41088ec6255a3f268f6bf0f131d142f7eaf4a8430eadb4c93e6c059a8d92: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/example02/cmd/main.go:13:2: no Go files in /chaincode/input/src/github.com/hyperledger/fabric/examples/chaincode/go/example02 ``` `install` seemed to work ok: ```vagrant@fabric:~/golang/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli$ ./fabric-cli chaincode install --ccp=github.com/hyperledger/fabric/examples/chaincode/go/example02/cmd --ccid mycc --v 1.0 --config cfg.yaml Installing chaincode mycc on org[org0] peers: -- localhost:7051 ...successfuly installed chaincode mycc.1.0 on peer localhost:7051. ```

bandreghetti (Tue, 11 Sep 2018 14:47:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=h9y3rTSyKPWX75eXe) @troyronda thank you! it seems i was using the wrong cert path it's working now c:

in0rdr (Tue, 11 Sep 2018 15:51:28 GMT):
Hello, can somebody help me out on a problem with the entities chaincode extension? I try to `putState` a EC signature (entities.SignedMessage) as `[]byte`. However, the `SignedMessage` is no longer persisted to KVS as soon as I do `Sign()` and the `SignedMessage.Sig` field is populated. How come? My code here: https://gist.github.com/in0rdr/4a9a8f3dfc13aede5f674c4bd3067522#file-gistfile1-txt-L32 If I `putState` the `struct` without signing (i.e., I skip the call to `Sign` the `struct` is saved, but without signature.

in0rdr (Tue, 11 Sep 2018 15:54:16 GMT):
Also, I wrote tests similar to https://github.com/hyperledger/fabric/blob/release-1.2/examples/chaincode/go/enccc_example/enccc_test.go They work fine locally (`go test`), but when running on a peer, the `struct` is not persisted.

kid101 (Tue, 11 Sep 2018 19:12:18 GMT):
Has joined the channel.

bandreghetti (Tue, 11 Sep 2018 20:19:16 GMT):
Hey guys, I managed to create a new identity for creating a new peer of an existing org but I can't find which method should I use to retrieve the new peer certificate from the CA. I don't even know if it's possible but it would be nice to be able to create a new identity and retrieve its certificate using the SDK.

bandreghetti (Tue, 11 Sep 2018 20:19:16 GMT):
Hey guys, I managed to create a new identity for creating a new peer of an existing org but I can't find which method should I use to retrieve the new peer certificate from the CA. I don't even know if it's possible but it would be nice to be able to create a new identity and retrieve its certificate using the SDK.

parsiya (Tue, 11 Sep 2018 20:55:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=n8YfjvW4KSB3xfs5Z) @bandreghetti See this integration test: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/msp/identity_test.go#L51

in0rdr (Tue, 11 Sep 2018 22:03:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FKY9HWonxvFMYWD6X) I think I found the bug. Probably I tried to read/write the same key in the same tx

kisna (Tue, 11 Sep 2018 23:42:35 GMT):
Has joined the channel.

DerekC (Wed, 12 Sep 2018 15:48:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7GyLoH4qdvv8ogKTo) @bstasyszyn I am resolving this issue right now. 6 orgs setting. n_out_of setting is the same. (n is equal to 4) When Org5 is down. The sdk keeps on return this error. ``` [fabsdk/common] 2018/09/12 15:24:33 UTC - retry.(*RetryableInvoker).Invoke -> DEBU ... retry for err [Failed to get endorsing peers: error getting channel response for channel [channel-1]: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: failed constructing descriptor for chaincodes: ] is NOT warranted after 1 attempt(s). [fabsdk/common] 2018/09/12 15:24:33 UTC - retry.(*RetryableInvoker).Invoke -> DEBU Failed with err [error getting channel response for channel [channel-1]: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: failed constructing descriptor for chaincodes: ] on attempt #1. Checking if retry is warranted... ``` The peer log, when the peer in org5 is down. We can see that when dead peer is removed, the peer start to complain that chaincode isn't installed on sufficient organizations required by the endorsement policy. Isn't it only one org is down? ``` [kvledger] CommitWithPvtData -> INFO 1111 Channel [channel-4]: Committed block [133427] with 47 transaction(s) [gossip/comm] func1 -> WARN 1112 peer0.org5:7051, PKIid:[127 250 30 54 197 191 20 236 57 18 211 206 241 152 242 151 141 214 177 142 22 47 183 233 212 140 128 105 234 240 68 5] isn't responsive: EOF [gossip/discovery] expireDeadMembers -> WARN 1113 Entering [[127 250 30 54 197 191 20 236 57 18 211 206 241 152 242 151 141 214 177 142 22 47 183 233 212 140 128 105 234 240 68 5]] [gossip/discovery] expireDeadMembers -> WARN 1114 Closing connection to Endpoint: peer0.org5:7051, InternalEndpoint: , PKI-ID: [127 250 30 54 197 191 20 236 57 18 211 206 241 152 242 151 141 214 177 142 22 47 183 233 212 140 128 105 234 240 68 5], Metadata: [] [gossip/discovery] expireDeadMembers -> WARN 1115 Exiting [discovery/endorsement] PeersForEndorsement -> WARN 1116 Principal set computation failed: chaincode isn't installed on sufficient organizations required by the endorsement policy [discovery] chaincodeQuery -> ERRO 1117 Failed constructing descriptor for chaincode chaincodes: ,: chaincode isn't installed on sufficient organizations required by the endorsement policy ```

sean (Wed, 12 Sep 2018 19:54:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sjGea4XY4m4QT37kp) @aleksandar.likic @aleksandar.likic The explanation of cert lookup process helps immensely. Can you comment on the best practice for storing user credentials over time? For example, if we have multiple users logging into a single client, how often should user credentials be purged and re-enrolled?

sean (Wed, 12 Sep 2018 19:54:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sjGea4XY4m4QT37kp) @aleksandar.likic @aleksandar.likic The explanation of cert lookup process helps immensely. Can you comment on the best practice for storing user credentials over time? For example, if we have multiple users logging into a single client, how often should user credentials be purged and re-enrolled? Also, I might have missed these dev notes, but how should we handle users logging in from different clients? If a user re-enrolls from a different client to obtain credentials, will this cause any issues with logging back in through a previously used client?

yacovm (Wed, 12 Sep 2018 19:59:35 GMT):
@DerekC - use `discover` CLI command and look at what organization peers that peer that you work against, knows about.

bandreghetti (Wed, 12 Sep 2018 20:36:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=p7tDN7N7GRkPbGSdx) @parsiya Thanks! I managed to get the enrollment cert. What about the private key for the identity? I need both the certificate and the private key to set up an endorsing peer, right? I can't find the method to retrieve the private key... "/

parsiya (Wed, 12 Sep 2018 23:55:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CuXxXXpvLxmJiL3eM) @bandreghetti Private key is never sent to server. For enrollment, you create a CSR (Certificate Signing Request) and send it out. Server signs it and returns it. Your private key and certificate are stored locally.

parsiya (Wed, 12 Sep 2018 23:56:43 GMT):
I am not sure where the Go-SDK stores them but the Node-SDK stores them in a directory named `.hfc-key-store`.

DerekC (Thu, 13 Sep 2018 09:43:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=vnFcHpN6sWg2h2x5W) @yacovm ``` [ { "MSPID": "Org5MSP", "LedgerHeight": 122383, "Endpoint": "peer.org5:7051", "Identity": ..... ``` I have just checked org4 and org3. Org4 and Org3 peer can see the Org5. In fact, Org4 and Org3 can see all 6 organization in the network.

yacovm (Thu, 13 Sep 2018 09:44:26 GMT):
and is the chaincode installed on all of them?

yacovm (Thu, 13 Sep 2018 09:45:44 GMT):
the CLI also tells you that in the `peers` query

DerekC (Thu, 13 Sep 2018 09:56:11 GMT):
Yes, the chaincode is installed on all of the peers

DerekC (Thu, 13 Sep 2018 09:56:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wT2GqWsrXfghTqgKx) @yacovm Yes, the chaincode is installed on all of the peers.

yacovm (Thu, 13 Sep 2018 09:59:32 GMT):
and the endorsement policy - what is it?

yacovm (Thu, 13 Sep 2018 10:26:28 GMT):
@DerekC and what version of the chaincode is installed on all the peers?

DerekC (Thu, 13 Sep 2018 10:48:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rHckgRcS8G849oKq6) @yacovm endorsement policy ``` { "n": 4, "out_of": [ { "signed_by": "backboneMSP.MEMBER" }, { "signed_by": "Org1MSP.MEMBER" }, { "signed_by": "Org2MSP.MEMBER" }, { "signed_by": "Org3MSP.MEMBER" }, { "signed_by": "Org4MSP.MEMBER" }, { "signed_by": "Org5MSP.MEMBER" } ] } ``` I only install one chaincode on the peer.

yacovm (Thu, 13 Sep 2018 11:00:20 GMT):
@DerekC and can you show me please the output of the listing of the peers?

yacovm (Thu, 13 Sep 2018 11:09:49 GMT):
also I have an idea... you can use the `discover endorsers` command when all 6 organizations are up

yacovm (Thu, 13 Sep 2018 11:09:56 GMT):
and see what combinations it returns

yacovm (Thu, 13 Sep 2018 11:10:19 GMT):
it's clear that it skips some organizations because it thinks no peers have that chaincode installed

yacovm (Thu, 13 Sep 2018 11:10:37 GMT):
but - I checked, and discovery supports `out_ouf` syntax

aleksandar.likic (Thu, 13 Sep 2018 13:19:30 GMT):
@sean I don't think multiple users should use a single client directly (using the same credential). If users hit fabric directly, each should have its own credential. If you have a service (in front of a fabric network) used by multiple clients you probably want to have users authenticated to the service. Mush like a traditional app server maintains DB access having only one DB credential, while users authenticate to the app server. This question is not directly related to Go SDK, you might want to post it to a more general channel to get more opinions.

sean (Thu, 13 Sep 2018 13:35:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gTQWK5GEqYqnryReF) @aleksandar.likic Understood, I was not clear in my question, sorry about that. I am assuming that after using a third-party user authentication service to verify the user for the app, the client would then for signing activity on the ledger. I am wondering if there is a guideline for properly handling the CA cert/keys stored on the client. I'm not a security expert - is it typically safe to keep those files without refresh until expiration? An additional question - if we use a scalable host for the client that rotates the specific endpoint instance for the client that the user connects to, the local credential store for the CA credentials will not always be available (one example is AWS elastic beanstalk for hosting the client/app endpoint - it might spin up a new instance with a blank local credential store) - I am assuming that the client would then need to re-enroll the user to get new CA credentials stored locally each time the endpoint instance is rotated, is that correct? Thanks for your help. <> Edited

sean (Thu, 13 Sep 2018 13:35:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gTQWK5GEqYqnryReF) @aleksandar.likic Understood, I was not clear in my question, sorry about that. I am assuming that after using a third-party user authentication service to verify the user for the app, the client would then `GetIdentity` the proper CA credentials (that match that user) for signing activity on the ledger. I am wondering if there is a guideline for properly handling the CA cert/keys stored on the client. I'm not a security expert - is it typically safe to keep those files without refresh until expiration? An additional question - if we use a scalable host for the client that rotates the specific endpoint instance for the client that the user connects to, the local credential store for the CA credentials will not always be available (one example is AWS elastic beanstalk for hosting the client/app endpoint - it might spin up a new instance with a blank local credential store) - I am assuming that the client would then need to re-enroll the user to get new CA credentials stored locally each time the endpoint instance is rotated, is that correct? Thanks for your help.

sean (Thu, 13 Sep 2018 13:35:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gTQWK5GEqYqnryReF) @aleksandar.likic Understood, I was not clear in my question, sorry about that. I am assuming that after using a third-party user authentication service to verify the user for the app, the client would then *reset the client context with the logged in user (to reference the proper CA credentials)* for signing activity on the ledger. I am wondering if there is a guideline for properly handling the CA cert/keys stored on the client. I'm not a security expert - is it typically safe to keep those files without refresh until expiration? An additional question - if we use a scalable host for the client that rotates the specific endpoint instance for the client that the user connects to, the local credential store for the CA credentials will not always be available (one example is AWS elastic beanstalk for hosting the client/app endpoint - it might spin up a new instance with a blank local credential store) - I am assuming that the client would then need to re-enroll the user to get new CA credentials stored locally each time the endpoint instance is rotated, is that correct? Thanks for your help. ** Edited

DerekC (Thu, 13 Sep 2018 14:26:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dXvCJELC6bHvBz4su) @yacovm Sure thing. ``` [ { "MSPID": "Org5MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org5:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": Org4MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org2:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "backboneMSP", "LedgerHeight": 138562, "Endpoint": "peer0.backbone:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org1MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org1:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org3MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org3:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org5MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org5:7051", "Identity": "", "Chaincodes": [ "test-cc" ] } ] ```

DerekC (Thu, 13 Sep 2018 14:26:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dXvCJELC6bHvBz4su) @yacovm Sure thing. ``` [ { "MSPID": "Org4MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org4:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": Org4MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org2:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "backboneMSP", "LedgerHeight": 138562, "Endpoint": "peer0.backbone:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org1MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org1:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org3MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org3:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org5MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org5:7051", "Identity": "", "Chaincodes": [ "test-cc" ] } ] ```

DerekC (Thu, 13 Sep 2018 14:26:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dXvCJELC6bHvBz4su) @yacovm Sure thing. ``` [ { "MSPID": "Org2MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org2:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": Org2MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org2:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "backboneMSP", "LedgerHeight": 138562, "Endpoint": "peer0.backbone:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org1MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org1:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org3MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org3:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org5MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org5:7051", "Identity": "", "Chaincodes": [ "test-cc" ] } ] ```

DerekC (Thu, 13 Sep 2018 14:26:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dXvCJELC6bHvBz4su) @yacovm Sure thing. ``` [ { "MSPID": "Org4MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org4:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": Org2MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org2:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "backboneMSP", "LedgerHeight": 138562, "Endpoint": "peer0.backbone:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org1MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org1:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org3MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org3:7051", "Identity": "", "Chaincodes": [ "test-cc" ] }, { "MSPID": "Org5MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org5:7051", "Identity": "", "Chaincodes": [ "test-cc" ] } ] ```

DerekC (Thu, 13 Sep 2018 14:27:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3f3dAGE5RMaLvGZ5Q) @yacovm ``` [ { "Chaincode": "heartbeat-1", "EndorsersByGroups": { "G0": [ { "MSPID": "Org5MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org5:7051", "Identity": "", "Chaincodes": null } ], "G1": [ { "MSPID": "Org3MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org3:7051", "Identity": "", "Chaincodes": null } ], "G2": [ { "MSPID": "Org4MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org4:7051", "Identity": "", "Chaincodes": null } ], "G3": [ { "MSPID": "backboneMSP", "LedgerHeight": 138562, "Endpoint": "peer0.backbone:7051", "Identity": "", "Chaincodes": null } ], "G4": [ { "MSPID": "Org1MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org1:7051", "Identity": "", "Chaincodes": null } ], "G5": [ { "MSPID": "Org2MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org2:7051", "Identity": "", "Chaincodes": null } ] }, "Layouts": [ { "quantities_by_group": { "G0": 1, "G3": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G3": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G3": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G3": 1, "G4": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G3": 1, "G4": 1 } }, { "quantities_by_group": { "G0": 1, "G2": 1, "G3": 1, "G4": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G3": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G3": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G2": 1, "G3": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G2": 1, "G3": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G2": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G2": 1, "G4": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G2": 1, "G5": 1 } } ] } ] ```

DerekC (Thu, 13 Sep 2018 14:27:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3f3dAGE5RMaLvGZ5Q) @yacovm ``` [ { "Chaincode": "test-cc", "EndorsersByGroups": { "G0": [ { "MSPID": "Org5MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org5:7051", "Identity": "", "Chaincodes": null } ], "G1": [ { "MSPID": "Org3MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org3:7051", "Identity": "", "Chaincodes": null } ], "G2": [ { "MSPID": "Org4MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org4:7051", "Identity": "", "Chaincodes": null } ], "G3": [ { "MSPID": "backboneMSP", "LedgerHeight": 138562, "Endpoint": "peer0.backbone:7051", "Identity": "", "Chaincodes": null } ], "G4": [ { "MSPID": "Org1MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org1:7051", "Identity": "", "Chaincodes": null } ], "G5": [ { "MSPID": "Org2MSP", "LedgerHeight": 138562, "Endpoint": "peer0.org2:7051", "Identity": "", "Chaincodes": null } ] }, "Layouts": [ { "quantities_by_group": { "G0": 1, "G3": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G3": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G3": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G3": 1, "G4": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G3": 1, "G4": 1 } }, { "quantities_by_group": { "G0": 1, "G2": 1, "G3": 1, "G4": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G3": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G3": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G2": 1, "G3": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G2": 1, "G3": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G2": 1, "G4": 1, "G5": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G2": 1, "G4": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G2": 1, "G5": 1 } } ] } ] ```

DerekC (Thu, 13 Sep 2018 14:28:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=N7uYqFDHMXzi5W6ik) @yacovm Yes, the discovery supports `out_of` syntac

yacovm (Thu, 13 Sep 2018 14:34:28 GMT):
@DerekC why is peer0.org5 found twice in the `discover` query?

DerekC (Thu, 13 Sep 2018 14:42:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9YZgEQ24ZHdAPCdwu) @yacovm Sorry, I rename the name of orgs before uploading the query result. This should be fine now.

yacovm (Thu, 13 Sep 2018 14:43:18 GMT):
now we have 2 of them in Org4MSP

DerekC (Thu, 13 Sep 2018 14:46:16 GMT):
Sorry again. It should be good now.

yacovm (Thu, 13 Sep 2018 14:55:18 GMT):
@DerekC so you're saying that 4 out of 6 works, but - 4 out of 5 doesn't. can you perhaps try to kill a different peer? can you perhaps try to kill 2 peers so it's 4 out of 4 ?

DerekC (Thu, 13 Sep 2018 14:57:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=vPXnzi4tviZzuHKd7) @yacovm hmm... No, 4 out of 6 doesn't work all the time. I did not change the network setting.

DerekC (Thu, 13 Sep 2018 14:57:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=vPXnzi4tviZzuHKd7) @yacovm hmm... No, 4 out of 6 doesn't work all the time. I did not change the policy setting.

yacovm (Thu, 13 Sep 2018 14:57:19 GMT):
what do you mean doesn't work all the time?

yacovm (Thu, 13 Sep 2018 14:57:50 GMT):
can you perhaps use the `discover endorsers` to see if it works or not?

DerekC (Thu, 13 Sep 2018 15:01:51 GMT):
I pasted the `discover endorsers` query result above. I meant when Org5 is down. I got the error like that: https://chat.hyperledger.org/channel/fabric-sdk-go?msg=52YRvKWHXLwcvufw8 When I try to query the chaincode, it return the following error: ``` time="2018-09-13T14:50:00Z" level=error msg="query failed after 30.255825219s: cc failed: [500] {\"error\":{\"code\":500,\"message\":\"make sure the chaincode test-cc has been successfully instantiated and try again: getccdata channel-1/test-cc failed: failed to execute transaction ff44fb02f2e3007e49cc4d5728ff150db12f630949a718a58bd1112bf2b9b48c: error sending: timeout expired while executing transaction\"}}" ```

DerekC (Thu, 13 Sep 2018 15:01:51 GMT):
I pasted the `discover endorsers` query result above. I meant when Org5 is down. I got the error like that: https://chat.hyperledger.org/channel/fabric-sdk-go?msg=52YRvKWHXLwcvufw8

yacovm (Thu, 13 Sep 2018 15:15:29 GMT):
right, @DerekC - but - can you re-create the problem just with `discover endorsers` ?

yacovm (Thu, 13 Sep 2018 15:15:36 GMT):
without using the Go SDK ?

yacovm (Thu, 13 Sep 2018 15:15:48 GMT):
like - kill Org5's peer and then do `discover endorsers`

DerekC (Thu, 13 Sep 2018 15:31:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kJCKw3kQ5ncnY4iMt) @yacovm Right now the backbone org is down. ``` [ { "Chaincode": "test-cc", "EndorsersByGroups": { "G0": [ { "MSPID": "Org3MSP", "LedgerHeight": 138588, "Endpoint": "peer0.org3:7051", "Identity": "", "Chaincodes": null } ], "G1": [ { "MSPID": "Org5MSP", "LedgerHeight": 138588, "Endpoint": "peer0.org5:7051", "Identity": "", "Chaincodes": null } ], "G2": [ { "MSPID": "Org4MSP", "LedgerHeight": 138588, "Endpoint": "peer0.org4:7051", "Identity": "", "Chaincodes": null } ], "G3": [ { "MSPID": "Org1MSP", "LedgerHeight": 138588, "Endpoint": "peer0.org1:7051", "Identity": "", "Chaincodes": null } ], "G4": [ { "MSPID": "Org2MSP", "LedgerHeight": 138588, "Endpoint": "peer0.org2:7051", "Identity": "", "Chaincodes": null } ] }, "Layouts": [ { "quantities_by_group": { "G0": 1, "G1": 1, "G3": 1, "G4": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G3": 1, "G4": 1 } }, { "quantities_by_group": { "G1": 1, "G2": 1, "G3": 1, "G4": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G2": 1, "G3": 1 } }, { "quantities_by_group": { "G0": 1, "G1": 1, "G2": 1, "G4": 1 } } ] } ] ```

yacovm (Thu, 13 Sep 2018 15:32:04 GMT):
ok

yacovm (Thu, 13 Sep 2018 15:32:19 GMT):
so it gives back 5 choices

yacovm (Thu, 13 Sep 2018 15:32:29 GMT):
which is (5 choose 4)

yacovm (Thu, 13 Sep 2018 15:32:38 GMT):
which means, the discovery service works....

yacovm (Thu, 13 Sep 2018 15:33:32 GMT):
because - you ask the peer - and it gives you back the answer

DerekC (Thu, 13 Sep 2018 15:35:25 GMT):
When one of the org is down, the whole network act strangely. SDK error: ``` time="2018-09-13T14:50:00Z" level=error msg="query failed after 30.255825219s: cc failed: [500] {\"error\":{\"code\":500,\"message\":\"make sure the chaincode test-cc has been successfully instantiated and try again: getccdata channel-1/test-cc failed: failed to execute transaction ff44fb02f2e3007e49cc4d5728ff150db12f630949a718a58bd1112bf2b9b48c: error sending: timeout expired while executing transaction\"}}" ``` One of the peer error: ``` [endorser] SimulateProposal -> ERRO 1baa6 [channel-1][e0717e02] failed to invoke chaincode name:"test-cc" , error: chaincode test-cc:1 has already been launched ```

yacovm (Thu, 13 Sep 2018 15:35:45 GMT):
:/

bandreghetti (Thu, 13 Sep 2018 17:05:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mhzvt9pPLLHjBTB5Q) @parsiya what if I need to set up a new peer? I need to put its private key under `/etc/hyperledger/fabric/msp` along with other crypto files, don't I? what I wanted to do is generate a new peer's certs via SDK but retrieve them to run a fabric-peer docker instance somewhere else

fhmarino (Thu, 13 Sep 2018 21:59:56 GMT):
Has joined the channel.

fhmarino (Thu, 13 Sep 2018 22:14:01 GMT):
hello there! I'm developing a middleware in Go that integrates a hyperledger fabric network using fabric-sdk-go. The middleware is running on Docker container and it's set to use the same network of fabric containers and it's working well, but when I tries connect to the channel the follow error is throwed: failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [peer0.slaughterhouse.kingbeefcattle.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.slaughterhouse.kingbeefcattle.com:7051] There is the link to my config.yaml: https://drive.google.com/open?id=1dt4dOGkZNLm1IGGYTfHpv4iuwm2bnpC0 Someone can help me, please?

fhmarino (Thu, 13 Sep 2018 22:14:01 GMT):
hello there! I'm developing a middleware in Go which integrate with a hyperledger fabric network using fabric-sdk-go. The middleware is running on Docker container and I setup it to use the same network of fabric containers (this settings is working well), but when I try connect with network channel a panic error occurs. Message error: failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [peer0.slaughterhouse.kingbeefcattle.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.slaughterhouse.kingbeefcattle.com:7051] There is the link to my config.yaml: https://drive.google.com/open?id=1dt4dOGkZNLm1IGGYTfHpv4iuwm2bnpC0 Could someone help me, please?

mahbub227 (Fri, 14 Sep 2018 02:49:59 GMT):
Has joined the channel.

venzi (Fri, 14 Sep 2018 12:19:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5KRJNqxd4jhBxdqTX) @bandreghetti I am very much interested in the answer for this, too. I don't see a way to get the private key that stored locally so I can set up a new peer. Does anybody know how to do this?

venzi (Fri, 14 Sep 2018 12:19:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5KRJNqxd4jhBxdqTX) @bandreghetti @parsiya I am very much interested in the answer for this, too. I don't see a way to get the private key that stored locally so I can set up a new peer. Does anybody know how to do this?

rmorbach (Fri, 14 Sep 2018 14:33:23 GMT):
Has joined the channel.

singh 31 (Fri, 14 Sep 2018 15:23:09 GMT):
Has joined the channel.

singh 31 (Fri, 14 Sep 2018 15:24:46 GMT):
Whats the easiest way to start writing some go-sdk code to interact with a running fabric instance? Do i have to write that long config.yaml file before i even get started? Is there an example network / config.yaml combination i can start with?

singh 31 (Fri, 14 Sep 2018 15:55:07 GMT):
the java sdk only needs the peer/orderer/ca urls to be functional, why does the GO one need an entire config file to create an instance of the sdk?

bandreghetti (Fri, 14 Sep 2018 15:59:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jKes5Q84ydZf4C24P) @singh 31 there is this example here https://github.com/hyperledger/fabric-sdk-go/blob/a18ca13249bf55644c9d04b3f300c634d871a992/test/fixtures/config/config_e2e.yaml as far as i know there is no way to instantiate the fabsdk object without passing a config file "/

singh 31 (Fri, 14 Sep 2018 16:01:09 GMT):
is there a way i can `docker-compose up` the exact network they are using in that config_e2e.yaml (or any of the other config.yaml files in the repo) so i wont have to change the config file

bandreghetti (Fri, 14 Sep 2018 16:05:34 GMT):
i'm afraid you can't, i guess your best shot is to find out what is the minimum config you need to make it work with your network

singh 31 (Fri, 14 Sep 2018 16:06:47 GMT):
i dont really care about the network itself, i just want to write some methods using the sdk. I wish there existed a config.yaml that mapped to one of the projects in fabric-samples

singh 31 (Fri, 14 Sep 2018 16:06:47 GMT):
i dont really care about the network itself, i just want to write some methods using the sdk. I wish there existed a config.yaml that mapped to one of the projects in the fabric-samples repo

bandreghetti (Fri, 14 Sep 2018 16:07:16 GMT):
in v1.2 there is a dynamic discovery service that makes life a whole lot easier

singh 31 (Fri, 14 Sep 2018 16:08:31 GMT):
is v1.2 released?

singh 31 (Fri, 14 Sep 2018 16:08:31 GMT):
is v1.2 released?

bandreghetti (Fri, 14 Sep 2018 16:15:31 GMT):
yes, it's the latest release

singh 31 (Fri, 14 Sep 2018 16:19:48 GMT):
oh awesome! Is there an example of this dynamic discovery service?

bandreghetti (Fri, 14 Sep 2018 16:31:25 GMT):
it's automatic. you only need to point to a single (anchor) peer in your config file and the sdk takes it from there

singh 31 (Fri, 14 Sep 2018 18:22:15 GMT):
okay, this is exactly what i was looking for. Thank you. Do you know the key for this config entry?

bandreghetti (Fri, 14 Sep 2018 19:02:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=AZZz7vSoAM3C9sd2c) @singh 31 https://github.com/hyperledger/fabric-sdk-go/blob/a18ca13249bf55644c9d04b3f300c634d871a992/test/fixtures/config/config_e2e.yaml#L241 here's where you put peer configs you'll probably still need to set orderer configs too

singh 31 (Fri, 14 Sep 2018 19:19:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DwGwikzHMKfzf2eiB) @bandreghetti Thanks a lot for your help @bandreghetti

singh 31 (Fri, 14 Sep 2018 19:19:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DwGwikzHMKfzf2eiB) @bandreghetti Thanks a lot for your help!

bandreghetti (Fri, 14 Sep 2018 20:57:04 GMT):
you're welcome!

jriachi (Sat, 15 Sep 2018 05:48:22 GMT):
Trying to upgrade cahincode and got the following error message

jriachi (Sat, 15 Sep 2018 05:48:26 GMT):
authorizing update: error validating ReadSet: readset expected key [Group] /Channel/Application at version 0, but got version 1

jriachi (Sat, 15 Sep 2018 05:48:36 GMT):
Any idea what is the cause of such an error?

jriachi (Sat, 15 Sep 2018 06:42:45 GMT):
Code is straight forward

jriachi (Sat, 15 Sep 2018 06:42:59 GMT):
upgradeResp, err := setup.admin.UpgradeCC(setup.ChannelID, resmgmt.UpgradeCCRequest{Name: setup.ChainCodeID, Path: setup.ChaincodePath, Version: "1", Args: [][]byte{}, Policy: ccPolicy})

fhmarino (Sat, 15 Sep 2018 18:01:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hLwKPZNzrdiLa9cHo) I found the cause of problem, it was because I've configure the peer port with the value it exposes to the host (being on the same network). To fix this I changed to port 7051 and 7053 (events), so some requests started to work, but now I has the following error that occurs intermittently: Note: this is not the peer host I've set up in my config.yaml Could this be with the CORE_PEER_GOSSIP_USELEADERELECTION = true setting?

fhmarino (Sat, 15 Sep 2018 18:01:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hLwKPZNzrdiLa9cHo) I found the cause of problem, it was because I've configure the peer port with the value it exposes to the host (being on the same network). To fix this I changed to port 7051 and 7053 (events), so some requests started to work, but now I has the following error that occurs intermittently: Transaction processing for endorser [peer1.slaughterhouse.kingbeefcattle.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer1.slaughterhouse.kingbeefcattle.com:7051] Note: this is not the peer host I've set up in my config.yaml Could this be with the CORE_PEER_GOSSIP_USELEADERELECTION = true setting?

fhmarino (Sat, 15 Sep 2018 18:01:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hLwKPZNzrdiLa9cHo) I found the cause of problem, it was because I've configure the peer port with the value it exposes to the host (being on the same network). To fix this I changed to port 7051 and 7053 (events), so some requests started to work, but now I has the following error that occurs intermittently: Transaction processing for endorser [peer1.slaughterhouse.kingbeefcattle.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer1.slaughterhouse.kingbeefcattle.com:7051] Note: this is not the peer host I've set up in my config.yaml, actually this peer is from another org... Could this be with the CORE_PEER_GOSSIP_USELEADERELECTION = true setting?

yacovm (Mon, 17 Sep 2018 20:40:00 GMT):
@bstasyszyn sorry for the delay on the review of https://gerrit.hyperledger.org/r/#/c/26163/ , I'll try to review it tomorrow

bstasyszyn (Tue, 18 Sep 2018 13:36:00 GMT):
@yacovm no worries

yacovm (Tue, 18 Sep 2018 14:18:29 GMT):
@bstasyszyn I looked at the CR and I an not against the idea of having a 1-shot filter function, but - i still don't understand *why* the current API doesn't satisfy your use case? The tests you added can be implemented with the current API, can they not?

yacovm (Tue, 18 Sep 2018 14:22:04 GMT):
oh, I think I see - the current filtering works on a single candidate and not on all of them, right?

yacovm (Tue, 18 Sep 2018 14:29:01 GMT):
that makes sense... indeed improves the API and the expressiveness. Thanks for the change. I don't like that we now have `ExclusionFilter` and `Filter` but I can't find a better name and names aren't that important anyway I +2ed

bstasyszyn (Tue, 18 Sep 2018 15:23:09 GMT):
@yacovm thx!

bjwswang (Wed, 19 Sep 2018 09:41:47 GMT):
Does anyone know if fabric-sdk-go can support to deploy nodejs chaincode or not ?

kariyappals (Wed, 19 Sep 2018 12:14:49 GMT):
Has joined the channel.

lmyu (Wed, 19 Sep 2018 16:49:51 GMT):
Has joined the channel.

baoyangc (Wed, 19 Sep 2018 17:10:27 GMT):
https://jira.hyperledger.org/browse/FAB-12053

aleksandar.likic (Wed, 19 Sep 2018 17:42:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=M2sxLgo96wv9kmeEf) @bjwswang It should, but I don't think it was ever tested. Maybe someone tried it already? There is a test case that deploys a go CC, at https://github.com/hyperledger/fabric-sdk-go/blob/1eb1d28713c411e25dbb68ac68df85d56b7a89b2/pkg/client/resmgmt/example_test.go#L53 . One should be able to package another CC type and provide the corresponding CC type at &resource.CCPackage{Type: 1, Code: []byte("bytes")}

aleksandar.likic (Wed, 19 Sep 2018 17:42:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=M2sxLgo96wv9kmeEf) @bjwswang It should, but I don't think it was ever tested. Maybe someone tried it already? There is a test case that deploys a go CC, at https://github.com/hyperledger/fabric-sdk-go/blob/1eb1d28713c411e25dbb68ac68df85d56b7a89b2/pkg/client/resmgmt/example_test.go#L53 . One should be able to package a CC of another type and provide the corresponding CC type at &resource.CCPackage{Type: 1, Code: []byte("bytes")}

aleksandar.likic (Wed, 19 Sep 2018 17:42:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=M2sxLgo96wv9kmeEf) @bjwswang It should, but I don't think it was ever tested. Maybe someone tried it already? There is a test case that installs a go CC, at https://github.com/hyperledger/fabric-sdk-go/blob/1eb1d28713c411e25dbb68ac68df85d56b7a89b2/pkg/client/resmgmt/example_test.go#L53 . One should be able to package a CC of another type and provide the corresponding CC type at &resource.CCPackage{Type: 1, Code: []byte("bytes")}

aleksandar.likic (Wed, 19 Sep 2018 17:42:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=M2sxLgo96wv9kmeEf) @bjwswang It should, but I don't think it was ever tested. Maybe someone tried it already? There is a test case that installs a go CC, at https://github.com/hyperledger/fabric-sdk-go/blob/1eb1d28713c411e25dbb68ac68df85d56b7a89b2/pkg/client/resmgmt/example_test.go#L53 . One should be able to package a CC of another type and provide the corresponding CC type at &resource.CCPackage{Type: 1, Code: []byte("bytes")} . Here is the integration test: https://github.com/hyperledger/fabric-sdk-go/blob/1eb1d28713c411e25dbb68ac68df85d56b7a89b2/test/integration/e2e/end_to_end.go#L197

bandreghetti (Wed, 19 Sep 2018 19:13:38 GMT):
So when I instantiate a chaincode via SDK i need to build a resmgmt.InstantiateCCRequest type structure as in: ``` instantiateRequest := resmgmt.InstantiateCCRequest{ Name: "mychaincode", Path: "github.com/myuser/mychaincode/chaincode", Version: "0.1", Policy: ccPolicy, } ``` First question: where should the path field point to? The folder where the chaincode source code is in the filesystem of the machine running the sdk or the folder where it is in the peer's filesystem? Also should I point to the folder or to the source code file itself? Second question: why must the policy field be a *SignaturePolicyEnvelope from `"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/common/cauthdsl"` and not from `"github.com/hyperledger/fabric/common/cauthdsl"`? If I let gofmt auto-import the former I get an error such as: ``` cannot use ccPolicy (type *"github.com/hyperledger/fabric/protos/common".SignaturePolicyEnvelope) as type *"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common".SignaturePolicyEnvelope in field value ``` Everything works fine if I import the other package but I'd like to know why. Thanks!

bandreghetti (Wed, 19 Sep 2018 19:13:38 GMT):
So when I instantiate a chaincode via SDK i need to build a resmgmt.InstantiateCCRequest type structure as in: ``` instantiateRequest := resmgmt.InstantiateCCRequest{ Name: "mychaincode", Path: "github.com/myuser/mychaincode/chaincode", Version: "0.1", Policy: ccPolicy, } ``` **First question**: where should the path field point to? The folder where the chaincode source code is in the filesystem of the machine running the sdk or the folder where it is in the peer's filesystem? Also should I point to the folder or to the source code file itself? **Second question**: why must the policy field be a *SignaturePolicyEnvelope from `"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/common/cauthdsl"` and not from `"github.com/hyperledger/fabric/common/cauthdsl"`? If I let gofmt auto-import the former I get an error such as: ``` cannot use ccPolicy (type *"github.com/hyperledger/fabric/protos/common".SignaturePolicyEnvelope) as type *"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common".SignaturePolicyEnvelope in field value ``` Everything works fine if I import the other package but I'd like to know why. Thanks!

Rachit_gaur (Thu, 20 Sep 2018 09:33:16 GMT):
How to use the setevent function? I have used setevent() function to set an event but how to handle the requests? where will my event hub be managed?

lmyu (Thu, 20 Sep 2018 18:09:03 GMT):
We're seeing concurrency issues with transactor, but we think it may be due to creating a transactor instance for each transaction. Should we not be doing this?

aleksandar.likic (Thu, 20 Sep 2018 18:48:38 GMT):
@bandreghetti The Path is a part of the Fabric ChaincodeID (https://github.com/hyperledger/fabric/blob/c232cbf8a04a3013ad49d7a1ad9abd86f5d97df4/protos/peer/chaincode.pb.go#L99). In think that in the case of a golang CC it should be the chaincode import path, usually something like "github.com/". Not sure how the path is used for CCs in other languages.

aleksandar.likic (Thu, 20 Sep 2018 18:48:38 GMT):
@bandreghetti The Path is a part of the Fabric ChaincodeID (https://github.com/hyperledger/fabric/blob/c232cbf8a04a3013ad49d7a1ad9abd86f5d97df4/protos/peer/chaincode.pb.go#L99). In think that in the case of a golang CC it should be the chaincode import path, usually something like "github.com/". Not sure how the path is used for CCs in other languages. See for example https://github.com/hyperledger/fabric-sdk-go/blob/1eb1d28713c411e25dbb68ac68df85d56b7a89b2/test/integration/e2e/end_to_end.go#L197.

aleksandar.likic (Thu, 20 Sep 2018 18:48:38 GMT):
@bandreghetti The Path is a part of the Fabric ChaincodeID (https://github.com/hyperledger/fabric/blob/c232cbf8a04a3013ad49d7a1ad9abd86f5d97df4/protos/peer/chaincode.pb.go#L99). I think that in the case of a golang CC it should be the chaincode import path, usually something like "github.com/". Not sure how the path is used for CCs in other languages. See for example https://github.com/hyperledger/fabric-sdk-go/blob/1eb1d28713c411e25dbb68ac68df85d56b7a89b2/test/integration/e2e/end_to_end.go#L197.

aleksandar.likic (Thu, 20 Sep 2018 18:51:05 GMT):
@bandreghetti on the second question, fabric-sdk-go copies parts of the fabric source it needs to the "third_party" folder and imports from there, so the client application doesn't need to import fabric - as it would have many unwanted side effects, like incompatible libraries etc.

bandreghetti (Thu, 20 Sep 2018 18:55:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=enNBYZdeNtQ42qDM4) @aleksandar.likic I see... Makes sense! Thank you c:

bjwswang (Fri, 21 Sep 2018 06:06:28 GMT):
@aleksandar.likic Thank you! I already tried in deploying go cc.It works very well ... I will verify the nodejs chaincode later.

antitoine (Fri, 21 Sep 2018 08:35:00 GMT):
Hi, there is any plan to improve the Fabric CA integration ? I would like to manage affiliations for example. Also, I can't edit an identity, the Fabric CA always return "Authorization failure" with the SDK.

aleksandar.likic (Fri, 21 Sep 2018 12:34:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=y9txQetW2ypv5fEev) @antitoine Have you tried https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp#Client.ModifyIdentity ? Integration test is at https://github.com/hyperledger/fabric-sdk-go/blob/b99fa1ec73dc3ae9e5f80d4ed42b7077fb706be6/test/integration/pkg/client/msp/identity_test.go#L88.

aleksandar.likic (Fri, 21 Sep 2018 12:44:06 GMT):
@antitoine Affiliation management is a part of https://jira.hyperledger.org/browse/FABG-680. Any help with implementing this would be great.

antitoine (Fri, 21 Sep 2018 13:04:10 GMT):
@aleksandar.likic My case is more advanced than the one in the integration test. I try to modify attributes or affiliation of an identity. Thanks for the pointer to the Jira issue, I will try maybe to contribute myself on it (it is a first time for me)

aleksandar.likic (Fri, 21 Sep 2018 13:20:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GQvq7rPgo73mbiSuK) @antitoine I think you should be able to modify an identity now, including changing it's affiliation and attributes - they are parts of https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp#IdentityRequest that goes into https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp#Client.ModifyIdentity. It is adding/removing affiliations that is missing from the API.

aleksandar.likic (Fri, 21 Sep 2018 13:20:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GQvq7rPgo73mbiSuK) @antitoine I think you should be able to modify an identity now, including changing its affiliation and attributes - they are parts of https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp#IdentityRequest that goes into https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp#Client.ModifyIdentity. It is adding/removing affiliations that is missing from the API.

nrohith (Mon, 24 Sep 2018 20:37:54 GMT):
Has joined the channel.

atirekg (Tue, 25 Sep 2018 05:46:25 GMT):
Has joined the channel.

atirekg (Tue, 25 Sep 2018 06:13:17 GMT):
hi there

atirekg (Tue, 25 Sep 2018 06:13:19 GMT):
Use "dep help [command]" for more information about a command. Makefile:267: recipe for target 'check-dep' failed make: *** [check-dep] Error 1

atirekg (Tue, 25 Sep 2018 06:13:28 GMT):
please help me to solve the issue

Ashish_ydv (Tue, 25 Sep 2018 09:09:45 GMT):
Has joined the channel.

lmyu (Tue, 25 Sep 2018 14:33:24 GMT):
Hi, sorry to ask again, but question regarding channel transactor usage. When creating a transaction on a channel should we specifically be re-using the same instance of a transactor?

gen_el (Wed, 26 Sep 2018 09:35:00 GMT):
Does the SDK support 1.30-rc

gen_el (Wed, 26 Sep 2018 09:35:00 GMT):
Does the SDK support 1.3.0-rc

gen_el (Wed, 26 Sep 2018 09:35:00 GMT):
Does the SDK support 1.3.0-rc?

greg2git (Wed, 26 Sep 2018 15:20:58 GMT):
Has joined the channel.

greg2git (Wed, 26 Sep 2018 16:02:22 GMT):
as a concept, a go 'channel' seems related to a fabric 'channel' or even a lightning 'channel' - are they all totally different concepts and only share the common name or there's something else they have in common?

antitoine (Wed, 26 Sep 2018 16:03:58 GMT):
@aleksandar.likic I finally found out why I had the mistake when editing an identity. I sent the attributes "hf.Affiliation", "hf.EnrollmentID" and "hf.Type", which is not allowed. But I have a more important issue, I can't instantiate another CA client with different identity (ID/secret) than the one stored in the configuration. Why ? I create a new msp Client by providing a new context from the SDK with the identity option (fabsdk.WithIdentity) of the user. The creation works, but when I use the new client to register for example, this is the identity provided in the configuration that is used, not the identity I gave in the context.

bandreghetti (Wed, 26 Sep 2018 20:03:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dGNvKryF9a2237Xhe) @greg2git I'm not very familiar with lightning channels, but here goes: A Golang 'channel' is actually a data type the language implements to allow for inter-thread communication. You can read more about them here: https://tour.golang.org/concurrency/1 A Hyperleger Fabric 'channel' is a subnet in the Fabric network that allows for transactions to occur privately between network members with access to that channel. You can read more about them here: https://hyperledger-fabric.readthedocs.io/en/release-1.3/channels.html A Lightning 'channel', as far as I know, is a bidirectional channel through which two Bitcoin users can do transactions between each other without having to consult the network - nothing to do with Hyperledger. You can read more about the Lightning Network solution here: https://www.blockchain-council.org/blockchain/what-is-the-lightning-network/

bandreghetti (Wed, 26 Sep 2018 20:03:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dGNvKryF9a2237Xhe) @greg2git I'm not very familiar with the Lightning Network, but here goes: A Golang 'channel' is actually a data type the language implements to allow for inter-thread communication. You can read more about them here: https://tour.golang.org/concurrency/1 A Hyperleger Fabric 'channel' is a subnet in the Fabric network that allows for transactions to occur privately between network members with access to that channel. You can read more about them here: https://hyperledger-fabric.readthedocs.io/en/release-1.3/channels.html A Lightning 'channel', as far as I know, is a bidirectional channel through which two Bitcoin users can do transactions between each other without having to consult the network - nothing to do with Hyperledger. You can read more about the Lightning Network solution here: https://www.blockchain-council.org/blockchain/what-is-the-lightning-network/

bandreghetti (Wed, 26 Sep 2018 20:03:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dGNvKryF9a2237Xhe) @greg2git I'm not very familiar with the Lightning Network, but here goes: A Golang 'channel' is actually a data type the language implements to allow for inter-thread communication. You can read more about them here: https://tour.golang.org/concurrency/1 A Hyperleger Fabric 'channel' is a subnet in the Fabric network that allows for transactions to occur privately between network members with access to that channel. You can read more about them here: https://hyperledger-fabric.readthedocs.io/en/release-1.3/channels.html A Lightning 'channel', as far as I know, is a bidirectional channel through which two Bitcoin users can do transactions between each other without having to consult the network - nothing to do with Hyperledger. You can read more about the Lightning Network solution here: https://www.blockchain-council.org/blockchain/what-is-the-lightning-network/ Therefore, they are all totally different concepts and only share the common name.

greg2git (Wed, 26 Sep 2018 20:47:22 GMT):
@bandreghetti :thumbsup:

yacovm (Wed, 26 Sep 2018 21:38:48 GMT):
Hey guys - what is the distributed signing identity concept in the go SDK ?

bandreghetti (Wed, 26 Sep 2018 21:51:36 GMT):
Hey guys! I'm trying to get the peer list for a channel using the following section of code: ``` chCfg, err := resmgmtClient.QueryConfigFromOrderer(reqBody.ChannelName, resmgmt.WithOrdererEndpoint("orderer.example.com")) if err != nil { w.WriteHeader(http.StatusBadRequest) errmsg := fmt.Sprintf("failed to query %s channel config: %s", reqBody.ChannelName, err.Error()) w.Write([]byte(errmsg)) log.Print(errmsg) return } log.Printf("chCfg = %#v\n", chCfg) chCtx, err := t.sdk.ChannelContext(reqBody.ChannelName, fabsdk.WithUser("Admin"), fabsdk.WithOrg("org1"))() if err != nil { w.WriteHeader(http.StatusInternalServerError) errmsg := fmt.Sprintf("failed to create channel context: %s", err.Error()) w.Write([]byte(errmsg)) log.Print(errmsg) return } discoveryService, err := chCtx.ChannelService().Discovery() if err != nil { w.WriteHeader(http.StatusInternalServerError) errmsg := fmt.Sprintf("failed to create discovery service: %s", err.Error()) w.Write([]byte(errmsg)) log.Print(errmsg) return } peerList, err := discoveryService.GetPeers() if err != nil { w.WriteHeader(http.StatusBadRequest) errmsg := fmt.Sprintf("failed to get %s peers: %s", reqBody.ChannelName, err.Error()) w.Write([]byte(errmsg)) log.Print(errmsg) return } ``` But I get the following error from the Discovery() method: ``` failed to create discovery service: could not get chConfig cache reference: read configuration for channel peers failed ``` The channel is not configured in the `config.yaml` file used to instantiate the SDK. However I thought the channel config would be retrieved from the orderer and stored in the SDK cache by using the QueryConfigFromOrderer method, which apparently is not working. What am I doing wrong?

bandreghetti (Wed, 26 Sep 2018 21:51:36 GMT):
Hey guys! I'm trying to get the peer list for a channel using the following section of code: ``` chCfg, err := resmgmtClient.QueryConfigFromOrderer(reqBody.ChannelName, resmgmt.WithOrdererEndpoint("orderer.example.com")) if err != nil { w.WriteHeader(http.StatusBadRequest) errmsg := fmt.Sprintf("failed to query %s channel config: %s", reqBody.ChannelName, err.Error()) w.Write([]byte(errmsg)) log.Print(errmsg) return } log.Printf("chCfg = %#v\n", chCfg) chCtx, err := t.sdk.ChannelContext(reqBody.ChannelName, fabsdk.WithUser("Admin"), fabsdk.WithOrg("org1"))() if err != nil { w.WriteHeader(http.StatusInternalServerError) errmsg := fmt.Sprintf("failed to create channel context: %s", err.Error()) w.Write([]byte(errmsg)) log.Print(errmsg) return } discoveryService, err := chCtx.ChannelService().Discovery() if err != nil { w.WriteHeader(http.StatusInternalServerError) errmsg := fmt.Sprintf("failed to create discovery service: %s", err.Error()) w.Write([]byte(errmsg)) log.Print(errmsg) return } peerList, err := discoveryService.GetPeers() if err != nil { w.WriteHeader(http.StatusBadRequest) errmsg := fmt.Sprintf("failed to get %s peers: %s", reqBody.ChannelName, err.Error()) w.Write([]byte(errmsg)) log.Print(errmsg) return } ``` But I get the following error from the Discovery() method: ``` failed to create discovery service: could not get chConfig cache reference: read configuration for channel peers failed ``` The channel is not configured in the `config.yaml` file used to instantiate the SDK. However I thought the channel config would be retrieved from the orderer and stored in the SDK cache by using the QueryConfigFromOrderer method, which apparently is not working. What am I doing wrong?

bandreghetti (Wed, 26 Sep 2018 22:28:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=F93vedKySpYTPAvBA) @yacovm I'm not sure if that answers your question but here's the definition of the SigningIdentity interface: https://github.com/hyperledger/fabric-sdk-go/blob/cb4ad138c14fd98039c56ab6301e665254a930bc/internal/github.com/hyperledger/fabric/msp/msp.go#L177 It extends the Identity interface with a Sign method for signing transactions. Feel free to ask for any clarifications.

bandreghetti (Wed, 26 Sep 2018 22:28:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=F93vedKySpYTPAvBA) @yacovm I'm not sure if that answers your question but here's the definition of the SigningIdentity interface: https://github.com/hyperledger/fabric-sdk-go/blob/cb4ad138c14fd98039c56ab6301e665254a930bc/internal/github.com/hyperledger/fabric/msp/msp.go#L177 It extends the Identity interface with a Sign method for signing transactions. Feel free to ask for any clarifications.

Aswath8687 (Wed, 26 Sep 2018 22:59:57 GMT):
Has joined the channel.

aleksandar.likic (Thu, 27 Sep 2018 01:21:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=n9Q5AxHKXbNH9kDGh) @antitoine Fabric CA allows registration of new users to be done only by users who have the Registrar role. See https://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#registering-a-new-identity, and test case at https://github.com/hyperledger/fabric-sdk-go/blob/ea10f6c54dced06829df0254dc417d26d90e54ad/test/integration/pkg/client/msp/enrollment_test.go#L47

aleksandar.likic (Thu, 27 Sep 2018 01:36:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=F93vedKySpYTPAvBA) @yacovm Can you clarify the question? Is there a particular use case you have in mind?

yacovm (Thu, 27 Sep 2018 04:50:27 GMT):
No. I some code in the sdk and wanted to ask what is it for

yacovm (Thu, 27 Sep 2018 04:50:27 GMT):
No. @aleksandar.likic I some saw code in the sdk and wanted to ask what is it for

twoneks (Thu, 27 Sep 2018 08:26:37 GMT):
Has joined the channel.

antitoine (Thu, 27 Sep 2018 08:40:23 GMT):
@aleksandar.likic I'm looking to have one instance of CA client per user enrolled in the same instance of the SDK. However, today, only the user specified in the configuration is used to communicate with the CA, for example to register a new user. The scenario is as follows: 1. The SDK is initialized with identity A to communicate with the CA. 2. Another identity B is registered by identity A (it is assumed that identity A can do so). 3. Identity B registers a user C only if B has the right to do so, using the same instance of the SDK initialized in 1. I can't find a solution today, except to make a new instance of the SDK with a different configuration including user B's information.

Baha-sk (Thu, 27 Sep 2018 17:51:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6794ac04-9011-4d3d-b4db-fb27ddd6b2ed) @yacovm @yacovm it allows different orgs to generate their own channel config signature using the SDK for channel updates. The network `admin` will then gather these signatures from each org then call resmgmt client.SaveChannel() with the list of signatures from each org. This way orgs, don't need to share their PKs with the network `admin`

Baha-sk (Thu, 27 Sep 2018 17:51:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6794ac04-9011-4d3d-b4db-fb27ddd6b2ed) @yacovm it allows different orgs to generate their own channel config signature using the SDK for channel updates. The network `admin` will then gather these signatures from each org then call resmgmt client.SaveChannel() with the list of signatures from each org. This way orgs, don't need to share their PKs with the network `admin`

yacovm (Thu, 27 Sep 2018 18:39:45 GMT):
@Baha-sk - so this is like a signature collection? does it work with some chaincode or something?

Baha-sk (Thu, 27 Sep 2018 20:04:12 GMT):
@yacovm - we added a new option in the resmgmt client's SaveChannel() to pass in a list of signatures, which bypasses signatures creation from SigningIdentity(s) .. this is only available for channel updates (for now)

Kyroy (Fri, 28 Sep 2018 06:37:04 GMT):
When I use `QueryInstantiatedChaincodes` on a peer from org2, I do not get the instantiated chaincode of org1. Same Channel. Documentation says: > QueryInstantiatedChaincodes queries the instantiated chaincodes on a peer for specific channel. Is this the expected behavior or a bug?

Kyroy (Fri, 28 Sep 2018 07:37:22 GMT):
Can I somehow get all chaincodes that are (instantiated) in a channel?

twoneks (Fri, 28 Sep 2018 11:27:25 GMT):
@Kyroy `peer chaincode list -C channelname --instantiated`

Kyroy (Fri, 28 Sep 2018 11:30:05 GMT):
I found my error.... because the sdk returns collections in this call, I did some filtering and this filtering filtered too much :D

twoneks (Fri, 28 Sep 2018 11:40:37 GMT):
```go // The context is fine since I'm using it to execute successfully Invoke actions event, err := event.New(clientContext) reg, notifier, err := event.RegisterChaincodeEvent("cc", "eventInvoke") defer event.Unregister(reg) client, err := channel.New(clientContext) client.Execute(channel.Request{ChaincodeID: "cc", Args: ....}) fmt.Println("Waiting...") ccEvent := <-notifier fmt.Println("Received CC event:", ccEvent) ``` The execution never arrive to the read from channel line. On my logs I have ```bash .... [lockbasedtxmgr] Commit -> DEBU 16e0 Updates committed to state database [kvledger] CommitWithPvtData -> DEBU 16e1 Channel [mychannel]: Committing block [10] transactions to history database [historyleveldb] Commit -> DEBU 16e2 Channel [mychannel]: Updating history database for blockNo [10] with [1] transactions [historyleveldb] Commit -> DEBU 16e3 Channel [mychannel]: Updates committed to history database for blockNo [10] [eventhub_producer] CreateBlockEvents -> DEBU 16e4 Entry [eventhub_producer] CreateBlockEvents -> DEBU 16e6 Channel [mychannel]: Block event for block number [10] contains transaction id: a583be58620b1d339c34c1c73df4aacdc58b05eac55940f5d100e34f4cf12650 [common/deliver] deliverBlocks -> DEBU 16e5 [channel: mychannel] Delivering block for (0xc4226ebae0) for 172.27.0.1:54606 [eventhub_producer] CreateBlockEvents -> DEBU 16e7 Exit [eventhub_producer] Send -> DEBU 16e8 Entry [eventhub_producer] Send -> DEBU 16ea Event processor timeout > 0 [common/deliver] deliverBlocks -> WARN 16e9 [channel: mychannel] Error sending to 172.27.0.1:54606: rpc error: code = Canceled desc = context canceled [eventhub_producer] Send -> DEBU 16eb Event sent successfully [common/deliverevents] func1 -> DEBU 16ec Closing Deliver stream [eventhub_producer] Send -> DEBU 16ed Exit [eventhub_producer] Send -> DEBU 16ee Entry [eventhub_producer] Send -> DEBU 16ef Event processor timeout > 0 [eventhub_producer] Send -> DEBU 16f1 Event sent successfully [common/deliver] deliverBlocks -> DEBU 16f0 [channel: mychannel] Delivering block for (0xc4203dcfe0) for 172.27.0.1:54628 [eventhub_producer] Send -> DEBU 16f2 Exit [fsblkstorage] waitForBlock -> DEBU 16f3 Going to wait for newer blocks. maxAvailaBlockNumber=[10], waitForBlockNum=[11] ``` Since I'm seeing Event sent successfully I'm assuming I should be able to read from the channel. Anybody is seeing something wierd here??

rmorbach (Fri, 28 Sep 2018 14:18:42 GMT):
Has left the channel.

atirekg (Fri, 28 Sep 2018 15:02:59 GMT):
Heelo

atirekg (Fri, 28 Sep 2018 15:03:12 GMT):
Hello /go/src/github.com/hyperledger/fabric-sdk-go$ make depend Installing dependencies ... Installing github.com/alecthomas/gometalinter@v2 to /home/ubuntu/go/bin ... using tag v2.0.11 HEAD is now at 17a7ffa Update gochecknoglobals Copying gometalinter to /home/ubuntu/go/bin cp: cannot stat '/tmp/tmp.ntFXr0iPke/bin/gometalinter': No such file or directory Makefile:242: recipe for target 'depend' failed make: *** [depend] Error 1

atirekg (Fri, 28 Sep 2018 15:03:32 GMT):
I am getting this while installing go sdk

bandreghetti (Fri, 28 Sep 2018 16:58:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=542maKYpyEbG8ckip) Does anyone know how to fetch channel config from orderer and somehow save it in the sdk cache so that reference by channelID works? I still haven't solved this "/

BlackMesa (Fri, 28 Sep 2018 17:23:59 GMT):
Has joined the channel.

liuhy (Sat, 29 Sep 2018 06:39:11 GMT):
Has joined the channel.

kisna (Mon, 01 Oct 2018 03:54:27 GMT):
Ola, can we generate the channel.tx file programatically? I only see an option to load the tx file to update the channel but not to create a new channel?

Kyroy (Mon, 01 Oct 2018 06:26:42 GMT):
Is there a way to receive the private collection configs of a chaincode/peer?

dave.enyeart (Mon, 01 Oct 2018 11:52:01 GMT):
@aleksandar.likic @troyronda @Kyroy Ability to retrieve collection configs was added to peer and node sdk in v1.3: https://gerrit.hyperledger.org/r/#/c/25753/. I've opened a jira request for go SDK to do the same: https://jira.hyperledger.org/browse/FABG-769

dave.enyeart (Mon, 01 Oct 2018 11:52:41 GMT):
@aleksandar.likic @troyronda In general, should we open a go sdk jira each time we add a function to node sdk?

twoneks (Mon, 01 Oct 2018 13:26:24 GMT):
Hi Which is the difference between User and Identity in the (MSP package)[https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp]

twoneks (Mon, 01 Oct 2018 13:26:24 GMT):
Hi Which is the difference between User and Identity in the [MSP package](https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp)

troyronda (Mon, 01 Oct 2018 14:19:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3WtJLKEmdnpfg7jMq) @dave.enyeart Probably the easiest way to handle - it would be handy to tag them somehow to make them more visible.

troyronda (Mon, 01 Oct 2018 14:37:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xsnH5CkBXcPpwB5S8) @bandreghetti The SDK currently works by fetching channel config from peers and storing it in the SDK cache.

troyronda (Mon, 01 Oct 2018 14:38:16 GMT):
(the SDK config is used to determine an initial set of peers to use).

troyronda (Mon, 01 Oct 2018 14:42:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ts7YLSwuvJzZDN3zD) @yacovm The name of the tickets/feature is probably a bit misleading - as Baha mentioned, it's just the idea that certain signatures should be generated in a first step across orgs, and then submitted as a separate step. (particularly for channel updates).

troyronda (Mon, 01 Oct 2018 14:49:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TMKZCzdPa3q9KarTG) @twoneks In many cases, these terms are being used interchangeably. However SigningIdentity is special in that it's the interface holding the operations used by the SDK to interact with the Fabric network.

troyronda (Mon, 01 Oct 2018 14:54:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=c6agPQgQGHs2SC3eC) @atirekg This sounds like a bug in the script in some environments (it does work in my particular Mac setup).

troyronda (Mon, 01 Oct 2018 14:55:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=QYasAsq5WdQZw7XYm) @Kyroy @bstasyszyn might know?

atirekg (Mon, 01 Oct 2018 15:25:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Hu9CKr5Byoq867zFX) @troyronda ok

atirekg (Mon, 01 Oct 2018 15:25:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Hu9CKr5Byoq867zFX) @troyronda ok I am using ubuntu 18 (latest)

greg2git (Mon, 01 Oct 2018 16:09:30 GMT):
how do i make my couchdb server running under :5984/_utils 'see' my newly deployed go chaincode running in separate container?

dave.enyeart (Mon, 01 Oct 2018 16:20:45 GMT):
you don't need to do anything. couchdb database will automatically be created by peer upon first key being written by the chaincode

greg2git (Mon, 01 Oct 2018 16:25:13 GMT):
shouldn

greg2git (Mon, 01 Oct 2018 16:25:29 GMT):
t it show up as a database?

dave.enyeart (Mon, 01 Oct 2018 16:26:17 GMT):
yes, upon first key being written (not necessarily at chaincode instantiation time)

greg2git (Mon, 01 Oct 2018 16:34:45 GMT):
it's failing with this yaml config:

greg2git (Mon, 01 Oct 2018 16:34:54 GMT):
couchdb0: container_name: couchdb0 image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, # for example map it to utilize Fauxton User Interface in dev environments. ports: - 5984:5984 peer: container_name: peer image: hyperledger/fabric-peer environment: - CORE_PEER_ID=peer - CORE_PEER_ADDRESS=peer:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer:7051 - CORE_PEER_LOCALMSPID=DEFAULT - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock # - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp volumes: - /var/run/:/host/var/run/ - ./msp:/etc/hyperledger/msp working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start --peer-chaincodedev=true -o orderer:7050 ports: - 7051:7051 - 7053:7053 depends_on: - orderer - couchdb0

bandreghetti (Mon, 01 Oct 2018 17:03:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3WtJLKEmdnpfg7jMq) @dave.enyeart Why should the Node SDK be prioritized over the Go SDK if Fabric itself is written in Go? Shouldn't features be implemented first in the Go SDK?

bandreghetti (Mon, 01 Oct 2018 17:08:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dJfcq4sDhrFM4kjxq) @troyronda Why then do I get an error `could not get chConfig cache reference: read configuration for channel peers failed` if I called `resmgmtClient.QueryConfigFromOrderer("channelname", resmgmt.WithOrdererEndpoint("orderer.example.com"))` first? Shouldn't the channel config be stored in SDK cache after querying its config? Or should I call another function to store the returned channelCfg in the cache?

troyronda (Mon, 01 Oct 2018 17:13:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=aAXicJeJPcz5Dt8qW) @bandreghetti This is a convenience function to fetch a channel configuration from the orderer. However - this is not used by the SDK. The SDK uses channel configuration fetched from the peers instead.

troyronda (Mon, 01 Oct 2018 17:13:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=aAXicJeJPcz5Dt8qW) @bandreghetti This is a convenience function for an application to fetch a channel configuration from the orderer. However - this is not used by the SDK. The SDK uses channel configuration fetched from the peers instead.

troyronda (Mon, 01 Oct 2018 17:13:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=aAXicJeJPcz5Dt8qW) @bandreghetti This is an accessor function for an application to fetch a channel configuration from the orderer. However - this is not used by the SDK. The SDK uses channel configuration fetched from the peers instead.

dave.enyeart (Mon, 01 Oct 2018 17:30:46 GMT):
@bandreghetti the sdks are decoupled from core fabric, so ideally the sdk language of most client application demand would be prioritized. the reason node sdk has been leading is mainly historical though, due to different sets of maintainers. there is a proposal to base the next Fabric CLI on go sdk so that would indeed be a reason to implement new features in go sdk first.

muralisr (Mon, 01 Oct 2018 19:03:17 GMT):
(apologize if this is doced and I should first read....) I have an env with the SDK configured to talk to 2 peers (1) which peer is used to for querying and how can I control peers to use (2) which peer is used for eventing and how can I control peers to use ... in particular, can the SDK be configured to listen for events from both peers and will not send duplicate events (when it receives identical events from both peers) ?

suchith.arodi (Mon, 01 Oct 2018 19:03:48 GMT):
Has joined the channel.

vitorduarte (Mon, 01 Oct 2018 20:24:02 GMT):
Has joined the channel.

twoneks (Tue, 02 Oct 2018 13:53:43 GMT):
Hi! Anyone know what the filter refer to in this function https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/event/event.go#L106

troyronda (Tue, 02 Oct 2018 14:01:58 GMT):
@muralisr you can use an endpoint filter (WithTargetFilter argument). The default version looks up the filter values using configuration. (e.g., https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L124

troyronda (Tue, 02 Oct 2018 14:04:03 GMT):
(From the filtered list, there are resolver and load balancing strategies in place as well - take a look at the channel policies section of the config).

troyronda (Tue, 02 Oct 2018 14:04:03 GMT):
(From the filtered list, there are resolver and load balancing strategies in place as well).

troyronda (Tue, 02 Oct 2018 14:04:56 GMT):
@muralisr e.g., for event connections: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L174

troyronda (Tue, 02 Oct 2018 14:08:32 GMT):
The SDK currently picks one peer at a time, but is enabled to switch peers automatically - e.g., if the peer falls behind in block height -- see BlockHeightLag. e.g., https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L198

troyronda (Tue, 02 Oct 2018 14:12:45 GMT):
@twoneks it's a filter for CC events - use a regular expression to filter for certain CC events.

troyronda (Tue, 02 Oct 2018 14:12:45 GMT):
@twoneks it's a filter for chain code events - use a regular expression to filter for certain CC event names.

troyronda (Tue, 02 Oct 2018 15:01:22 GMT):
@muralisr I also just pushed a change to expose the TargetSorter in channel client (https://gerrit.hyperledger.org/r/c/26717/)

troyronda (Tue, 02 Oct 2018 15:01:22 GMT):
@muralisr I also just pushed a change to expose the TargetSorter in channel client (https://gerrit.hyperledger.org/r/c/26717/) - WithTargetSorter

troyronda (Tue, 02 Oct 2018 15:01:22 GMT):
@muralisr I also just merged a change to expose the TargetSorter in channel client - WithTargetSorter

mrudav.shukla (Wed, 03 Oct 2018 06:43:04 GMT):
Has joined the channel.

twoneks (Wed, 03 Oct 2018 09:13:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=joNyrEm9HsZHy6JeH) @troyronda @troyronda How do I know the names of the events that are registered??

troyronda (Wed, 03 Oct 2018 11:50:58 GMT):
@twoneks these are the names that you set inside your chaincode

twoneks (Wed, 03 Oct 2018 12:25:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=veEvezQnzACyavsvP) @troyronda @troyronda that's what I was missing! Thanks. Do you have a resource link to share where to check how to set it?

troyronda (Wed, 03 Oct 2018 13:29:54 GMT):
@twoneks https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.SetEvent

jvsclp (Wed, 03 Oct 2018 14:15:49 GMT):
Has joined the channel.

jvsclp (Wed, 03 Oct 2018 14:16:06 GMT):
makefile:118

jvsclp (Wed, 03 Oct 2018 14:23:27 GMT):
Good morning I am having an issue getting the Go SDK running. I run the `make depend` command, but get the following errors which fail and hang: https://hastebin.com/unoqolanor.sql When I force close the terminal I get this message:

jvsclp (Wed, 03 Oct 2018 14:23:53 GMT):

Capture.PNG

twoneks (Wed, 03 Oct 2018 15:27:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xWKkL9cQjTKBzTbG5) @troyronda thanks! just a clarification.. In my chaincode invocation function I will then do something like: ```go .... _, notifier, err := myEventClient.RegisterChaincodeEvent(ccID, "write") ccEvent := <-notifier .... ``` while in my chaincode I do something like: ```go shim.SetEvent("write", payload []byte) ``` The question is... Thinking that my chaincode will be executed more than once (one for each endorser peer) how should I handle the notifier challenge?? How do I know how many time should I read from the channel assuming that the number of endorser peers could grow?

twoneks (Wed, 03 Oct 2018 15:27:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xWKkL9cQjTKBzTbG5) @troyronda thanks! just a clarification.. In my chaincode invocation function I will then do something like: ```go .... _, notifier, err := myEventClient.RegisterChaincodeEvent(ccID, "write") ccEvent := <-notifier .... ``` while in my chaincode I do something like: ```go shim.SetEvent("write", payload []byte) ``` The question is... Thinking that my chaincode will be executed more than once (one for each endorser peer) how should I handle the notifier challenge?? How do I know how many time should I read from the channel assuming that the number of endorser peers could grow? I know that a client should collects all the endorsement signatures and assembles the transaction message.. Is the purpose of events to let the client receive all those signatures??

twoneks (Wed, 03 Oct 2018 15:27:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xWKkL9cQjTKBzTbG5) @troyronda thanks! just a clarification.. In my chaincode invocation function I will then do something like: ```go .... _, notifier, err := myEventClient.RegisterChaincodeEvent(ccID, "write") ccEvent := <-notifier .... ``` while in my chaincode I do something like: ```go shim.SetEvent("write", payload) ``` The question is... Thinking that my chaincode will be executed more than once (one for each endorser peer) how should I handle the notifier challenge?? How do I know how many time should I read from the channel assuming that the number of endorser peers could grow? I know that a client should collects all the endorsement signatures and assembles the transaction message.. Is the purpose of events to let the client receive all those signatures??

jvsclp (Wed, 03 Oct 2018 16:01:34 GMT):
If I just run make I get: `make: Makefile:118: pipe: Bad file descriptor Checking Go version go version go1.10.3 windows/amd64 Running check_license.sh Examining last commit changes All files have SPDX-License-Identifier headers rm -Rf /tmp/enroll_user /tmp/msp /tmp/keyvaluestore /tmp/hfc-kvs /tmp/state /tmp/state-store rm -f integration-report.xml report.xml go clean FIXTURE_PROJECT_NAME=fabsdkgo DOCKER_REMOVE_FORCE=false test/scripts/clean_integration.sh make: *** Error -1 . Stop. make: *** Waiting for unfinished jobs....`

jvsclp (Wed, 03 Oct 2018 16:02:11 GMT):
If I just run make I get: `make: Makefile:118: pipe: Bad file descriptor Checking Go version go version go1.10.3 windows/amd64 Running check_license.sh Examining last commit changes All files have SPDX-License-Identifier headers rm -Rf /tmp/enroll_user /tmp/msp /tmp/keyvaluestore /tmp/hfc-kvs /tmp/state /tmp/state-store rm -f integration-report.xml report.xml go clean FIXTURE_PROJECT_NAME=fabsdkgo DOCKER_REMOVE_FORCE=false test/scripts/clean_integration.sh make: *** Error -1 . Stop. make: *** Waiting for unfinished jobs....`

jvsclp (Wed, 03 Oct 2018 16:03:23 GMT):
If I just run make I get: `make: Makefile:118: pipe: Bad file descriptor` `Checking Go version` `go version go1.10.3 windows/amd64` `Running check_license.sh` `Examining last commit changes` `All files have SPDX-License-Identifier headers` `rm -Rf /tmp/enroll_user /tmp/msp /tmp/keyvaluestore /tmp/hfc-kvs /tmp/state /tmp/state-store` `rm -f integration-report.xml report.xml` `go clean` `FIXTURE_PROJECT_NAME=fabsdkgo DOCKER_REMOVE_FORCE=false test/scripts/clean_integration.sh` `make: *** Error -1` `. Stop.` `make: *** Waiting for unfinished jobs....`

jvsclp (Wed, 03 Oct 2018 16:03:38 GMT):
Any help would be greatly appreciated.

troyronda (Wed, 03 Oct 2018 16:04:53 GMT):
@jvsclp looks like this could be related to Windows (but I can't help much as I'm on a Mac).

jvsclp (Wed, 03 Oct 2018 16:07:30 GMT):
Hmm, do you happen to be aware of anyone else working in Windows with this SDK?

troyronda (Wed, 03 Oct 2018 16:09:53 GMT):
I know people using a Linux VM on Windows :)

jvsclp (Wed, 03 Oct 2018 16:19:24 GMT):
Well, drat. I have to move to an SDK as the fabric-cli doesn't support how I want to define my organization. Unless you happen to know a workaround in the CLI to define a single organization root with multiple organizational units under their own intermediate certificate authorities outside the msp_principal.proto

jakereps (Wed, 03 Oct 2018 17:35:00 GMT):
contls

bandreghetti (Wed, 03 Oct 2018 18:09:35 GMT):
Are all unit tests passing on the master branch? I just tried running `make` as instructed by the readme file and got an error (https://hastebin.com/gafodubaba.sql the logs) It took a couple of minutes on the "Running metalinters" part

Baha-sk (Wed, 03 Oct 2018 19:10:55 GMT):
@bandreghetti try `make depend` to re-install gometalinter and retry again

troyronda (Wed, 03 Oct 2018 21:07:36 GMT):
@jvsclp note - you don’t need to run make to use the SDK

troyronda (Wed, 03 Oct 2018 21:08:02 GMT):
(That’s to run the tests)

troyronda (Wed, 03 Oct 2018 21:08:41 GMT):
But the downside is, of course, the tests haven’t been run on that platform and so some things might not work.

jvsclp (Wed, 03 Oct 2018 21:38:12 GMT):
@troyronda Thank you for the information. If that's the case I'm doing worse than before because I cannot figure out how to run the e2e Test example using the SDK. I can do the first-network tutorial in docker without the SDK and my setup so far has only been using the fabric tools. Do you happen to know where can I find more information about how to use the Go SDK with hyperledger? We're talking explain like I've never seen the word SDK before.

troyronda (Thu, 04 Oct 2018 00:33:31 GMT):
@jvsclp there were nice efforts from a community member on a tutorial some months ago (search chainhero in the chat archives). it's probably not completely up to date but could help.

antitoine (Thu, 04 Oct 2018 07:48:36 GMT):
@jvsclp @troyronda Hi thanks to notice the effort! Here the link of the tutorial (https://chainhero.io/2018/06/tutorial-build-blockchain-app-v1-1-0/). We will also handle a tech workshop at Basel (Switzerland) in December for the Hyperledger Global Forum. The objective is to explain how to use the SDK and build your first application with Hyperledger Fabric.

ffiore81 (Thu, 04 Oct 2018 15:09:59 GMT):
Has joined the channel.

bandreghetti (Thu, 04 Oct 2018 17:00:32 GMT):
didn't work "/ https://pastebin.com/hNPkVLST it seems there is some kind of problem with the pkcs11 package but I have reinstalled the whole thing and couldn't make it pass the tests

bandreghetti (Thu, 04 Oct 2018 17:00:32 GMT):
@Baha-sk didn't work "/ https://pastebin.com/hNPkVLST it seems there is some kind of problem with the pkcs11 package but I have reinstalled the whole thing and couldn't make it pass the tests

sudeshrshetty (Thu, 04 Oct 2018 17:23:03 GMT):
@bandreghetti what is your go version?

sudeshrshetty (Thu, 04 Oct 2018 17:24:04 GMT):
look like go1.10.4

bandreghetti (Thu, 04 Oct 2018 17:26:00 GMT):
yes it is

Baha-sk (Thu, 04 Oct 2018 17:30:25 GMT):
@bandreghetti it's still related to gometalinter.. have you checked $GOPATH/bin/ folder to see if gomatelinter directory was updated with the version created by `make depend`

Baha-sk (Thu, 04 Oct 2018 17:30:34 GMT):
?

Baha-sk (Thu, 04 Oct 2018 17:33:21 GMT):
@bandreghetti my bad.. .it doesn't look like gometalinter... can you backup and rename your fabric-sdk-go directory and checkout a fresh copy of the project?

bandreghetti (Thu, 04 Oct 2018 17:35:19 GMT):
I did, checked out a fresh copy of fabric-sdk-go, ran `make depend` and then `make` but got the same results

Baha-sk (Thu, 04 Oct 2018 17:36:34 GMT):
what's the time of creation of the gometalinter directory under $GOPATH/bin/ ?

Baha-sk (Thu, 04 Oct 2018 17:36:34 GMT):
what's the time/date of creation of the gometalinter directory under $GOPATH/bin/ ? @bandreghetti

bandreghetti (Thu, 04 Oct 2018 17:38:40 GMT):
```~/go/bin$ ls -lt | grep gometalinter -rwxrwxr-x 1 bad bad 6482072 Out 4 13:43 gometalinter```

bandreghetti (Thu, 04 Oct 2018 17:38:40 GMT):
```~/go/bin$ ls -lt | grep gometalinter -rwxrwxr-x 1 user user 6482072 Out 4 13:43 gometalinter```

Baha-sk (Thu, 04 Oct 2018 17:39:07 GMT):
that seems like 5 minutes ago.. so it should be good!

bandreghetti (Thu, 04 Oct 2018 17:39:30 GMT):
actually it is an hour ago, i'm at UTC-3 haha

Baha-sk (Thu, 04 Oct 2018 17:39:39 GMT):
actually it's 4 minutes in the future.. oh

bandreghetti (Thu, 04 Oct 2018 17:40:02 GMT):
but that's when I checked out and ran make depend I guess

Baha-sk (Thu, 04 Oct 2018 17:40:05 GMT):
but I guess it's 13:43 your time..

bandreghetti (Thu, 04 Oct 2018 17:41:17 GMT):
the last time I did was yesterday so we should be safe

Baha-sk (Thu, 04 Oct 2018 17:41:23 GMT):
and you confirm running gometalinter is pointing to $GOPATH/gometalinter? (run `which gometalinter`)

Baha-sk (Thu, 04 Oct 2018 17:41:23 GMT):
and you confirm running gometalinter is pointing to $GOPATH/bin/gometalinter? (run `which gometalinter`)

bandreghetti (Thu, 04 Oct 2018 17:41:49 GMT):
yep ```$ which gometalinter /home/user/go/bin/gometalinter```

Baha-sk (Thu, 04 Oct 2018 17:42:24 GMT):
weird

Baha-sk (Thu, 04 Oct 2018 17:43:18 GMT):
`go version` gives you 1.10.4, right?

bandreghetti (Thu, 04 Oct 2018 17:43:36 GMT):
yep ```$ go version go version go1.10.4 linux/amd64```

bandreghetti (Thu, 04 Oct 2018 17:45:25 GMT):
I have downgraded from 1.11 yesterday, is there any possible way it could be messing up the tests?

bandreghetti (Thu, 04 Oct 2018 17:45:46 GMT):
I basically erased the goroot folder and replaced it with the 1.10.4 one

Baha-sk (Thu, 04 Oct 2018 17:49:18 GMT):
on a Mac, I had 1.11 installed, then re-installed 1.10 package and had to change the symlink of go

Baha-sk (Thu, 04 Oct 2018 17:49:42 GMT):
I suspect gometalinter is still pointing to the 1.11 version somewhere on your box

bandreghetti (Thu, 04 Oct 2018 17:52:45 GMT):
how so? isn't the binary file self-contained?

bandreghetti (Thu, 04 Oct 2018 17:54:01 GMT):
```$ gometalinter --version gometalinter version master built from ? on``` not sure what that means haha

Baha-sk (Thu, 04 Oct 2018 17:56:42 GMT):
I think I have the same issue ...

Baha-sk (Thu, 04 Oct 2018 17:56:49 GMT):
need to investigate further..

bandreghetti (Thu, 04 Oct 2018 18:03:01 GMT):
Thanks for the help! Do the tests run fine on your machine? :thinking:

Baha-sk (Thu, 04 Oct 2018 18:08:01 GMT):
yeah, without running the checks

Baha-sk (Thu, 04 Oct 2018 18:08:11 GMT):
can you run `make checks`?

bandreghetti (Thu, 04 Oct 2018 18:19:43 GMT):
https://pastebin.com/tCMmeB84

bandreghetti (Thu, 04 Oct 2018 18:19:58 GMT):
hastebin isn't working for some reason :c

Baha-sk (Thu, 04 Oct 2018 18:25:14 GMT):
yeah, I get different output ```Running metalinters... pkg/msp/certfileuserstore.go:1::warning: file is not gofmted with -s (gofmt) pkg/msp/getsigid_test.go:1::warning: file is not gofmted with -s (gofmt) pkg/msp/memory_user_store.go:1::warning: file is not gofmted with -s (gofmt) pkg/msp/enrollment_test.go:1::warning: file is not gofmted with -s (gofmt) pkg/msp/getsigid.go:1::warning: file is not gofmted with -s (gofmt) pkg/fab/endpointconfig.go:1::warning: file is not gofmted with -s (gofmt) pkg/fab/channel/membership/membership_test.go:1::warning: file is not gofmted with -s (gofmt) pkg/msp/certfileuserstore_test.go:1::warning: file is not gofmted with -s (gofmt) pkg/msp/caclient.go:1::warning: file is not gofmted with -s (gofmt) test/integration/e2e/configless/endpointconfig_override_test.go:1::warning: file is not gofmted with -s (gofmt) make: *** [lint] Error 1```

bandreghetti (Thu, 04 Oct 2018 18:34:29 GMT):
on another topic, i'm getting `failed to get discovery service: could not get chConfig cache reference: no channel peers configured for channel` whenever I try to run the SDK without static channel configs in config.yaml file channel is created and peers are joined to it by the SDK itself shouldn't it have the channel peers configuration? where should I set/fetch this config, other than the config.yaml file?

Baha-sk (Thu, 04 Oct 2018 18:35:22 GMT):
for the metal inter issue.. are you able to revert to go 1.10.3?

bandreghetti (Thu, 04 Oct 2018 18:35:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=w2QdDGCbRaEpXGGFw) @Baha-sk is this the output from `make checks`?

Baha-sk (Thu, 04 Oct 2018 18:35:52 GMT):
for the channel topic.. is this your own example? or are you trying to run your own test application?

Baha-sk (Thu, 04 Oct 2018 18:36:02 GMT):
yes, for me that is

bandreghetti (Thu, 04 Oct 2018 18:36:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TEsCFwkeX43dnkjLr) @Baha-sk I could do that. Why?

Baha-sk (Thu, 04 Oct 2018 18:36:44 GMT):
I wanna rule out the go version from the linter issue

Baha-sk (Thu, 04 Oct 2018 18:37:25 GMT):
CI is running with 1.10.3 as well as my colleagues who didn't upgrade their go version (still at 1.10.3) have no gometalinter errors

Baha-sk (Thu, 04 Oct 2018 18:37:59 GMT):
I'm running 1.10.4 and I'm getting the above errors, you're running 1.10.4 and have different errors

bandreghetti (Thu, 04 Oct 2018 18:38:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Hx6gH68n5mYPwKsuJ) @Baha-sk it is my own application I want to be able to manage my network with it by having the least amout of static configs as possible

bandreghetti (Thu, 04 Oct 2018 18:38:40 GMT):
I'll revert to go1.10.3, gimme a moment

Baha-sk (Thu, 04 Oct 2018 18:41:24 GMT):
look at the how SDK integration tests create and join a channel: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L158 ... you need to define the channel in the config

Baha-sk (Thu, 04 Oct 2018 18:41:49 GMT):
if you don't want to provide a static config.. then you can override your own config dynamically...

Baha-sk (Thu, 04 Oct 2018 18:43:26 GMT):
like this: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/configless/endpointconfig_override_test.go#L105

troyronda (Thu, 04 Oct 2018 18:43:34 GMT):
I am running 1.10.4 without errors.

troyronda (Thu, 04 Oct 2018 18:44:44 GMT):
I was trying to reproduce but haven't been able to (on Mac).

troyronda (Thu, 04 Oct 2018 18:45:08 GMT):
Even checked out everything into a brand new GOPATH.

troyronda (Thu, 04 Oct 2018 18:45:16 GMT):
tried on bash and zsh.

jvsclp (Thu, 04 Oct 2018 18:50:15 GMT):
I've been working through the chainheroes tutorial and when I get to the point of integrating the Go SDK with the fabric-network I receive an error: `./heroes-service.exe SDK created Unable to initialize the Fabric SDK: failed to create channel management client from Admin identity: failed to create resmgmt client due to context error: user not found

jvsclp (Thu, 04 Oct 2018 18:50:15 GMT):
I've been working through the chainheroes tutorial and when I get to the point of integrating the Go SDK with the fabric-network I receive an error: `./heroes-service.exe SDK created Unable to initialize the Fabric SDK: failed to create channel management client from Admin identity: failed to create resmgmt client due to context error: user not found`

jvsclp (Thu, 04 Oct 2018 18:50:15 GMT):
I've been working through the chainheroes tutorial and when I get to the point of integrating the Go SDK with the fabric-network I receive an error: `./heroes-service.exe` `SDK created` `Unable to initialize the Fabric SDK: failed to create channel management client from Admin identity: failed to create resmgmt client due to context error: user not found`

jvsclp (Thu, 04 Oct 2018 18:50:15 GMT):
I've been working through the chainheroes tutorial and when I get to the point of integrating the Go SDK with the fabric-network I receive an error: ```./heroes-service.exe SDK created Unable to initialize the Fabric SDK: failed to create channel management client from Admin identity: failed to create resmgmt client due to context error: user not found```

jvsclp (Thu, 04 Oct 2018 18:52:22 GMT):
I am not sure how to resolve this, what information can I provide to help narrow down a solution?

Baha-sk (Thu, 04 Oct 2018 18:53:34 GMT):
@jvsclp I think you can ask @antitoine about this executable as it is not part of the Go SDK project

Baha-sk (Thu, 04 Oct 2018 18:55:09 GMT):
@troyronda are you able to reproduce the problem with the old GOPATH upgraded to 1.10.4? i will try to reinstall go into a new GOPATH in the meantime

jvsclp (Thu, 04 Oct 2018 18:56:13 GMT):
@Baha-sk Thanks, I will follow your suggestion to message @antitoine

bandreghetti (Thu, 04 Oct 2018 19:02:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Kqz4eereazN9mPDHs) @troyronda I guess this settles it then... Should I still downgrade to 1.10.3?

Baha-sk (Thu, 04 Oct 2018 19:18:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oisptAg7PGBuCZwe2) @jvsclp you can also try `make crypto-gen` to create the sdk's crypto-gen artifacts needs for the integration tests.. just a thought..

Baha-sk (Thu, 04 Oct 2018 19:18:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oisptAg7PGBuCZwe2) @jvsclp you can also try `make crypto-gen` to create the sdk's crypto-gen artifacts needed for the integration tests.. just a thought..

jvsclp (Thu, 04 Oct 2018 19:35:43 GMT):
I'll give it a shot. Right now I'm out of my element. I can get my organization's hyperledger network up (still needs some tweaks which is where the SDK comes in), but I have no idea how to integrate the SDK into the environment. Perhaps, once I understand more the SDK `README` will make more sense, but I cannot make heads or tails of how it's integrated into hyperledger fabric.

jvsclp (Thu, 04 Oct 2018 19:35:43 GMT):
I'll give it a shot. Right now I'm out of my element. I can get my organization's hyperledger network up (still needs some tweaks which is where the SDK comes in), but I have no idea how to integrate the SDK into the environment. Perhaps, once I understand more the SDK `README` will make more sense, but I cannot make heads or tails from the documentation of how it's integrated into hyperledger fabric.

Baha-sk (Thu, 04 Oct 2018 19:40:00 GMT):
@jvsclp the SDK allows user to create client applications to the peers, look at the `test/integrations` directory of the SDK project to see examples of how one can create an sdk instance, create channel clients and query the orderer/peer, etc.

Baha-sk (Thu, 04 Oct 2018 19:40:00 GMT):
@jvsclp the SDK allows a user to create client applications to the peers, look at the `test/integrations` directory of the SDK project to see examples of how one can create an sdk instance, create channel clients and query the orderer/peer, etc.

jvsclp (Thu, 04 Oct 2018 19:44:13 GMT):
:) Been there, still not certain how to run the package. :/

Baha-sk (Thu, 04 Oct 2018 19:44:31 GMT):
make integration-test is the simplest way

Baha-sk (Thu, 04 Oct 2018 19:44:31 GMT):
make integration-tests is the simplest way

Baha-sk (Thu, 04 Oct 2018 19:44:31 GMT):
`make integration-tests` is the simplest way

Baha-sk (Thu, 04 Oct 2018 19:46:25 GMT):
if you want to start the network for the integration tests alone, then you can use: `make dockerenv-stable-up`

Baha-sk (Thu, 04 Oct 2018 19:46:57 GMT):
this will kick off the peers/orderers/couchdb, etc. containers without running any tests

Baha-sk (Thu, 04 Oct 2018 19:47:56 GMT):
then in another window, you can navigate to `test/integrations/...` to any test file, then run any of the go tests just as you would run a normal go test..

Baha-sk (Thu, 04 Oct 2018 19:47:56 GMT):
then in another terminal, you can navigate to `test/integrations/...` to any test file, then run any of the go tests just as you would run a normal go test..

Baha-sk (Thu, 04 Oct 2018 19:48:27 GMT):
I recommend starting with e2e directory as it shows full end to end integration tests with the peers

Baha-sk (Thu, 04 Oct 2018 19:49:17 GMT):
@bandreghetti I've got my environment working, `make checks` is successful with 1.10.4 now

Baha-sk (Thu, 04 Oct 2018 19:50:22 GMT):
what I recommend to do is move/backup your $GPATH/bin directory and create a new empty one

Baha-sk (Thu, 04 Oct 2018 19:51:37 GMT):
then run `make depend` to make sure it gets all the metal inter binaries used by `make check`.. make sure $GOPATH/bin is populated with up to date binaries

Baha-sk (Thu, 04 Oct 2018 19:51:37 GMT):
then run `make depend` to make sure it gets all the metalinter binaries used by `make check`.. make sure $GOPATH/bin is populated with up to date binaries

Baha-sk (Thu, 04 Oct 2018 19:56:31 GMT):
@bandreghetti can you run `which gofmt`? to see if it's located in the same folder as the go binary?

bandreghetti (Thu, 04 Oct 2018 20:25:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3rLmCMxgzKEvP3824) @Baha-sk ``` $ which go gofmt /opt/go/bin/go /opt/go/bin/gofmt ```

bandreghetti (Thu, 04 Oct 2018 20:26:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uemuiRX26y5Xg3Nav) @Baha-sk will do

Baha-sk (Thu, 04 Oct 2018 20:28:54 GMT):
what about `which godoc`? just double checking it's in the same folder as well

bandreghetti (Thu, 04 Oct 2018 20:29:41 GMT):
``` $ which godoc /opt/go/bin/godoc ```

Baha-sk (Thu, 04 Oct 2018 20:30:09 GMT):
and hopefully all three binaries are created at the same time? :)

Baha-sk (Thu, 04 Oct 2018 20:30:46 GMT):
`ls -lai /opt/go/bin |grep go`

Baha-sk (Thu, 04 Oct 2018 20:35:27 GMT):
is /opt/go/bin holding the real go binaries? or is it holding symlinks only? I guess let's focus on one thing now.. starting with replacing $GOPATH/bin and running `make depend` ..

bandreghetti (Thu, 04 Oct 2018 20:37:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9dLep2PxG46PAghBo) @Baha-sk I see how to create the fab.ChannelEndpointConfig struct but how do I pass it to the SDK?

bandreghetti (Thu, 04 Oct 2018 20:38:59 GMT):
`/opt/go/bin` holds the real binaries. I copypasted the pre-compiled go folder to `/opt`

bandreghetti (Thu, 04 Oct 2018 20:39:26 GMT):
```$ make depend Checking Go version go version go1.10.4 linux/amd64 Last installed dependencies on 10-04-2018 with revision 7c970d5 Installing dependencies ... Installing github.com/alecthomas/gometalinter@v2 to /home/bad/go/bin ... using tag v2.0.11 HEAD is now at 17a7ffa Update gochecknoglobals Copying gometalinter to /home/bad/go/bin Installing: deadcode dupl errcheck gochecknoglobals gochecknoinits goconst gocyclo goimports golint gosec gosimple gotype gotypex ineffassign interfacer lll maligned megacheck misspell nakedret safesql staticcheck structcheck unconvert unparam unused varcheck ^[Installing github.com/GoASTScanner/gas@4ae8c95 to /home/bad/go/bin ... HEAD is now at 4ae8c95 Add an option for Go build tags (#201) Copying gas to /home/bad/go/bin Installing github.com/golang/dep@v0.5.0 to /home/bad/go/bin ... using tag v0.5.0 HEAD is now at 224a564 v0.5.0 release! Copying dep to /home/bad/go/bin Creating docker images used by tests ... make[1]: Entering directory '/home/bad/go/src/github.com/hyperledger/fabric-sdk-go' sha256:211b1a75f1a0f07702c3ead4559837ae9c24a176c4971ea284386868e562b354 make[1]: Leaving directory '/home/bad/go/src/github.com/hyperledger/fabric-sdk-go'```

bandreghetti (Thu, 04 Oct 2018 20:39:26 GMT):
```$ make depend Checking Go version go version go1.10.4 linux/amd64 Last installed dependencies on 10-04-2018 with revision 7c970d5 Installing dependencies ... Installing github.com/alecthomas/gometalinter@v2 to /home/bad/go/bin ... using tag v2.0.11 HEAD is now at 17a7ffa Update gochecknoglobals Copying gometalinter to /home/bad/go/bin Installing: deadcode dupl errcheck gochecknoglobals gochecknoinits goconst gocyclo goimports golint gosec gosimple gotype gotypex ineffassign interfacer lll maligned megacheck misspell nakedret safesql staticcheck structcheck unconvert unparam unused varcheck ^[Installing github.com/GoASTScanner/gas@4ae8c95 to /home/bad/go/bin ... HEAD is now at 4ae8c95 Add an option for Go build tags (#201) Copying gas to /home/bad/go/bin Installing github.com/golang/dep@v0.5.0 to /home/bad/go/bin ... using tag v0.5.0 HEAD is now at 224a564 v0.5.0 release! Copying dep to /home/bad/go/bin Creating docker images used by tests ... make[1]: Entering directory '/home/bad/go/src/github.com/hyperledger/fabric-sdk-go' sha256:211b1a75f1a0f07702c3ead4559837ae9c24a176c4971ea284386868e562b354 make[1]: Leaving directory '/home/bad/go/src/github.com/hyperledger/fabric-sdk-go'```

Baha-sk (Thu, 04 Oct 2018 20:40:11 GMT):
once you created your own interface, you'll have to pass it in as an option when creating the sdk (something like this: `fabsdk.WithEndpointConfig(endpointConfigImpls...)`)

Baha-sk (Thu, 04 Oct 2018 20:42:07 GMT):
you can follow the function at https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/configless/end_to_end_test.go#L28 where the option mentioned above is passed in at line 30

bandreghetti (Thu, 04 Oct 2018 20:43:30 GMT):
oh, so I'll have to create a new SDK instance? I thought it as more dynamic than that :thinking:

Baha-sk (Thu, 04 Oct 2018 20:43:39 GMT):
for the metalinter issue above, is your go binary installed in $GOPATH/bin?

bandreghetti (Thu, 04 Oct 2018 20:43:50 GMT):
I mean, if it creates a channel why doesn't it store the channel configs?

Baha-sk (Thu, 04 Oct 2018 20:44:12 GMT):
yes, you have to pass it in to your new SDK instance... it's a replacement of the static config file

bandreghetti (Thu, 04 Oct 2018 20:44:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yhBYRJvFDrzqajdMD) @Baha-sk my go binary is installed under $GOROOT/bin

Baha-sk (Thu, 04 Oct 2018 20:44:56 GMT):
the SDK doesn't update its configs on the fly

Baha-sk (Thu, 04 Oct 2018 20:45:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qsu3XGntp6KHdS8zA) @bandreghetti ok good.. just making sure

Baha-sk (Thu, 04 Oct 2018 20:45:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qsu3XGntp6KHdS8zA) @bandreghetti ok good.. just making sure.. now that you recreated a new bin folder... you have new binaries in it after running `make depend`?

Baha-sk (Thu, 04 Oct 2018 20:50:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qHqu9nbiGiTFGWoP3) @bandreghetti just as you have to create a channel config tx file before starting the client to send a channel update to the orderer/peers, adding the channel config info in the config file has to pre exist beforehand... I guess this will keep the SDK consistent. if you need to create a new channel, then create a new SDK instance.. you can always close the old SDK instance (by calling sdk.Close(), very important) and create a new one with the new channel and its config you intend to create

bandreghetti (Thu, 04 Oct 2018 20:54:36 GMT):
oh, so I should close the SDK and reopen it with the new config everytime I create a channel? this doesn't seem practical... are you sure this is the canonic way to do this?

Baha-sk (Thu, 04 Oct 2018 21:00:58 GMT):
creating a channel is an administrative task, I hope you don't need to create too many channels in your network...

bandreghetti (Thu, 04 Oct 2018 21:01:38 GMT):
yea I don't but I thought I'd only need to instantiate the SDK once

bandreghetti (Thu, 04 Oct 2018 21:02:18 GMT):
and never again, with it updating configs on the way

Baha-sk (Thu, 04 Oct 2018 21:03:07 GMT):
usually, an admin application will create the channels.. and another user application will query channels , for the user, the channels should already be created... so you know which channel configs the user needs to talk to

bandreghetti (Thu, 04 Oct 2018 21:05:55 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e_single_org.yaml#L105 this is the reason why I thought the sdk would store the channel configs `If an app is creating channels, then it likely will not need this section.`

bandreghetti (Thu, 04 Oct 2018 21:26:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=iP68bEHB3g9SsjCZb) @Baha-sk I wanted the app to do both: be able to create channels, join peers to a channel, install and instantiate chaincodes and interact with the chaincodes for that the user would just pass the channelID (and other needed informations according to the operation) and then the sdk would access that channel this is why i wanted the channel configs to be fetched dynamically from orderer

bandreghetti (Thu, 04 Oct 2018 21:26:54 GMT):
on the gometalinter subject: https://pastebin.com/BUaGdb5k erasing the $GOPATH/bin and running `make depend` and then `make` again gave me the same error messages "/

Baha-sk (Fri, 05 Oct 2018 02:54:21 GMT):
@bandreghetti that is weird, can you list with details $GOPATH/bin?

Baha-sk (Fri, 05 Oct 2018 13:49:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=2PhcYqxcGyZnaqJtg) @bandreghetti as per the error you posted earlier (`failed to get discovery service: could not get chConfig cache reference: no channel peers configured for channel`). It is a symptom of missing the channel section in the sdk config. It may not be directly used when updating channels, in this case the discovery service depends on it as stated in the log message.

Baha-sk (Fri, 05 Oct 2018 13:49:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=2PhcYqxcGyZnaqJtg) @bandreghetti as per the error you posted earlier `failed to get discovery service: could not get chConfig cache reference: no channel peers configured for channel`. It is a symptom of missing the channel section in the sdk config. It may not be directly used when updating channels, in this case the discovery service depends on it as stated in the log message.

jrosmith (Fri, 05 Oct 2018 14:08:29 GMT):
hey all, the node sdk will be separating signing and sending of transactions in 1.3. does the go sdk support or plan to support off line signing so that clients do not explicitly communicate with fabric themselves?

Baha-sk (Fri, 05 Oct 2018 14:14:50 GMT):
@jrosmith we just done distributed signing for channel updates in go SDK, where signatures can be created beforehand, sent to the network admin who will assemble all signatures then call channel updates.. are you planning to do something similar for general transactions in node SDK?

jrosmith (Fri, 05 Oct 2018 14:31:42 GMT):
@Baha-sk not exactly. im looking for functionality in which a client can sign transaction proposals with their own cert and then send a signed proposal to a separate service which will forward the signed proposal to the appropriate peers. the folks in the node-sdk will be supporting that but id love to be able to build that logic into a binary

Baha-sk (Fri, 05 Oct 2018 15:05:59 GMT):
@jrosmith currently, at a high level, the users of the SDK go client don't need to deal with transaction proposals, they only need to get a channel client and call its `execute` function, example: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L173.. not sure if it makes sense to expose the proposals to the user. The aim is to make it easy to use the SDK to communicate with the Hyperledger network.

Baha-sk (Fri, 05 Oct 2018 15:05:59 GMT):
@jrosmith currently, at a high level, the users of the SDK go client don't need to deal with transaction proposals, they only need to get a channel client and call its `Execute` function, example: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L173.. not sure if it makes sense to expose the proposals to the user. The aim is to make it easy to use the SDK to communicate with the Hyperledger network.

Baha-sk (Fri, 05 Oct 2018 15:07:58 GMT):
also, signing the proposal is done at the very end of `execute`, when we're about to send the proposal..

Baha-sk (Fri, 05 Oct 2018 15:07:58 GMT):
also, signing the proposal is done at the very end of `Execute`, when we're about to send the proposal..

Baha-sk (Fri, 05 Oct 2018 15:14:06 GMT):
at a low level, one can always get a transactor instance from ChannelService to submit proposals manually. If we want to separate signing from subitting

Baha-sk (Fri, 05 Oct 2018 15:14:06 GMT):
at a low level, one can always get a transactor instance from ChannelService to submit proposals manually. If we want to separate signing from submitting the proposal, we'd have to change our code

Baha-sk (Fri, 05 Oct 2018 15:16:44 GMT):
not sure at what level a binary would be useful to the node SDK though as the logic depends on the framework around go SDK's channel transactor api..

jrosmith (Fri, 05 Oct 2018 17:04:33 GMT):
@Baha-sk to clarify i don't want to use the binary to extend the node-sdk. i want to be able to compile a binary whose sole responsibility is to sign transaction proposals

Baha-sk (Fri, 05 Oct 2018 17:15:11 GMT):
@jrosmith and output the signed tx proposal, then you'll import these into node sdk? we don't have this feature or even have separate binaries in go SDK.. not sure if this is planned though... @troyronda ^^^

jrosmith (Fri, 05 Oct 2018 17:17:25 GMT):
@Baha-sk sure that would work. i basically want to make it as easy as possible for end-users to provide me with proposals and then i can process those proposals with any sdk i wish

jvsclp (Fri, 05 Oct 2018 21:39:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7vnNEGahwSpKXbogM) @Baha-sk @Baha-sk @troyronda After a bit of sleuthing I was able to get `make integration-tests` run on Windows 10. 1. I had to change from MINGW64 to Cygwin, the `make` command for MINGW64 kept giving me a `make: Makefile:118: pipe: Bad file descriptor` 2. I had to add `COMPOSE_CONVERT_WINDOWS_PATHS=1` to the `.env` in `fabric-sdk-go/test/fixtures/dockerenv`

jvsclp (Fri, 05 Oct 2018 21:39:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7vnNEGahwSpKXbogM) @Baha-sk @troyronda After a bit of sleuthing I was able to get `make integration-tests` run on Windows 10. 1. I had to change from MINGW64 to Cygwin, the `make` command for MINGW64 kept giving me a `make: Makefile:118: pipe: Bad file descriptor` 2. I had to add `COMPOSE_CONVERT_WINDOWS_PATHS=1` to the `.env` in `fabric-sdk-go/test/fixtures/dockerenv`

jvsclp (Fri, 05 Oct 2018 21:42:52 GMT):
Most of the tests passed except: `TestDiscoveryClientEndorsers/Policy:_Org1_or_Org2`.

jvsclp (Fri, 05 Oct 2018 21:42:52 GMT):
Most of the tests passed except: `TestDiscoveryClientEndorsers/Policy:_Org1_or_Org2`. with multiple errors. I attached my log as I'm still new to using this SDK and your help in interpreting possible fixes for me to run down would be greatly appreciated. https://hastebin.com/xoporonoyo.bash

jvsclp (Fri, 05 Oct 2018 21:42:52 GMT):
Most of the tests passed except: `TestDiscoveryClientEndorsers/Policy:_Org1_or_Org2`. with multiple errors. I attached my log as I'm still new to using this SDK and your help in interpreting possible fixes for me to run down would be greatly appreciated. The errors start at line 114. https://hastebin.com/xoporonoyo.bash

Baha-sk (Sat, 06 Oct 2018 01:27:59 GMT):
@jvsclp feel free to push a patch for the Windows/Cygwin makefile fix, if the CI passes, it can probably be accepted to be merged into master.. if the CI fails, then the change is probably not compatible with *nix/Mac environments. As for the errors in the logs above, it could be that the peers urls are not being resolved in Cygwin to localhost, try to resolve them inside of /etc/hosts by adding the peers urls to the loopback address, like adding these entries to `/etc/hosts`: ```127.0.0.1 peer0.org1.example.com peer0.org2.example.com tlsca.example.com ca.org1.example.com ca.org2.example.com orderer.example.com 127.0.0.1 peer1.org1.example.com peer1.org2.example.com```

qiangqinqq (Sat, 06 Oct 2018 07:37:41 GMT):
Has joined the channel.

Nihcep (Mon, 08 Oct 2018 08:52:02 GMT):
Has joined the channel.

jvsclp (Mon, 08 Oct 2018 15:07:17 GMT):
@Baha-sk Forgive my ignorance, what is CI?

yacovm (Mon, 08 Oct 2018 15:15:22 GMT):
continuous integration

jvsclp (Mon, 08 Oct 2018 22:02:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SoPg8nqGkGhseiGn7) @Baha-sk Adding your suggested entries into my `C:\Windows\System32\drivers\etc\host` file helped the `fabric-sdk-go/test/integration/pkg/client/common/selection` test pass, but the `common/discovery` test still fails: https://hastebin.com/suladuxeve.bash After a day of searching for a solution I'm still standing at square one. Any help would be appreciated.

jvsclp (Mon, 08 Oct 2018 22:02:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SoPg8nqGkGhseiGn7) @Baha-sk Adding your suggested entries into my `C:\Windows\System32\drivers\etc\hosts` file helped the `fabric-sdk-go/test/integration/pkg/client/common/selection` test pass, but the `common/discovery` test still fails: https://hastebin.com/suladuxeve.bash After a day of searching for a solution I'm still standing at square one. Any help would be appreciated.

NageshCR (Tue, 09 Oct 2018 02:45:17 GMT):
Has joined the channel.

rezmuh (Tue, 09 Oct 2018 04:56:10 GMT):
Has joined the channel.

Baha-sk (Tue, 09 Oct 2018 14:35:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rtauwkwbssn2Daie6) @jvsclp Context Deadline Exceeded errors are a symptom of missing credentials, try `make crypto-gen` maybe to make sure the crypto-config directory is created under `fabric-sdk-go/test/fixtures/fabric/v1/`

Baha-sk (Tue, 09 Oct 2018 14:35:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rtauwkwbssn2Daie6) @jvsclp Context Deadline Exceeded errors are a symptom of missing/bad credentials, try `make crypto-gen` maybe to make sure the crypto-config directory is created under `fabric-sdk-go/test/fixtures/fabric/v1/`

jvsclp (Tue, 09 Oct 2018 21:03:20 GMT):
Did something change in the SDK? I cannot get the integration tests to run today. ```$ make integration-tests rm -Rf /tmp/enroll_user /tmp/msp /tmp/keyvaluestore /tmp/hfc-kvs /tmp/state /tmp/state-store rm -f integration-report.xml report.xml go clean FIXTURE_PROJECT_NAME=fabsdkgo DOCKER_REMOVE_FORCE=false test/scripts/clean_integration.sh Removing docker-compose network created from fixtures ... Removing network fabsdkgo_default Network fabsdkgo_default not found. Checking Go version go version go1.10.3 windows/amd64 Vendor directory does not exist - will need to populate vendor Populating vendor ... test/scripts/populate-vendor.sh: line 95: dep: command not found make: *** [Makefile:585: populate-vendor-noforce] Error 127```

jvsclp (Tue, 09 Oct 2018 21:08:00 GMT):
If I run `make-depend` I get an odd error about my gopath being relative and showing a random file name instead of my actual GOPATH, which is absolute at C:\Users\user\Documents\

jvsclp (Tue, 09 Oct 2018 21:08:00 GMT):
If I run `make-depend` I get an odd error about my gopath being relative and showing a random file name instead of my actual GOPATH, which is absolute at C:\Users\user\Documents\gowork

jvsclp (Tue, 09 Oct 2018 21:08:00 GMT):
If I run `make-depend` I get an odd error about my gopath being relative and showing a random file name instead of my actual GOPATH, which is absolute at `C:\Users\user\Documents\gowork` and confirmed by running `go env GOPATH`

jvsclp (Tue, 09 Oct 2018 21:08:44 GMT):
I have not found anything on the subject other than recommending setting the GOPATH to an absolute value which it is

jvsclp (Tue, 09 Oct 2018 21:08:44 GMT):
I have not found anything on the subject other than recommending setting the GOPATH to an absolute value, which it is.

jvsclp (Tue, 09 Oct 2018 21:09:29 GMT):
```$ make depend Checking Go version go version go1.10.3 windows/amd64 Installing dependencies ... go: GOPATH entry is relative; must be absolute path: "/tmp/tmp.nPgaTZA3oo". For more details see: 'go help gopath' make: *** [Makefile:246: depend] Error 2```

jvsclp (Tue, 09 Oct 2018 21:09:54 GMT):
Has anyone seen of or know a way to resolve this?

coolsvap (Wed, 10 Oct 2018 07:10:03 GMT):
Has joined the channel.

twoneks (Wed, 10 Oct 2018 10:16:58 GMT):
Hi I'm having some problem using the function `myChannelclient.Execute(...) ` I'm receiving this warning `[fabsdk/client] 2018/10/10 10:08:52 UTC - pgresolver.(*randomLBP).Choose -> WARN No available peer groups` From what I understood the problem could be in my `entityMatchers` config that is like this ```yml entityMatchers: peer: - pattern: (\w*)peer0.importerorg.trade.com(\w*) urlSubstitutionExp: localhost:8051 eventUrlSubstitutionExp: localhost:8053 sslTargetOverrideUrlSubstitutionExp: peer0.importerorg.trade.com mappedHost: peer0.importerorg.trade.com - pattern: (\w*)peer1.importerorg.trade.com(\w*) urlSubstitutionExp: localhost:11051 eventUrlSubstitutionExp: localhost:11053 sslTargetOverrideUrlSubstitutionExp: peer1.importerorg.trade.com mappedHost: peer1.importerorg.trade.com orderer: - pattern: (\w*)orderer.trade.com(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.trade.com mappedHost: orderer.trade.com certificateAuthorities: - pattern: (\w*)ca_peerImporterOrg(\w*) urlSubstitutionExp: http://localhost:8054 mappedHost: ca_peerImporterOrg ``` I'm getting this warning in the main flow but digging into the sdk I notice that in my request options I have txnOpts: channel.requestOptions BeforeRetry: nil CCFilter: nil ParentContext: context.Context nil Retry: retry.Opts TargetFilter: fab.TargetFilter (*filter.EndpointFilter) TargetSorter: fab.TargetSorter nil Targets: []fab.Peer(len: 0, cap: 0)

twoneks (Wed, 10 Oct 2018 10:16:58 GMT):
Hi I'm having some problem using the function `myChannelclient.Execute(...) ` I'm receiving this warning `[fabsdk/client] 2018/10/10 10:08:52 UTC - pgresolver.(*randomLBP).Choose -> WARN No available peer groups` From what I understood the problem could be in my `entityMatchers` config that is like this ```yml entityMatchers: peer: - pattern: (\w*)peer0.importerorg.trade.com(\w*) urlSubstitutionExp: localhost:8051 eventUrlSubstitutionExp: localhost:8053 sslTargetOverrideUrlSubstitutionExp: peer0.importerorg.trade.com mappedHost: peer0.importerorg.trade.com - pattern: (\w*)peer1.importerorg.trade.com(\w*) urlSubstitutionExp: localhost:11051 eventUrlSubstitutionExp: localhost:11053 sslTargetOverrideUrlSubstitutionExp: peer1.importerorg.trade.com mappedHost: peer1.importerorg.trade.com orderer: - pattern: (\w*)orderer.trade.com(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.trade.com mappedHost: orderer.trade.com certificateAuthorities: - pattern: (\w*)ca_peerImporterOrg(\w*) urlSubstitutionExp: http://localhost:8054 mappedHost: ca_peerImporterOrg ``` I'm getting this warning in the main flow but digging into the sdk I notice that in my request options I have ``` txnOpts: channel.requestOptions BeforeRetry: nil CCFilter: nil ParentContext: context.Context nil Retry: retry.Opts TargetFilter: fab.TargetFilter (*filter.EndpointFilter) TargetSorter: fab.TargetSorter nil Targets: []fab.Peer(len: 0, cap: 0)

twoneks (Wed, 10 Oct 2018 10:16:58 GMT):
Hi I'm having some problem using the function `myChannelclient.Execute(...) ` I'm receiving this warning `[fabsdk/client] 2018/10/10 10:08:52 UTC - pgresolver.(*randomLBP).Choose -> WARN No available peer groups` From what I understood the problem could be in my `entityMatchers` config that is like this ```yml entityMatchers: peer: - pattern: (\w*)peer0.importerorg.trade.com(\w*) urlSubstitutionExp: localhost:8051 eventUrlSubstitutionExp: localhost:8053 sslTargetOverrideUrlSubstitutionExp: peer0.importerorg.trade.com mappedHost: peer0.importerorg.trade.com - pattern: (\w*)peer1.importerorg.trade.com(\w*) urlSubstitutionExp: localhost:11051 eventUrlSubstitutionExp: localhost:11053 sslTargetOverrideUrlSubstitutionExp: peer1.importerorg.trade.com mappedHost: peer1.importerorg.trade.com orderer: - pattern: (\w*)orderer.trade.com(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.trade.com mappedHost: orderer.trade.com certificateAuthorities: - pattern: (\w*)ca_peerImporterOrg(\w*) urlSubstitutionExp: http://localhost:8054 mappedHost: ca_peerImporterOrg ``` I'm getting this warning in the main flow but digging into the sdk I notice that in my request options I have ``` txnOpts: channel.requestOptions BeforeRetry: nil CCFilter: nil ParentContext: context.Context nil Retry: retry.Opts TargetFilter: fab.TargetFilter (*filter.EndpointFilter) TargetSorter: fab.TargetSorter nil Targets: []fab.Peer(len: 0, cap: 0)

twoneks (Wed, 10 Oct 2018 10:16:58 GMT):
Hi I'm having some problem using the function `myChannelclient.Execute(...) ` I'm receiving this warning `[fabsdk/client] 2018/10/10 10:08:52 UTC - pgresolver.(*randomLBP).Choose -> WARN No available peer groups` From what I understood the problem could be in my `entityMatchers` config that is like this ```yml entityMatchers: peer: - pattern: (\w*)peer0.importerorg.trade.com(\w*) urlSubstitutionExp: localhost:8051 eventUrlSubstitutionExp: localhost:8053 sslTargetOverrideUrlSubstitutionExp: peer0.importerorg.trade.com mappedHost: peer0.importerorg.trade.com - pattern: (\w*)peer1.importerorg.trade.com(\w*) urlSubstitutionExp: localhost:11051 eventUrlSubstitutionExp: localhost:11053 sslTargetOverrideUrlSubstitutionExp: peer1.importerorg.trade.com mappedHost: peer1.importerorg.trade.com orderer: - pattern: (\w*)orderer.trade.com(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.trade.com mappedHost: orderer.trade.com certificateAuthorities: - pattern: (\w*)ca_peerImporterOrg(\w*) urlSubstitutionExp: http://localhost:8054 mappedHost: ca_peerImporterOrg ``` I'm getting this warning in the main flow but digging into the sdk I notice that in my request options I have ``` txnOpts: channel.requestOptions BeforeRetry: nil CCFilter: nil ParentContext: context.Context nil Retry: retry.Opts TargetFilter: fab.TargetFilter (*filter.EndpointFilter) TargetSorter: fab.TargetSorter nil Targets: []fab.Peer(len: 0, cap: 0) ``` Where target is empty. Does anybody have some ideas?

twoneks (Wed, 10 Oct 2018 10:16:58 GMT):
Hi I'm having some problem using the function `myChannelclient.Execute(...) ` I'm receiving this warning `[fabsdk/client] 2018/10/10 10:08:52 UTC - pgresolver.(*randomLBP).Choose -> WARN No available peer groups` From what I understood the problem could be in my `entityMatchers` config that is like this ```yml entityMatchers: peer: - pattern: (\w*)peer0.importerorg.trade.com(\w*) urlSubstitutionExp: localhost:8051 eventUrlSubstitutionExp: localhost:8053 sslTargetOverrideUrlSubstitutionExp: peer0.importerorg.trade.com mappedHost: peer0.importerorg.trade.com - pattern: (\w*)peer1.importerorg.trade.com(\w*) urlSubstitutionExp: localhost:11051 eventUrlSubstitutionExp: localhost:11053 sslTargetOverrideUrlSubstitutionExp: peer1.importerorg.trade.com mappedHost: peer1.importerorg.trade.com orderer: - pattern: (\w*)orderer.trade.com(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.trade.com mappedHost: orderer.trade.com certificateAuthorities: - pattern: (\w*)ca_peerImporterOrg(\w*) urlSubstitutionExp: http://localhost:8054 mappedHost: ca_peerImporterOrg ``` I'm getting this warning in the main flow but digging into the sdk I notice that in my request options I have ``` txnOpts: channel.requestOptions BeforeRetry: nil CCFilter: nil ParentContext: context.Context nil Retry: retry.Opts TargetFilter: fab.TargetFilter (*filter.EndpointFilter) TargetSorter: fab.TargetSorter nil Targets: []fab.Peer(len: 0, cap: 0) ``` And I know is not really helpful but I don't know exactly how to reproduce it... Sometimes With the debugger I get ``` [fabsdk/util] 2018/10/10 10:37:38 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:11051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:11051]. Will retry again late ``` In which sometimes the port is 11051 and some others is 8051 over localhost Where target is empty. Does anybody have some ideas?

habpygo (Wed, 10 Oct 2018 11:23:05 GMT):
Hi, I’m having the following problem after upgrading the `fabric-sdk-go`. In the method `ProcessTransactionProposal` in peerendorser.go, `proposalResponse, err := p.sendProposal(ctx, request)` the proposalResponse is `nil` and gives the error: `err is: cscc.GetChannels failed: SendProposal failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7051]` Both `ctx` and `request` are not nil, the latter containing the Certificate. Anyone who can point me to the right direction? Thanks.

twoneks (Wed, 10 Oct 2018 14:19:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wic25nDzBjrAAQhb8) I solved this. The problem was an invalid msp in the chaincode policy configuration

jvsclp (Wed, 10 Oct 2018 21:24:18 GMT):
I managed to get `make populate` to run on MINGW64 for Windows 10, but had to make a change to two shells. The changes are: https://gerrit.hyperledger.org/r/#/c/26919/ and https://gerrit.hyperledger.org/r/#/c/26920/

jvsclp (Wed, 10 Oct 2018 21:25:05 GMT):
Now I'm running into an error when setting up the crypto config directory:

jvsclp (Wed, 10 Oct 2018 21:25:20 GMT):
```Crypto config directory does not exist - will need to populate fixture make[1]: Entering directory `/d/gowork/src/github.com/hyperledger/fabric-sdk-go' Generating crypto directory ... c:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: Mount denied: The source path "D:/gowork/src/github.com/hyperledger/fabric-sdk-go;C" doesn't exist and is not known to Docker.```

jvsclp (Wed, 10 Oct 2018 21:29:09 GMT):
The problem I have is the source path highlighted in red. I have a feeling it has something to do with the `makefile` and the `.PHONY: crypto-gen` volume mounts because the source path seems to be picking up some extra characters. Any idea on what I can do to narrow down the problem or if I'm looking in the wrong spot?

jvsclp (Wed, 10 Oct 2018 21:29:09 GMT):
The problem I have is the source path highlighted in red. I have a feeling it has something to do with the `makefile` and the `.PHONY: crypto-gen` volume mounts on line 507. The source path seems to be picking up some extra characters. Any idea on what I can do to narrow down the problem or if I'm looking in the wrong spot?

jvsclp (Wed, 10 Oct 2018 21:29:09 GMT):
The problem I have is the source path highlighted in red. I have a feeling it has something to do with the `makefile` and the `.PHONY: crypto-gen` volume mounts on line 507. The source path seems to be picking up some extra characters, namely, `;C` at the end of the path. Any idea on what I can do to narrow down the problem or if I'm looking in the wrong spot?

sergefdrv (Thu, 11 Oct 2018 08:58:21 GMT):
Has left the channel.

Baha-sk (Thu, 11 Oct 2018 12:39:55 GMT):
@jvsclp can you echo `abspath` in your environment maybe?

Baha-sk (Thu, 11 Oct 2018 12:42:59 GMT):
I won't be able to help much with this issue since i'm on a Mac unfortunately... but if you find something that works on Windows.. then we can work out a solution that supports both including *nix environments

Baha-sk (Thu, 11 Oct 2018 12:47:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ZwqZRSdscK3MXDrc2) @habpygo @habpygo are you using a config file with your sdk instance? if yes, how are you configuring the peers? Probably post the config here to have a look..

Baha-sk (Thu, 11 Oct 2018 13:03:29 GMT):
@jvsclp see if this post helps: https://stackoverflow.com/a/21289106

vieiramanoel (Thu, 11 Oct 2018 16:40:10 GMT):
Hi guys, I've a rest api, on chaincode I change the status of response before return shim e.g ``` shimError := shim.Error(err.Error()) errorCode, err := strconv.Atoi(result) if err != nil { return shim.Error(err.Error()) } shimError.Status = int32(errorCode) return shimError ``` . But at fabric-sdk-go the chaincode status is always 0 ``` resp, err := channelClient.Execute(invokeRequest) if err != nil { log.Printf("Put Error:\n%+v\n", resp) w.WriteHeader(int(resp.ChaincodeStatus)) # always 0 w.Write([]byte(err.Error())) return } ``` how do I get status returned at pb.response? I want to manage error codes between chaincode and rest, instead of returning always 500 for internal error I can see in err.Error() the chaincode status that i've set in chaincode `err.Error() = Transaction processing for endorser [peer1.org1.example.com:8051]: Chaincode status Code: (402) UNKNOWN. Description: Person 000 already exists`, but I can't access it from response struct

Baha-sk (Thu, 11 Oct 2018 17:16:13 GMT):
@vieiramanoel this is normal behaviour, cc errors are set in error, not in response

vieiramanoel (Thu, 11 Oct 2018 17:28:11 GMT):
@Baha-sk then how can I manage errors with http codes between chaincode and sdk?

vieiramanoel (Thu, 11 Oct 2018 17:28:11 GMT):
@Baha-sk then how can I manage errors in chaincode with http codes between chaincode and sdk?

Baha-sk (Thu, 11 Oct 2018 18:06:40 GMT):
@vieiramanoel in the log statement you pasted above, 402 is an HTTP status code, which happens to be returned by the CC... the SDK doesn't distinguish who originated the error, it's up to the application to manage the errors the way it wants. You can categorize them by error range (ie: 500 range errors are system wise, 400 range are application wise, etc.), that's up to you.

vieiramanoel (Thu, 11 Oct 2018 18:17:56 GMT):
@Baha-sk But in this case I must parse string in order to get the http status code, instead I would like to get it as int32 from `resp.ChaincodeStatus` is it possible? Or I have to parse string in application always?

vieiramanoel (Thu, 11 Oct 2018 18:17:56 GMT):
@Baha-sk But in this case I must parse string in order to get the http status code, instead I would like to get it as int32 from `resp.ChaincodeStatus` is it possible? Or do I have to parse string in application always?

Baha-sk (Thu, 11 Oct 2018 18:25:05 GMT):
you may look into resp.Responses which is an array of TransactionProposalResponse...you can iterate through it, it has Status and ChaincodeStatus as well

vieiramanoel (Thu, 11 Oct 2018 18:53:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=c27H4tnGoiw33qbR4) @Baha-sk resp.Responses is always an empty array when an error is returned :(

vieiramanoel (Thu, 11 Oct 2018 18:53:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=c27H4tnGoiw33qbR4) @Baha-sk resp.Responses is always an empty array when an error is returned on chaincode :(

jvsclp (Thu, 11 Oct 2018 19:30:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jpptQGsXBpfZGwHWZ) @Baha-sk Thank you for the information on the error, that helped to make some progress. After making some changes to echo variables in the `Makefile` After line 506: `$(info abspath is $(abspath .))` to display what abspath is creating before calling Docker with `@(DOCKER_CMD)` in `.PHONY: crypto-gen` The result is what I would expect: `abspath is /d/gowork/src/github.com/hyperledger/fabric-sdk-go` It seems the problem lies with MINGW trying to convert the path for docker because if I adjust the volume mount, I no longer get the source path error, but: ```c:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"C:/MinGW/msys/1.0/bin/bash\": stat C:/MinGW/msys/1.0/bin/bash: no such file or directory": unknown.``` I'm still working on it, but if you have any advice I'd appreciate it.

Baha-sk (Thu, 11 Oct 2018 19:51:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=32rZ5rfcHeekSgrd7) @vieiramanoel the error message you posted earlier is most likely coming from here: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L129 if you noticed in this line, the code sets requestContext.Error, the requestContext.Response and requestContext.Response.Responses should be unaltered... and also notice that in the peer endorser code: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L129 the response is returned as is unless if it's a connection error (code above this line), we only extract the error code.. not sure how come your response is empty

Baha-sk (Thu, 11 Oct 2018 19:55:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5RZs4z6JJquEb2hPR) @jvsclp have you checked the stack overflow link I sent you earlier? https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tWeq299ZsL3EThPot what you can do is probably set `$(abspath .)` or the equivalent in your environment into an env variable, and use some logic to set the right value according the architecture, (ie Darwin or *nix env set the variable to `$(abspath .)`, if your env, then set the equivalent command).. abspath is a makefile function.. not sure how it's different in Cygwin/Windows

vieiramanoel (Thu, 11 Oct 2018 20:11:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rT65Gu5EXnfbooMZQ) @Baha-sk I did take a look onto those files, but none of them gave me any clue about what's happening, another guy on my team got stuck in the same step, my exec in sdk app is something like this bellow ```invokeRequest := channel.Request{ ChaincodeID: "go-process", Fcn: "createNew" + funcname, Args: [][]byte{ []byte(value), }, } resp, err := channelClient.Execute(invokeRequest) if err != nil { log.Printf("Put Error:\n%+v\n", resp.Responses) w.WriteHeader(http.StatusInternalServerError) w.Write([]byte(err.Error())) return }``` this log prints out: ```2018/10/11 17:07:37 Put Error: [] ```

Baha-sk (Thu, 11 Oct 2018 22:12:52 GMT):
not sure @vieiramanoel .. could be a possible bug, feel free to open an issue for it.. any contribution to the go SDK is welcome

vieiramanoel (Thu, 11 Oct 2018 22:13:39 GMT):
@Baha-sk sure, I'll be opening an issue in jyra, in a few minutes I post here :)

vieiramanoel (Thu, 11 Oct 2018 22:13:39 GMT):
@Baha-sk sure, I'll be opening an issue in jira, in a few minutes I post here :)

Baha-sk (Thu, 11 Oct 2018 22:13:51 GMT):
sure

Baha-sk (Thu, 11 Oct 2018 22:14:45 GMT):
you're also welcome to help fix the issue as well :)

vieiramanoel (Thu, 11 Oct 2018 22:16:13 GMT):
I'll try to understand the process about go-sdk and if I could, be sure i'll be contributing, opening jira is the first step once discussion about the bug will make the problem clearer in order to submit changes

Baha-sk (Thu, 11 Oct 2018 22:17:08 GMT):
sounds good @vieiramanoel ... the community is here for any help needed

jvsclp (Thu, 11 Oct 2018 22:25:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GqbxYDwYeCrNnCuge) @Baha-sk I saw the stack overflow link. I read through it which spawned a lot of other open tabs and searching and got me to where I am now. Your advice is very helpful, otherwise I feel as if I've been dropped in the wilderness without a map or compass. I've never worked with a makefile before and a lot of my work in Hyperledger is all new to me. I am not a developer by trade (you could probably tell by my commits), but I feel fairly proficient with Google. I am going to continue working on your suggestion regarding setting an environment variable according to the architecture.

Baha-sk (Thu, 11 Oct 2018 22:31:41 GMT):
glad to help @jvsclp and happy to know that you're just starting up, fyi, there's already a variable in the Makefile that has the architecture name (ARCH) and os name (OS_NAME)... you can try to echo them and see what values you get on your environment, you can probably figure it out... look at line 200 of the makefile for some logic on how to set a new variable for your environment.. good luck

Baha-sk (Thu, 11 Oct 2018 22:31:41 GMT):
glad to help @jvsclp and happy to know that you're just starting up with go SDK and Hyperledger, fyi, there's already a variable in the Makefile that has the architecture name (ARCH) and os name (OS_NAME)... you can try to echo them and see what values you get on your environment, you can probably figure it out... look at line 200 of the makefile for some logic on how to set a new variable for your environment.. good luck

vieiramanoel (Thu, 11 Oct 2018 23:18:49 GMT):
https://jira.hyperledger.org/browse/FABG-775 @Baha-sk

Baha-sk (Fri, 12 Oct 2018 13:51:41 GMT):
sounds good @vieiramanoel .. are you going to work on it?

habpygo (Fri, 12 Oct 2018 14:24:49 GMT):
Hi, Just upgraded to the Fabric-SDK-Go v1.3 and trying to run `make` gives me these errors: ``` Running metalinters... pkg/msp/memory_user_store.go:1::warning: file is not gofmted with -s (gofmt) pkg/msp/certfileuserstore.go:1::warning: file is not gofmted with -s (gofmt) pkg/msp/getsigid.go:1::warning: file is not gofmted with -s (gofmt) …. ake: *** [unit-test] Error 1 ``` I had to “down grade from Go 1.11 to 1.10.4 — not sure whether that’s relevant. Any ideas?

troyronda (Fri, 12 Oct 2018 14:29:25 GMT):
@habpygo the go formatting seems to have changed between 1.10 and 1.11

troyronda (Fri, 12 Oct 2018 14:30:24 GMT):
(the SDK is currently using 1.10 gofmt)

habpygo (Fri, 12 Oct 2018 14:40:26 GMT):
Probably that's the problem, although I can't find out what version is running (gofmt -version/-v/ not working). Any idea how to downgrade to version 1.10?

habpygo (Fri, 12 Oct 2018 14:41:41 GMT):
Just assuming that it has silently upgraded to version 1.11 after I upgraded Go to version 1.11

habpygo (Fri, 12 Oct 2018 14:41:58 GMT):
and then downgraded Go to 1.10.4 again.

habpygo (Fri, 12 Oct 2018 15:46:43 GMT):
Ok @troyronda it was that. Solved it by doing a `which gofmt` and then deleting that file. After that running `make` for the testsuite exited with code code 0

habpygo (Fri, 12 Oct 2018 15:48:09 GMT):
and now @Baha-sk seeing whether I can get it to work again. Will post and share the solution of course.

vieiramanoel (Fri, 12 Oct 2018 18:44:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xDFmzoyGZrnMrwMNh) @Baha-sk I've started it now, lets see if I can do anything about it haha

vieiramanoel (Fri, 12 Oct 2018 21:12:16 GMT):
@Baha-sk I found a way to fix it, but I'm not sure if it's the best one. I'll be submitting a PR later tonight

jvsclp (Fri, 12 Oct 2018 21:40:00 GMT):
I've made some significant progress and I want to check in to see how I should go about putting in my bug reports. The `abspath` issue has been resolved, https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CPB8WkCHLLCbFujG8, but it leads to a follow-up error not recognizing the bash shell to start, https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5RZs4z6JJquEb2hPR. This issue affects every instance where `Docker run` is invoked in the makefile. 1) Should I submit a JIRA for each seperate function call, that is, `crypto-gen`, `channel-config-gen`, etc. that has the `abspath` problem or consolidate them? 2) Similar question as (1), but for Docker not recognizing how to start /bin/bash in Linux containers? 3) Should I consolidate all the changes and push them as one unit solving the two bugs in all the functions of the makefile for fabric-sdk-go in Windows? I'm leaning toward submitting a separate bug report for each occurrence, but what are your thoughts?

vieiramanoel (Fri, 12 Oct 2018 22:04:50 GMT):
pls check https://gerrit.hyperledger.org/r/#/c/26970/

vieiramanoel (Fri, 12 Oct 2018 22:05:12 GMT):
@Baha-sk https://gerrit.hyperledger.org/r/#/c/26970/

vieiramanoel (Fri, 12 Oct 2018 22:05:12 GMT):
@Baha-sk https://gerrit.hyperledger.org/r/#/c/26970/ pls check

httran88 (Fri, 12 Oct 2018 22:34:47 GMT):
Has joined the channel.

httran88 (Fri, 12 Oct 2018 22:35:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GExt4pYbwL25Zj5Fu) @habpygo same

vieiramanoel (Fri, 12 Oct 2018 23:50:45 GMT):
https://gerrit.hyperledger.org/r/#/c/26971/ @Baha-sk Idk why tests are still failing, running locally they work, but jekins fail]

httran88 (Sat, 13 Oct 2018 00:08:09 GMT):
question, how come for fabric-sdk-go tags, there's no v1.1, v1.2. or v1.3?

httran88 (Sat, 13 Oct 2018 00:08:38 GMT):
or a release version?

tahaf10 (Sat, 13 Oct 2018 06:31:18 GMT):
Has joined the channel.

habpygo (Sat, 13 Oct 2018 08:43:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uu5h7SuFrmsjrzxr7) @httran88 Hi @httran88 , yes this is relevant. As Troyonda was saying, *the formatting seems to have changed between 1.10 to 1.11* So what I did is - deleted Go version 1.11 and installed 1.10.4 - did `which gofmt` and go the that directory - deleted the `gofmt` file. After that I was able to run the testsuite without problems.

kostas (Sat, 13 Oct 2018 20:19:03 GMT):
How can I silence of edit the SDK's logger? A chaincode invocation is failing and I get this on my log: `[fabsdk/fab] 2018/10/13 20:15:51 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = chaincode error (status: 500, ...`

kostas (Sat, 13 Oct 2018 20:19:03 GMT):
How can I silence of edit the SDK's logger? A chaincode invocation is failing and I get this on the output of my application: `[fabsdk/fab] 2018/10/13 20:15:51 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = chaincode error (status: 500, ...`

kostas (Sat, 13 Oct 2018 20:19:45 GMT):
I want to suppress this output (the failing invocation is actually expected) - how do I do that?

httran88 (Sun, 14 Oct 2018 02:02:25 GMT):
i didn't delete gofmt, i jsut went to my /usr/local/go and deleted and went to golang official website and installed the 1.10.4 from tgz and not the macos installer and everything was fine after that.

kostas (Sun, 14 Oct 2018 03:28:02 GMT):
Using the SDK, how can I go about writing a function that notifies me every time a new block is added to the ledger?

baoyangc (Sun, 14 Oct 2018 04:23:14 GMT):
https://jira.hyperledger.org/browse/FABG-779

baoyangc (Sun, 14 Oct 2018 12:55:33 GMT):
I have submit an changeset, but the Jenkins build meet an failure with on reason. https://jenkins.hyperledger.org/job/fabric-sdk-go-tests-verify-x86_64/3989/ does anyone could help me

baoyangc (Sun, 14 Oct 2018 12:55:44 GMT):
@troyronda

httran88 (Sun, 14 Oct 2018 18:07:24 GMT):
Question! for v1.3, in the connection profile, channels, it says the orderers section is deprecated and entityMatchers should be used, is it correct to assume the same for peers?

maplerichie (Sun, 14 Oct 2018 18:27:02 GMT):
Has joined the channel.

httran88 (Sun, 14 Oct 2018 18:54:29 GMT):
Also, anyone running from local have issues when instantiating cc? I can call InstantiateCC(with no targets) parameters and during the InstantiateCC function call, I can see my cc containers started but InstantiateCC still returns an error ``` [fabsdk/client] 2018/10/14 18:49:28 UTC - dynamicdiscovery.asPeers -> WARN Peer config not found for url [peer0.org1.example.com:7051] 2018/10/14 14:49:30 Unable to install and instantiate cc failed to instantiate the chaincode: error registering for TxStatus event: no peers to connect to``` It seems its able to find the peer ID to use but using the incorrect endpoint, should be using localhost instead

httran88 (Sun, 14 Oct 2018 19:04:26 GMT):
looks like the problem is rc.sendTransactionAndCheckEvent, I can see that the transaction proposals are returning 200, but ```eventService.RegisterTxStatusEvent(string(tp.TxnID))``` is throwing the error

httran88 (Sun, 14 Oct 2018 19:56:49 GMT):

SS of sendCCProposal that throws event error

vieiramanoel (Sun, 14 Oct 2018 23:02:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YGCn5658ML9ievYKJ) @baoyangc same happened here. Jekins seems to be failing and he removed the ci fail

baoyangc (Mon, 15 Oct 2018 02:51:21 GMT):
https://jenkins.hyperledger.org/job/fabric-sdk-go-tests-verify-s390x/4109/console now the jenkins log said: `integration-tests_1 | ? github.com/hyperledger/fabric-sdk-go/test/integration/util/runner [no test files]`. As I didn't write the code in this directory, I do not need care it. Is this right ? @troyronda

Taaanos (Mon, 15 Oct 2018 12:58:59 GMT):
Has joined the channel.

Taaanos (Mon, 15 Oct 2018 13:00:47 GMT):
Hey all Is there anyone working on an SDK for devices?

rameshthoomu (Mon, 15 Oct 2018 13:54:04 GMT):
@troyronda Could you please check this FAB-12464

Baha-sk (Mon, 15 Oct 2018 13:57:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rwvWC5pHxyyQKf52i) @jvsclp for # 1, one issue is sufficient for # 2, that's not possible, the CI runs on Linux (Ubuntu) and /bin/bash is standard (works on Mac as well).. see where your 'bash' program points to in the copy of your Docker image.. for # 3, you can consolidate them as they're related to your specific environment

Baha-sk (Mon, 15 Oct 2018 14:00:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mLAM8PGQbmosDkaAq) @vieiramanoel the z build failed (the env is not stable sometimes).. I kicked in a new build .. hopefully it will pass

baoyangc (Mon, 15 Oct 2018 14:15:45 GMT):
@troyronda I think we should create fabric-ca SDK in the repo fabric-ca. So we can avoid update dependency from fabric-ca when a new release of fabric-ca is out.

baoyangc (Mon, 15 Oct 2018 14:22:46 GMT):
@troyronda https://jira.hyperledger.org/browse/FABC-739

vieiramanoel (Mon, 15 Oct 2018 15:30:26 GMT):
Failed again haha @Baha-sk [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=h4rWd5gQJ9nQEDdBj)

Baha-sk (Mon, 15 Oct 2018 15:56:45 GMT):
@rameshthoomu I need to check the peer logs on z build, it seems the problem everyone is having is the same.. it is not happening on x86... not sure if I push the peer logs into a file, how can I access it?

Baha-sk (Mon, 15 Oct 2018 15:56:45 GMT):
@rameshthoomu I need to check the peer logs on z build, it seems the problem everyone is having is the same.. it is not happening on x86... not sure if I push the peer logs into a file, how can I access it? this is related to FAB-12464 too

rameshthoomu (Mon, 15 Oct 2018 15:58:52 GMT):
@Baha-sk checking this one now.. Will let you know

Baha-sk (Mon, 15 Oct 2018 16:05:02 GMT):
for now, I'll log the details of the error in the test and see what value I get for z390 @rameshthoomu , I'll push a patch shortly..

jvsclp (Mon, 15 Oct 2018 17:27:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TJYF5EXiTtsPQv7hB) @Baha-sk https://jira.hyperledger.org/browse/FABG-778 created and change request generated: https://gerrit.hyperledger.org/r/#/c/27004/

Baha-sk (Mon, 15 Oct 2018 17:29:41 GMT):
hey @rameshthoomu, I uploaded a simple patch.. z build was successful with no issues, then I looked at previous committed patches with z build failures, I see this in their log: ```23:18:06 Wiping out workspace first. 23:18:07 java.nio.file.FileSystemException: /w/workspace/fabric-sdk-go-tests-verify-s390x/gopath/src/github.com/hyperledger/fabric-sdk-go/test/integration/e2e/orgs/dschannelext275638414: Operation not permitted 23:18:07 at sun.nio.fs.UnixException.translateToIOException(UnixException.java:103) 23:18:07 at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:114) 23:18:07 at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:119) 23:18:07 at sun.nio.fs.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:250) 23:18:07 at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:272) 23:18:07 at java.nio.file.Files.setPosixFilePermissions(Files.java:2056) 23:18:07 at hudson.Util.makeWritable(Util.java:337) 23:18:07 at hudson.Util.tryOnceDeleteFile(Util.java:297) 23:18:07 at hudson.Util.deleteFile(Util.java:272) 23:18:07 Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to ubuntu1604-s390x-2c-16g-17 23:18:07 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741) 23:18:07 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) 23:18:07 at hudson.remoting.Channel.call(Channel.java:955) 23:18:07 at hudson.FilePath.act(FilePath.java:1071) 23:18:07 at hudson.FilePath.act(FilePath.java:1060) 23:18:07 at hudson.FilePath.deleteContents(FilePath.java:1282) 23:18:07 at hudson.plugins.git.extensions.impl.WipeWorkspace.beforeCheckout(WipeWorkspace.java:30) 23:18:07 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1183) 23:18:07 at hudson.scm.SCM.checkout(SCM.java:504) 23:18:07 at hudson.model.AbstractProject.checkout(AbstractProject.java:1208) 23:18:07 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574) 23:18:07 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 23:18:07 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) 23:18:07 at hudson.model.Run.execute(Run.java:1815) 23:18:07 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 23:18:07 at hudson.model.ResourceController.execute(ResourceController.java:97) 23:18:07 at hudson.model.Executor.run(Executor.java:429) 23:18:07 Caused: java.io.IOException: Unable to delete '/w/workspace/fabric-sdk-go-tests-verify-s390x/gopath/src/github.com/hyperledger/fabric-sdk-go/test/integration/e2e/orgs/dschannelext275638414'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts. 23:18:07 at hudson.Util.deleteFile(Util.java:277)``` logs pulled from last z build of https://gerrit.hyperledger.org/r/c/26971/

Baha-sk (Mon, 15 Oct 2018 17:30:19 GMT):
it looks like there's an IO issue with the z build...

Baha-sk (Mon, 15 Oct 2018 17:30:50 GMT):
I will re trigger the build on that patch..

Baha-sk (Mon, 15 Oct 2018 17:33:37 GMT):
@rameshthoomu fyi: `23:18:07 Caused: java.io.IOException: Unable to delete '/w/workspace/fabric-sdk-go-tests-verify-s390x/gopath/src/github.com/hyperledger/fabric-sdk-go/test/integration/e2e/orgs/dschannelext275638414` our integration tests now create temp directories... this directory can be safely deleted: `dschannelext275638414`

rameshthoomu (Mon, 15 Oct 2018 17:34:29 GMT):
checking

Baha-sk (Mon, 15 Oct 2018 17:38:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RT263Yn6iuHy5yA5k) @jvsclp :thumbsup: let's see how the build goes...

vieiramanoel (Mon, 15 Oct 2018 17:46:45 GMT):
@Baha-sk still failing https://jenkins.hyperledger.org/job/fabric-sdk-go-tests-verify-s390x/4117/console

vieiramanoel (Mon, 15 Oct 2018 17:46:59 GMT):
now the error is another one

vieiramanoel (Mon, 15 Oct 2018 17:47:07 GMT):
```14:44:21 Makefile:308: recipe for target 'integration-tests-stable' failed 14:44:21 make[1]: *** [integration-tests-stable] Error 1 14:44:21 make[1]: Leaving directory '/w/workspace/fabric-sdk-go-tests-verify-s390x/gopath/src/github.com/hyperledger/fabric-sdk-go' 14:44:21 Makefile:388: recipe for target 'integration-test' failed 14:44:21 make: *** [integration-test] Error 2 14:44:21 Build step 'Execute shell' marked build as failure```

Baha-sk (Mon, 15 Oct 2018 17:51:21 GMT):
@vieiramanoel yes... it seems the problem is inconsistent on the z environment.. still investigating..

ahern077 (Mon, 15 Oct 2018 20:35:18 GMT):
Has joined the channel.

Baha-sk (Tue, 16 Oct 2018 01:14:00 GMT):
@rameshthoomu @troyronda @firas.qutishat ... I believe i fixed the z build failures issue.. https://gerrit.hyperledger.org/r/c/27003/ .. other pending patches can rebase on top of this once merged..

Baha-sk (Tue, 16 Oct 2018 01:50:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4s3iNAyiT9GZrnTm5) @vieiramanoel try rebasing now: https://gerrit.hyperledger.org/r/c/26971/ and see how the z build goes..

Baha-sk (Tue, 16 Oct 2018 02:16:38 GMT):
@vieiramanoel the build seems to still fail... apparently I fixed one error, but there is another error .. but there are is another error..

Baha-sk (Tue, 16 Oct 2018 02:16:38 GMT):
@vieiramanoel the build seems to still fail... apparently I fixed one error, but there is another error ..

Baha-sk (Tue, 16 Oct 2018 16:01:46 GMT):
@vieiramanoel can you address the comments given to your patch? I have reverted the commit to your original change... I'm committing a separate patch.. hopefully you can rebase on top of it once merged..

jvsclp (Tue, 16 Oct 2018 16:30:54 GMT):
Found a bug preventing `make depend` from running on Windows 10 using Git Bash similar to the other shells that had regex lines converted to strings. https://jira.hyperledger.org/browse/FABG-780 and https://gerrit.hyperledger.org/r/#/c/27031/

vieiramanoel (Tue, 16 Oct 2018 17:38:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=p8B8oSu9rn6sgLb57) @Baha-sk ok, i'm checking this right now

vieiramanoel (Tue, 16 Oct 2018 17:40:48 GMT):
@troyronda I've some questions about the comments: first: I'm not sure how to write a test for this once the chaincodes on fabexamples returns nothing but 500 second: what's the best practice handling errors if not checking its err.Error() string?

vieiramanoel (Tue, 16 Oct 2018 17:40:48 GMT):
@troyronda I've got some questions about the comments: first: I'm not sure how to write a test for this once the chaincodes on fabexamples returns nothing but 500 second: what's the best practice handling errors if not checking its err.Error() string?

vieiramanoel (Tue, 16 Oct 2018 17:41:01 GMT):
https://gerrit.hyperledger.org/r/#/c/26971/7/pkg/fab/peer/peerendorser.go on this commit

vieiramanoel (Tue, 16 Oct 2018 17:48:14 GMT):
On the second case, I think that rely on `err != nil && proposalResponse == nil` is the best way to handle this case

vieiramanoel (Tue, 16 Oct 2018 17:48:33 GMT):
once this condition will be true only when a bad dial is made

Baha-sk (Tue, 16 Oct 2018 19:10:31 GMT):
@jvsclp for https://gerrit.hyperledger.org/r/c/27004/, have you tried `-v /$(abspath .)` and `/bin/bash` (ie not `bin/bash`)?

Baha-sk (Tue, 16 Oct 2018 19:11:07 GMT):
I'm asking because `bin/bash` seems awkward inside a Docker container...

jvsclp (Tue, 16 Oct 2018 19:37:46 GMT):
@Baha-sk Using `-v /$(abspath .)` corrects the first bug I was having from the Docker call appending `;C` to the directory passed in the `abspath` on Windows. Having `/bin/bash` as mentioned in the commit causes a follow on error unrelated to the `abspath` correction. So if I do `-v /$(abspath .)` I will still get an error from `/bin/bash`. However, I tried with two forward slashes, `//bin/bash` and that worked on Windows using Git Bash (MINGW64) which keeps the call out of the Docker container. I published a new patch with the change.

jvsclp (Tue, 16 Oct 2018 19:38:02 GMT):
What are the drawbacks to bin/bash versus /bin/bash?

jvsclp (Tue, 16 Oct 2018 19:38:02 GMT):
What are the drawbacks to bin/bash versus /bin/bash in the call to Docker?

jvsclp (Tue, 16 Oct 2018 19:38:02 GMT):
What are the drawbacks to bin/bash versus /bin/bash in the call to Docker for those functions mentioned in the patch commit?

Baha-sk (Tue, 16 Oct 2018 19:47:16 GMT):
@jvsclp it is odd to reference the standard /bin/bash binary as bin/bash... this assumes one must cd into / in order to access `bin/bash`

jvsclp (Tue, 16 Oct 2018 20:26:31 GMT):
@Baha-sk If `/bin/bash` is in the Docker container, I wonder why when making the call to run Docker `bin/bash` or `//bin/bash` works, but `/bin/bash` does not.

jvsclp (Tue, 16 Oct 2018 20:31:41 GMT):
Also, in the case of the function calls in the Makefile, does it matter if the call to the shell is `bin/bash`? It seems the `crypto-gen` and `channel-config` functions are single purpose and do not persist after a successful run to generate the necessary network artifacts.

Baha-sk (Tue, 16 Oct 2018 20:41:58 GMT):
@jvsclp to be honest, I've never seen `bin/bash` in scripts before.. it does entail someone is running it from their current directory, not from `/`

jvsclp (Tue, 16 Oct 2018 20:51:10 GMT):
@Baha-sk I guess I'm confused then. `/bin/bash` occurs in the spun up Docker container and `bin/bash` runs from the local machine spinning up the Docker container?

jvsclp (Tue, 16 Oct 2018 20:52:12 GMT):
It seems that `//bin/bash` also verifies in https://gerrit.hyperledger.org/r/#/c/27004/.

Baha-sk (Tue, 16 Oct 2018 22:33:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wxaSHFi43sqsz4tiT) @jvsclp that's not what I meant... I meant we usually never access /bin/bash binary via `bin/bash`... that's all

jvsclp (Tue, 16 Oct 2018 22:59:09 GMT):
@Baha-sk Good to know, thank you.

vieiramanoel (Tue, 16 Oct 2018 23:50:07 GMT):
@Baha-sk, troye had suggested to write tests for the changes I've made. But I really don't know how to mock a ProposalRequest that makes `ProcessTransactionProposal` fail once `mockProposalRequest` only returns me a void `SignedProposal` struct

vieiramanoel (Tue, 16 Oct 2018 23:50:29 GMT):
do you have any suggestions about how to do it?

baoyangc (Wed, 17 Oct 2018 04:28:48 GMT):
the ci build meet error: https://jenkins.hyperledger.org/job/fabric-sdk-go-tests-verify-s390x/4150/console

baoyangc (Wed, 17 Oct 2018 04:29:30 GMT):
``` integration-tests_1 | --- FAIL: TestDynamicSelection (1.80s) 11:55:58 integration-tests_1 | sdk_provider_test.go:69: Failed to query funds: Transaction processing for endorser [peer1.org1.example.com:7151]: Chaincode status Code: (500) UNKNOWN. Description: {"Error":"Nil amount for key-TestDynamicSelection-mxruvasn3w"} 11:55:58 integration-tests_1 | FAIL 11:55:58 integration-tests_1 | FAIL github.com/hyperledger/fabric-sdk-go/test/integration/pkg/fabsdk/provider 3.434s 11:55:58 integration-tests_1 | ? github.com/hyperledger/fabric-sdk-go/test/integration/util/runner [no test files] 11:55:58 fabsdkgo_integration-tests_1 exited with code 1 ``` but I didn't change any code of these files

Baha-sk (Wed, 17 Oct 2018 14:00:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=aYSCQ3juFNuqo9i6S) @vieiramanoel you can look at existing test files, I would suggest to look into them and find something similar to what you would like to test..

Baha-sk (Wed, 17 Oct 2018 14:01:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fBoZKRx6iZhMJBDWK) @baoyangc your real error is this: ```03:54:55 integration-tests_1 | [fabsdk/client] 2018/10/17 03:54:13 UTC - invoke.(*SelectAndEndorseHandler).Handle -> WARN error getting additional endorsers: error getting additional endorsers: error getting channel response for channel [orgchannel]: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: failed constructing descriptor for chaincodes: 03:54:55 integration-tests_1 | --- FAIL: TestChannelClient (1.04s) 03:54:55 integration-tests_1 | assertions.go:247: Error Trace: channel_client_test.go:338 03:54:55 integration-tests_1 | channel_client_test.go:56 03:54:55 integration-tests_1 | Error: Received unexpected error: 03:54:55 integration-tests_1 | Chaincode status Code: (500) UNKNOWN. Description: {"Error":"Nil amount for key-TestChannelClient-ia7dekt138"}```

Baha-sk (Wed, 17 Oct 2018 14:01:48 GMT):
@baoyangc I created a patch to fix this in the z build... hopefully once merged you can rebase and see if it still fails..

baoyangc (Wed, 17 Oct 2018 16:53:39 GMT):
@Baha-sk I got it . After I reply reverify, it has been fixed

baoyangc (Wed, 17 Oct 2018 16:53:41 GMT):
thanks

ataul443 (Wed, 17 Oct 2018 18:22:40 GMT):
Has joined the channel.

jvsclp (Wed, 17 Oct 2018 22:08:38 GMT):
Just wondering if this is expected behavior after running `make`: https://hastebin.com/uzabumayay.sql I'm good with all the warnings, but it's the `make: *** [unit-test] Error 1` I'm not sure about.

jvsclp (Wed, 17 Oct 2018 22:08:38 GMT):
Just wondering if this is expected behavior after running `make`: https://hastebin.com/uzabumayay.sql I'm good with all the warnings, but it's the last line `make: *** [unit-test] Error 1` I'm not sure about.

Baha-sk (Wed, 17 Oct 2018 22:19:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=AXY4p6C5ojS72KbKu) @jvsclp those metalinter warnings are actual errors, you're probably using the wrong version of gometalinter.. delete your gometalinter binary then run `make depend`, it will re install the metalinter binaries and try again..

Baha-sk (Wed, 17 Oct 2018 22:20:01 GMT):
also fyi, sdk go doesn't support go 1.11 yet and gometalinter is linked the go version.. so make sure you're on a 1.10 version

jvsclp (Wed, 17 Oct 2018 22:21:37 GMT):
@Baha-sk Thanks, I'm using go v1.10.3. I'll give your suggestion a shot.

vieiramanoel (Thu, 18 Oct 2018 01:16:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wJQkDNRNtYNXRk39D) @Baha-sk none of them has anything similar to :( @troyronda can you help?

vieiramanoel (Thu, 18 Oct 2018 01:16:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wJQkDNRNtYNXRk39D) @Baha-sk none of them has anything similar to :( @troyronda can you help?

baoyangc (Thu, 18 Oct 2018 02:51:48 GMT):
@Baha-sk are you Baha A Shannban?

baoyangc (Thu, 18 Oct 2018 02:52:34 GMT):
@troyronda would please review my change at https://gerrit.hyperledger.org/r/#/c/26984/?

harsha (Thu, 18 Oct 2018 11:17:47 GMT):
Has joined the channel.

AndrewNRise (Fri, 19 Oct 2018 08:15:35 GMT):
Has joined the channel.

AndrewNRise (Fri, 19 Oct 2018 09:38:41 GMT):
Hi, I have some questions about the Fabric-go sdk's maturity and development plan that I have not been able to find any information on: * I see that the project is in Alpha 4, is there a ballpark ETA for a Beta or RC? * At what point can we expect API's to settle? * Which version of the Fabric project can we expect the go-sdk to be fully released alongside? * Which are the most pressing issues in the tracker?

angelsuarez (Fri, 19 Oct 2018 12:20:52 GMT):
Has joined the channel.

vieiramanoel (Fri, 19 Oct 2018 18:25:48 GMT):
guys?

vieiramanoel (Fri, 19 Oct 2018 18:26:29 GMT):
the progress of my change depends on the discussion about it, and I really need it to handle errors between chaincode-api-frontend

jamesxql (Fri, 19 Oct 2018 19:12:09 GMT):
Has joined the channel.

ak97m (Fri, 19 Oct 2018 19:50:47 GMT):
Has joined the channel.

Baha-sk (Fri, 19 Oct 2018 20:12:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RhejuqZQrcygbSoNR) @vieiramanoel so basically you need to mock the result coming from this line: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/peer/peerendorser.go#L105

Baha-sk (Fri, 19 Oct 2018 20:14:54 GMT):
if you go to the sendProposal() call... you will see that it calls `conn, err := p.conn(ctx)` which returns a grpc clientContext... if you go to conn() function, you notice that it gets a fab.commManager instance through the call `commManager, ok := context.RequestCommManager(ctx)`

Baha-sk (Fri, 19 Oct 2018 20:15:10 GMT):
commManager is what you want to mock here...

Baha-sk (Fri, 19 Oct 2018 20:18:11 GMT):
look at https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/peer/peer.go#L233 for how you can create an example mockCommManager...

Baha-sk (Fri, 19 Oct 2018 20:18:11 GMT):
look at https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/comm/mocks.go#L19 for how you can create an example mockCommManager...

Baha-sk (Fri, 19 Oct 2018 20:21:31 GMT):
then make sure to add the instance of the mockCommManager in your ctx passed in to processProposal

vieiramanoel (Fri, 19 Oct 2018 20:21:56 GMT):
so mocking commManager I can emulate sendProposal result, right?

vieiramanoel (Fri, 19 Oct 2018 20:22:01 GMT):
I'll work on this

Baha-sk (Fri, 19 Oct 2018 20:22:38 GMT):
not all of sendProposal.. just the outside call inside of sendProposal..

Baha-sk (Fri, 19 Oct 2018 20:22:49 GMT):
good luck..

Baha-sk (Fri, 19 Oct 2018 20:59:53 GMT):
@vieiramanoel I was thinking... probably you don't need to mock CommManager...

Baha-sk (Fri, 19 Oct 2018 21:00:48 GMT):
all you need is a MockEndorserServer... and leave processProposal do an external grpc call where the MockEndorserServer will catch it and simulate an error ...

Baha-sk (Fri, 19 Oct 2018 21:02:37 GMT):
actually this is exactly what TestProcessProposalGoodDial() does..

Baha-sk (Fri, 19 Oct 2018 21:02:40 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/peer/peerendorser_test.go#L194

Baha-sk (Fri, 19 Oct 2018 21:04:55 GMT):
then you can return whatever you like from this mockEndorserServer

Baha-sk (Fri, 19 Oct 2018 21:05:33 GMT):
this is an example of proposalError, I think this is what you want to return.. https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/peer/peerendorser_test.go#L208 @vieiramanoel

Baha-sk (Fri, 19 Oct 2018 21:05:33 GMT):
this is an example of proposalError, I think this is what you want to return.. https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/peer/peerendorser_test.go#L254 @vieiramanoel

DheerajBalodia (Mon, 22 Oct 2018 07:40:38 GMT):
Has joined the channel.

rmaurer (Mon, 22 Oct 2018 13:11:37 GMT):
Has joined the channel.

smeyers (Mon, 22 Oct 2018 15:22:28 GMT):
Does anyone know of a way to write to the ledger that a query happened. Chaincode Invoke sends the transaction to the orderer. Is there a way to force the query to do the same?

angelsuarez (Mon, 22 Oct 2018 17:10:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8M3sepiksLW2NShwP) @AndrewNRise Hey @AndrewNRise , have you got an answer about any of those questions? it would be nice to know more about it

nyet (Mon, 22 Oct 2018 21:07:26 GMT):
Has joined the channel.

nyet (Mon, 22 Oct 2018 21:10:05 GMT):
Hello everyone. Noob here, trying to migrate some of my sample code from HLF 1.1 to 1.2, and I am having problems with locating peer endpoints. The old `InstantiateCC()` worked fine without `resmgt.WithPeers()` but it doesn't seem to work against 1.2. I see that the sample-cli code calls` WithPeers()` but it goes through quite a bit of trouble to compose a peer list based on `EndpointConfig()`. Is all of that rigamarole strictly required? If so, is there already equivalent code actually in the sdk so i don't have to copy/paste or ref the fabric-cli sample?

nyet (Mon, 22 Oct 2018 21:10:05 GMT):
Hello everyone. Noob here, trying to migrate some of my sample code from HLF 1.1 to 1.2, and I am having problems with locating peer endpoints. The old `InstantiateCC()` worked fine without `resmgt.WithPeers()` but it doesn't seem to work against 1.2. I see that the sample-cli code calls `WithPeers()` but it goes through quite a bit of trouble to compose a peer list based on `EndpointConfig()`. Is all of that rigamarole strictly required? If so, is there already equivalent code actually in the sdk so i don't have to copy/paste or ref the fabric-cli sample?

nyet (Mon, 22 Oct 2018 21:10:05 GMT):
Hello everyone. Noob here, trying to migrate some of my sample code from HLF 1.1 to 1.2, and I am having problems with locating peer endpoints. The old `InstantiateCC()` worked fine without `resmgt.WithPeers()` but it doesn't seem to work against 1.2. I see that the sample `fabric-cli` code calls `WithPeers()` but it goes through quite a bit of trouble in `action.Initialize()` to compose a peer list based on `EndpointConfig()`. Is all of that rigamarole strictly required? If so, is there already equivalent code actually in the sdk so i don't have to copy/paste or ref the fabric-cli sample?

nyet (Mon, 22 Oct 2018 23:57:16 GMT):
``` failed to instantiate the chaincode: error registering for TxStatus event: no peers to connect to ```

SMiskey (Tue, 23 Oct 2018 00:22:06 GMT):
Has joined the channel.

Baha-sk (Tue, 23 Oct 2018 15:40:43 GMT):
@nyet this example of the integration test does not use `WithPeers()`: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/base_test_setup.go#L314 ... make sure your peers (at least anchor peer for each org) are defined in your config.yaml as in https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L332

nyet (Tue, 23 Oct 2018 18:20:11 GMT):
@baha-sk they are

nyet (Tue, 23 Oct 2018 18:21:29 GMT):
should it rely on entityMatchers or talk directly to localhost (entityMatchers maps my peers to localhost)

nyet (Tue, 23 Oct 2018 18:28:12 GMT):
They are working, but the registering of the TxStatus event is not

nyet (Tue, 23 Oct 2018 18:33:34 GMT):
Turning on debugging, i see ```Excluding peer [localhost:7051] since it is not configured as an event source```

nyet (Tue, 23 Oct 2018 18:33:34 GMT):
Turning on debugging, i see ``` [fabsdk/fab] 2018/10/23 18:39:54 UTC - endpoint.(*DiscoveryWrapper).GetPeers -> DEBU Channel peer config for [localhost:8051]: &fab.ChannelPeer{PeerChannelConfig:fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}, NetworkPeer:fab.NetworkPeer{PeerConfig:fab.PeerConfig{URL:"localhost:8051", GRPCOptions:map[string]interface {}{"keep-alive-permit":false, "fail-fast":false, "allow-insecure":false, "ssl-target-name-override":"peer1.org1.hf.blockdaemon.io", "keep-alive-time":"0Excluding peer [localhost:7051] since it is not configured as an event source```

nyet (Tue, 23 Oct 2018 18:33:34 GMT):
Turning on debugging, i see ```endpoint.(*DiscoveryWrapper).GetPeers -> DEBU Channel peer config for [localhost:8051]: &fab.ChannelPeer{PeerChannelConfig:fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}, NetworkPeer:fab.NetworkPeer{PeerConfig:fab.PeerConfig{URL:"localhost:8051", GRPCOptions:map[string]interface {}{"keep-alive-permit":false, "fail-fast":false, "allow-insecure":false, "ssl-target-name-override":"peer1.org1.hf.blockdaemon.io", "keep-alive-time":"0 endpoint.(*DiscoveryWrapper).GetPeers ->Excluding peer [localhost:7051] since it is not configured as an event source```

nyet (Tue, 23 Oct 2018 18:37:15 GMT):
I have tried setting `eventSource: true` in both `peers` and `entityMatchers`

nyet (Tue, 23 Oct 2018 18:47:42 GMT):
note that in the debug log, we see `EventSource:false`

nyet (Tue, 23 Oct 2018 18:48:22 GMT):
in fact, all of those should be true (endorsingpeer, chaincodequery, ledgerquery, etc)

nyet (Tue, 23 Oct 2018 18:51:17 GMT):
ah it looks like it has to be in the channels->(org)->peers section, even though the comment says it is optoinal: ``` # [Optional]. will this peer be the target of the SDK's listener registration? All peers can # produce events but the app typically only needs to connect to one to listen to events. # Default: true eventSource: true ```

Baha-sk (Tue, 23 Oct 2018 19:39:41 GMT):
@nyet, eventSource being `[Optional]` means it doesn't need to be specified for all the channel peers (if the client doesn't need to listen to events from all peers).. did it work?

nyet (Tue, 23 Oct 2018 19:40:16 GMT):
yes. I should have said the note about "default: true:" is wrong

Baha-sk (Tue, 23 Oct 2018 19:41:23 GMT):
also `channels/peers` must match the `peers` list

Baha-sk (Tue, 23 Oct 2018 19:41:31 GMT):
oh I see

Baha-sk (Tue, 23 Oct 2018 19:42:01 GMT):
yeah.. I guess the comment can be changed if that's the case

nyet (Tue, 23 Oct 2018 19:42:18 GMT):
Now, I am trying to do the same thing with `SaveChannelRequest()` and `JoinChannel()` (without `WithOrdererEndpoint`).. but that doesn't seem to work either. Is `WithOrdererEndpoint()` also required or can the orderer be determined from `config.yaml`?

Baha-sk (Tue, 23 Oct 2018 19:43:19 GMT):
you don't need to use `WithOrdererEndpoint` or `WithOrdererEndpoint()` if they're all set in `config.yaml`

Baha-sk (Tue, 23 Oct 2018 19:44:03 GMT):
you said you were using `entitymatchers` ?

nyet (Tue, 23 Oct 2018 19:44:07 GMT):
yes

Baha-sk (Tue, 23 Oct 2018 19:44:53 GMT):
do you mind sharing your config.yaml?

nyet (Tue, 23 Oct 2018 19:45:13 GMT):
yep hold

nyet (Tue, 23 Oct 2018 19:45:38 GMT):
its stripped down because I am building templates so it is missing all the comments. i only want to include what the bare minimum is

Baha-sk (Tue, 23 Oct 2018 19:46:32 GMT):
eqtitymatchers are useful if you want to map peers urls with different dns names than the ones defined under peer generally

nyet (Tue, 23 Oct 2018 19:47:08 GMT):
https://pastebin.com/evCfnBbT

nyet (Tue, 23 Oct 2018 19:47:21 GMT):
yea i have stuff in docker so all the peers appear via localhost

nyet (Tue, 23 Oct 2018 19:47:26 GMT):
(for this POC)

Baha-sk (Tue, 23 Oct 2018 19:49:06 GMT):
actually fyi https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml is the bare minimum (you can even remove certificateAuthorities section if you don't want to interact with Fabric CA).. Normally you don't need entityMatchers also..

Baha-sk (Tue, 23 Oct 2018 19:49:15 GMT):
looking into your config..

Baha-sk (Tue, 23 Oct 2018 19:53:00 GMT):
can you comment out `entityMatchers` in the config and add these addresses to your /etc/hostsfile: `127.0.0.1 peer0.org1.hf.blockdaemon.io peer1.org1.hf.blockdaemon.io orderer0.hf.blockdaemon.io`

Baha-sk (Tue, 23 Oct 2018 19:53:17 GMT):
i'mi assuming you're running all your network locally, right?

nyet (Tue, 23 Oct 2018 19:53:27 GMT):
its on a vm somehwere

nyet (Tue, 23 Oct 2018 19:53:38 GMT):
i'd have to set up ports etc

Baha-sk (Tue, 23 Oct 2018 19:53:48 GMT):
but on localhost?

nyet (Tue, 23 Oct 2018 19:53:51 GMT):
eerr just set them in `config.yaml`

Baha-sk (Tue, 23 Oct 2018 19:54:18 GMT):
usually your docker-compose.yaml will set the ports for you..

nyet (Tue, 23 Oct 2018 19:54:21 GMT):
no i mean

nyet (Tue, 23 Oct 2018 19:54:30 GMT):
i have to put the ports in `config.yaml`

Baha-sk (Tue, 23 Oct 2018 19:56:00 GMT):
if you notice the sdk config e2e example, the peers/orderers have the url set in them... https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L335 is this what you mean?

nyet (Tue, 23 Oct 2018 19:56:31 GMT):
yes id' have to set the ports via the rul

nyet (Tue, 23 Oct 2018 19:56:31 GMT):
yes id' have to set the ports via the url. Mine do not becausei use matcher

Baha-sk (Tue, 23 Oct 2018 19:57:28 GMT):
yes, that's fine.. but your `entityMatcher` section entails your peers/orderer are running locally on your machine

nyet (Tue, 23 Oct 2018 19:57:35 GMT):
nope does not work

nyet (Tue, 23 Oct 2018 19:57:47 GMT):
```Unable to create and join channel: failed to save channel: failed to find orderer for request: orderer not found: no orderers found ```

nyet (Tue, 23 Oct 2018 19:57:58 GMT):
let me turn on debuggign

Baha-sk (Tue, 23 Oct 2018 19:58:23 GMT):
is your orderer up and running?

nyet (Tue, 23 Oct 2018 19:58:42 GMT):
```[fabsdk/fab] 2018/10/23 19:58:14 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU orderers are: map[orderer0.hf.blockdaemon.io:{URL:orderer0.hf.blockdaemon.io:7050 GRPCOptions:map[ssl-target-name-override:orderer0.hf.blockdaemon.io] TLSCACerts:{Path:/home/nyet/go/src/github.com/Blockdaemon/hlf-service-network/crypto-config/ordererOrganizations/hf.blockdaemon.io/tlsca/tlsca.hf.blockdaemon.io-cert.pem Pem: bytes:[]}}] ```

nyet (Tue, 23 Oct 2018 19:58:43 GMT):
yes

nyet (Tue, 23 Oct 2018 19:58:51 GMT):
if i use WithEndpointConfig() it works

nyet (Tue, 23 Oct 2018 19:58:51 GMT):
if i use `WithOrdererEndpoint()` it works

nyet (Tue, 23 Oct 2018 19:59:01 GMT):
err OrdererEndpoint

Baha-sk (Tue, 23 Oct 2018 20:00:42 GMT):
not sure what went wrong.. but I guess if it works using `WithOrdererEndpoint()` then it's fine I guess

Baha-sk (Tue, 23 Oct 2018 20:02:20 GMT):
you can also enable debug logging on the orderer and view the docker logs on the orderer when you start up your client...

nyet (Tue, 23 Oct 2018 20:03:05 GMT):
its not even hitting the orderer

Baha-sk (Tue, 23 Oct 2018 20:03:30 GMT):
then it could be the orderer is refusing the client connection..

nyet (Tue, 23 Oct 2018 20:03:37 GMT):
no i dont see any network traffic

nyet (Tue, 23 Oct 2018 20:04:31 GMT):
oh wait

nyet (Tue, 23 Oct 2018 20:04:45 GMT):
i am missing channels//orderers:

nyet (Tue, 23 Oct 2018 20:04:53 GMT):
that must be whats wrong

nyet (Tue, 23 Oct 2018 20:05:22 GMT):
but the comment says ``` # deprecated: not recommended, to override any orderer configuration items, entity matchers should be used. # orderers: # - orderer.example.com ```

nyet (Tue, 23 Oct 2018 20:05:27 GMT):
hmm

nyet (Tue, 23 Oct 2018 20:05:43 GMT):
oh tahts just for configuration

Baha-sk (Tue, 23 Oct 2018 20:07:09 GMT):
are you sure this is the correct patch to the tlsca cert? `/home/nyet/go/src/github.com/Blockdaemon/hlf-service-network/crypto-config/ordererOrganizations/hf.blockdaemon.io/tlsca/tlsca.hf.blockdaemon.io-cert.pem`

Baha-sk (Tue, 23 Oct 2018 20:07:09 GMT):
are you sure this is the correct path to the tlsca cert? `/home/nyet/go/src/github.com/Blockdaemon/hlf-service-network/crypto-config/ordererOrganizations/hf.blockdaemon.io/tlsca/tlsca.hf.blockdaemon.io-cert.pem`

nyet (Tue, 23 Oct 2018 20:07:20 GMT):
no i was just missing the section above

nyet (Tue, 23 Oct 2018 20:07:33 GMT):
channels:/:/orderers:

nyet (Tue, 23 Oct 2018 20:10:17 GMT):
buht

Baha-sk (Tue, 23 Oct 2018 20:10:19 GMT):
Technically you should not specify the orderer section under channels..

nyet (Tue, 23 Oct 2018 20:10:22 GMT):
yea

nyet (Tue, 23 Oct 2018 20:10:24 GMT):
hmm

nyet (Tue, 23 Oct 2018 20:10:28 GMT):
i see that

nyet (Tue, 23 Oct 2018 20:10:34 GMT):
``` [fabsdk/fab] 2018/10/23 20:09:59 UTC - fab.detectDeprecatedNetworkConfig -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration```

nyet (Tue, 23 Oct 2018 20:11:01 GMT):
how do i specify an orderer to use in Matchers

Baha-sk (Tue, 23 Oct 2018 20:11:59 GMT):
you don't need to use matchers if you have specified the url under the `orderers`

Baha-sk (Tue, 23 Oct 2018 20:12:51 GMT):
and you should not be specifying this section in the config: channels:/:/orderers

nyet (Tue, 23 Oct 2018 20:12:51 GMT):
specifying the url in orderers does nothing

nyet (Tue, 23 Oct 2018 20:14:27 GMT):
Matching just remaps the specified orderer. The one in `orderers:` does nothing. the one in `channels:/:/orderers:` works but i'm not supposed to use it

Baha-sk (Tue, 23 Oct 2018 20:15:17 GMT):
orderer matcher is commented out here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L477

Baha-sk (Tue, 23 Oct 2018 20:16:02 GMT):
you can try to add one and try ..

nyet (Tue, 23 Oct 2018 20:16:43 GMT):
yea nothing works unless I specify one in channels, or via WithOrdererEndpoint()

nyet (Tue, 23 Oct 2018 20:16:52 GMT):
with or without matcher

nyet (Tue, 23 Oct 2018 20:16:55 GMT):
i have stuff in localhost too

nyet (Tue, 23 Oct 2018 20:16:58 GMT):
eerr

nyet (Tue, 23 Oct 2018 20:17:02 GMT):
/etc/hosts

Baha-sk (Tue, 23 Oct 2018 20:17:56 GMT):
this is for `resMgmt.InstantiateCC() ?

Baha-sk (Tue, 23 Oct 2018 20:17:56 GMT):
this is for `resMgmt.InstantiateCC()` ?

nyet (Tue, 23 Oct 2018 20:18:05 GMT):
no this is for Save/Join channel

nyet (Tue, 23 Oct 2018 20:18:25 GMT):
`txID, err := setup.resClient.SaveChannel(req, resmgmt.WithOrdererEndpoint(setup.OrdererID))`

nyet (Tue, 23 Oct 2018 20:18:25 GMT):
`txID, err := setup.resClient.SaveChannel(req, resmgmt.WithOrdererEndpoint(setup.OrdererID))

nyet (Tue, 23 Oct 2018 20:18:25 GMT):
`txID, err := setup.resClient.SaveChannel(req, resmgmt.WithOrdererEndpoint(setup.OrdererID))`

nyet (Tue, 23 Oct 2018 20:18:25 GMT):
`setup.resClient.SaveChannel(req, resmgmt.WithOrdererEndpoint(setup.OrdererID))`

nyet (Tue, 23 Oct 2018 20:18:34 GMT):
`setup.resClient.JoinChannel(setup.ChannelID, resmgmt.WithRetry(retry.DefaultResMgmtOpts), resmgmt.WithOrdererEndpoint(setup.OrdererID))`

Baha-sk (Tue, 23 Oct 2018 20:20:08 GMT):
the e2e test is using WithOrdererEndpoint() as well: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/base_test_setup.go#L236

nyet (Tue, 23 Oct 2018 20:20:22 GMT):
Yea i think you HAVE to specify orderer

nyet (Tue, 23 Oct 2018 20:20:27 GMT):
the client can't know

Baha-sk (Tue, 23 Oct 2018 20:20:34 GMT):
so it's fine, just pass it when saving the channel

nyet (Tue, 23 Oct 2018 20:21:31 GMT):
yea no big deal was hoping to avoid having to have it in code, was hoping to be able to specify it in config.yaml but i can see that if the channel doesn't exist yet, the client can't know what orderer to use yet

Baha-sk (Tue, 23 Oct 2018 20:23:07 GMT):
that's right

nyet (Tue, 23 Oct 2018 20:25:04 GMT):
Anyway thanks, I think that resolves all my issues!

nyet (Tue, 23 Oct 2018 20:25:12 GMT):
Thank you for your time

nyet (Tue, 23 Oct 2018 20:25:25 GMT):
(might want to change that comment about defaults though above)

Baha-sk (Tue, 23 Oct 2018 20:25:30 GMT):
:thumbsup: you're welcome

nyet (Tue, 23 Oct 2018 20:25:32 GMT):
in the various sample yamls

nyet (Tue, 23 Oct 2018 20:50:21 GMT):
Are there plans to put `test/integration/utils.go` into the main sdk? There are some very handy things in there

nyet (Tue, 23 Oct 2018 20:53:23 GMT):
e.g. JoinPeersToChannel

nyet (Tue, 23 Oct 2018 20:54:52 GMT):
If i call JoinChannel() wihtout specificing peers, will it only join the one i'm talking to?

jvsclp (Wed, 24 Oct 2018 14:26:59 GMT):
I've looked over the logs for https://gerrit.hyperledger.org/r/#/c/27004/ but I can't find a reason why the s390x build is failing. May I get a second opinion, please? https://gerrit.hyperledger.org/r/#/c/27073/ is also ready for a non-author code review.

Chandoo (Wed, 24 Oct 2018 14:37:17 GMT):
Has joined the channel.

Baha-sk (Wed, 24 Oct 2018 15:20:13 GMT):
hmm... @jvsclp I have reverified the z build.. seems to be passing now.. but I will investigate further why it fails interminttently

jvsclp (Wed, 24 Oct 2018 15:21:48 GMT):
@Baha-sk What is the difference between a `reverify` build and a `reverify-z` build. I could not find anything on the Gerrit wiki.

jvsclp (Wed, 24 Oct 2018 15:21:48 GMT):
@Baha-sk What is the difference between a `reverify` build and a `reverify-z` build? I could not find anything on the Gerrit wiki.

Baha-sk (Wed, 24 Oct 2018 15:25:42 GMT):
`reverify` triggers both x86 and s390x builds.. reverify-z triggers s390x alone and reverify-x triggers x86 builds alone

jvsclp (Wed, 24 Oct 2018 17:02:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=iphf5idjCnDvXowGh) @Baha-sk Finally got a chance to try out your suggestion. I deleted the gometalinter binary in my gowork/bin folder, then ran `make depend` and I'm receiving some file not found errors, https://hastebin.com/ocuhodamen.sql Have you seen anything like this or did I make a mistake following your instructions?

Baha-sk (Wed, 24 Oct 2018 17:07:14 GMT):
@jvsclp never seen this before : `_linters/honnef.co': No such file or directory`

Baha-sk (Wed, 24 Oct 2018 17:10:16 GMT):
try to install gometalinter manually then.. either by following instructions in https://github.com/alecthomas/gometalinter or by looking at the `depend` target..

nyet (Wed, 24 Oct 2018 19:52:31 GMT):
@baha-sk i may dig around the sdk some and figure out why the defaults don't match the docs. I think the default should be true; is there a reason it isn't? If not, I will probably submit a PR

nyet (Wed, 24 Oct 2018 19:52:31 GMT):
@Baha-sk i may dig around the sdk some and figure out why the defaults don't match the docs. I think the default should be true; is there a reason it isn't? If not, I will probably submit a PR

nyet (Wed, 24 Oct 2018 19:52:57 GMT):
In general, i think there should be more sane defaults so config.yaml doesn't have to be so verbose

jvsclp (Wed, 24 Oct 2018 20:45:01 GMT):
@Baha-sk I tried a few different approaches to resolve the errors when running `make` in Windows with no success. I'm still getting the long list of errors: https://hastebin.com/ozadikejuc.sql 1) I deleted the `gometalinter.exe` in my `gowork/bin` directory and the `gowork/src/github.com/alecthomas` which made the `make depend` script run without error. It only seems to cause the `_linters/honnef.co': No such file or directory` error when the binary and the directory for the gometalinter both exist. 2) I ran `make` with both the latest release, `v2.0.11` of gometalinter and the `v2` which is the default in the `dependencies.sh` 3) I also upgraded from go v1.10.3 to v1.10.4, then tried the above step with no success.

Baha-sk (Wed, 24 Oct 2018 21:09:32 GMT):
@jvsclp not sure how to help in Windows as I'm using Mac

jvsclp (Wed, 24 Oct 2018 21:10:16 GMT):
That's fair.

zimabry (Thu, 25 Oct 2018 01:01:36 GMT):
Has left the channel.

cagdast (Thu, 25 Oct 2018 08:08:03 GMT):
Has joined the channel.

JOYELIN (Thu, 25 Oct 2018 08:53:47 GMT):
Has joined the channel.

vieiramanoel (Thu, 25 Oct 2018 15:13:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ZSz4aFnxhNfpicP24) @Baha-sk The thing is: when a chaincode returns an error, this line ` proposalResponse, err := p.sendProposal(ctx, request)` has a proposalResponse and doesn't have an error once proposal didn't failed, just chaincode entered in a condition that is not allowed

vieiramanoel (Thu, 25 Oct 2018 15:13:49 GMT):
It took some days due to demands at work, but i'm working back on this change now

vieiramanoel (Thu, 25 Oct 2018 15:14:03 GMT):
@troyronda what do you think?

jvsclp (Thu, 25 Oct 2018 17:47:11 GMT):
After applying the changes requested by @troyronda, I'm looking for a non-author code review of https://gerrit.hyperledger.org/r/#/c/27004/

tinywell (Fri, 26 Oct 2018 08:04:28 GMT):
when i use client.Excute() with two endpoints of 'peer0.org1.example.com' and 'peer0.org2.example.com',but the eventservice use 'peer1.org1.example.com' and i get a error 'error registering for TxStatus event: could not create client conn: could not connect to peer1.org1.example.com:7051: dialing connection timed out [peer1.org1.example.com:7051]'. why eventservice use node 'peer1.org1'? could anyone help?

Switch2Logic (Fri, 26 Oct 2018 13:20:44 GMT):
Has joined the channel.

nyet (Fri, 26 Oct 2018 15:23:51 GMT):
@tinywell I had this problem as well with two peers. Sometimes the client would connect to different peers for the tx and one for the event, unless you specifically use `resmgt.WithPeers(...)` to override the peers specified in `config.yaml`. In the case where they are different, the event is greatly delayed. However, if one peer is not reachable, it should try others.

nyet (Fri, 26 Oct 2018 15:26:08 GMT):
Which brings us to another point; is there a way to figure out which peer a tx used so it can be forcibly preferred when using eventservice for TxStatus?

nyet (Fri, 26 Oct 2018 15:40:28 GMT):
@jvsclp The comment says you removed leading slashes, but now there are double? I don't see why double forward slashes are necessary, they aren't escaped anywhere in mingw64 make as far as i know

jvsclp (Fri, 26 Oct 2018 17:14:32 GMT):
@nyet I originally removed the leading slashes, correct. That made running `bin/bash` work on Windows 10 using mingw64, otherwise with `/bin/bash` mingw attempts to convert '/bin/bash' to 'C:/MinGW/msys/1.0/bin/bash` which is not found in the docker container (see http://www.mingw.org/wiki/Posix_path_conversion). However, there was some consternation of running `bin/bash` versus `/bin/bash` and rightfully so. I found in the release notes of Known Issues with Git for Windows that using a double slash `//bin/bash` is an acceptable alternative which will avoid the path conversion (https://github.com/git-for-windows/build-extra/blob/master/ReleaseNotes.md). Running the double slash `//bin/bash` works on Windows 10 using mingw64.

jvsclp (Fri, 26 Oct 2018 17:14:32 GMT):
@nyet I originally removed the leading slashes, correct. That made running `bin/bash` work on Windows 10 using mingw64, otherwise with `/bin/bash` mingw converts '/bin/bash' to 'C:/MinGW/msys/1.0/bin/bash` which is not found in the docker container (see http://www.mingw.org/wiki/Posix_path_conversion). However, there was some consternation of running `bin/bash` versus `/bin/bash` and rightfully so. I found in the release notes of Known Issues with Git for Windows that using a double slash `//bin/bash` is an acceptable alternative which will avoid the path conversion (https://github.com/git-for-windows/build-extra/blob/master/ReleaseNotes.md). Running the double slash `//bin/bash` works on Windows 10 using mingw64.

jvsclp (Fri, 26 Oct 2018 17:14:32 GMT):
@nyet I originally removed the leading slashes, correct. That made running `bin/bash` work on Windows 10 using mingw64, otherwise with `/bin/bash` mingw converts `/bin/bash` to `C:/MinGW/msys/1.0/bin/bash` which is not found in the docker container (see http://www.mingw.org/wiki/Posix_path_conversion). However, there was some consternation of running `bin/bash` versus `/bin/bash` and rightfully so. I found in the release notes of Known Issues with Git for Windows that using a double slash `//bin/bash` is an acceptable alternative which will avoid the path conversion (https://github.com/git-for-windows/build-extra/blob/master/ReleaseNotes.md). Running the double slash `//bin/bash` works on Windows 10 using mingw64.

jvsclp (Fri, 26 Oct 2018 17:14:32 GMT):
@nyet I originally removed the leading slashes, correct. That made running `bin/bash` work on Windows 10 using mingw64, otherwise mingw converts `/bin/bash` to `C:/MinGW/msys/1.0/bin/bash` which is not found in the docker container (see http://www.mingw.org/wiki/Posix_path_conversion). However, there was some consternation of running `bin/bash` versus `/bin/bash` and rightfully so. I found in the release notes of Known Issues with Git for Windows that using a double slash `//bin/bash` is an acceptable alternative which will avoid the path conversion (https://github.com/git-for-windows/build-extra/blob/master/ReleaseNotes.md). Running the double slash `//bin/bash` works on Windows 10 using mingw64.

jvsclp (Fri, 26 Oct 2018 17:14:32 GMT):
@nyet I originally removed the leading slashes, correct. That made running `bin/bash` work on Windows 10 using mingw64, otherwise mingw converts `/bin/bash` to `C:/MinGW/msys/1.0/bin/bash` which is not found in the docker container (see http://www.mingw.org/wiki/Posix_path_conversion). However, there was some consternation of running `bin/bash` versus `/bin/bash` and rightfully so. I found in the release notes of Known Issues with Git for Windows that using a double slash, `//bin/bash`, is an acceptable alternative which will avoid the path conversion (https://github.com/git-for-windows/build-extra/blob/master/ReleaseNotes.md). Running the double slash `//bin/bash` works on Windows 10 using mingw64.

nyet (Fri, 26 Oct 2018 17:40:50 GMT):
@jvsclp that is a pretty ugly workaround :/ I wonder if cygwin is any better about it

jvsclp (Fri, 26 Oct 2018 17:53:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KeTp74hLQW4PQtGap) @nyet Cygwin is better about `/bin/bash`, but I am working using mingw64 as it's what is recommended by Hyperledger for the Windows prereqs.

jvsclp (Fri, 26 Oct 2018 17:55:36 GMT):
And `//bin/bash` works with Cygwin.

nyet (Fri, 26 Oct 2018 19:35:41 GMT):
Yea I REALLY wish they would recommend cygwin instead :/ I don't much like the mingw environment, except for native windows app dev.

Taaanos (Mon, 29 Oct 2018 13:12:43 GMT):
Hey everyone, could someone point me to the right direction to check available options for tx signing. Also, what options does the sdk provide for key sizes, algorithms etc?

Baha-sk (Mon, 29 Oct 2018 15:27:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zc4M87cRMvJbbgK6r) @vieiramanoel I think the CC should handle wrong states and return 400+ errors in this case, and always expect 200 to be as success.. this should be part of the CC logic

bandreghetti (Mon, 29 Oct 2018 18:45:09 GMT):
Hey guys, How can I install a chaincode with CouchDB indexes using the Go SDK? It seems like the `resmgmt.InstallCCRequest` does not have a `metadataPath` field...

bandreghetti (Mon, 29 Oct 2018 21:55:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=enXB88jRZSYMJcg88) Okay it seems like the Go SDK handles this the same as the CLI so index JSONs should be under `META-INF/statedb/couchdb/indexes/`

JaccobSmith (Tue, 30 Oct 2018 09:17:11 GMT):
The certificate file must be as "userid@orgname-cert.pem" !!! I really serve you guys

Mr.Reddington (Tue, 30 Oct 2018 10:05:59 GMT):
Has joined the channel.

nyet (Tue, 30 Oct 2018 22:17:25 GMT):
@Baha-sk I can't seem to figure out why the peer defaults aren't being set to true when reading `config.yaml`, got any hints?

nyet (Tue, 30 Oct 2018 22:17:25 GMT):
@Baha-sk I can't seem to figure out why the peer attributes aren't being set to default to true when reading `config.yaml`, got any hints?

nyet (Tue, 30 Oct 2018 22:25:34 GMT):
None of PeerChannelConfig seems initialized anywhere in `EndpoindConfig.defaultPeerConfig`

nyet (Tue, 30 Oct 2018 22:25:34 GMT):
None of PeerChannelConfig seems initialized anywhere in `EndpointConfig.defaultPeerConfig` or `ChannelEndpointConfig`

nyet (Tue, 30 Oct 2018 22:39:57 GMT):
I see this in `loadChannelEndpointConfig` ``` for chPeer, chPeerCfg := range chNwCfgPeers { if c.isPeerToBeIgnored(chPeer) { //filter peer to be ignored continue } chPeers[chPeer] = fab.PeerChannelConfig{ EndorsingPeer: chPeerCfg.EndorsingPeer, ChaincodeQuery: chPeerCfg.ChaincodeQuery, LedgerQuery: chPeerCfg.LedgerQuery, EventSource: chPeerCfg.EventSource, } } ``` but there are no defaults for `chPeerCfg` that I can find

nyet (Tue, 30 Oct 2018 22:56:47 GMT):
Oh. I see that `peerChannelConfigHookFunc()` initializes them but all lower case.

ranjan008 (Wed, 31 Oct 2018 10:29:38 GMT):
@troyronda is there any method where I can directly query Block with private data from the peers instead of querying it through chaincode, just like we are querying block data directly through peer.

JaccobSmith (Wed, 31 Oct 2018 10:35:42 GMT):
Has the sdk updated with Fabric 1.3 ?

JaccobSmith (Wed, 31 Oct 2018 10:36:06 GMT):
Fabric 1.3 has removed the Event service

JaccobSmith (Wed, 31 Oct 2018 10:36:14 GMT):
Eventhub

Baha-sk (Wed, 31 Oct 2018 14:19:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ivgmHm5cngfq7P6cP) @JaccobSmith yes, Go SDK supports 1.3

Baha-sk (Wed, 31 Oct 2018 14:19:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ivgmHm5cngfq7P6cP) @JaccobSmith yes, Go SDK supports Fabric 1.3

Baha-sk (Wed, 31 Oct 2018 15:09:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DM6N6e97cNgWPKazu) @nyet `chPeerCfg` are loaded from config.yaml... there are no defaults.. if you have no channel peers in the config, the code will not enter this for loop

Baha-sk (Wed, 31 Oct 2018 15:09:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DM6N6e97cNgWPKazu) @nyet `chPeerCfg` are loaded from config.yaml... there are no defaults.. if you have no channel peers in the config, the code will not enter this for loop, also if these 4 fields are not set in the channel config, EndpointConfig will set them to the default bool value (false)

Baha-sk (Wed, 31 Oct 2018 15:09:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DM6N6e97cNgWPKazu) @nyet `chPeerCfg` are loaded from config.yaml... there are no defaults.. if you have no channel peers in the config, the code will not enter this for loop, also if these 4 fields are not set in the channel config, EndpointConfig will set them to the default bool value (false) --- UPDATE: you're right, `peerChannelConfigHookFunc()` in `pkg/fab/endpointconfig.go` sets the default values to true actually

nyet (Wed, 31 Oct 2018 15:37:43 GMT):
I have changed the case to camelCase but now my fabric setup is broken so I can't test it :/

nyet (Wed, 31 Oct 2018 15:38:45 GMT):
@Baha-sk ``` diff --git a/pkg/fab/endpointconfig.go b/pkg/fab/endpointconfig.go index 7db3120d..d35ad4d4 100644 --- a/pkg/fab/endpointconfig.go +++ b/pkg/fab/endpointconfig.go @@ -1753,10 +1753,10 @@ func peerChannelConfigHookFunc() mapstructure.DecodeHookFunc { if t == reflect.TypeOf(PeerChannelConfig{}) { dataMap, ok := data.(map[string]interface{}) if ok { - setDefault(dataMap, "endorsingpeer", true) - setDefault(dataMap, "chaincodequery", true) - setDefault(dataMap, "ledgerquery", true) - setDefault(dataMap, "eventsource", true) + setDefault(dataMap, "endorsingPeer", true) + setDefault(dataMap, "chaincodeQuery", true) + setDefault(dataMap, "ledgerQuery", true) + setDefault(dataMap, "eventSource", true) return dataMap, nil } ```

Baha-sk (Wed, 31 Oct 2018 15:40:47 GMT):
@nyet the lookups are using viper behind the scenes... so all keys are automatically converted to lowercase by the tool, this is why it's failing.. I suggest we keep lowercase keys

nyet (Wed, 31 Oct 2018 15:40:50 GMT):
I made a few other changes in `pkg/core/cryptosuite/cryptoconfig.go` to set defaults for security

nyet (Wed, 31 Oct 2018 15:41:06 GMT):
(again, to minimize the stuff needed in `config.yaml`)

nyet (Wed, 31 Oct 2018 15:41:32 GMT):
I will submit PRs once i have a functioning fabric setup again and test them properly

Baha-sk (Wed, 31 Oct 2018 15:41:55 GMT):
@sudeshrshetty @troyronda ^^^

nyet (Wed, 31 Oct 2018 15:42:03 GMT):
@baha-sk that would be fine but it doesn't work with all lower case :/

nyet (Wed, 31 Oct 2018 15:42:03 GMT):
@Baha-sk that would be fine but it doesn't work with all lower case :/

nyet (Wed, 31 Oct 2018 15:42:16 GMT):
I have to set those vars in `config.yaml` or nothing works

nyet (Wed, 31 Oct 2018 15:42:56 GMT):
I will have more information once i get my fabric setup working again, for some reason cc instantiation is failing with a timeout

nyet (Wed, 31 Oct 2018 15:43:15 GMT):
it was working before i updated ... something, not clear what is different from the last time i was doing this

Baha-sk (Wed, 31 Oct 2018 15:44:30 GMT):
are you talking about x86 build failing the integration tests with timeout?

nyet (Wed, 31 Oct 2018 15:44:37 GMT):
Nope, my own test setup

Baha-sk (Wed, 31 Oct 2018 15:44:45 GMT):
locally

Baha-sk (Wed, 31 Oct 2018 15:44:48 GMT):
?

nyet (Wed, 31 Oct 2018 15:44:48 GMT):
yeah

Baha-sk (Wed, 31 Oct 2018 15:44:57 GMT):
unit test or integration test?

nyet (Wed, 31 Oct 2018 15:45:26 GMT):
a POC network using my own tool that uses the go sdk

Baha-sk (Wed, 31 Oct 2018 15:45:36 GMT):
oh I see

Baha-sk (Wed, 31 Oct 2018 15:46:10 GMT):
try to increase the timeout when querying the peers maybe?

nyet (Wed, 31 Oct 2018 15:46:15 GMT):
yea i did

nyet (Wed, 31 Oct 2018 15:46:25 GMT):
its definitley not a timeout issue

nyet (Wed, 31 Oct 2018 15:46:46 GMT):
hang on maybe i can get you some useful logs if you think you can help :) that would be really really helpful

nyet (Wed, 31 Oct 2018 15:46:49 GMT):
again, this setup was working before

nyet (Wed, 31 Oct 2018 15:47:01 GMT):
and i rolled back the sdk to master without my changes, obviously

Baha-sk (Wed, 31 Oct 2018 15:47:02 GMT):
weird..

Baha-sk (Wed, 31 Oct 2018 15:47:58 GMT):
could be your docker instance needs more resources? if running on a Mac, you can increase the RAM/core CPUs used by Docker

nyet (Wed, 31 Oct 2018 15:48:08 GMT):
its on a pretty beefy vm

Baha-sk (Wed, 31 Oct 2018 15:48:19 GMT):
weird..

nyet (Wed, 31 Oct 2018 15:48:32 GMT):
lemme fire it back up while you're here

nyet (Wed, 31 Oct 2018 15:48:33 GMT):
sec

nyet (Wed, 31 Oct 2018 15:49:35 GMT):
```peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:49:03.524 UTC [blockdaemon-peer0.org1.hlf.blockdaemon.io-hlf-database-app-0] func2 -> INFO 363 ########### DatabaseChaincode Init ########### peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:49:03.525 UTC [chaincode] handleMessage -> DEBU 364 [7fbf56ab] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:49:03.525 UTC [chaincode] Notify -> DEBU 365 notifier Txid:7fbf56ab9c36e0a42c6b8a97a5c1692da288a02b67ac4b5cd523aa0a5e777473, channelID: does not exist for handleing message COMPLETED ```

nyet (Wed, 31 Oct 2018 15:49:48 GMT):
thats on the peer

nyet (Wed, 31 Oct 2018 15:49:56 GMT):
on the client ```Unable to instantiate the chaincode: failed to instantiate the chaincode: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Chaincode status Code: (500) UNKNOWN. Description: failed to execute transaction 7fbf56ab9c36e0a42c6b8a97a5c1692da288a02b67ac4b5cd523aa0a5e777473: error sending: timeout expired while executing transaction ```

Baha-sk (Wed, 31 Oct 2018 15:50:54 GMT):
`channelID: does not exist for handleing message COMPLETED` doesn't seem right on the peer

nyet (Wed, 31 Oct 2018 15:50:58 GMT):
yep

nyet (Wed, 31 Oct 2018 15:51:02 GMT):
thats what i cant figure out

nyet (Wed, 31 Oct 2018 15:51:07 GMT):
i can't figure out what changed

Baha-sk (Wed, 31 Oct 2018 15:51:31 GMT):
are you using Fabric 1.2 peers? or 1.3?

nyet (Wed, 31 Oct 2018 15:51:34 GMT):
1.2

nyet (Wed, 31 Oct 2018 15:51:45 GMT):
` hyperledger/fabric-peer:amd64-1.2.0 `

nyet (Wed, 31 Oct 2018 15:51:48 GMT):
should i move to 1.3?

nyet (Wed, 31 Oct 2018 15:51:50 GMT):
i can try it

Baha-sk (Wed, 31 Oct 2018 15:51:52 GMT):
try to use 1.3?

nyet (Wed, 31 Oct 2018 15:51:54 GMT):
yea ok hold

Baha-sk (Wed, 31 Oct 2018 15:52:03 GMT):
could be worth a try..

nyet (Wed, 31 Oct 2018 15:52:17 GMT):
is it considered stable enough for real use now?

Baha-sk (Wed, 31 Oct 2018 15:52:54 GMT):
the SDK supports both 1.2 and 1.3

nyet (Wed, 31 Oct 2018 15:52:59 GMT):
okay

nyet (Wed, 31 Oct 2018 15:53:08 GMT):
btw im setting up the genesis block in its own channel

nyet (Wed, 31 Oct 2018 15:53:18 GMT):
(we had to do that starting with 1.2?)

Baha-sk (Wed, 31 Oct 2018 15:53:32 GMT):
you can use 1.3, in fact the Go SDK integration tests are executed against different builds for Fabric

nyet (Wed, 31 Oct 2018 15:54:27 GMT):
```peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:54:04.336 UTC [chaincode] Execute -> DEBU 2f8 Exit peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:54:04.336 UTC [endorser] callChaincode -> INFO 2f9 [blockdaemon][427d29b7] Exit chaincode: name:"lscc" (30501ms) peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:54:04.336 UTC [endorser] SimulateProposal -> ERRO 2fa [blockdaemon][427d29b7] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction ```

nyet (Wed, 31 Oct 2018 15:57:41 GMT):
looking back

nyet (Wed, 31 Oct 2018 15:57:46 GMT):
way way back have the same error

nyet (Wed, 31 Oct 2018 15:57:48 GMT):
hold

nyet (Wed, 31 Oct 2018 15:59:28 GMT):
```peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:53:34.338 UTC [chaincode] handleMessage -> DEBU 2c4 [427d29b7] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:53:34.338 UTC [chaincode] Notify -> DEBU 2c5 notifier Txid:427d29b76204ff4eb561f9718cb0848c0a5db0c97341e6a60be2fe54ecb3800b, channelID: does not exist for handlingsage COMPLETED peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:53:34.338 UTC [blockdaemon-peer0.org1.hlf.blockdaemon.io-hlf-database-app-0] func2 -> INFO 2c6 ########### DatabaseChaincode Init ########### peer1.org1.hlf.blockdaemon.io | 2018-10-31 15:53:34.635 UTC [gossip/election] waitForMembershipStabilization -> DEBU 288 [108 176 157 97 218 71 33 139 82 240 208 8 218 9 235 178 203 147 247 178 59 199 75 80 18 211 81 216 245 48 209] : Exiting, peers found 0 ```

Baha-sk (Wed, 31 Oct 2018 16:00:10 GMT):
why is `channelID` value empty in the log?

nyet (Wed, 31 Oct 2018 16:00:16 GMT):
so i think the chaincode instantiation complete message is disappearing

nyet (Wed, 31 Oct 2018 16:00:17 GMT):
yea

nyet (Wed, 31 Oct 2018 16:00:20 GMT):
exactly!!

nyet (Wed, 31 Oct 2018 16:00:59 GMT):
"handlingsage"

nyet (Wed, 31 Oct 2018 16:01:16 GMT):
there is some overlap in the messages not sure if that is docker ...

nyet (Wed, 31 Oct 2018 16:01:56 GMT):
oh nvm thta is my termianl

Baha-sk (Wed, 31 Oct 2018 16:01:59 GMT):
the four log entries are for `peer0.org1.hlf.blockdaemon.io` peer... so they should be in orderer

nyet (Wed, 31 Oct 2018 16:02:07 GMT):
```peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:53:34.338 UTC [chaincode] Notify -> DEBU 2c5 notifier Txid:427d29b76204ff4eb561f9718cb0848c0a5db0c97341e6a60be2fe54ecb3800b, channelID: does not exist for handling message COMPLETED peer0.org1.hlf.blockdaemon.io | 2018-10-31 15:53:34.338 UTC [blockdaemon-peer0.org1.hlf.blockdaemon.io-hlf-database-app-0] func2 -> INFO 2c6 ########### DatabaseChaincode Init ########### ```

nyet (Wed, 31 Oct 2018 16:02:16 GMT):
but yea channelid is empty

Baha-sk (Wed, 31 Oct 2018 16:03:20 GMT):
not sure how you created the channel.. you might wanna double check how that's done in your code.. there are examples in the go SDK's integration tests ..

nyet (Wed, 31 Oct 2018 16:03:32 GMT):
yea i followed them

nyet (Wed, 31 Oct 2018 16:03:39 GMT):
and like i said it was working before

nyet (Wed, 31 Oct 2018 16:04:25 GMT):
create/join and ccinstall are working

nyet (Wed, 31 Oct 2018 16:04:28 GMT):
just not ccintantiate

nyet (Wed, 31 Oct 2018 16:04:56 GMT):
``` func (setup *FabricSetup) InstantiateCC() error { // Set up chaincode policy ccPolicy := cauthdsl.SignedByAnyMember([]string{setup.OrgName + ".hlf." + setup.Domain}) req := resmgmt.InstantiateCCRequest{ Name: setup.ChainCodeID, Path: setup.ChaincodeGoPath, Version: "0", Args: [][]byte{[]byte("init")}, Policy: ccPolicy, //CollConfig: collConfig } resp, err := setup.resClient.InstantiateCC(setup.ChannelID, req) if err != nil || resp.TransactionID == "" { // Seriously, hyperledger? if strings.Contains(err.Error(), "chaincode exists "+setup.ChainCodeID) { fmt.Println("Chaincode already instantiated") return nil } if strings.Contains(err.Error(), "chaincode with name '"+setup.ChainCodeID+"' already exists") { fmt.Println("Chaincode already instantiated") return nil } return errors.WithMessage(err, "failed to instantiate the chaincode") } fmt.Println("Chaincode instantiated") return nil } ```

Baha-sk (Wed, 31 Oct 2018 16:05:03 GMT):
did you try a channel query?

nyet (Wed, 31 Oct 2018 16:05:18 GMT):
i can do a "peer channel list" and it works

nyet (Wed, 31 Oct 2018 16:05:25 GMT):
hold lemme do that

nyet (Wed, 31 Oct 2018 16:05:33 GMT):
or you mean from the client?

Baha-sk (Wed, 31 Oct 2018 16:05:53 GMT):
yes from the client

nyet (Wed, 31 Oct 2018 16:06:47 GMT):
ok that will take a bit of added code but ill try

nyet (Wed, 31 Oct 2018 16:06:55 GMT):
OR alternatley i can try the sample cli maybe?

nyet (Wed, 31 Oct 2018 16:07:12 GMT):
just to narrow it down between my code and my fabric set up

nyet (Wed, 31 Oct 2018 16:07:29 GMT):
let me dork around, ill try to ping you later when i have useful information for you

nyet (Wed, 31 Oct 2018 16:07:31 GMT):
thanks!

Baha-sk (Wed, 31 Oct 2018 16:07:37 GMT):
sure, you can try the cli ...

Baha-sk (Wed, 31 Oct 2018 16:07:46 GMT):
good luck!

nyet (Wed, 31 Oct 2018 16:07:55 GMT):
appreciate your time!

Baha-sk (Wed, 31 Oct 2018 16:08:20 GMT):
no problem

nyet (Wed, 31 Oct 2018 16:12:05 GMT):
btw i'm using couch and im seeing this, is it normal? ```couchdb0.org1.hlf.blockdaemon.io | [notice] 2018-10-31T16:09:42.646605Z nonode@nohost <0.22312.0> 72ae9a53cb couchdb0.org1.hlf.blockdaemon.io:5984 172.28.0.7 cdbadmin GET /blockdaemon_lscc/hlf-database-app?attachments=true 404 ok 9 peer0.org1.hlf.blockdaemon.io | 2018-10-31 16:09:42.644 UTC [couchdb] handleRequest -> DEBU 65a Error handling CouchDB request. Error:not_found, Status Code:404, Reason:missing ```

nyet (Wed, 31 Oct 2018 16:12:39 GMT):
also i'm seeing the right notify ```peer0.org1.hlf.blockdaemon.io | 2018-10-31 16:09:42.645 UTC [chaincode] Notify -> DEBU 663 [9203c6c4] notifying Txid:9203c6c44c9793112027aaca73e14cc63bb5590ef05c7b2c54c5fe19a987f665, channelID:blockdaemon```

nyet (Wed, 31 Oct 2018 16:17:59 GMT):
nevermind change to leveldb, same issue, not related to couch

jvsclp (Wed, 31 Oct 2018 17:41:14 GMT):
bump for a code review: https://gerrit.hyperledger.org/r/#/c/27004/

noursaadallah (Wed, 31 Oct 2018 17:48:19 GMT):
Hello! i'm trying the sdk with head at 614551a752802488988921a730b172dada7def1d and the make command fails! I have a lot of output but the most relevant message is i suppose : Failed to get client TLS config: Certificate provided has expired Does anyone know how to bypass this as i don't want to change the commit i'm using? Thank you in advance!

Baha-sk (Wed, 31 Oct 2018 17:54:45 GMT):
@noursaadallah a lot has changed since this commit (including support for Fabric 1.3) you might wanna update to the latest revision

Baha-sk (Wed, 31 Oct 2018 17:55:38 GMT):
@noursaadallah another option is regenerate the crypto-gen directory locally..

noursaadallah (Wed, 31 Oct 2018 18:06:07 GMT):
@Baha-sk thank you for your answer! and how can i regenerate the crypto-gen directory please?

Baha-sk (Wed, 31 Oct 2018 18:11:05 GMT):
it's a command under Fabric.. look it up in the Fabric's makefile to generate the tool, then you can run it for the crypto-gen folder that holds your users credentials

Baha-sk (Wed, 31 Oct 2018 18:11:05 GMT):
it's a command under Fabric.. look it up in the Fabric's makefile to generate the tool, then you can run it for the crypto-config folder that holds your users credentials

noursaadallah (Wed, 31 Oct 2018 18:13:22 GMT):
Ok thank you for your help!

bandreghetti (Wed, 31 Oct 2018 18:16:16 GMT):
Hey guys, When querying CouchDB using the stub.QueryResultWithPagination method, is there a way to get how many pages there are in total? Also, is there a way to ask for a specific page instead of iterating with bookmarks? I feel like this is not very efficient...

dave.enyeart (Wed, 31 Oct 2018 18:18:22 GMT):
sorry, there is no such support in leveldb or couchdb to efficiently get that information

bandreghetti (Wed, 31 Oct 2018 18:41:29 GMT):
Oh, thank you then "/ But will it be implemented eventually?

bandreghetti (Wed, 31 Oct 2018 18:41:29 GMT):
Oh, thank you then "/ Will it be implemented eventually, though?

JaccobSmith (Thu, 01 Nov 2018 02:14:53 GMT):
help,help

JaccobSmith (Thu, 01 Nov 2018 02:16:22 GMT):
when I use the sdk to invoke a chaincode ,the orderer node produced an error: received bogusgreeting from client: \"\\x16.....................

JaccobSmith (Thu, 01 Nov 2018 02:21:15 GMT):
Oh, I found it, it's because of my config, I use the "127.0.0.1:7050" as the orderer's url, then I didn't change the config item "allow-insecure" to true

JaccobSmith (Thu, 01 Nov 2018 02:21:51 GMT):
Or ,I can add a "http://" to the front of the orderer's url

JaccobSmith (Thu, 01 Nov 2018 02:27:24 GMT):
Another question , when the endorsering process is successful,but the orderer fails committing the block , Is there some way to judge this with the SDK? Actually, when I use the SDK to send the proposal to the peer and get the endorsered results ,the SDK seems to send the results to the orderer without waitting the reeponse of the orderer

habpygo (Thu, 01 Nov 2018 12:27:33 GMT):
Hey guys, when running the integration test I get the following error messages. Any ideal ``` --- FAIL: TestFabricSelection (605.59s) integration-tests_1 | --- FAIL: TestFabricSelection/Policy:_Org1_and_Org2 (175.42s) integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org1.example.com:7051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org2.example.com:8051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:230: Found matching endorser group: []string{"peer0.org1.example.com:7051", "peer0.org2.example.com:8051"} integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org1.example.com:7051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org2.example.com:8051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:230: Found matching endorser group: []string{"peer0.org1.example.com:7051", "peer0.org2.example.com:8051"} integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org2.example.com:8051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org1.example.com:7051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:230: Found matching endorser group: []string{"peer0.org1.example.com:7051", "peer0.org2.example.com:8051"} integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org1.example.com:7051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org2.example.com:8051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:230: Found matching endorser group: []string{"peer0.org1.example.com:7051", "peer0.org2.example.com:8051"} integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org1.example.com:7051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org2.example.com:8051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:230: Found matching endorser group: []string{"peer0.org1.example.com:7051", "peer0.org2.example.com:8051"} Error Trace: fabricselection_test.go:222 integrat | fabricselection_test.go:160 integratError: | Received unexpected error: integrat | Discovery status Code: (11) UNKNOWN. Description: error getting endorsers: no endorsement combination can be satisfied integratTest: | TestFabricSelection/Policy:_Org1_and_Org2 integratMessages: | error getting endorsers integration-tests_1 | FAIL integration-tests_1 | FAIL github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/common/selection 606.976s ```

habpygo (Thu, 01 Nov 2018 12:27:33 GMT):
Hey guys, when running the integration test I get the following error messages. Any idea ``` --- FAIL: TestFabricSelection (605.59s) integration-tests_1 | --- FAIL: TestFabricSelection/Policy:_Org1_and_Org2 (175.42s) integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org1.example.com:7051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org2.example.com:8051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:230: Found matching endorser group: []string{"peer0.org1.example.com:7051", "peer0.org2.example.com:8051"} integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org1.example.com:7051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org2.example.com:8051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:230: Found matching endorser group: []string{"peer0.org1.example.com:7051", "peer0.org2.example.com:8051"} integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org2.example.com:8051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org1.example.com:7051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:230: Found matching endorser group: []string{"peer0.org1.example.com:7051", "peer0.org2.example.com:8051"} integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org1.example.com:7051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org2.example.com:8051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:230: Found matching endorser group: []string{"peer0.org1.example.com:7051", "peer0.org2.example.com:8051"} integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org1.example.com:7051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:247: Checking endpoint: &{peer0.org2.example.com:8051 %!s(uint64=50)} ... integration-tests_1 | fabricselection_test.go:230: Found matching endorser group: []string{"peer0.org1.example.com:7051", "peer0.org2.example.com:8051"} Error Trace: fabricselection_test.go:222 integrat | fabricselection_test.go:160 integratError: | Received unexpected error: integrat | Discovery status Code: (11) UNKNOWN. Description: error getting endorsers: no endorsement combination can be satisfied integratTest: | TestFabricSelection/Policy:_Org1_and_Org2 integratMessages: | error getting endorsers integration-tests_1 | FAIL integration-tests_1 | FAIL github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/common/selection 606.976s ```

habpygo (Thu, 01 Nov 2018 12:27:49 GMT):
The rest is ok

habpygo (Thu, 01 Nov 2018 12:27:49 GMT):
The rest is ok NOTE: Problem solved. Forgot to properly clean containers.

oreg (Thu, 01 Nov 2018 13:30:36 GMT):
Hi, can anybody tell me how the SDK internally correlates an incoming endorsement with the associated TX proposal? I know where to find the transaction ID of the proposal and the proposal hash in the proposal response, but that's not the same. Any pointers?

Kyroy (Thu, 01 Nov 2018 15:27:58 GMT):
I use the sdk with `fabsdk.WithEndpointConfig` and `fabsdk.WithIdentityConfig`. However, the function signatures change from time to time and when I update the sdk, I would like to type check my functions. Is there a way to check if my functions still match the signatures? interfaces like the following are all private ```type peerConfig interface { PeerConfig(nameOrURL string) (*fab.PeerConfig, bool) }```

Baha-sk (Thu, 01 Nov 2018 15:59:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KeX8JRoG22RAvmZyy) @Kyroy peerConfig is not a reference interface, this is why it's not exposed. The reference interface is the original one in pkg/common/providers/fab.providers.go : ```//EndpointConfig contains endpoint network configurations type EndpointConfig interface { Timeout(TimeoutType) time.Duration OrderersConfig() []OrdererConfig OrdererConfig(nameOrURL string) (*OrdererConfig, bool) PeersConfig(org string) ([]PeerConfig, bool) PeerConfig(nameOrURL string) (*PeerConfig, bool) NetworkConfig() *NetworkConfig NetworkPeers() []NetworkPeer ChannelConfig(name string) *ChannelEndpointConfig ChannelPeers(name string) []ChannelPeer ChannelOrderers(name string) []OrdererConfig TLSCACertPool() CertPool TLSClientCerts() []tls.Certificate CryptoConfigPath() string }```

Baha-sk (Thu, 01 Nov 2018 16:00:15 GMT):
@Kyroy so your overridable config functions must match this official interface's functions instead

nyet (Thu, 01 Nov 2018 16:24:46 GMT):
@baha-sk i did the same with fabric-cli example and get the same error: ```peer0.org1.hlf.blockdaemon.io | 2018-11-01 16:24:10.627 UTC [chaincode] Notify -> DEBU 8cc notifier Txid:da217b9cd7f27251ebdb15169b90e9dea0516745c1bf63b1bebdb1a9d9d65f32, channelID: does not exist for handling message ERROR```

nyet (Thu, 01 Nov 2018 16:24:46 GMT):
@Baha-sk i did the same with fabric-cli example and get the same error: ```peer0.org1.hlf.blockdaemon.io | 2018-11-01 16:24:10.627 UTC [chaincode] Notify -> DEBU 8cc notifier Txid:da217b9cd7f27251ebdb15169b90e9dea0516745c1bf63b1bebdb1a9d9d65f32, channelID: does not exist for handling message ERROR```

nyet (Thu, 01 Nov 2018 16:25:11 GMT):
channelID is empty in `fabric/Notify()`!!

nyet (Thu, 01 Nov 2018 16:26:22 GMT):
```i$ ./fabric-cli --config config.yaml chaincode install --ccid hlf-database-app --ccp github.com/Blockdaemon/hlf-database-app/chaincode --cid blockdaemon Installing chaincode hlf-database-app on org[org1] peers: -- localhost:7051 -- localhost:8051 ...successfuly installed chaincode hlf-database-app.v0 on peer localhost:8051. ...successfuly installed chaincode hlf-database-app.v0 on peer localhost:7051. ``` ``` $ ./fabric-cli --config config.yaml chaincode instantiate --ccid hlf-database-app --ccp github.com/Blockdaemon/hlf-database-app/chaincode --cid blockdaemon [fabriccli] 2018/11/01 16:26:10 UTC - chaincode.glob..func4 -> ERRO Error while running instantiateAction: error instantiating chaincode: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Chaincode status Code: (500) UNKNOWN. Description: failed to execute transaction 911d7d513b740dd042672fad3d618f813bf80f166034f52bb2e412f39298e733: error sending: timeout expired while executing transaction ```

nyet (Thu, 01 Nov 2018 16:26:56 GMT):
``` func (h *Handler) Notify(msg *pb.ChaincodeMessage) { tctx := h.TXContexts.Get(msg.ChannelId, msg.Txid) if tctx == nil { chaincodeLogger.Debugf("notifier Txid:%s, channelID:%s does not exist for handling message %s", msg.Txid, msg.ChannelId, msg.Type) return } chaincodeLogger.Debugf("[%s] notifying Txid:%s, channelID:%s", shorttxid(msg.Txid), msg.Txid, msg.ChannelId) tctx.ResponseNotifier <- msg tctx.CloseQueryIterators() } ```

Baha-sk (Thu, 01 Nov 2018 16:34:43 GMT):
@nyet, did you create the channel with genesis block initially?

nyet (Thu, 01 Nov 2018 16:34:50 GMT):
yep

Baha-sk (Thu, 01 Nov 2018 16:35:22 GMT):
did you see in the peer logs that the channel was successfully created?

nyet (Thu, 01 Nov 2018 16:35:25 GMT):
I see a lot of couchdb 404 errors

nyet (Thu, 01 Nov 2018 16:35:27 GMT):
ya

Baha-sk (Thu, 01 Nov 2018 16:36:52 GMT):
have you cleaned up all containers? I recommend you delete all containers and retry

nyet (Thu, 01 Nov 2018 16:37:00 GMT):
```$ ./fabric-cli --config config.yaml query channels --peer localhost:7051 Channels for peer [localhost:7051] **************************************************************************************************** ***** Channels: ***** | ChannelId: blockdaemon **************************************************************************************************** ```

nyet (Thu, 01 Nov 2018 16:37:07 GMT):
yep cleaned all containers, rmi, prune etc

nyet (Thu, 01 Nov 2018 16:37:21 GMT):
i can try again though

nyet (Thu, 01 Nov 2018 16:44:20 GMT):
same thing

nyet (Thu, 01 Nov 2018 16:45:18 GMT):
here is my sequence ``` ./fabric-cli --config config.yaml channel create --cid blockdaemon --txfile blockdaemon.channel.tx ./fabric-cli --config config.yaml channel join --cid blockdaemon --orgid org1 ./fabric-cli --config config.yaml chaincode install --ccid hlf-database-app --ccp github.com/Blockdaemon/hlf-database-app/chaincode --cid blockdaemon ./fabric-cli --config config.yaml chaincode instantiate --ccid hlf-database-app --ccp github.com/Blockdaemon/hlf-database-app/chaincode --cid blockdaemon ```

nyet (Thu, 01 Nov 2018 16:49:53 GMT):
i think it has to do with config.yaml

nyet (Thu, 01 Nov 2018 16:50:23 GMT):
I tried to make a minimal ones, it appears as though most of it is not optional (seems very verbose). missing a bunch of defaults IMO

Baha-sk (Thu, 01 Nov 2018 16:55:56 GMT):
not sure if it's an SDK issue or a Fabric issue to be honest

nyet (Thu, 01 Nov 2018 16:56:22 GMT):
yea I am sorting through all of the versions of config.yaml I have and they behave ... diffedrently

Baha-sk (Thu, 01 Nov 2018 16:56:35 GMT):
you can confirm if the config is similar to the ones we have in the go sdk's integration tests

Baha-sk (Thu, 01 Nov 2018 16:57:07 GMT):
under /test/fixtures/config

nyet (Thu, 01 Nov 2018 16:57:09 GMT):
yea that one is different still from the fabric-cli test yaml

nyet (Thu, 01 Nov 2018 16:57:27 GMT):
(in fabric-samples)

nyet (Thu, 01 Nov 2018 16:57:36 GMT):
err examples

Baha-sk (Thu, 01 Nov 2018 16:58:13 GMT):
it's probably not using the same config as the go SDK one.. they're not the same

nyet (Thu, 01 Nov 2018 16:59:04 GMT):
It would be helpful if there were more defaults, or there was a top level way to adjust things

nyet (Thu, 01 Nov 2018 16:59:13 GMT):
without having to search/replace a zillion things :/

nyet (Thu, 01 Nov 2018 17:07:15 GMT):
It is bizarre that small changes in the config result in totally different behavior, with no real messages to figure out what went wrong

Kyroy (Thu, 01 Nov 2018 17:11:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=QwZXs8DDeA7MDRM2r) @Baha-sk I know, but I am just overwriting some of these methods. So I cannot check against this `interface` directly

Baha-sk (Thu, 01 Nov 2018 18:23:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zSu9s7ugG4KyX5E7K) @nyet the config_e2e.yaml in the integration tests was updated with minor changes in the last couple of months, mainly to remove the EvenHub configs (as it's not used since 1.2) and added some eventService configs for supporting block update events

Baha-sk (Thu, 01 Nov 2018 18:23:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zSu9s7ugG4KyX5E7K) @nyet the config_e2e.yaml in the integration tests was updated with minor changes in the last couple of months, mainly to remove the EvenHub configs (as it's not used since 1.2) and added some eventService configs for supporting block update events on a channel

nyet (Thu, 01 Nov 2018 18:43:11 GMT):
@baha-sk i have tracked the problem down to something in fabric where it is missing the channelID in the nofication path... but I cannot figure out why the channel id went missing between instantiate and the notify... it looks like I will have to actually do my own build of the peer binary to get some debugging ... any recommendations?

nyet (Thu, 01 Nov 2018 18:43:11 GMT):
@Baha-sk i have tracked the problem down to something in fabric where it is missing the channelID in the notification path... but I cannot figure out why the channel id went missing between instantiate and the notify... it looks like I will have to actually do my own build of the peer binary to get some debugging ... any recommendations?

Baha-sk (Thu, 01 Nov 2018 18:53:09 GMT):
@nyet, if it's a Fabric issue, then I recommend to post the issue on the Fabric channel

Baha-sk (Thu, 01 Nov 2018 18:53:09 GMT):
@nyet, if it's a Fabric issue, then I recommend to post it on the Fabric channel

Baha-sk (Thu, 01 Nov 2018 18:58:38 GMT):
@kyroy what do you mean by cannot `check` against the interface? are you doing the checking through reflection or something?

Baha-sk (Thu, 01 Nov 2018 18:58:38 GMT):
@Kyroy what do you mean by cannot `check` against the interface? are you doing the checking through reflection or something?

Baha-sk (Thu, 01 Nov 2018 18:58:38 GMT):
@Kyroy what do you mean by cannot `check` against the interface? are you doing the checking through reflection or something else?

nyet (Thu, 01 Nov 2018 20:08:39 GMT):
Sigh. Gometalinter is such a pos ```WARNING: exec: "gas": executable file not found in $PATH```

nyet (Thu, 01 Nov 2018 20:15:58 GMT):
its `gosec`, i hate all this so much

Baha-sk (Thu, 01 Nov 2018 20:17:25 GMT):
unfortunately we can't remove it

nyet (Thu, 01 Nov 2018 20:21:12 GMT):
``` installGoPkg "${repo}" "${revision}" "/cmd/gas/..." "gas"``` i think that should be gosec now

nyet (Thu, 01 Nov 2018 20:24:31 GMT):
(trying to run unit tests on my changes to the sdk)

nyet (Thu, 01 Nov 2018 20:26:32 GMT):
``` diff --git a/test/scripts/dependencies.sh b/test/scripts/dependencies.sh index 9821fb75..3405fa84 100755 --- a/test/scripts/dependencies.sh +++ b/test/scripts/dependencies.sh @@ -62,7 +62,7 @@ function installGoMetalinter { } function installGoGas { - declare repo="github.com/GoASTScanner/gas" + declare repo="github.com/securego/gosec" declare revision="4ae8c95" GOPATH=${BUILD_TMP} ${GO_CMD} get -u github.com/kisielk/gotool @@ -70,7 +70,7 @@ function installGoGas { GOPATH=${BUILD_TMP} ${GO_CMD} get -u github.com/ryanuber/go-glob GOPATH=${BUILD_TMP} ${GO_CMD} get -u gopkg.in/yaml.v2 - installGoPkg "${repo}" "${revision}" "/cmd/gas/..." "gas" + installGoPkg "${repo}" "${revision}" "/cmd/gosec/..." "gosec" } function installGoPkg { @@ -158,7 +158,7 @@ function isGoMetalinterInstalled { deadcode dupl errcheck - gas + gosec gochecknoglobals gochecknoinits goconst @@ -246,4 +246,4 @@ if ! isDependenciesInstalled true; then echo "Missing dependency. Aborting. You can fix by installing the tool listed above or running make depend-install." rm ${CACHE_PATH}/${LASTRUN_INFO_FILENAME} exit 1 -fi \ No newline at end of file +fi ```

nyet (Thu, 01 Nov 2018 20:29:29 GMT):
``` diff --git a/gometalinter.json b/gometalinter.json index f1ac8715..1ff773d9 100644 --- a/gometalinter.json +++ b/gometalinter.json @@ -27,14 +27,14 @@ "errcheck", "megacheck", "goconst", - "gas", + "gosec", "structcheck" ], "Linters": { - "gas": { - "Command": "gas -fmt=csv", + "gosec": { + "Command": "gosec -fmt=csv", "Pattern": "^(?P.*?\\.go),(?P\\d+)(-\\d+)?,(?P[^,]+,[^,]+,[^,]+)", - "InstallFrom": "github.com/GoASTScanner/gas", + "InstallFrom": "github.com/securego/gosec", "PartitionStrategy": "packages", "defaultEnabled": true, "IsFast": true @@ -42,4 +42,4 @@ }, "Cyclo": 10, "Aggregate": true -} \ No newline at end of file +} ```

Baha-sk (Thu, 01 Nov 2018 20:32:05 GMT):
```- declare repo="github.com/GoASTScanner/gas" + declare repo="github.com/securego/gosec"``` to be honest, use all lowercase package names is much safer and future proof..

nyet (Thu, 01 Nov 2018 20:32:42 GMT):
well GoASTScanner is the name of the repo user

nyet (Thu, 01 Nov 2018 20:32:46 GMT):
and gas is gone anyway

nyet (Thu, 01 Nov 2018 20:32:51 GMT):
its gosec now

nyet (Thu, 01 Nov 2018 20:33:40 GMT):
not sure what person decided `gas` was a good name for a utility considering `as` and `gas` assemblers are older than me

nyet (Thu, 01 Nov 2018 20:34:00 GMT):
but considering what I have seen in the golang/container dev community i'm not suprised

Baha-sk (Thu, 01 Nov 2018 20:35:04 GMT):
@troyronda ^^^

nyet (Thu, 01 Nov 2018 20:35:08 GMT):
Are the linters expected to fail? ``` Running metalinters... pkg/util/pathvar/subst.go:45::warning: Errors unhandled.,LOW,HIGH (gosec) pkg/util/pathvar/subst.go:46::warning: Errors unhandled.,LOW,HIGH (gosec) pkg/client/channel/chclient.go:179::warning: Errors unhandled.,LOW,HIGH (gosec) pkg/util/concurrent/lazyref/lazyref.go:227::warning: Use of unsafe calls should be audited,LOW,HIGH (gosec) pkg/util/concurrent/lazyref/lazyref.go:232::warning: Use of unsafe calls should be audited,LOW,HIGH (gosec) pkg/util/pathvar/subst.go:41::warning: Errors unhandled.,LOW,HIGH (gosec) pkg/fab/keyvaluestore/filekeyvaluestore.go:119::warning: Potential file inclusion via variable,MEDIUM,HIGH (gosec) pkg/fab/keyvaluestore/filekeyvaluestore.go:119:38:warning: nolint directive did not match any issue (nolint) pkg/client/channel/chclient.go:179:26:warning: nolint directive did not match any issue (nolint) pkg/util/concurrent/lazyref/lazyref.go:227:74:warning: nolint directive did not match any issue (nolint) pkg/util/concurrent/lazyref/lazyref.go:232:65:warning: nolint directive did not match any issue (nolint) pkg/util/pathvar/subst.go:41:32:warning: nolint directive did not match any issue (nolint) pkg/util/pathvar/subst.go:45:29:warning: nolint directive did not match any issue (nolint) pkg/util/pathvar/subst.go:46:29:warning: nolint directive did not match any issue (nolint) make: *** [Makefile:289: unit-test] Error 1 ```

Baha-sk (Thu, 01 Nov 2018 20:38:07 GMT):
no.. you're probably running a newer version.. are you on go 1.10 or 1.11?

nyet (Thu, 01 Nov 2018 20:38:32 GMT):
Not sure how i can make sure the changes I made were ok since it looks like the linters are run for both unit-tests and integration-tests

nyet (Thu, 01 Nov 2018 20:39:01 GMT):
1.10

Baha-sk (Thu, 01 Nov 2018 20:40:12 GMT):
run remove your local gomatelinter binary and run `make depend` to reinstall it

Baha-sk (Thu, 01 Nov 2018 20:40:12 GMT):
remove your local gomatelinter binary and run `make depend` to reinstall it

nyet (Thu, 01 Nov 2018 20:42:10 GMT):
ok trying that

nyet (Thu, 01 Nov 2018 20:46:18 GMT):
thanks that worked

nyet (Thu, 01 Nov 2018 20:59:03 GMT):
Ok, so with my changes, `TestBadConfigFile` unit-test fails. i can't tell what that is testing

nyet (Thu, 01 Nov 2018 21:00:59 GMT):
Not sure what error that is supposed to cause

nyet (Thu, 01 Nov 2018 21:01:34 GMT):
working on it now

nyet (Thu, 01 Nov 2018 21:04:52 GMT):
mostly because my changes set up a default BCSSP provider so it doesn't have to be specified in config

nyet (Thu, 01 Nov 2018 21:31:34 GMT):
OK works. Opened two review requests.

nyet (Thu, 01 Nov 2018 21:31:41 GMT):
Thanks @Baha-sk

Baha-sk (Thu, 01 Nov 2018 22:38:58 GMT):
sounds good @nyet

nyet (Thu, 01 Nov 2018 23:41:29 GMT):
ugh both failed jenkins

nyet (Thu, 01 Nov 2018 23:41:45 GMT):
ah well ill look into it time permitting

Taaanos (Fri, 02 Nov 2018 09:37:42 GMT):
Can someone point me to the func where the signing of the tx proposal happens?

oreg (Fri, 02 Nov 2018 10:11:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gW4CLMtYCBa2As9vA) @Taaanos fab/txn/proposal.go:signProposal(...) calls the interface method SigningManager.Sign(...). Not sure where that is implemented.

oreg (Fri, 02 Nov 2018 10:14:32 GMT):
Got it: fab/signingmgr/signingmgr.go:Sign(...)

oreg (Fri, 02 Nov 2018 10:17:56 GMT):
... which then goes further down the rabbit hole of indirections.

Taaanos (Fri, 02 Nov 2018 10:20:12 GMT):
ok, found it! Thank you. I am measuring the time it takes for a client to a.make a Proposal b.Sign it c.Send it

Taaanos (Fri, 02 Nov 2018 10:21:16 GMT):
@oreg

Baha-sk (Fri, 02 Nov 2018 12:21:52 GMT):
@nyet, just do reverify to trigger the builds again

Baha-sk (Fri, 02 Nov 2018 12:34:25 GMT):
@oreg @Taaanos then signingmgr.go calls the Sign of the CryptoProvider.. which default implementation is: fabric-sdk-go/pkg/core/cryptosuite/bccsp/wrapper/cryptosuiteimpl.go and from there the rabbit hole ends with Fabric's sw or PKCS11 implementations .. in the default you have another call to either ecdsa signing or rsa signing, look at fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw package for more details (ecdsa.go and rsa.go)

Baha-sk (Fri, 02 Nov 2018 12:34:48 GMT):
these are copies from Fabric code

oreg (Fri, 02 Nov 2018 12:37:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xAxmiKCwKsFDRo7Kh) Would anybody have any insight on this question?

MuhammedHafil (Fri, 02 Nov 2018 13:28:44 GMT):
Has joined the channel.

MuhammedHafil (Fri, 02 Nov 2018 13:30:55 GMT):
In golang , Is it possible to set default values for properties of a struct? for example ``` ObjectType string `json:docType` ``` ``` ```

MuhammedHafil (Fri, 02 Nov 2018 13:30:55 GMT):
In golang , Is it possible to set default values for properties of a struct? for example ``` ObjectType string `json:docType` ```

MuhammedHafil (Fri, 02 Nov 2018 13:30:55 GMT):
In golang , Is it possible to set default values for properties of a struct? for example, Can i add a value to `ObjectType` property by default? ``` ObjectType string `json:docType` ```

Taaanos (Fri, 02 Nov 2018 14:43:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rN6wKSxSjZ6PPX5W2) @MuhammedHafil No, you cannot have default values for struct properties in go. You have workarounds though

Taaanos (Fri, 02 Nov 2018 14:59:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=AYoGtCwK9ZNBNTbzv) @Baha-sk Yeah! Exactly what I was looking for

troyronda (Fri, 02 Nov 2018 17:39:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oE6y9X2L6oKGCZ6Fo) @jvsclp done

jvsclp (Fri, 02 Nov 2018 17:43:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ctpz6Q3XEsvLDakf7) @troyronda I noticed. Thank you @troyronda! I don't have to run off a seperate git branch now. Except for the gometalinter. I haven't figured out what's causing that to fail, though I think it has to do with directory issues in Windows as well.

jvsclp (Fri, 02 Nov 2018 17:43:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ctpz6Q3XEsvLDakf7) @troyronda I noticed. Thank you! I don't have to run off a seperate git branch now. Except for the gometalinter. I haven't figured out what's causing that to fail, though I think it has to do with directory issues in Windows as well.

Baha-sk (Fri, 02 Nov 2018 19:15:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FRtZ4r9G8brirEdGJ) @oreg what do you mean by incoming endorser? the sdk submits transaction proposals and gets responses synchronously

Baha-sk (Fri, 02 Nov 2018 19:15:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FRtZ4r9G8brirEdGJ) @oreg what do you mean by incoming endorsment? the sdk submits transaction proposals and gets responses synchronously

Kyroy (Sun, 04 Nov 2018 23:19:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=JD75aqojqEw3PFnjd) @Baha-sk I want to typecheck that all of my "overwrites" are working. So I would pick 4 of these internal interfaces, pack them to one `xxx` and do ```var _ xxx = (*MyImpl)(nil) ``` What I do now is add a test struct `otherFcns` that implements the rest of the functions, embedd my `MyImpl` struct and do ```var _ fab.EndpointConfig = (*otherFcns)(nil) ```

Baha-sk (Mon, 05 Nov 2018 00:31:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BGtecNx4LGHgX96GG) @Kyroy Actually this is the reason these single interfaces should not to be exposed. We don't want to enforce single interfaces for each function, the purpose of overriding the functions is for users to create an interface with their own combination of functions (which is exactly what you are doing with the `xxx` interface). You do not need to implement all the functions. Even though this test implements each function separately then assembles a complete EndpointConfigOptions instance: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/opts_test.go#L49 you can also implement multiple functions in 1 interface and pass that interface to BuildConfigEndpointFromOptions() (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/opts.go#L107) which will build a complete EndpointConfig interface which you can pass to `pkg.context.WithEndpointConfig()`. In fact, the exposed functions in `pkg/fab/opts.go` are utility functions to help users build a final EndpointConfig instance that you can pass to `WithEndpointConfig`: 1. `UpdateMissingOptsWithDefaultConfig`: will fill in functions not implemented by the user (interface of first argument), with default EndpointConfig implementation (second argument) 2. `IsEndpointConfigFullyOverridden`: will return true if all functions were implemented in the user's custom interface (argument passed), false otherwise. 3. `BuildConfigEndpointFromOptions`: build a final EndpointConfig to be used by the SDK with the user interface implementing one (or more) function(s) of EndpointConfig.

Baha-sk (Mon, 05 Nov 2018 00:31:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BGtecNx4LGHgX96GG) @Kyroy Actually this is the reason these single interfaces should not to be exposed. We don't want to enforce single interfaces for each function, the purpose of overriding the functions is for users to create an interface with their own combination of functions (which is exactly what you are doing with the `xxx` interface). You do not need to implement all the functions. Even though this test implements each function separately then assembles a complete EndpointConfigOptions instance: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/opts_test.go#L49 you can also implement multiple functions in 1 interface and pass that interface to BuildConfigEndpointFromOptions() (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/opts.go#L107) which will build a complete EndpointConfig interface that you can pass to `pkg.context.WithEndpointConfig()`. In fact, the exposed functions in `pkg/fab/opts.go` are utility functions to help users build a final EndpointConfig instance that you can pass to `WithEndpointConfig`: 1. `UpdateMissingOptsWithDefaultConfig`: will fill in functions not implemented by the user (interface of first argument), with default EndpointConfig implementation (second argument) 2. `IsEndpointConfigFullyOverridden`: will return true if all functions were implemented in the user's custom interface (argument passed), false otherwise. 3. `BuildConfigEndpointFromOptions`: build a final EndpointConfig to be used by the SDK with the user interface implementing one (or more) function(s) of EndpointConfig.

Baha-sk (Mon, 05 Nov 2018 00:31:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BGtecNx4LGHgX96GG) @Kyroy Actually this is the reason these single interfaces should not to be exposed. We don't want to enforce single interfaces for each function, the purpose of overriding the functions is for users to create an interface with their own combination of functions (which is exactly what you are doing with the `xxx` interface). You do not need to implement all the functions. Even though this test implements each function separately then assembles a complete EndpointConfigOptions instance: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/opts_test.go#L49 you can also implement multiple functions in 1 interface and pass that interface to BuildConfigEndpointFromOptions() (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/opts.go#L107) which will build a complete EndpointConfig interface that you can pass to `pkg.context.WithEndpointConfig()`. In fact, the exposed functions in `pkg/fab/opts.go` are utility functions to help users build a final EndpointConfig instance that you can pass to `WithEndpointConfig()`: 1. `UpdateMissingOptsWithDefaultConfig`: will fill in functions not implemented by the user (interface of first argument), with default EndpointConfig implementation (second argument) 2. `IsEndpointConfigFullyOverridden`: will return true if all functions were implemented in the user's custom interface (argument passed), false otherwise. 3. `BuildConfigEndpointFromOptions`: build a final EndpointConfig to be used by the SDK with the user interface implementing one (or more) function(s) of EndpointConfig.

oreg (Mon, 05 Nov 2018 10:11:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tdrqdQCDc3jjX54Q5) @Baha-sk @Baha-sk: Thanks much for your response. I thought the SDK submits transaction proposals to the endorsing nodes asynchronously, no? The endorsers do their thing and when they're done they send their response back to the SDK some time later. Are you saying the SDK opens a connection to each endorsing node that it shuts down only once the response has arrived on that same connection? That would be useful. Could you point me to the SDK code that handle this connection?

oreg (Mon, 05 Nov 2018 10:11:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tdrqdQCDc3jjX54Q5) @Baha-sk: Thanks much for your response. I thought the SDK submits transaction proposals to the endorsing nodes asynchronously, no? The endorsers do their thing and when they're done they send their response back to the SDK some time later. Are you saying the SDK opens a connection to each endorsing node that it shuts down only once the response has arrived on that same connection? That would be useful. Could you point me to the SDK code that handle this connection?

oreg (Mon, 05 Nov 2018 10:11:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tdrqdQCDc3jjX54Q5) @Baha-sk: Thanks much for your response. I thought the SDK submits transaction proposals to the endorsing nodes asynchronously, no? The endorsers do their thing and when they're done they send their response back to the SDK some time later. Are you saying the SDK opens a connection to each endorsing node that it shuts down only once the response has arrived on that same connection? That would be useful. Could you point me to the SDK code that handles this connection?

Kyroy (Mon, 05 Nov 2018 10:29:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DFtRPJmNFmsnqvupe) @Baha-sk When I define my own interface that I implement, the typechecker will not see when the interface `fab.EndpointConfig` was changed in the SDK. The program still runs and just uses the default implementations by the sdk. However, my solution covers this. So I am ok with it

14gracel (Mon, 05 Nov 2018 11:11:22 GMT):
Has joined the channel.

14gracel (Mon, 05 Nov 2018 11:13:23 GMT):
Hi, can anyone tell me the minimum version of fabric compatible with the Go SDK? I have a project running Fabric 1.1, and am interested in migrating

twoneks (Mon, 05 Nov 2018 11:24:28 GMT):
Hi I'm having trouble to instanciate my cc to the blockchain service This is my erorr ``` The chaincode installed successfully, but instantiation failed because of this error: Instantiate failed on because of this error: 2 UNKNOWN: error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# npl.v0/chaincode/vendor/golang.org/x/crypto/sha3 /chaincode/input/src/npl.v0/chaincode/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go:13: missing function body for "keccakF1600" # npl.v0/chaincode/vendor/go.uber.org/zap /chaincode/input/src/npl.v0/chaincode/vendor/go.uber.org/zap/field.go:33: syntax error: unexpected = in type declaration # npl.v0/chaincode/vendor/golang.org/x/sys/unix /chaincode/input/src/npl.v0/chaincode/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:13: missing function body for "gettimeofday" /chaincode/input/src/npl.v0/chaincode/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:10: missing function body for "SyscallNoError" /chaincode/input/src/npl.v0/chaincode/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:14: missing function body for "RawSyscallNoError" /chaincode/input/src/npl.v0/chaincode/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:12: missing function body for "Syscall" /chaincode/input/src/npl.v0/chaincode/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:13: missing function body for "Syscall6" /chaincode/input/src/npl.v0/chaincode/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:14: missing function body for "RawSyscall" /chaincode/input/src/npl.v0/chaincode/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:15: missing function body for "RawSyscall6" " ``` the only similar issue I found is this https://lists.hyperledger.org/g/fabric/topic/17549226 I'm very very stuck since 2 days. Please if someone could help it will be super appreciated

vladyslavmunin (Mon, 05 Nov 2018 11:48:43 GMT):
Hello all ,has anyone faced with this issue? `go build` ``` # github.com/cloudflare/cfssl/vendor/github.com/google/certificate-transparency-go/x509 ..\github.com\cloudflare\cfssl\vendor\github.com\google\certificate-transparency-go\x509\root_windows.go:112:3: cannot use uintptr(unsafe.Pointer(sslPara)) (type uintptr) as type syscall.Pointer in field value ``` it looks like this is a problem of go 1.11 compiler , I found that issue was fixed in cloudfare/cfssl in the new package version but fabric-go-sdk is linked to 1.3.1

vladyslavmunin (Mon, 05 Nov 2018 11:48:43 GMT):
Hello all ,has anyone faced with this issue? `go build` ``` # github.com/cloudflare/cfssl/vendor/github.com/google/certificate-transparency-go/x509 ..\github.com\cloudflare\cfssl\vendor\github.com\google\certificate-transparency-go\x509\root_windows.go:112:3: cannot use uintptr(unsafe.Pointer(sslPara)) (type uintptr) as type syscall.Pointer in field value ``` it looks like this is a problem of go 1.11 compiler , I found that issue was fixed in google/certificate-transparency-go in the new package version but fabric-go-sdk is linked to 1.3.1 (https://github.com/google/certificate-transparency-go/pull/286#partial-pull-merging)

adamhardie (Mon, 05 Nov 2018 15:13:41 GMT):
Has joined the channel.

adamhardie (Mon, 05 Nov 2018 15:16:23 GMT):
hello! i am trying to import the following package https://godoc.org/github.com/hyperledger/fabric/core/chaincode/lib/cid

adamhardie (Mon, 05 Nov 2018 15:16:30 GMT):
using import : "github.com/hyperledger/fabric/core/chaincode/lib/cid"

adamhardie (Mon, 05 Nov 2018 15:16:41 GMT):
however i get this issue

adamhardie (Mon, 05 Nov 2018 15:16:41 GMT):
can't load package: package github.com/hyperledger/fabric/core/chaincode/lib/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT)

Taaanos (Mon, 05 Nov 2018 15:27:45 GMT):
go get -u github.com/hyperledger/fabric/core/chaincode/lib/cid should install the package at $GOPATH

Taaanos (Mon, 05 Nov 2018 15:28:04 GMT):
have you set up go's env vars?

Taaanos (Mon, 05 Nov 2018 15:29:00 GMT):
@adamhardie

adamhardie (Mon, 05 Nov 2018 15:29:24 GMT):
aah i see

adamhardie (Mon, 05 Nov 2018 15:29:30 GMT):
my mistake, thanks !

Mr.Reddington (Mon, 05 Nov 2018 15:40:05 GMT):
Hi Experts Anyone could suggest me good tutorial or documentation link of the #fabric-sdk-go ? I’m trying to learn how an own REST API build in go could interact with the peer using #fabric-ds-go.

Taaanos (Mon, 05 Nov 2018 15:41:31 GMT):
@Mr.Reddington fabric is built using gRPC. There are REST options as well.

Taaanos (Mon, 05 Nov 2018 15:41:31 GMT):
fabric is build using gRPC. There are REST options as well.

Taaanos (Mon, 05 Nov 2018 15:41:31 GMT):
fabric is built using gRPC. There are REST options as well.

Taaanos (Mon, 05 Nov 2018 15:42:38 GMT):
There is no official documentation yet for fabric-sdk-go, like fabric-sdk-node for example

adamhardie (Mon, 05 Nov 2018 15:42:47 GMT):
hm, i can see github.com/hyperledger/fabric/core/chaincode/lib/cid is in "go list ... "

adamhardie (Mon, 05 Nov 2018 15:44:14 GMT):
i think i may have installed it stragely as i check cd $GOPATH go list

adamhardie (Mon, 05 Nov 2018 15:44:33 GMT):
and it says "no go files in xxx/x"

Taaanos (Mon, 05 Nov 2018 15:44:55 GMT):
@adamhardie what are you trying to do? FYI if you cloned a repo there is probably a Gopkg.lock and Gopkg.toml, if yes you can use dep to handle the dependencies

Taaanos (Mon, 05 Nov 2018 15:45:14 GMT):
what does echo $GOPATH prints?

Taaanos (Mon, 05 Nov 2018 15:45:14 GMT):
what does echo $GOPATH print?

adamhardie (Mon, 05 Nov 2018 15:45:17 GMT):
just install the package for cli

adamhardie (Mon, 05 Nov 2018 15:45:46 GMT):
gopath prints /opt/go

adamhardie (Mon, 05 Nov 2018 15:55:42 GMT):
just install the package for cli ^ * i mean CID

adamhardie (Mon, 05 Nov 2018 15:55:58 GMT):
i have added packages before but a while ago, i will keep trying

Mr.Reddington (Mon, 05 Nov 2018 17:13:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mH4fCpJei9yNqZs3f) @Taaanos Hi there @Taaanos thank you for the answer, what are you guys currently using to build the REST API for your chaincode?

Mr.Reddington (Mon, 05 Nov 2018 17:13:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mH4fCpJei9yNqZs3f) @Taaanos Hi there @Tanus, thank you for the answer, what are you guys currently using to build the REST API for your chaincode?

Mr.Reddington (Mon, 05 Nov 2018 17:13:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mH4fCpJei9yNqZs3f) @Taaanos Hi there @Taaanos s, thank you for the answer, what are you guys currently using to build the REST API for your chaincode?

Taaanos (Mon, 05 Nov 2018 18:28:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=WQNmJjy3efPWBNnKo) @Mr.Reddington There is a REST-sdk but it is in beta, haven't used it though. https://github.com/hyperledger/fabric-sdk-rest/

KaseyAlusi (Mon, 05 Nov 2018 18:55:36 GMT):
Has joined the channel.

awes0menessInc (Tue, 06 Nov 2018 03:40:02 GMT):
Has joined the channel.

kisna (Tue, 06 Nov 2018 07:53:52 GMT):
fabric e2e test checkOSNAvailability() method cli throws INFO 043 Got status: &{NOT_FOUND} Error: can't read the block: &{NOT_FOUND} All I did was change example.com to domain.com everywhere, am I missing something? All other ` -----END CERTIFICATE----- 2018-11-06 07:43:47.987 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-11-02 16:43:00 +0000 UTC 2018-11-06 07:43:47.987 UTC [msp] Validate -> DEBU 036 MSP OrdererMSP validating identity 2018-11-06 07:43:47.988 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity 2018-11-06 07:43:47.990 UTC [grpc] DialContext -> DEBU 038 parsed scheme: "" 2018-11-06 07:43:47.990 UTC [grpc] DialContext -> DEBU 039 scheme "" not registered, fallback to default scheme 2018-11-06 07:43:47.990 UTC [grpc] watcher -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.domain.com:7050 0 }] 2018-11-06 07:43:47.990 UTC [grpc] switchBalancer -> DEBU 03b ClientConn switching balancer to "pick_first" 2018-11-06 07:43:47.990 UTC [grpc] HandleSubConnStateChange -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4204f62c0, CONNECTING 2018-11-06 07:43:47.994 UTC [grpc] HandleSubConnStateChange -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc4204f62c0, READY 2018-11-06 07:43:47.994 UTC [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized 2018-11-06 07:43:47.994 UTC [msp] GetDefaultSigningIdentity -> DEBU 03f Obtaining default signing identity 2018-11-06 07:43:47.994 UTC [msp] GetDefaultSigningIdentity -> DEBU 040 Obtaining default signing identity 2018-11-06 07:43:47.994 UTC [msp/identity] Sign -> DEBU 041 Sign: plaintext: 0AD1060A1F08051A0608B38C85DF0522...B783561797E012080A021A0012021A00 2018-11-06 07:43:47.994 UTC [msp/identity] Sign -> DEBU 042 Sign: digest: 8D07CE4F4FF7A76EBBCC9AAC6A129B7AD6B07CC9E537179963F368BB16C7EF11 2018-11-06 07:43:47.996 UTC [cli/common] readBlock -> INFO 043 Got status: &{NOT_FOUND} Error: can't read the block: &{NOT_FOUND} !!!!!!!!!!!!!!! Ordering Service is not available, Please try again ... !!!!!!!!!!!!!!!! ================== ERROR !!! FAILED to execute End-2-End Scenario ==================`

kisna (Tue, 06 Nov 2018 07:53:52 GMT):
fabric e2e test checkOSNAvailability() method cli throws INFO 043 Got status: &{NOT_FOUND} Error: can't read the block: &{NOT_FOUND} All I did was change example.com to domain.com everywhere, am I missing something? All other ` -----END CERTIFICATE----- 2018-11-06 07:43:47.987 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-11-02 16:43:00 +0000 UTC 2018-11-06 07:43:47.987 UTC [msp] Validate -> DEBU 036 MSP OrdererMSP validating identity 2018-11-06 07:43:47.988 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity 2018-11-06 07:43:47.990 UTC [grpc] DialContext -> DEBU 038 parsed scheme: "" 2018-11-06 07:43:47.990 UTC [grpc] DialContext -> DEBU 039 scheme "" not registered, fallback to default scheme 2018-11-06 07:43:47.990 UTC [grpc] watcher -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.domain.com:7050 0 }] 2018-11-06 07:43:47.990 UTC [grpc] switchBalancer -> DEBU 03b ClientConn switching balancer to "pick_first" 2018-11-06 07:43:47.990 UTC [grpc] HandleSubConnStateChange -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4204f62c0, CONNECTING 2018-11-06 07:43:47.994 UTC [grpc] HandleSubConnStateChange -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc4204f62c0, READY 2018-11-06 07:43:47.994 UTC [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized 2018-11-06 07:43:47.994 UTC [msp] GetDefaultSigningIdentity -> DEBU 03f Obtaining default signing identity 2018-11-06 07:43:47.994 UTC [msp] GetDefaultSigningIdentity -> DEBU 040 Obtaining default signing identity 2018-11-06 07:43:47.994 UTC [msp/identity] Sign -> DEBU 041 Sign: plaintext: 0AD1060A1F08051A0608B38C85DF0522...B783561797E012080A021A0012021A00 2018-11-06 07:43:47.994 UTC [msp/identity] Sign -> DEBU 042 Sign: digest: 8D07CE4F4FF7A76EBBCC9AAC6A129B7AD6B07CC9E537179963F368BB16C7EF11 2018-11-06 07:43:47.996 UTC [cli/common] readBlock -> INFO 043 Got status: &{NOT_FOUND} Error: can't read the block: &{NOT_FOUND} !!!!!!!!!!!!!!! Ordering Service is not available, Please try again ... !!!!!!!!!!!!!!!! ================== ERROR !!! FAILED to execute End-2-End Scenario ==================`

kisna (Tue, 06 Nov 2018 07:53:52 GMT):
fabric e2e test checkOSNAvailability() method cli throws INFO 043 Got status: &{NOT_FOUND} Error: can't read the block: &{NOT_FOUND} All I did was change example.com to domain.com everywhere, am I missing something? All other ` -----END CERTIFICATE----- 2018-11-06 07:43:47.987 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-11-02 16:43:00 +0000 UTC 2018-11-06 07:43:47.987 UTC [msp] Validate -> DEBU 036 MSP OrdererMSP validating identity 2018-11-06 07:43:47.988 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity 2018-11-06 07:43:47.990 UTC [grpc] DialContext -> DEBU 038 parsed scheme: "" 2018-11-06 07:43:47.990 UTC [grpc] DialContext -> DEBU 039 scheme "" not registered, fallback to default scheme 2018-11-06 07:43:47.990 UTC [grpc] watcher -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.domain.com:7050 0 }] 2018-11-06 07:43:47.990 UTC [grpc] switchBalancer -> DEBU 03b ClientConn switching balancer to "pick_first" 2018-11-06 07:43:47.990 UTC [grpc] HandleSubConnStateChange -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4204f62c0, CONNECTING 2018-11-06 07:43:47.994 UTC [grpc] HandleSubConnStateChange -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc4204f62c0, READY 2018-11-06 07:43:47.994 UTC [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized 2018-11-06 07:43:47.994 UTC [msp] GetDefaultSigningIdentity -> DEBU 03f Obtaining default signing identity 2018-11-06 07:43:47.994 UTC [msp] GetDefaultSigningIdentity -> DEBU 040 Obtaining default signing identity 2018-11-06 07:43:47.994 UTC [msp/identity] Sign -> DEBU 041 Sign: plaintext: 0AD1060A1F08051A0608B38C85DF0522...B783561797E012080A021A0012021A00 2018-11-06 07:43:47.994 UTC [msp/identity] Sign -> DEBU 042 Sign: digest: 8D07CE4F4FF7A76EBBCC9AAC6A129B7AD6B07CC9E537179963F368BB16C7EF11 2018-11-06 07:43:47.996 UTC [cli/common] readBlock -> INFO 043 Got status: &{NOT_FOUND} Error: can't read the block: &{NOT_FOUND} !!!!!!!!!!!!!!! Ordering Service is not available, Please try again ... !!!!!!!!!!!!!!!! ================== ERROR !!! FAILED to execute End-2-End Scenario ==================` Version: 1.3.0-rc1

kisna (Tue, 06 Nov 2018 07:53:52 GMT):
fabric e2e test checkOSNAvailability() method cli throws INFO 043 Got status: &{NOT_FOUND} Error: can't read the block: &{NOT_FOUND} All I did was change example.com to domain.com everywhere, am I missing something? All other ` -----END CERTIFICATE----- 2018-11-06 07:43:47.987 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-11-02 16:43:00 +0000 UTC 2018-11-06 07:43:47.987 UTC [msp] Validate -> DEBU 036 MSP OrdererMSP validating identity 2018-11-06 07:43:47.988 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity 2018-11-06 07:43:47.990 UTC [grpc] DialContext -> DEBU 038 parsed scheme: "" 2018-11-06 07:43:47.990 UTC [grpc] DialContext -> DEBU 039 scheme "" not registered, fallback to default scheme 2018-11-06 07:43:47.990 UTC [grpc] watcher -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.domain.com:7050 0 }] 2018-11-06 07:43:47.990 UTC [grpc] switchBalancer -> DEBU 03b ClientConn switching balancer to "pick_first" 2018-11-06 07:43:47.990 UTC [grpc] HandleSubConnStateChange -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4204f62c0, CONNECTING 2018-11-06 07:43:47.994 UTC [grpc] HandleSubConnStateChange -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc4204f62c0, READY 2018-11-06 07:43:47.994 UTC [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized 2018-11-06 07:43:47.994 UTC [msp] GetDefaultSigningIdentity -> DEBU 03f Obtaining default signing identity 2018-11-06 07:43:47.994 UTC [msp] GetDefaultSigningIdentity -> DEBU 040 Obtaining default signing identity 2018-11-06 07:43:47.994 UTC [msp/identity] Sign -> DEBU 041 Sign: plaintext: 0AD1060A1F08051A0608B38C85DF0522...B783561797E012080A021A0012021A00 2018-11-06 07:43:47.994 UTC [msp/identity] Sign -> DEBU 042 Sign: digest: 8D07CE4F4FF7A76EBBCC9AAC6A129B7AD6B07CC9E537179963F368BB16C7EF11 2018-11-06 07:43:47.996 UTC [cli/common] readBlock -> INFO 043 Got status: &{NOT_FOUND} Error: can't read the block: &{NOT_FOUND} !!!!!!!!!!!!!!! Ordering Service is not available, Please try again ... !!!!!!!!!!!!!!!! ================== ERROR !!! FAILED to execute End-2-End Scenario ==================` Version: 1.3.0-rc1 orderer logs at the same time: `2018-11-06 08:01:09.069 UTC [orderer/common/server] Deliver -> DEBU 201 Starting new Deliver handler 2018-11-06 08:01:09.069 UTC [common/deliver] Handle -> DEBU 202 Starting new deliver loop for 172.18.0.14:57222 2018-11-06 08:01:09.069 UTC [common/deliver] Handle -> DEBU 203 Attempting to read seek info message from 172.18.0.14:57222 2018-11-06 08:01:09.070 UTC [common/deliver] deliverBlocks -> DEBU 204 Rejecting deliver for 172.18.0.14:57222 *because channel e2e-orderer-syschan not found* 2018-11-06 08:01:09.070 UTC [common/deliver] Handle -> DEBU 205 Waiting for new SeekInfo from 172.18.0.14:57222 2018-11-06 08:01:09.070 UTC [common/deliver] Handle -> DEBU 206 Attempting to read seek info message from 172.18.0.14:57222 2018-11-06 08:01:09.075 UTC [grpc] warningf -> DEBU 207 transport: http2Server.HandleStreams failed to read frame: read tcp 172.18.0.13:7050->172.18.0.14:57222: read: connection reset by peer 2018-11-06 08:01:09.075 UTC [common/deliver] Handle -> WARN 208 Error reading from 172.18.0.14:57222: rpc error: code = Canceled desc = context canceled 2018-11-06 08:01:09.075 UTC [orderer/common/server] func1 -> DEBU 209 Closing Deliver stream 2018-11-06 08:01:09.075 UTC [grpc] infof -> DEBU 20a transport: loopyWriter.run returning. connection error: desc = "transport is closing"`

Taaanos (Tue, 06 Nov 2018 08:40:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=WQNmJjy3efPWBNnKo) @Mr.Reddington This is something that might interest you https://github.com/hyperledger/fabric-sdk-rest/blob/master/tests/fabric_rest.py Plus hyperledger composer can also be an option for your REST API

Taaanos (Tue, 06 Nov 2018 09:14:26 GMT):
*Note, it seems fabric-sdk-REST is obsolete since it hasn't been updated for a year now.

Kyroy (Tue, 06 Nov 2018 09:54:27 GMT):
Is there an example on how to use chaincode instantiation policies? https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4noah.html#packaging

Fleda (Tue, 06 Nov 2018 13:13:45 GMT):
Has joined the channel.

Taaanos (Tue, 06 Nov 2018 14:05:34 GMT):
Is there an example of fabric-sdk-go interacting with a fabric network?

Taaanos (Tue, 06 Nov 2018 15:07:08 GMT):
can somebody make the connection for me for shim package and fabric-sdk-go?

Taaanos (Tue, 06 Nov 2018 15:07:08 GMT):
can somebody make the connection for me for shim package and fabric-sdk-go

Baha-sk (Tue, 06 Nov 2018 16:24:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kEPramufuMQMMDzEQ) @kisna you can't change the domain names alone for the e2e tests as there are crypto material generated for example.com, you will have to regenerate the channel configs and crypto-config folders and probably other things

Baha-sk (Tue, 06 Nov 2018 16:26:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yPnJcBnvG73yTfYwa) @Taaanos all the tests under integration/e2e are examples fo the SDK interacting with a fabric network

Baha-sk (Tue, 06 Nov 2018 16:26:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yPnJcBnvG73yTfYwa) @Taaanos all the tests under integration/e2e interact with a fabric network

Baha-sk (Tue, 06 Nov 2018 16:37:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TNS2Csvux3KhxiS2W) @Taaanos shim package is to be used inside the cc to respond to requests and operate with the peer/ledger, the SDK's job is to query a fabric network as an admin (ie Create Channel, Install CC, etc.) or as a user (invoke/Query CC, listen to CC events, etc.) there are different client packages to allow this, for instance the `resmgmt` is a client that allows to manage/query fabric resources (like CCs and Channels), look at the tests under /integration/e2e/pkg/resmgmt for examples, or the channel client to execute/query transactions on the channel, see integration/pkg/client/channel for examples... if you want a broader full end to end examples, then integration/e2e/end_to_end.go shows full examples of creating channels and CCs and invoking them via the client. Of course there are other clients in the SDK that you can use like eventClient or ledger client.. Hope this helps..

Baha-sk (Tue, 06 Nov 2018 16:37:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TNS2Csvux3KhxiS2W) @Taaanos shim package is to be used inside the cc to respond to requests and operate with the peer/ledger, the SDK's job to query a fabric network as an admin (ie Create Channel, Install CC, etc.) or as a user (invoke/Query CC, listen to CC events, etc.) there are different client packages to allow this, for instance the `resmgmt` is a client that allows to manage/query fabric resources (like CCs and Channels), look at the tests under /integration/e2e/pkg/resmgmt for examples, or the channel client to execute/query transactions on the channel, see integration/pkg/client/channel for examples... if you want a broader full end to end examples, then integration/e2e/end_to_end.go shows full examples of creating channels and CCs and invoking them via the client. Hope this helps..

Baha-sk (Tue, 06 Nov 2018 16:37:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TNS2Csvux3KhxiS2W) @Taaanos shim package is to be used inside the cc to respond to requests and operate with the peer/ledger, the SDK's job is to query a fabric network as an admin (ie Create Channel, Install CC, etc.) or as a user (invoke/Query CC, listen to CC events, etc.) there are different client packages to allow this, for instance the `resmgmt` is a client that allows to manage/query fabric resources (like CCs and Channels), look at the tests under /integration/e2e/pkg/resmgmt for examples, or the channel client to execute/query transactions on the channel, see integration/pkg/client/channel for examples... if you want a broader full end to end examples, then integration/e2e/end_to_end.go shows full examples of creating channels and CCs and invoking them via the client. Hope this helps..

nyet (Tue, 06 Nov 2018 16:45:15 GMT):
@Baha-sk im getting closer to figuring out what is wrong with cc instantation; long story short: there are situations where when calling cc, the peer generates an event with no channelid, and Notify() fails to pass the error along to the peer via event.

nyet (Tue, 06 Nov 2018 16:45:15 GMT):
@Baha-sk im getting closer to figuring out what is wrong with cc instantation; long story short: there are situations where when calling cc, the peer generates an event with no channelid, and Notify() fails to pass the error along to the client via event.

nyet (Tue, 06 Nov 2018 16:46:17 GMT):
The result is a timeout, rather than the client seeing the error message from the peer when it is waiting for the TxEvent for the instantiation txid. I searched in Jira but I do not see a bug for it...

nyet (Tue, 06 Nov 2018 16:49:22 GMT):
You can test this by making the Init() shim in a CC always return shim.Error()

Baha-sk (Tue, 06 Nov 2018 16:53:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=XK3Ze5j2fbcfoC2XZ) @nyet I believe you need to have a channel first, look at `createChannelAndCC` in test/integration/e2e/end_to_end.go.. the test first creates a resmgmt client and joins a channel, then does the installCC and instantiateCC with that resmgmt client

nyet (Tue, 06 Nov 2018 16:54:07 GMT):
ya i did all of that

Baha-sk (Tue, 06 Nov 2018 16:54:41 GMT):
and you specified the orderer endpoint in JoinChannel?

nyet (Tue, 06 Nov 2018 16:54:58 GMT):
yea, create, join, install all work

nyet (Tue, 06 Nov 2018 16:56:10 GMT):
the interesting thing is, in all cases, channelid is missing in the Notify()

nyet (Tue, 06 Nov 2018 16:56:18 GMT):
but only instantiate doesn't like it

Baha-sk (Tue, 06 Nov 2018 16:56:39 GMT):
usually timeout is a sign of a bad credential during connection..

nyet (Tue, 06 Nov 2018 16:56:54 GMT):
Yep, that doesn't seem to be the case here

Baha-sk (Tue, 06 Nov 2018 16:57:11 GMT):
are you using resMgmt.InstantiateCC() call?

nyet (Tue, 06 Nov 2018 16:58:02 GMT):
whoa wierd this time the notify got channelid but the client STILL didn't see the error

nyet (Tue, 06 Nov 2018 16:58:04 GMT):
ya

nyet (Tue, 06 Nov 2018 16:58:28 GMT):
Is it strictkly legal to call instantiate with no args?

nyet (Tue, 06 Nov 2018 16:58:35 GMT):
(the shim)

nyet (Tue, 06 Nov 2018 16:59:21 GMT):
wait no it got the error this time

Baha-sk (Tue, 06 Nov 2018 16:59:26 GMT):
no.. you need to pass in the channelID, resmgmt.InstantiateCCRequest and (if you have options) you can pass in the opts as last argument

nyet (Tue, 06 Nov 2018 16:59:42 GMT):
hold lemme check my code real quick and i can tell you

nyet (Tue, 06 Nov 2018 16:59:54 GMT):
channel is there but no optional args

Baha-sk (Tue, 06 Nov 2018 16:59:56 GMT):
the shim is used inside the cc, not the client

nyet (Tue, 06 Nov 2018 16:59:59 GMT):
yes

nyet (Tue, 06 Nov 2018 17:00:01 GMT):
i understand

nyet (Tue, 06 Nov 2018 17:00:25 GMT):
the issue that is in some cases, if the shim returns an error from the cc, the peer generates an event with no channelid

nyet (Tue, 06 Nov 2018 17:00:47 GMT):
and the client never sees the error

Baha-sk (Tue, 06 Nov 2018 17:00:57 GMT):
you also need an instance of resmgmt.InstantiateCCRequest to specify the cc name, path, version, policy and args

Baha-sk (Tue, 06 Nov 2018 17:01:26 GMT):
are you sure the channel is created?

nyet (Tue, 06 Nov 2018 17:01:29 GMT):
yep

Baha-sk (Tue, 06 Nov 2018 17:01:47 GMT):
if not, restart your network and make sure create and join channel are executed..

nyet (Tue, 06 Nov 2018 17:01:52 GMT):
yep they are for sure

nyet (Tue, 06 Nov 2018 17:02:04 GMT):
im using fabric-cli as a reference as well

nyet (Tue, 06 Nov 2018 17:02:30 GMT):
https://github.com/securekey/fabric-examples/tree/master/fabric-cli

Baha-sk (Tue, 06 Nov 2018 17:02:36 GMT):
weird, e2e test always works

nyet (Tue, 06 Nov 2018 17:02:44 GMT):
yea not sure it must be something i'm missing

nyet (Tue, 06 Nov 2018 17:02:59 GMT):
just wondering if that sounded familiar to you

nyet (Tue, 06 Nov 2018 17:03:08 GMT):
im getting closer to narrowing it down to something in my code

Baha-sk (Tue, 06 Nov 2018 17:04:39 GMT):
if you want, try to add the option WithRetry() call so that it tries multiple times..

Baha-sk (Tue, 06 Nov 2018 17:05:24 GMT):
`resmgmt.WithRetry(retry.DefaultResMgmtOpts)` in createCC under test/integration/e2e/end_to_end.go

Baha-sk (Tue, 06 Nov 2018 17:05:58 GMT):
`retry.DefaultResMgmtOpts` is specific to the tests, but you can create your own copy

nyet (Tue, 06 Nov 2018 17:15:20 GMT):
@Baha-sk I have fixed my end by having `Init()` allow an empty function from `GetFunctionAndParameters()`, but the results are still cryptic (sometimes) if `Init()` returns an error. Not sure why, it isn't a consistent behavior. If i get something consistently reproducible I will open a bug. Until them I'm moving on.

Baha-sk (Tue, 06 Nov 2018 17:19:57 GMT):
out of curiosity, why does `Init()` returns shim.Error()? if the CC is not doing any special initialization operations just return shim.Success(), no?

nyet (Tue, 06 Nov 2018 17:20:07 GMT):
Yes, it was my mistake

nyet (Tue, 06 Nov 2018 17:20:17 GMT):
i was having it look for `function == "init"`

nyet (Tue, 06 Nov 2018 17:20:40 GMT):
(since my instantiation used to call it with "init")

Baha-sk (Tue, 06 Nov 2018 17:21:25 GMT):
you don't need to have init as part of the invocation list, it is used by the peer to start the CC only

nyet (Tue, 06 Nov 2018 17:21:34 GMT):
I am not sure why, I don't recall every doing that but something changed recently.

Baha-sk (Tue, 06 Nov 2018 17:21:56 GMT):
your functions should be the ones needed when Invoke is called

nyet (Tue, 06 Nov 2018 17:22:32 GMT):
Understood, not sure why Init() was looking for `"init"`. I may have erroneously copied it from somewhere. What is confusing is why it was working before.

Baha-sk (Tue, 06 Nov 2018 17:22:49 GMT):
ok

nyet (Tue, 06 Nov 2018 17:25:14 GMT):
oh wait

nyet (Tue, 06 Nov 2018 17:25:16 GMT):
here i is

nyet (Tue, 06 Nov 2018 17:25:19 GMT):
i am sending init

nyet (Tue, 06 Nov 2018 17:25:25 GMT):
but it isn't making it to the cc

kisna (Tue, 06 Nov 2018 17:25:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6GQj2cfftByMfuKTQ) @Baha-sk of course @Baha-sk :), I did re generate crypto keys certs and the tx blocks successfully, also inspected them that all domains are correctly updated question is, how do I verify that the default channels like e2e-orderer-syschan are created in the orderer? `../../.build/bin/cryptogen generate --config=crypto-config.yaml ../../.build/bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block export CHANNEL_NAME=custom_domain_channel && ../../.build/bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME .. anchor peer .tx files `

nyet (Tue, 06 Nov 2018 17:25:44 GMT):
``` ccPolicy := cauthdsl.SignedByAnyMember([]string{setup.OrgName + ".hlf." + setup.Domain}) req := resmgmt.InstantiateCCRequest{ Name: setup.ChainCodeID, Path: setup.ChaincodeGoPath, Version: "0", Args: [][]byte{[]byte("init")}, Policy: ccPolicy, //CollConfig: collConfig } ```

Baha-sk (Tue, 06 Nov 2018 17:28:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PqhfLEkTdRLrfMZcC) @kisna e2e-orderer-syschan is out of the SDK's scope.. we don't manipulate this channel in the SDK

Baha-sk (Tue, 06 Nov 2018 17:30:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hnm2XZARoJXNSJg9S) @nyet are you 100% positive `setup.OrgName + ".hlf." + setup.Domain` is your MSP ID?

nyet (Tue, 06 Nov 2018 17:31:39 GMT):
yep. It works fine as long as i ignore function==''... im moving on for now since i need to close those other two reviews I requested, ill circle back after i've got those nailed down.

nyet (Tue, 06 Nov 2018 17:31:39 GMT):
yep. It works fine as long as i ignore `function==''` ... im moving on for now since i need to close those other two reviews I requested, ill circle back after i've got those nailed down.

Baha-sk (Tue, 06 Nov 2018 17:32:01 GMT):
ok..

Baha-sk (Tue, 06 Nov 2018 17:35:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bsDBWxvGbzWvqn9QB) @kisna also are you on Master version of the SDK? how do you startup the peer network? there are different targets in the Makefile that start the network for different versions (1.2 or 1.3)

kisna (Tue, 06 Nov 2018 17:42:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=85SEWnagJm8hYzodd) @Baha-sk wow, that is a good point, I just checked out Version: 1.3.0-rc1 Fabric and then ran docker-compose after making the changes

Baha-sk (Tue, 06 Nov 2018 17:44:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ZeAC4YQpqYrRmYoKy) @kisna then you can run `make dockerenv-stable-up` to start your network with 1.3.0

kisna (Tue, 06 Nov 2018 17:45:16 GMT):
docker ps shows all except cli because of that reason I am trying to find how orderer health can be verified

kisna (Tue, 06 Nov 2018 17:45:17 GMT):
sure

kisna (Tue, 06 Nov 2018 17:45:31 GMT):
I am checking docker versions right now of all the containers

Baha-sk (Tue, 06 Nov 2018 17:45:45 GMT):
clean all your containers to make sure your start fresh

kisna (Tue, 06 Nov 2018 17:49:19 GMT):
hmm, looks like I did that, all orderer image and labels when I did an inspect on the container "Labels": { "com.docker.compose.config-hash": "9cf741f316e325d3e6b9f5314aabbfac7ca0c8f2a13d52ce552f6fc4db3c9735", "com.docker.compose.container-number": "1", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "e2e_custom", "com.docker.compose.service": "orderer.domain.com", "com.docker.compose.version": "1.22.0", "org.hyperledger.fabric.base.version": "0.4.12", "org.hyperledger.fabric.version": "1.3.0-rc1" }

Baha-sk (Tue, 06 Nov 2018 17:49:23 GMT):
also the above target are for scope of the integration tests

kisna (Tue, 06 Nov 2018 17:49:36 GMT):
looks like all containers are using the latest fabric version

Baha-sk (Tue, 06 Nov 2018 17:50:12 GMT):
ok, so these are your own network, not from the SDK's integration tests

kisna (Tue, 06 Nov 2018 17:51:20 GMT):
docker container inspect $(docker ps -aq) | grep -i 'fabric' returns 1.3.0-rc1

kisna (Tue, 06 Nov 2018 17:54:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=K4xmo89sx46GNWRqQ) @Baha-sk basically, I cloned the e2e_cli and made a e2e_custom and changed example.com to domain.com that is it

Baha-sk (Tue, 06 Nov 2018 17:57:20 GMT):
this is from fabric-examples?

kisna (Tue, 06 Nov 2018 17:57:29 GMT):
yes

Baha-sk (Tue, 06 Nov 2018 17:58:37 GMT):
I was talking about fabric-sdk-go.. i haven't touched fabric-examples to be honest

kisna (Tue, 06 Nov 2018 18:20:36 GMT):
got it @Baha-sk who can answer the orderer validation questions? ../../.build/bin/configtxgen -channelID custom_channel -outputBlock custom_channel_genesisblock.pb -inspectBlock custom_channel_genesisblock.pb -profile TwoOrgsOrdererGenesis also returns all MSPs, orderers properly, looks like orderer is not coming up fine, *i.e., their system channels are not and I don't know how to investigate this*

kisna (Tue, 06 Nov 2018 18:23:16 GMT):
@Baha-sk , sad but true, channel id has conventions panic: Error creating channelconfig bundle: initializing configtx manager failed: bad channel ID: channel ID 'custom_channel' contains illegal characters ;)

kisna (Tue, 06 Nov 2018 18:23:28 GMT):
no underscores are allowed in channel ID or name?

nyet (Tue, 06 Nov 2018 18:30:37 GMT):
@Baha-sk https://jira.hyperledger.org/browse/FABG-787 and https://jira.hyperledger.org/browse/FABG-788

nyet (Tue, 06 Nov 2018 18:31:04 GMT):
@kisna correct.

kisna (Tue, 06 Nov 2018 18:31:34 GMT):
yikes, where is this documented ;)

nyet (Tue, 06 Nov 2018 18:31:49 GMT):
hrm i saw it somewhere at some point

nyet (Tue, 06 Nov 2018 18:31:55 GMT):
i'd have to dig around but it is there

nyet (Tue, 06 Nov 2018 18:33:10 GMT):
@kisna https://jira.hyperledger.org/browse/FAB-10071 :/

nyet (Tue, 06 Nov 2018 18:33:56 GMT):
@kisna https://hyperledger-fabric.readthedocs.io/en/latest/commands/peerchannel.html#peer-channel-create

nyet (Tue, 06 Nov 2018 18:33:56 GMT):
@kisna https://hyperledger-fabric.readthedocs.io/en/latest/commands/peerchannel.html#peer-channel-create It must be all lower case, less than 250 characters long and match the regular expression: [a-z][a-z0-9.-]*

kisna (Tue, 06 Nov 2018 18:40:20 GMT):
yikes got it

kisna (Tue, 06 Nov 2018 18:40:43 GMT):
@nyet is there a orderer chat channel?

kisna (Tue, 06 Nov 2018 18:42:26 GMT):
orderer still cannot find e2e-orderer-syschan?

kisna (Tue, 06 Nov 2018 18:43:12 GMT):
and cli keeps searching for Attempting to fetch system channel 'e2e-orderer-syschan' ..XXX secs

kisna (Tue, 06 Nov 2018 18:46:48 GMT):
or an orderer detailed setup/documentation?

nyet (Tue, 06 Nov 2018 20:30:34 GMT):
@Baha-sk I think this related to the problem I was seeing https://jira.hyperledger.org/browse/FABG-775

Baha-sk (Tue, 06 Nov 2018 20:41:02 GMT):
yes, @vieiramanoel was working on this and even pushed a patch for this, but the error codes returned by the CC are indirectly managed in the SDK, so it's not that straight forward to expose these error codes as the SDK generates Status instances with a specific code once the response is received

Baha-sk (Tue, 06 Nov 2018 20:43:45 GMT):
for now, your cc should return shim.Error("...some error msg here...") and the SDK will expect error 500 (the string in shim.Error(..)) matches some specific strings, then the SDK will set a proper error code and return it back to you

Baha-sk (Tue, 06 Nov 2018 20:57:15 GMT):
@nyet @vieiramanoel have a look at https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/peer/peerendorser.go#L228 to see how the CC errors are extracted into `status` error

vieiramanoel (Tue, 06 Nov 2018 21:12:59 GMT):
@Baha-sk always getting 500 for cc error is awful, I'm not happy in matching error strings too, makes it not generic and for each chaincode I need to specifically implement a different rest-server

nyet (Tue, 06 Nov 2018 21:46:09 GMT):
@vieiramanoel absolutely feel the same

nyet (Tue, 06 Nov 2018 21:46:55 GMT):
even the most basic error recovery/retry exception handling is basically impossible w/o a bunch of string matching

nyet (Tue, 06 Nov 2018 21:47:04 GMT):
which is, by nature, extremely fragile

Baha-sk (Tue, 06 Nov 2018 21:50:39 GMT):
you can return `pb.Response{Status: "1234", Message: fmt.Sprintf("Failed to set value for key[%s] : %s", key, err)}` in the cc, but it needs to be handled properly in the sdk

Baha-sk (Tue, 06 Nov 2018 21:50:39 GMT):
you can return `pb.Response{Status: "1234", Message: fmt.Sprintf("Failed to set value for key[%s] : %s", key, err)}` in the cc as an example, but it needs to be handled properly in the sdk

nyet (Tue, 06 Nov 2018 21:52:07 GMT):
ah so just avoid Error() unless it really is a crazy error

nyet (Tue, 06 Nov 2018 21:52:20 GMT):
yea

nyet (Tue, 06 Nov 2018 21:52:23 GMT):
ok I see.

Baha-sk (Tue, 06 Nov 2018 21:53:14 GMT):
the available codes in the SDK are here: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/common/errors/status/codes.go#L22, these codes don't have 1:1 mapping with returned pb.Response in the CC as we can't control what the CC return

Baha-sk (Tue, 06 Nov 2018 21:53:45 GMT):
shim.Error() resolves to http 500 error

nyet (Tue, 06 Nov 2018 21:59:14 GMT):
thanks!

nyet (Tue, 06 Nov 2018 22:00:07 GMT):
@Baha-sk what about this example: ``` resp, err := setup.resClient.InstantiateCC(setup.ChannelID, req) if err != nil || resp.TransactionID == "" { // Seriously, hyperledger? if strings.Contains(err.Error(), "chaincode exists "+setup.ChainCodeID) { fmt.Println("Chaincode already instantiated on channel "+setup.ChannelID) return nil } if strings.Contains(err.Error(), "chaincode with name '"+setup.ChainCodeID+"' already exists") { fmt.Println("Chaincode already instantiated on channel "+setup.ChannelID) return nil } return errors.WithMessage(err, "failed to instantiate the chaincode on channel "+setup.ChannelID) } ```

nyet (Tue, 06 Nov 2018 22:00:28 GMT):
like i think the only way to detect this is to query the channel to see if it is already there?

nyet (Tue, 06 Nov 2018 22:00:34 GMT):
(before calling instantiate)

Baha-sk (Tue, 06 Nov 2018 22:06:33 GMT):
yes you can, usually the install and instantiate CC calls are done by an admin app.. and the user app does CC invocations and tx executions..

Baha-sk (Tue, 06 Nov 2018 22:07:13 GMT):
you can do a CC query to check if the CC is already installed prior to do instantiateCC

Baha-sk (Tue, 06 Nov 2018 22:07:13 GMT):
you can do a CC query to check if the CC is already installed prior to do instantiateCC, you're right

kisna (Tue, 06 Nov 2018 23:11:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SBtwRnGuwwgFeFuKP) found the problem that system channels (gensis block) and application channels (transactions) names were overlapping and overriding inspecting genesis block should show only system channel with all consortiums

kisna (Tue, 06 Nov 2018 23:11:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SBtwRnGuwwgFeFuKP) found the problem that system channels (gensis block) and application channels (transactions) names were overlapping and overriding inspecting genesis block should show only system channel with all consortiums Fabric custom e2e orgs and domains is up and running finally ;)

kisna (Tue, 06 Nov 2018 23:11:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SBtwRnGuwwgFeFuKP) found the problem that system channels (gensis block) and application channels (transactions) names were overlapping and overriding inspecting genesis block should show only system channel with all consortiums Fabric 1.3 custom e2e orgs and domains is up and running finally ;)

kisna (Tue, 06 Nov 2018 23:29:36 GMT):
where is the peer gossip configuration or how do peers identify each other in the same org? we only defined a docker network - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_quotient_default - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false

kisna (Tue, 06 Nov 2018 23:29:36 GMT):
where is the peer gossip configuration or how do peers identify each other in the same org other than going through so much gossip logs? we only defined a docker network - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_quotient_default - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false

kisna (Tue, 06 Nov 2018 23:29:36 GMT):
where is the peer gossip configuration or how do peers identify each other ONLY in the same ORG other than going through so much gossip logs? we only defined a common docker network for all peers in all orgs - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_quotient_default - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false

kisna (Tue, 06 Nov 2018 23:29:36 GMT):
Channel based on channel.tx which has all applications that can participate based on profile TwoOrgsChannel and we see to restrict peers from joining a channel based on channel channel.tx created on orderer i.e., channel.block which is used to join channel Why do we have to join all peers to the channel explicitly when channel.tx and channel.block already has information and peers are already connected? Where is the peer gossip configuration or how do peers identify each other ONLY in the same ORG other than going through so much gossip logs? we only defined a common docker network for all peers in all orgs - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_quotient_default - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false

kisna (Tue, 06 Nov 2018 23:29:36 GMT):
Channel based on channel.tx which has all applications that can participate based on profile TwoOrgsChannel and we seem to restrict peers from joining any channel created based on channel channel.tx created on orderer i.e., channel.block which is used to join channel Why do we have to join all peers to the channel explicitly when channel.tx and channel.block already has information and peers are already connected? Where is the peer gossip configuration or how do peers identify each other ONLY in the same ORG other than going through so much gossip logs? we only defined a common docker network for all peers in all orgs - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_quotient_default - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false

kisna (Tue, 06 Nov 2018 23:29:36 GMT):
Channel based on channel.tx which has all applications that can participate based on profile TwoOrgsChannel and we seem to restrict peers from joining any channel created based on channel channel.tx created on orderer that gives you channel.block which probably also is based on genesis.block restriction on the orderer (which orgs can participate?) is used by peers to join channel Why do we have to join all peers to the channel explicitly when channel.tx and channel.block already has information and peers are already connected? Where is the peer gossip configuration or how do peers identify each other ONLY in the same ORG other than going through so much gossip logs? we only defined a common docker network for all peers in all orgs - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_quotient_default - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false

kisna (Tue, 06 Nov 2018 23:29:36 GMT):
Channel based on channel.tx which has all applications that can participate based on profile TwoOrgsChannel and we seem to restrict peers from joining any channel created based on channel channel.tx created on orderer that gives you channel.block which probably also is based on genesis.block restriction on the orderer (which orgs can participate?) is used by peers to join channel Why do we have to join all peers to the channel explicitly when channel.tx and channel.block already has information about orgs and peers for each org are already connected? Where is the peer gossip configuration or how do peers identify each other ONLY in the same ORG other than going through so much gossip logs? we only defined a common docker network for all peers in all orgs - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_quotient_default - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false

kisna (Tue, 06 Nov 2018 23:29:36 GMT):
So, looks like genesis block is created only once with all orgs on system channel Application Channel are created per channel based on channel.tx that also has all application orgs that can participate based on a profile TwoOrgsChannel and we seem to restrict peers from joining any channel created based on channel channel.tx created on orderer that gives you channel.block which is probably also based on genesis.block restriction on orderer (which orgs can participate?) is used by peers to join channel Q) Why do we have to join all peers to the channel explicitly when channel.tx and channel.block already has information about orgs and peers for each org are already connected? Q) What is the purpose of anchor peer transactions again per peer on orderer after joining the channel? Q) Where is the peer gossip configuration or how do peers identify each other ONLY in the same ORG other than going through so much gossip logs? we only defined a common docker network for all peers in all orgs - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_quotient_default - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false

kisna (Tue, 06 Nov 2018 23:29:36 GMT):
So, looks like genesis block is created only once with all orgs on system channel Application Channel are created per channel based on channel.tx that also has all application orgs that can participate based on a profile TwoOrgsChannel and we seem to restrict peers from joining any channel created based on channel channel.tx created on orderer that gives you channel.block which is probably also based on genesis.block restriction on orderer (which orgs can participate?) is used by peers to join channel Q) Why do we have to join all peers to the channel explicitly when channel.tx and channel.block already has information about orgs and peers for each org are already connected? Q) What is the purpose of anchor peer transactions again per peer on orderer after joining the channel? Aren't there leaders per Org that are automatically assigned as an Anchor peer? Q) Where is the peer gossip configuration or how do peers identify each other ONLY in the same ORG other than going through so much gossip logs? we only defined a common docker network for all peers in all orgs - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_quotient_default - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false

kisna (Tue, 06 Nov 2018 23:29:36 GMT):
So, looks like genesis block is created only once with all orgs on system channel Application Channel are created per channel based on channel.tx that also has all application orgs that can participate based on a profile TwoOrgsChannel and we seem to restrict peers from joining any channel created based on channel channel.tx created on orderer that gives you channel.block which is probably also based on genesis.block restriction on orderer (which orgs can participate?) is used by peers to join channel Q) Why do we have to join all peers to the channel explicitly when channel.tx and channel.block already has information about orgs and peers for each org are already connected? Q) What is the purpose of anchor peer transactions again per peer on orderer after joining the channel? Aren't there leaders per Org that are automatically assigned as an Anchor peer? Q) Where is the peer gossip configuration or how do peers identify each other ONLY in the same ORG other than going through so much gossip logs? Q) Same with chaincode, why install on all peers? and again instantiate on orderer - so many times :)? we only defined a common docker network for all peers in all orgs - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_quotient_default - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false

kisna (Tue, 06 Nov 2018 23:54:42 GMT):
Each org has a few peers, genesis block has all orgs, orderer info - based on configs Channel (.tx) has subset of orgs - based on configs Why would we restrict specific peers in same org like this?

Kyroy (Wed, 07 Nov 2018 07:39:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=THYAG5YHq9Q3Rrti2) @Baha-sk @troyronda Any idea? I think it is missing, so I created FABG-786

enriquebusti (Wed, 07 Nov 2018 12:02:08 GMT):
Has joined the channel.

Baha-sk (Wed, 07 Nov 2018 14:42:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TiDXtFe6THN3rJ4zv) @Kyroy do you mean this test: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L197 ?

Baha-sk (Wed, 07 Nov 2018 14:44:13 GMT):
the above call is to install the CC on the org peers, and a few lines below is instantiating the CC on the channel with a cc policy

Kyroy (Wed, 07 Nov 2018 14:50:05 GMT):
@Baha-sk Kinda... There, I need the possibility to specify the chaincode instantiation policy

Baha-sk (Wed, 07 Nov 2018 14:53:22 GMT):
@Kyroy the cc policy is set at the end of line 207 in the `resmgmt.InstantiateCCRequest` instance

Kyroy (Wed, 07 Nov 2018 15:04:07 GMT):
@Baha-sk this is the chaincode policy. But I want to set the instantiation policy: https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4noah.html#packaging ```an optional instantiation policy which can be syntactically described by the same policy used for endorsement and described in Endorsement policies, and```

Kyroy (Wed, 07 Nov 2018 15:04:07 GMT):
@Baha-sk this is the endorsement policy. But I want to set the instantiation policy: https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4noah.html#packaging ```an optional instantiation policy which can be syntactically described by the same policy used for endorsement and described in Endorsement policies, and```

Baha-sk (Wed, 07 Nov 2018 15:05:38 GMT):
that ccpolicy is nothing else but the endorsement policy (https://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html)

Kyroy (Wed, 07 Nov 2018 15:07:16 GMT):
no, it's not. I also just recently learned this. This is why I am looking for this feature in the sdk - The creator of the instantiation transaction of the chaincode on a channel is validated against the instantiation policy of the chaincode. - specifies the set of peers on a channel that must execute chaincode and endorse the execution results

Kyroy (Wed, 07 Nov 2018 15:07:16 GMT):
no, it's not. I also just recently learned this. This is why I am looking for this feature in the sdk - The creator of the instantiation transaction of the chaincode on a channel is validated against the instantiation policy of the chaincode. - [endorsement policy] specifies the set of peers on a channel that must execute chaincode and endorse the execution results

Kyroy (Wed, 07 Nov 2018 15:44:15 GMT):
@Baha-sk https://jira.hyperledger.org/projects/FABG/issues/FABG-786 do you agree?

Baha-sk (Wed, 07 Nov 2018 15:50:18 GMT):
right now the test I pasted above has a simple `SignedByAnyMember` policy of Org1MSP(https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L203), but it can be changed to be more restrictive like SignedByMSPAdmin("Org1MSP") for instance

Baha-sk (Wed, 07 Nov 2018 15:50:18 GMT):
@Kyroy right now the test I pasted above has a simple `SignedByAnyMember` policy of Org1MSP(https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L203), but it can be changed to be more restrictive like SignedByMSPAdmin("Org1MSP") for instance

Baha-sk (Wed, 07 Nov 2018 15:50:54 GMT):
I don't see why we need an additional policy in CCInstantiate request

mshirman (Wed, 07 Nov 2018 21:37:08 GMT):
Has joined the channel.

kisna (Wed, 07 Nov 2018 21:48:38 GMT):
unable to run example channel/chaincode on my private fabric network -- peer error `2018-11-07 21:36:09.135 UTC [vscc] Validate -> ERRO 037 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode example_cc_go in tx 2:0 failed: signature set did not satisfy policy 2018-11-07 21:36:09.135 UTC [committer/txvalidator] validateTx -> ERRO 038 VSCCValidateTx for transaction txId = 89b66864a08c4ccff94bb46be529853a6d9572b0ccb8fc28159543d3e9f0f220 returned error: validation of endorsement policy for chaincode example_cc_go in tx 2:0 failed: signature set did not satisfy policy 2018-11-07 21:36:09.135 UTC [committer/txvalidator] Validate -> INFO 039 [custom-channel] Validated block [2] in 0ms 2018-11-07 21:36:09.135 UTC [valimpl] preprocessProtoBlock -> WARN 03a Channel [custom-channel]: Block [2] Transaction index [0] TxId [89b66864a08c4ccff94bb46be529853a6d9572b0ccb8fc28159543d3e9f0f220] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-11-07 21:36:09.164 UTC [kvledger] CommitWithPvtData -> INFO 03b [custom-channel] Committed block [2] with 1 transaction(s) in 28ms (state_validation=0ms block_commit=18ms state_commit=6ms) peer1.quotient.coupons.com | 2018-11-07 21:36:09.135 UTC [valimpl] preprocessProtoBlock -> WARN 03a Channel [custom-channel]: Block [2] Transaction index [0] TxId [89b66864a08c4ccff94bb46be529853a6d9572b0ccb8fc28159543d3e9f0f220] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE]`

kisna (Wed, 07 Nov 2018 21:48:38 GMT):
unable to run example channel/chaincode on my private fabric network -- peer error `2018-11-07 21:36:09.135 UTC [vscc] Validate -> ERRO 037 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode example_cc_go in tx 2:0 failed: signature set did not satisfy policy 2018-11-07 21:36:09.135 UTC [committer/txvalidator] validateTx -> ERRO 038 VSCCValidateTx for transaction txId = 89b66864a08c4ccff94bb46be529853a6d9572b0ccb8fc28159543d3e9f0f220 returned error: validation of endorsement policy for chaincode example_cc_go in tx 2:0 failed: signature set did not satisfy policy 2018-11-07 21:36:09.135 UTC [committer/txvalidator] Validate -> INFO 039 [custom-channel] Validated block [2] in 0ms 2018-11-07 21:36:09.135 UTC [valimpl] preprocessProtoBlock -> WARN 03a Channel [custom-channel]: Block [2] Transaction index [0] TxId [89b66864a08c4ccff94bb46be529853a6d9572b0ccb8fc28159543d3e9f0f220] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-11-07 21:36:09.164 UTC [kvledger] CommitWithPvtData -> INFO 03b [custom-channel] Committed block [2] with 1 transaction(s) in 28ms (state_validation=0ms block_commit=18ms state_commit=6ms) peer1.domain.com | 2018-11-07 21:36:09.135 UTC [valimpl] preprocessProtoBlock -> WARN 03a Channel [custom-channel]: Block [2] Transaction index [0] TxId [89b66864a08c4ccff94bb46be529853a6d9572b0ccb8fc28159543d3e9f0f220] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE]`

kisna (Thu, 08 Nov 2018 00:22:46 GMT):
policies are set open to all, 0-of policy: # the policy each MUST sign 0-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - signed-by: "user1" - signed-by: "user2"

kisna (Thu, 08 Nov 2018 00:23:42 GMT):
what is code: 404, code: 63, msg: Failed to get Affiliation? In RegistrationRequest(user.getName(), "org1.department1"); what is this department and org already set?

kisna (Thu, 08 Nov 2018 00:23:54 GMT):
if I change it msp org, it keeps failing with failed to get affiliation

nyet (Thu, 08 Nov 2018 03:22:29 GMT):
@Baha-sk why do the s390 tests fail so much?

Kyroy (Thu, 08 Nov 2018 08:28:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DayHLtTHfEcuvTtsx) @Baha-sk > I don't see why we need an additional policy in CCInstantiate request Please try to read my messages carefully. The "chaincode instantiation policy" is provided on `install`. I quoted the documentation a lot to make clear that these are 2 different things..

adamhardie (Thu, 08 Nov 2018 10:38:17 GMT):
hello all, can someone guide me on how to acheive this :

adamhardie (Thu, 08 Nov 2018 10:38:18 GMT):
https://jira.hyperledger.org/browse/FAB-9081?jql=text%20~%20%22github.com%2Fhyperledger%2Ffabric%2Fcore%2Fchaincode%2Flib%2Fcid%22

adamhardie (Thu, 08 Nov 2018 10:38:47 GMT):
i'd like to use the cid library in my chaincode but i am not sure how to mount the go lib

adamhardie (Thu, 08 Nov 2018 10:39:08 GMT):
should i bring down my peer container, install, and then bring the container back up?

adamhardie (Thu, 08 Nov 2018 10:39:41 GMT):
what if the peer is peer0? it may prevent some clients calling chaincode for a while during the upgrade?

VenkatThota (Thu, 08 Nov 2018 11:13:12 GMT):
Has joined the channel.

Baha-sk (Thu, 08 Nov 2018 16:31:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Z6DEGBLoEczh2otE3) @Kyroy but why is it called `instantiation` policy if you want this available on `install` ?

Baha-sk (Thu, 08 Nov 2018 16:35:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4c4y4EquLwQDg5wHn) @nyet my 2 cents are the tests run quicker than the peer/cc containers which is causing the test to query before the fabric network is updated, which is causing different failures at different runs, I'm trying to add retries where these failures occur

Kyroy (Thu, 08 Nov 2018 16:40:47 GMT):
@Baha-sk I also don't know why it was designed like this (on `install`). It is called `instantiation policy` because it defines who is allowed to instantiate the chaincode. And later who is allowed to upgrade (if I got it correctly).

Kyroy (Thu, 08 Nov 2018 16:40:47 GMT):
What I was looking for is how to prevent a random party from upgrading a chaincode to a malicious version. e.g. to read private information from private collections, etc...

nyet (Thu, 08 Nov 2018 16:43:09 GMT):
@kyroy And that hypothetical party has instantiation privileges but not install privileges?

nyet (Thu, 08 Nov 2018 16:43:09 GMT):
@Kyroy And that hypothetical party has instantiation privileges but not install privileges?

nyet (Thu, 08 Nov 2018 16:46:16 GMT):
(because they have endorsement privs?)

nyet (Thu, 08 Nov 2018 16:48:17 GMT):
IIRC you must have install privileges to upgrade chaincode (it is the same action as install).

nyet (Thu, 08 Nov 2018 16:48:52 GMT):
Update/upgrade is just install with a different version number.

kisna (Thu, 08 Nov 2018 23:08:05 GMT):
cross posting again here: Java SDK + Java Chaincode instantiation keeps throwing a time out on instantiation, whereas GO chaincode works fine `2018-11-08 18:48:25,798 main ERROR Channel:4103 - Sending proposal to peer1.domain.com failed because of timeout(120000 milliseconds) expiration java.util.concurrent.TimeoutException at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4086) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:2501) at org.hyperledger.fabric.sdkintegration.End2endIT_custom_java_quotient.runChannel(End2endIT_custom_java_quotient.java:473) ` 2018-11-08 21:24:19.083 UTC [core/comm] ServerHandshake -> ERRO 0a5 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.9:33486"} 2018-11-08 21:24:19.099 UTC [core/comm] ServerHandshake -> ERRO 0a6 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.9:33462"} 2018-11-08 21:24:19.804 UTC [endorser] SimulateProposal -> ERRO 0a7 [channel][7c4fa0e2] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode SimpleChaincode:1 for transaction some times, do see some time outs in ZK and Kafka and have no idea why Whereas go chain code works perfectly fine, no other difference in code Install works fine, instantiate Java chaincode always times out 2018-11-08 20:48:27.686 UTC [lscc] executeInstall -> INFO 031 Installed Chaincode [SimpleChaincode] Version [1] to peer Reproducible again and again only with java chaincode instantiation with same logs, go chaincode instantiate works fine: https://hastebin.com/osafazisaj.rb

kisna (Thu, 08 Nov 2018 23:08:05 GMT):
cross posting again here: Java SDK + Java Chaincode instantiation keeps throwing a time out on instantiation, whereas GO chaincode works fine `2018-11-08 18:48:25,798 main ERROR Channel:4103 - Sending proposal to peer1.domain.com failed because of timeout(120000 milliseconds) expiration java.util.concurrent.TimeoutException at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4086) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:2501) at org.hyperledger.fabric.sdkintegration.End2endIT_custom_java_quotient.runChannel(End2endIT_custom_java_quotient.java:473) ` 2018-11-08 21:24:19.083 UTC [core/comm] ServerHandshake -> ERRO 0a5 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.9:33486"} 2018-11-08 21:24:19.099 UTC [core/comm] ServerHandshake -> ERRO 0a6 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.9:33462"} 2018-11-08 21:24:19.804 UTC [endorser] SimulateProposal -> ERRO 0a7 [channel][7c4fa0e2] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode SimpleChaincode:1 for transaction Whereas go chain code works perfectly fine, no other difference in code Install works fine, instantiate Java chaincode always times out 2018-11-08 20:48:27.686 UTC [lscc] executeInstall -> INFO 031 Installed Chaincode [SimpleChaincode] Version [1] to peer Reproducible again and again only with java chaincode instantiation with same logs, go chaincode instantiate works fine: https://hastebin.com/osafazisaj.rb

kisna (Thu, 08 Nov 2018 23:08:05 GMT):
cross posting again here: Java SDK + Java Chaincode instantiation keeps throwing a time out on instantiation, whereas GO chaincode works fine `2018-11-08 18:48:25,798 main ERROR Channel:4103 - Sending proposal to peer1.domain.com failed because of timeout(120000 milliseconds) expiration java.util.concurrent.TimeoutException at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4086) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:2501) at org.hyperledger.fabric.sdkintegration.End2endIT_custom_java_quotient.runChannel(End2endIT_custom_java.java:473) ` 2018-11-08 21:24:19.083 UTC [core/comm] ServerHandshake -> ERRO 0a5 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.9:33486"} 2018-11-08 21:24:19.099 UTC [core/comm] ServerHandshake -> ERRO 0a6 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.9:33462"} 2018-11-08 21:24:19.804 UTC [endorser] SimulateProposal -> ERRO 0a7 [channel][7c4fa0e2] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode SimpleChaincode:1 for transaction Whereas go chain code works perfectly fine, no other difference in code Install works fine, instantiate Java chaincode always times out 2018-11-08 20:48:27.686 UTC [lscc] executeInstall -> INFO 031 Installed Chaincode [SimpleChaincode] Version [1] to peer Reproducible again and again only with java chaincode instantiation with same logs, go chaincode instantiate works fine: https://hastebin.com/osafazisaj.rb

kisna (Thu, 08 Nov 2018 23:49:54 GMT):
when I switch from Kafka to SOLO orderer, I get a better and different exception, Kafka orderer probably freezes docker network saturation? SOLO throws an error while launching: API error (404): network e2e_domain_default not found https://hastebin.com/konoqewofe.md

kisna (Thu, 08 Nov 2018 23:49:54 GMT):
when I switch from Kafka to SOLO orderer, I get a better and different exception, Kafka orderer probably freezes docker network saturation? SOLO throws an error while launching: API error (404): network e2e_domain_default not found Or or failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction https://hastebin.com/konoqewofe.md

kisna (Thu, 08 Nov 2018 23:49:54 GMT):
when I switch from Kafka to SOLO orderer, I get a better and different exception, Kafka orderer probably freezes docker network saturation? SOLO throws an error: failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction https://hastebin.com/konoqewofe.md

Kyroy (Fri, 09 Nov 2018 07:16:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mQgs3aW5DNkKk69A3) @nyet Scenario: multiple orgs on a channel, let's say org1, org2, org3, ... All of them are "equal", so they have the same rights. Let's assume all policies are MAJORITY If you have a chaincode where, e.g. there exists a private-collection from org1 and org2, they can implement a function to get some special documents also for org3 (by querying peer from org1/org2). So they implemented an access control. But when you do not set the instantiation policy, org3 could install a new version of this cc, and just upgrade the chaincode. this means that a) org3 can remove current features from the CC and make a DoS for the chaincode b) org3 can remove the access control and access all documents in the private collection by querying the peers from org1/org2 At least this is how I understood `instantiation policies`. When I stated this problem in the #fabric chat, I was forwarded to the instantiation policy. ( @Baha-sk )

kisna (Fri, 09 Nov 2018 07:42:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5kQTdnQPN32PFZbkG) looks like others have faced this issue too: https://stackoverflow.com/questions/52982837/problem-about-instantiating-java-chaincode-in-hyperledger-fabric-v1-3-failed-t https://stackoverflow.com/questions/51394881/lscc-chaincode-timeout-error

kisna (Fri, 09 Nov 2018 07:42:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5kQTdnQPN32PFZbkG) looks like others have faced this issue too, giving up on Java chain code and switching to GO chain code: https://stackoverflow.com/questions/52982837/problem-about-instantiating-java-chaincode-in-hyperledger-fabric-v1-3-failed-t https://stackoverflow.com/questions/51394881/lscc-chaincode-timeout-error

Baha-sk (Fri, 09 Nov 2018 15:20:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=otpYtfm7vdSXJmvEr) @Kyroy yes, I see the instantiation policies in the CDS (ChaincodeDeploymentSpec in Fabric), I guess we will need to update the SDK package to add this policy.. would you like to help with this? probably create a lira ticket for tracking purposes in the FABG project : https://jira.hyperledger.org/projects/FABG/summary

Kyroy (Fri, 09 Nov 2018 15:21:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rewtwfKDLH2XPjKRG) @Baha-sk https://jira.hyperledger.org/projects/FABG/issues/FABG-786 I also considered contributing again

Baha-sk (Fri, 09 Nov 2018 15:24:44 GMT):
thanks a lot @Kyroy , probably need to add this policy to ccPackage:https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/resource/api.go#L55 ? @troyronda, @bstasyszyn, @firas.qutishat ^^^

Kyroy (Fri, 09 Nov 2018 15:25:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qNbzcZKFPZGjMjPRa) @Baha-sk Why dont you use the CCPackage interface? https://github.com/hyperledger/fabric/blob/release-1.3/core/common/ccprovider/ccprovider.go#L34

Baha-sk (Fri, 09 Nov 2018 15:27:19 GMT):
@Kyroy that's in Fabric, the one I pasted above is the SDK version

Baha-sk (Fri, 09 Nov 2018 15:27:44 GMT):
and it's the one used in the request sent during InstallCC request in resmgmt client

Kyroy (Fri, 09 Nov 2018 15:28:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BqGRCZ9Ttrz4WKF9o) @Baha-sk yes I know. You also include fabric as a `third_party` library. When using the interface, you can be sure that you don't muss a feature like this

Kyroy (Fri, 09 Nov 2018 15:28:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BqGRCZ9Ttrz4WKF9o) @Baha-sk yes I know. You also include fabric as a `third_party` library. When using the interface, you can be sure that you don't miss a feature like this

Baha-sk (Fri, 09 Nov 2018 15:29:56 GMT):
we need to update the request struct we use inside the sdk, which already has it's own version of the struct

Baha-sk (Fri, 09 Nov 2018 15:31:04 GMT):
ie in here: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/resmgmt.go#L54

Kyroy (Fri, 09 Nov 2018 15:31:34 GMT):
And my question is, why not updating this struct to the interface a) you use native structs of fabric and dont define own structs that differ b) by using native structs, you dont miss any features c) users that know fabric constructs can just use them I get that right now the sdk has its own stuff

Baha-sk (Fri, 09 Nov 2018 15:33:10 GMT):
also the link you pasted above is an interface, we only need to worry about the data being sent in the request

Baha-sk (Fri, 09 Nov 2018 15:33:10 GMT):
also the link you pasted above is an interface, we only need to worry about the data being sent in the request @Kyroy

Taaanos (Fri, 09 Nov 2018 15:36:14 GMT):
Hey, I would like to test something and I would like to gather some opinions and things to keep in mind. I would like to deploy a local(on a macbook) network (just a peer, an orderer, a ca) install fabric-sdk-go on a rasberry pi 3 and use the pi as a client in order to sign a tx proposal and sent it for endorsing to the local network (deployed on my macbook). Anything that comes in mind would be pretty useful

Taaanos (Fri, 09 Nov 2018 15:36:14 GMT):
Hey I would like to test something and I would like to gather some opinions and things to keep in mind. I would like to deploy a local network (just a peer, an orderer, a ca) install fabric-sdk-go on a rpi3 and use the pi as a client in order to sign a tx proposal and sent it for endorsing to the local network (deployed on my macbook). Anything that comes to mind would be pretty useful

Taaanos (Fri, 09 Nov 2018 15:36:14 GMT):
Hey, I would like to test something and I would like to gather some opinions and things to keep in mind. I would like to deploy a local network (just a peer, an orderer, a ca) install fabric-sdk-go on a rpi3 and use the pi as a client in order to sign a tx proposal and sent it for endorsing to the local network (deployed on my macbook). Anything that comes to mind would be pretty useful

Taaanos (Fri, 09 Nov 2018 15:36:14 GMT):
Hey, I would like to test something and I would like to gather some opinions and things to keep in mind. I would like to deploy a local(on a macbook) network (just a peer, an orderer, a ca) install fabric-sdk-go on a rpi3 and use the pi as a client in order to sign a tx proposal and sent it for endorsing to the local network (deployed on my macbook). Anything that comes to mind would be pretty useful

Taaanos (Fri, 09 Nov 2018 15:36:14 GMT):
Hey, I would like to test something and I would like to gather some opinions and things to keep in mind. I would like to deploy a local(on a macbook) network (just a peer, an orderer, a ca) install fabric-sdk-go on a rpi3 and use the pi as a client in order to sign a tx proposal and sent it for endorsing to the local network (deployed on my macbook). Anything that comes in mind would be pretty useful

Kyroy (Fri, 09 Nov 2018 15:37:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ZfoSL7jW8EkNznB8W) @Baha-sk I know. I don't want to sound harsh. It took me a week to convince you that `chaincode instantiation policy` differs from `endorsement policy`. And I even sent you the official documentation links. It was just a proposal to use the interface in the struct instead of re-defining the struct in the sdk. I am not sure how much refactoring would be needed. Maybe I will just try and send a PR if it works. I will check next week or so

Baha-sk (Fri, 09 Nov 2018 16:04:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nA5LD6KLBQYKk7txX) @Taaanos not sure what rpi3 is, but as long as you have the sdk configs, channel tx and creds accessible to the instance of your sdk, you should be able to communicate with any fabric network mentioned in your config, whether from a docker container, local machine or a remote container/machine

Taaanos (Fri, 09 Nov 2018 16:06:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zq49hSkvN8Z2grYX5) @Baha-sk ok! Rasberry pi 3

Baha-sk (Fri, 09 Nov 2018 16:21:39 GMT):
oh I see.. thanks for enlightening my ignorance @Taaanos ! I guess it should work as long as you have Go installed on it :)

Baha-sk (Fri, 09 Nov 2018 16:21:39 GMT):
oh I see.. thanks for enlightening my ignorance @Taaanos ! I guess it should work as long as you Go installed on it :)

nyet (Sat, 10 Nov 2018 02:32:59 GMT):
@Kyroy understood.

Kyroy (Mon, 12 Nov 2018 10:13:25 GMT):
I have multiple sdk instances running in my application. And the sdk constantly loggs ``` 2018-11-12T11:12:41.82+0100 [APP/PROC/WEB/1] OUT [fabsdk/client] 2018/11/12 10:12:41 UTC - dynamicdiscovery.(*ChannelService).evaluate -> WARN error getting peers from discovery response: access denied ```

Kyroy (Mon, 12 Nov 2018 10:14:26 GMT):
How can I reliably disable this log? I used ```logging.SetLevel("fabsdk/client", logging.CRITICAL) ``` After `fabsdk.New` which helps sometimes but since I create new sdk instances on the fly, I still can see a lot of these logs

AlexanderZhovnuvaty (Mon, 12 Nov 2018 11:06:19 GMT):
Has left the channel.

Switch2Logic (Tue, 13 Nov 2018 11:16:44 GMT):
Hey guys... Does anyone have a simple chaincode query example of querying?invoking chaincode. Very difficult to work through the documentation and examples too much going on...

Switch2Logic (Tue, 13 Nov 2018 11:16:44 GMT):
Hey guys... Does anyone have a simple chaincode query example of querying?invoking chaincode. Very difficult to work through the documentation and examples too much going on... I have done a nodejs app but GO seems to be increasingly more involved and I would like to keep everything in one languages. Chaincode and Client Application.

Switch2Logic (Tue, 13 Nov 2018 11:21:46 GMT):
Hey guys... Does anyone have a simple chaincode query example of querying?invoking chaincode. Very difficult to work through the documentation and examples too much going on... I have done a nodejs app but GO seems to be increasingly more involved and I would like to keep everything in one languages. Chaincode and Client Application.

Taaanos (Tue, 13 Nov 2018 11:40:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nkD4zhwk4w7G5omaC) @Switch2Logic You can check 1. fabric-samples/chaincode/marbles02/go/marbles_chaincode.go 2.fabric-samples/chaincode/sacc/sacc.go

Taaanos (Tue, 13 Nov 2018 11:40:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nkD4zhwk4w7G5omaC) @Switch2Logic You can check 1. fabric-samples/chaincode/marbles02/go/marbles_chaincode.go 2.samples/chaincode/sacc/sacc.go

Taaanos (Tue, 13 Nov 2018 11:40:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nkD4zhwk4w7G5omaC) @Switch2Logic You can check 1. fabric-samples/chaincode/marbles02/go/marbles_chaincode.go 2.fabric-samples/chaincode/sacc/sacc.go

Taaanos (Tue, 13 Nov 2018 11:45:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nkD4zhwk4w7G5omaC) @Switch2Logic this might help you as well https://chainhero.io/2018/03/tutorial-build-blockchain-app-2/

Switch2Logic (Tue, 13 Nov 2018 11:45:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8aPpY5arazB5SLA6P) @Taaanos Thank you @Taaanos but I am not talking about actual chain code that I have down. I am busy with a client side app like nodejs but using go....

GingerMoon (Tue, 13 Nov 2018 12:06:49 GMT):
Has joined the channel.

GingerMoon (Tue, 13 Nov 2018 12:08:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ALLgeC2NbitKHzi2g) @Switch2Logic @Switch2Logic You may refer to the example provided in the sdk https://github.com/hyperledger/fabric-sdk-go

Switch2Logic (Tue, 13 Nov 2018 12:10:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Zpfihhnp3DMwHbYGL) @GingerMoon Yea I do but I want something simple just to query there is too much going on need a minimal setup too much dependencies that you need to run down...

Switch2Logic (Tue, 13 Nov 2018 12:11:21 GMT):
I have also read the documentation I am asking if some one created there own little app not going with full implementation as they do... Very difficult to clear out all the noise

Switch2Logic (Tue, 13 Nov 2018 12:11:21 GMT):
I have also read the documentation I am asking if some one created there own little app not going with full implementation as they do... Very difficult to clear out all the noise. chainhero.io also too much noise and joining of channel all this is already setup so it crashes because the channel already exists.

GingerMoon (Tue, 13 Nov 2018 12:21:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Zpfihhnp3DMwHbYGL) I am also blocked in windows... /c/goworkspace/src/github.com/hyperledger/fabric-sdk-go/test/integration/e2e (master) $ go test # github.com/hyperledger/fabric-sdk-go/vendor/github.com/google/certificate-transparency-go/x509 ..\..\..\vendor\github.com\google\certificate-transparency-go\x509\root_windows.go:112:3: cannot use uintptr(unsafe.Pointer(sslPara)) (type uintptr) as type syscall.Pointer in field value FAIL github.com/hyperledger/fabric-sdk-go/test/integration/e2e [build failed]

GingerMoon (Tue, 13 Nov 2018 12:24:20 GMT):
@Switch2Logic Totally agree with you... The most difficult part is the config.yaml, the definitions of the key config fields are not clear enough.

Switch2Logic (Tue, 13 Nov 2018 12:32:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qm2X9aGmSiq8GRmzG) @GingerMoon I got the config.yaml part working with chainhero.ios example and can log orderer and see its contacting it but fails because the channel exists.. The trying to query only just messes up everything... NodeJS workd like a charm... query enroling admin I have done all of that... But GO docs and examples are too involved to many moving parts.. Like example this is how you query bam done next file this is how you invoke bam done... not linking all of the shit in one... makes it very difficult to read and work through... Just some back ground I am a masters student in software engineering so not a complete idiot... Just Its easier to read your own code than trying to read very involved code like entering a job and there give you 500000 lines of code to get familiar with it..

Switch2Logic (Tue, 13 Nov 2018 12:33:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qm2X9aGmSiq8GRmzG) @GingerMoon Seems like TLS related issues... Check certs directories in config.yaml

GingerMoon (Tue, 13 Nov 2018 12:54:34 GMT):
@Switch2Logic I made a quite simple example https://github.com/GingerMoon/fabric-samples

GingerMoon (Tue, 13 Nov 2018 12:56:33 GMT):
@Taaanos do you have any idea about the error "failed to create transactor: Channel_Cfg_Cache - cache is closed"?

GingerMoon (Tue, 13 Nov 2018 12:57:34 GMT):
@Switch2Logic I made a simple example, but was blocked by the error above

Taaanos (Tue, 13 Nov 2018 12:59:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=e4MSkEakTTYhsRkqT) @Switch2Logic Indeed, fabric-sdk-go is not well documented. I have a hard time as well.

GingerMoon (Tue, 13 Nov 2018 13:00:38 GMT):

payment.go - Copy.txt

GingerMoon (Tue, 13 Nov 2018 13:01:06 GMT):

config - Copy.yaml.txt

GingerMoon (Tue, 13 Nov 2018 13:01:22 GMT):
@Switch2Logic use the byfn.sh up to start the network

GingerMoon (Tue, 13 Nov 2018 13:02:43 GMT):

docker-compose-cli - Copy.yaml.txt

Taaanos (Tue, 13 Nov 2018 13:03:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Sog9eFCp5EaYRjH2T) @GingerMoon No. Will look into it though, if I have any findings I will let you know.

GingerMoon (Tue, 13 Nov 2018 13:12:17 GMT):
@Taaanos Thanks. I also posted the question here: https://stackoverflow.com/questions/53281766/fabric-sdk-go-returns-error-failed-to-create-transactor-channel-cfg-cache-ca

Switch2Logic (Tue, 13 Nov 2018 14:05:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=775z4kmWQdv4ukAxS) @Taaanos Guess I am staying at nodejs for now...

Baha-sk (Tue, 13 Nov 2018 18:35:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=r7CRsDawc7FN73939) @Switch2Logic try to use `make integration-test` first to see if this works

sudeshrshetty (Tue, 13 Nov 2018 18:44:07 GMT):
@Switch2Logic Try this https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L83 You have to create new sdk instance using config, something lie 'sdk = fabsdk.New(config.FromFile()' Then create Channel client using channel id and user (as given in that test) You don't need retry opts or target endpoints for simple straightforward test client.Query() ` client.Query(channel.Request{.......})` is enough

nyet (Tue, 13 Nov 2018 21:42:39 GMT):
@Switch2Logic You can try my skeleton https://github.com/Blockdaemon/hlf-database-app

nyet (Wed, 14 Nov 2018 05:04:42 GMT):
I'm trying to do a back to back channel create with an anchor-peers update. Is `WaitForOrdererConfigUpdate()` still needed? The comment in https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/base_test_setup.go says ```// WaitForOrdererConfigUpdate waits until the config block update has been committed. // In Fabric 1.0 there is a bug that panics the orderer if more than one config update is added to the same block. // This function may be invoked after each config update as a workaround.```

Switch2Logic (Wed, 14 Nov 2018 06:46:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=McJDSzJBfNXskekdF) @nyet Thank you... I will be checking it out and let you know how it goes... :)

Switch2Logic (Wed, 14 Nov 2018 08:09:00 GMT):
Any ideas ? -----failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [peer0.hospital1.switch2logic.co.za]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.hospital1.switch2logic.co.za]

SuperSeiyan (Wed, 14 Nov 2018 10:15:53 GMT):
Has joined the channel.

habpygo (Wed, 14 Nov 2018 14:58:04 GMT):
Hi, When trying to set up my network, I get error messages like `[org1].Users[admin].Cert: source data must be an array or slice, got map` any idea where to look for the error? Thanks.

nyet (Wed, 14 Nov 2018 16:30:43 GMT):
@Switch2Logic Looks like a simple connectivity problem. Can you ping the peer from the client? Can the order see the peer?

nyet (Wed, 14 Nov 2018 16:30:43 GMT):
@Switch2Logic Looks like a simple connectivity problem. Can you ping the peer from the client? Can the orderer see the peer?

nyet (Wed, 14 Nov 2018 16:30:43 GMT):
@Switch2Logic Looks like a simple connectivity problem. Can you ping the peer from the client? Can the orderer see the peer? Are the appropriate ports open?

nyet (Wed, 14 Nov 2018 16:33:53 GMT):
@habpygo Looks like a JSON unmarshaler is not seeing Certs in the proper layout. Where is that Cert specified?

nyet (Wed, 14 Nov 2018 17:17:08 GMT):
I'm having this exact problem : https://lists.hyperledger.org/g/fabric/message/4968 both LOCALMSPID and MSPCONFIGPATH are set. launching a fabric network in docker, using `docker exec -ti /bin/bash` to run a shell in container. `peer node status` results in permission denied, the non-admin peer commands work. How do i tell peer to use the admin cert?

nyet (Wed, 14 Nov 2018 17:17:08 GMT):
I'm having this exact problem : https://lists.hyperledger.org/g/fabric/message/4968 both LOCALMSPID and MSPCONFIGPATH are set. launching a fabric network in docker, using `docker exec -ti /bin/bash` to run a shell in container. `peer node status` results in `access denied`, the non-admin peer commands work. How do i tell peer to use the admin cert?

nyet (Wed, 14 Nov 2018 17:24:54 GMT):
in the peer `CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp`

nyet (Wed, 14 Nov 2018 17:26:20 GMT):
but in docker: ``` volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/org1.${DOMAIN}/peers/peer0.org1.${DOMAIN}/msp:/var/hyperledger/msp - ./crypto-config/peerOrganizations/org1.${DOMAIN}/peers/peer0.org1.${DOMAIN}/tls:/var/hyperledger/tls ``` According to this https://stackoverflow.com/questions/51398420/hyperledger-fabric-msp-directory-to-be-used-while-defining-docker-compose `CORE_PEER_MSPCONFIGPATH` should be `users/Admin@org1.example.com/msp`, not `peers/..../msp`

nyet (Wed, 14 Nov 2018 17:29:46 GMT):
do i need something like ` - ./crypto-config/peerOrganizations/org1.${DOMAIN}/users/Admin@org1.${DOMAIN}/msp:/var/hyperledger/admin_msp` for the "peer" command to work inside that container?

nyet (Wed, 14 Nov 2018 17:42:03 GMT):
I guess the answer is, the peer running in the container as a real peer uses the peer msp, but when running the peer command as a client needs the admin msp?

nyet (Wed, 14 Nov 2018 17:56:57 GMT):
I guess the answer is yes, it works.

Baha-sk (Wed, 14 Nov 2018 18:47:49 GMT):
@nyet there's no need to change docker compose as this `/var/hyperledger/msp` is a mounted volume to whatever path you specified in docker-compose file.. make sure the volume mounting is done properly (you can log in to the container and double check if `/var/hyperledger/msp` is properly mapped

Baha-sk (Wed, 14 Nov 2018 18:47:49 GMT):
@nyet there's no need to change docker compose as this `/var/hyperledger/msp` is a mounted volume to whatever path you specified in docker-compose file.. make sure the volume mounting is done properly (you can log in to the container and double check if `/var/hyperledger/msp` is properly mapped)

Baha-sk (Wed, 14 Nov 2018 18:50:39 GMT):
if not, then double check `./crypto-config/peerOrganizations/org1.${DOMAIN}/peers/peer0.org1.${DOMAIN}/msp` is a valid path and `${DOMAIN}` environment variable is properly set in docker-compose

Baha-sk (Wed, 14 Nov 2018 18:51:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8RqBuvDgNY3XffsgB) @nyet you don't need `/var/hyperledger/admin_msp` in the peer container

Baha-sk (Wed, 14 Nov 2018 18:51:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8RqBuvDgNY3XffsgB) @nyet you don't need `/var/hyperledger/admin_msp` in the peer container, only `/var/hyperledger/msp`

nyet (Wed, 14 Nov 2018 20:15:21 GMT):
well i was trying to run the peer command as a client in the peer container

nyet (Wed, 14 Nov 2018 20:15:29 GMT):
e.g. `peer node status`

nyet (Wed, 14 Nov 2018 20:15:53 GMT):
I get permission failed if i use the peer MSP, but it works with the users/Admin MSP. is that not expected?

nyet (Wed, 14 Nov 2018 20:15:53 GMT):
I get permission failed if i use the peer MSP, but it works with the `users/Admin@` MSP. is that not expected?

nyet (Wed, 14 Nov 2018 20:15:53 GMT):
I get `access denied` if i use the peer MSP, but it works with the `users/Admin@` MSP. is that not expected?

nyet (Wed, 14 Nov 2018 20:20:33 GMT):
```root@4ec1ba101149:/var/hyperledger# ls users/Admin\@org1.hlf.blockdaemon.io/msp/signcerts/ Admin@org1.hlf.blockdaemon.io-cert.pem root@4ec1ba101149:/var/hyperledger# ls msp/signcerts/ peer0.org1.hlf.blockdaemon.io-cert.pem ```

nyet (Wed, 14 Nov 2018 20:21:25 GMT):
where `users` is ` - ./crypto-config/peerOrganizations/org1.${DOMAIN}/users:/var/hyperledger/users`

nyet (Wed, 14 Nov 2018 20:22:37 GMT):
is my policy wrong for the peer0 identity?

nyet (Wed, 14 Nov 2018 20:27:23 GMT):
`2018-11-14 20:25:03.054 UTC [bccsp_sw] loadPrivateKey -> DEBU 033 Loading private key [65f275a0f06516b525f47c77fbe645019bb2b9f4f5560c9cea67f3fe70b6af0a] at [/var/hyperledger/users/Admin@org1.hlf.blockdaemon.io/msp/keystore/65f275a0f06516b525f47c77fbe645019bb2b9f4f5560c9cea67f3fe70b6af0a_sk]...` works but `2018-11-14 20:25:39.783 UTC [bccsp_sw] loadPrivateKey -> DEBU 033 Loading private key [cdc2bfef39dffca18b1b3ff946488a35382a8ffdd408a7666efff2619199cec9] at [/var/hyperledger/msp/keystore/cdc2bfef39dffca18b1b3ff946488a35382a8ffdd408a7666efff2619199cec9_sk]...` does not

nyet (Wed, 14 Nov 2018 20:27:28 GMT):
hm

nyet (Wed, 14 Nov 2018 20:38:04 GMT):
what Policy determines if a client can do "peer node status" on a peer?

yacovm (Wed, 14 Nov 2018 20:43:43 GMT):
@nyet local MSP admins

nyet (Wed, 14 Nov 2018 20:52:06 GMT):
@yacovm where in configtx?

nyet (Wed, 14 Nov 2018 20:53:48 GMT):
i dont get why users cert works but the peers msp does not

yacovm (Wed, 14 Nov 2018 20:54:23 GMT):
no, local MSP admins

yacovm (Wed, 14 Nov 2018 20:54:32 GMT):
is in the `admincerts/` folder

nyet (Wed, 14 Nov 2018 20:54:39 GMT):
thats what i dont get

nyet (Wed, 14 Nov 2018 20:54:55 GMT):
the peer is started with `CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp`

nyet (Wed, 14 Nov 2018 20:55:00 GMT):
which is the peer msp

nyet (Wed, 14 Nov 2018 20:55:27 GMT):
but when i `docker exec` into the peer container and run `peer node status` it doesn't work unless i point it to the user msp

yacovm (Wed, 14 Nov 2018 21:00:00 GMT):
right

yacovm (Wed, 14 Nov 2018 21:00:11 GMT):
in the `msp` folder

yacovm (Wed, 14 Nov 2018 21:00:15 GMT):
there is a folder `admincerts`

yacovm (Wed, 14 Nov 2018 21:00:30 GMT):
you need the MSPCONFIGPATH of the *client administrator*

yacovm (Wed, 14 Nov 2018 21:00:37 GMT):
that holds that certificate in the admincerts

yacovm (Wed, 14 Nov 2018 21:00:55 GMT):
I know it sounds weird that you have authentication just for the node to tell you "I'm alive"

yacovm (Wed, 14 Nov 2018 21:01:11 GMT):
but honestly I wouldn't use this method at all

yacovm (Wed, 14 Nov 2018 21:01:13 GMT):
it's useless.

yacovm (Wed, 14 Nov 2018 21:01:25 GMT):
We're developing a real health check based on an HTTP endpoint for v1.4

yacovm (Wed, 14 Nov 2018 21:01:42 GMT):
so you could curl and the peer would actually check stuff like its database, docker client connection,

yacovm (Wed, 14 Nov 2018 21:01:46 GMT):
and tell you if it's OK or not

yacovm (Wed, 14 Nov 2018 21:01:53 GMT):
right now the `peer node status` is useless

nyet (Wed, 14 Nov 2018 21:02:42 GMT):
the msp folder of the USER msp, not the PEER msp though :)

nyet (Wed, 14 Nov 2018 21:02:42 GMT):
the msp folder of the USERS msp, not the PEER msp though :)

nyet (Wed, 14 Nov 2018 21:03:07 GMT):
yea im trying to set up monitoring for the nodes etc.

nyet (Wed, 14 Nov 2018 21:03:14 GMT):
that is the intent :/

nyet (Wed, 14 Nov 2018 21:03:46 GMT):
i was expecting to be able to use MSPCONFIGPATH of the peers, not the users

nyet (Wed, 14 Nov 2018 21:04:45 GMT):
```root@e95205629a1c:/var/hyperledger# ls msp/admincerts/ Admin@org1.hlf.blockdaemon.io-cert.pem root@e95205629a1c:/var/hyperledger# ls users/Admin\@org1.hlf.blockdaemon.io/msp/admincerts/ Admin@org1.hlf.blockdaemon.io-cert.pem ````

nyet (Wed, 14 Nov 2018 21:04:59 GMT):
the 1st one does not work, the second one does

nyet (Wed, 14 Nov 2018 21:05:41 GMT):
which is odd because the file is the same :/

nyet (Wed, 14 Nov 2018 21:21:01 GMT):
and the keystore files are different :/

yacovm (Wed, 14 Nov 2018 21:22:19 GMT):
> the msp folder of the USERS msp, not the PEER msp though I know... did i say something else, @nyet ?

yacovm (Wed, 14 Nov 2018 21:22:48 GMT):
@nyet don't use that `peer node status` for monitoring

yacovm (Wed, 14 Nov 2018 21:22:52 GMT):
either wait for v1.4

nyet (Wed, 14 Nov 2018 21:22:56 GMT):
ok

yacovm (Wed, 14 Nov 2018 21:22:57 GMT):
or use discovery

nyet (Wed, 14 Nov 2018 21:23:07 GMT):
so dont use anythign that needs admin on peer?

yacovm (Wed, 14 Nov 2018 21:23:08 GMT):
https://hyperledger-fabric.readthedocs.io/en/latest/discovery-cli.html

yacovm (Wed, 14 Nov 2018 21:23:18 GMT):
I am just saying that `peer node status` is worthless

yacovm (Wed, 14 Nov 2018 21:23:30 GMT):
the peer can have cancer and still say it is fine

nyet (Wed, 14 Nov 2018 21:23:32 GMT):
what about other peer node commands?

yacovm (Wed, 14 Nov 2018 21:23:41 GMT):
use https://hyperledger-fabric.readthedocs.io/en/latest/discovery-cli.html

yacovm (Wed, 14 Nov 2018 21:23:47 GMT):
on a single peer

nyet (Wed, 14 Nov 2018 21:23:48 GMT):
ok

yacovm (Wed, 14 Nov 2018 21:23:54 GMT):
and it gives you the list of all the other peers

yacovm (Wed, 14 Nov 2018 21:24:01 GMT):
it's much better than asking all the peers

nyet (Wed, 14 Nov 2018 21:24:04 GMT):
got it

nyet (Wed, 14 Nov 2018 21:24:05 GMT):
thanks

yacovm (Wed, 14 Nov 2018 21:24:12 GMT):
now, in v1.4 we will have metrics support

yacovm (Wed, 14 Nov 2018 21:24:21 GMT):
so the peer will be able to send via udp, all kinds of information

yacovm (Wed, 14 Nov 2018 21:24:28 GMT):
way too much information if you ask me ;)

yacovm (Wed, 14 Nov 2018 21:24:38 GMT):
and also the peer will have an endpoint `/healthz`

yacovm (Wed, 14 Nov 2018 21:24:42 GMT):
that you could `curl`

nyet (Wed, 14 Nov 2018 21:27:25 GMT):
so all the rest of the peer commands seem to work it was only `peer node status` that had cert issues

nyet (Wed, 14 Nov 2018 21:27:30 GMT):
understood

nyet (Wed, 14 Nov 2018 21:27:36 GMT):
looking at discovery now

Switch2Logic (Thu, 15 Nov 2018 06:07:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TJ3qEnnSgovvBqFLx) @nyet yes sir... I mean I run nodejs commands no problem but go keeps on making kak...

Switch2Logic (Thu, 15 Nov 2018 06:09:16 GMT):

Screenshot from 2018-11-15 08-08-03.png

periodic (Thu, 15 Nov 2018 10:04:05 GMT):
Has joined the channel.

Taaanos (Thu, 15 Nov 2018 11:55:52 GMT):
Do you pass all the tests from `fabric-sdk-go`?

Taaanos (Thu, 15 Nov 2018 11:55:52 GMT):
Do you pass all the tests from 'fabric-sdk-go'?

Taaanos (Thu, 15 Nov 2018 11:56:44 GMT):
*inside the `fabric-sdk-go` folder I run `go test ./...`

habpygo (Thu, 15 Nov 2018 12:00:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TJ3qEnnSgovvBqFLx) @nyet The cert is specified in the config.yaml file using `cryptoPath` rather than `path`

habpygo (Thu, 15 Nov 2018 12:00:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qZqTGzppqhufZwiBk) @nyet The cert is specified in the config.yaml file using `cryptoPath` rather than `path

habpygo (Thu, 15 Nov 2018 12:00:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qZqTGzppqhufZwiBk) @nyet The cert is specified in the config.yaml file using `cryptoPath` rather than `path`

Taaanos (Thu, 15 Nov 2018 12:21:19 GMT):
``

Taaanos (Thu, 15 Nov 2018 12:21:19 GMT):
`pkg/core/cryptosuite/common/pkcs11/contextHandle.go:196:77:warning: Mechanism not declared by package pkcs11 (interfacer, maligned, unconvert) pkg/core/cryptosuite/common/pkcs11/contextHandle.go:205:84:warning: Attribute not declared by package pkcs11 (interfacer, maligned, unconvert) pkg/core/cryptosuite/common/pkcs11/contextHandle.go:316:116:warning: error return value not checked (ObjectHandle not declared by package pkcs11) (errcheck) pkg/client/channel/chclientrun.go:18:30:warning: nolint directive did not match any issue (nolint) pkg/client/channel/chclient.go:44:15:warning: nolint directive did not match any issue (nolint) make: *** [unit-test] Error 1`

Taaanos (Thu, 15 Nov 2018 12:21:56 GMT):
``` pkg/core/cryptosuite/common/pkcs11/contextHandle.go:196:77:warning: Mechanism not declared by package pkcs11 (interfacer, maligned, unconvert) pkg/core/cryptosuite/common/pkcs11/contextHandle.go:205:84:warning: Attribute not declared by package pkcs11 (interfacer, maligned, unconvert) pkg/core/cryptosuite/common/pkcs11/contextHandle.go:316:116:warning: error return value not checked (ObjectHandle not declared by package pkcs11) (errcheck) pkg/client/channel/chclientrun.go:18:30:warning: nolint directive did not match any issue (nolint) pkg/client/channel/chclient.go:44:15:warning: nolint directive did not match any issue (nolint) make: *** [unit-test] Error 1 ```

Taaanos (Thu, 15 Nov 2018 12:22:20 GMT):
last prints after `make`

Taaanos (Thu, 15 Nov 2018 12:22:20 GMT):
last prints after running `make`

Taaanos (Thu, 15 Nov 2018 13:32:49 GMT):
1. Are you able to use the current release of `fabric-sdk-go`?

Taaanos (Thu, 15 Nov 2018 13:33:23 GMT):
2. build fails from Jenkins, is the sdk still usable?

Taaanos (Thu, 15 Nov 2018 14:28:20 GMT):
I cannot make even with release v1.0.0-alpha4 a906355

Taaanos (Thu, 15 Nov 2018 14:28:33 GMT):
``` pkg/util/concurrent/lazyref/lazyref.go:213:74:warning: nolint directive did not match any issue (nolint) pkg/util/concurrent/lazyref/lazyref.go:218:65:warning: nolint directive did not match any issue (nolint) pkg/util/concurrent/futurevalue/futurevalue.go:83:25:warning: nolint directive did not match any issue (nolint) pkg/util/concurrent/futurevalue/futurevalue.go:101:54:warning: nolint directive did not match any issue (nolint) pkg/fabsdk/provider/chpvdr/cachekey.go:35:59:warning: nolint directive did not match any issue (nolint) pkg/fabsdk/provider/chpvdr/cachekey.go:67:59:warning: nolint directive did not match any issue (nolint) make: *** [lint] Error 1 ```

Baha-sk (Thu, 15 Nov 2018 14:31:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bnBpqLordn5vGBMoo) @Taaanos this has been discussed on this channel previously.. the SDK GO uses Go up to version 1.10.4, including gometalinter... Go 1.11 is still not supported.. you will to have to install Go 1.10.4 (at most) and its corresponding gometalinter binary

Baha-sk (Thu, 15 Nov 2018 14:31:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bnBpqLordn5vGBMoo) @Taaanos this has been discussed on this channel previously.. the SDK GO uses Go up to version 1.10.4, including gometalinter... Go 1.11 is still not supported.. you will to have Go 1.10.4 it's corresponding gometalinter binary

Taaanos (Thu, 15 Nov 2018 14:39:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=taT2EubgwQoxWYQjE) @Baha-sk thank you for your answer. I am using go 1.10.4 but how can I find the correct gometalinter?

Baha-sk (Thu, 15 Nov 2018 14:41:13 GMT):
you can run `which gometalinter` where it's installed ...

Taaanos (Thu, 15 Nov 2018 14:42:22 GMT):
@Baha-sk Plus, are we talking about master branch?

Taaanos (Thu, 15 Nov 2018 14:43:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nCXjfrr7zeKZFHzot) @Baha-sk I have `gometalinter` at the correct path `go/bin/gometalinter`

Baha-sk (Thu, 15 Nov 2018 14:43:30 GMT):
yes, no master branch in go sdk... you can probably delete the binary then run `make depend` to reinstall it

Baha-sk (Thu, 15 Nov 2018 14:43:30 GMT):
yes, on master branch in go sdk... you can probably delete the binary then run `make depend` to reinstall it

Baha-sk (Thu, 15 Nov 2018 14:45:07 GMT):
unfortunately when printing the version of gometalinter (`gometalinter --version`) it just says: `gometalinter version master built from ? on `

Baha-sk (Thu, 15 Nov 2018 14:45:55 GMT):
it's because the install script builds it from GitHub..

Taaanos (Thu, 15 Nov 2018 14:59:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mcT8z5QZXpGXsBb9z) @Baha-sk done, but unfortunately I still get errors after running `make` for the whole SDK ``` pkg/core/cryptosuite/common/pkcs11/contextHandle_test.go:260:10:warning: unused variable or constant invalid operation: handle.ctx (variable of type *invalid type) has no field or method GetSessionInfo (varcheck) pkg/core/cryptosuite/common/pkcs11/contextHandle.go:290:98:warning: error return value not checked (ObjectHandle not declared by package pkcs11) (errcheck) pkg/client/channel/chclient.go:44:15:warning: nolint directive did not match any issue (nolint) pkg/client/channel/chclientrun.go:18:30:warning: nolint directive did not match any issue (nolint) make: *** [unit-test] Error 1 ```

Taaanos (Thu, 15 Nov 2018 14:59:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mcT8z5QZXpGXsBb9z) @Baha-sk done, but unfortunately I get errors after running `make` for the whole SDK ``` pkg/core/cryptosuite/common/pkcs11/contextHandle_test.go:260:10:warning: unused variable or constant invalid operation: handle.ctx (variable of type *invalid type) has no field or method GetSessionInfo (varcheck) pkg/core/cryptosuite/common/pkcs11/contextHandle.go:290:98:warning: error return value not checked (ObjectHandle not declared by package pkcs11) (errcheck) pkg/client/channel/chclient.go:44:15:warning: nolint directive did not match any issue (nolint) pkg/client/channel/chclientrun.go:18:30:warning: nolint directive did not match any issue (nolint) make: *** [unit-test] Error 1 ```

Baha-sk (Thu, 15 Nov 2018 15:18:44 GMT):
@tanos can you delete all go metalinter binaries locally? ie: ` gometalinter deadcode dupl errcheck gas gochecknoglobals gochecknoinits goconst gocyclo goimports golint gosimple gotype ineffassign interfacer lll maligned megacheck misspell nakedret safesql staticcheck structcheck unconvert unparam unused varcheck`

Baha-sk (Thu, 15 Nov 2018 15:18:44 GMT):
@Taaanos can you delete all go metalinter binaries locally? ie: ``` gometalinter deadcode dupl errcheck gas gochecknoglobals gochecknoinits goconst gocyclo goimports golint gosimple gotype ineffassign interfacer lll maligned megacheck misspell nakedret safesql staticcheck structcheck unconvert unparam unused varcheck```

Baha-sk (Thu, 15 Nov 2018 15:18:44 GMT):
@Taaanos can you delete all go metalinter binaries locally? ie: ` gometalinter deadcode dupl errcheck gas gochecknoglobals gochecknoinits goconst gocyclo goimports golint gosimple gotype ineffassign interfacer lll maligned megacheck misspell nakedret safesql staticcheck structcheck unconvert unparam unused varcheck`

Baha-sk (Thu, 15 Nov 2018 15:18:52 GMT):
then run `make depend` again

Baha-sk (Thu, 15 Nov 2018 15:21:02 GMT):
most probably `golint` and `errcheck` are not at the same version

Baha-sk (Thu, 15 Nov 2018 15:21:02 GMT):
most probably `golint`, `varcheck` and `errcheck` are not at the same version

Baha-sk (Thu, 15 Nov 2018 15:22:05 GMT):
you can probably delete those three only first? but I gave you the full list the Go SDK uses

Taaanos (Thu, 15 Nov 2018 15:42:59 GMT):
@Baha-sk ok, I did `rm`ed everything that you mentioned and run `make depend` again. After satisfying all dependencies I run `make` and still get the same error, failing somewhere at `unit-test`. What about jenkins status build:failing? Also thank you for your time.

Taaanos (Thu, 15 Nov 2018 15:43:34 GMT):
here is the output ``` . . . pkg/core/cryptosuite/common/pkcs11/contextHandle.go:522:21:warning: unused struct field invalid operation: ctx (variable of type *invalid type) has no field or method OpenSession (structcheck) pkg/client/channel/chclientrun.go:18:30:warning: nolint directive did not match any issue (nolint) pkg/client/channel/chclient.go:44:15:warning: nolint directive did not match any issue (nolint) make: *** [unit-test] Error 1 ``` `

Taaanos (Thu, 15 Nov 2018 16:08:20 GMT):
@Baha-sk at you installation, are you able to pass all the tests from `make`?

nyet (Thu, 15 Nov 2018 16:54:33 GMT):
@Taaanos I had the same problem. Metalinter is completely broken. All it takes is one wayward binary and nothing works. Make sure NONE of the metalinters are anywhere in your path except the ones for the sdk

nyet (Thu, 15 Nov 2018 17:12:20 GMT):
Also @Baha-sk I guess my PR is stuck pending fixing the s390 unit-tests? :/

nyet (Thu, 15 Nov 2018 17:12:35 GMT):
I would try to fix it but I dont have an s390 handy

Baha-sk (Thu, 15 Nov 2018 17:20:05 GMT):
@nyet, do `rebase` and then check if the build passes this time

Baha-sk (Thu, 15 Nov 2018 17:21:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oJDJScNDwjLZM4CPB) @Taaanos this means you still have another version of golint somewhere in go path that's taking precedence

nyet (Thu, 15 Nov 2018 17:38:09 GMT):
@Baha-sk thanks will do

nyet (Thu, 15 Nov 2018 18:04:54 GMT):
@Baha-sk looks like the s390 IT passed.

nyet (Thu, 15 Nov 2018 18:05:16 GMT):
so whatever you did either fixed it, or we got lucky :)

Baha-sk (Thu, 15 Nov 2018 19:43:54 GMT):
@nyet my invocation retry patch fix apparently fixed the builds... but just to make sure, can you reply a message with "reverify" in your patch? it will restart the verification builds to ensure integration-tests are still passing..

Baha-sk (Thu, 15 Nov 2018 19:43:54 GMT):
@nyet my invocation retry patch apparently fixed the builds... but just to make sure, can you reply a message with "reverify" in your patch? it will restart the verification builds to ensure integration-tests are still passing..

nyet (Thu, 15 Nov 2018 20:51:24 GMT):
@Baha-sk done

nyet (Thu, 15 Nov 2018 20:51:49 GMT):
Well started anyway.

nyet (Thu, 15 Nov 2018 22:22:08 GMT):
@Baha-sk failed again :/

ameijer (Thu, 15 Nov 2018 22:59:35 GMT):
Has joined the channel.

twoneks (Fri, 16 Nov 2018 09:00:55 GMT):
Hi guys. I'm enrolling a user after the registration. I know based on the keystore configuration params that the user's key and cert are stored in a given folder. I would like to let the user handle the key and the cert. I would like to give him back his key and cert and every time he performs a transaction request he will giving me back the credentials and I use the [CreateSigningIdentity](https://github.com/hyperledger/fabric-sdk-go/blob/42e17991cdc4c0fe1d0540decf2a78c5b1f90c1f/pkg/msp/getsigid.go#L69) to create the Identity to sign the transaction request. How could I walkaround the fact that the files are stored in the filesystem? In case Is not possible hoiw could I retrive the correct pk of a given cert from the file system

twoneks (Fri, 16 Nov 2018 09:00:55 GMT):
Hi guys. I'm enrolling a user after the registration. I know based on the keystore configuration params that the user's key and cert are stored in a given folder. I would like to let the user handle the key and the cert. I would like to give him back his key and cert and every time he performs a transaction request he will giving me back the credentials and I use the [CreateSigningIdentity](https://github.com/hyperledger/fabric-sdk-go/blob/42e17991cdc4c0fe1d0540decf2a78c5b1f90c1f/pkg/msp/getsigid.go#L69) to create the Identity to sign the transaction request. How could I walkaround the fact that the files are stored in the filesystem? In case Is not possible hoiw could I retrive the correct pk of a given cert from the file system?

Taaanos (Fri, 16 Nov 2018 10:36:37 GMT):
@Baha-sk @nyet impossible. Uninstalled go. Reinstalled 1.10.4 from .dmg + `dep` as well. From a fresh clone of `fabric-sdk-go` I run 1. `make depend` and then 2. `make` and get the same errors. What about the jenkins tag that `build:failing`? Here is a pastebin from all the output https://pastebin.com/iSW81J5F

Taaanos (Fri, 16 Nov 2018 10:36:37 GMT):
@Baha-sk @nyet impossible. Uninstalled go. Reinstalled 1.10.4 from .dmg + `dep` as well. From a fresh clone of `fabric-sdk-go` I run 1.`make depend` and then 2. `make` and get the same errors. What about the jenkins tag that `build:failing`?

Taaanos (Fri, 16 Nov 2018 10:36:37 GMT):
@Baha-sk @nyet impossible. Uninstalled go. Reinstalled 1.10.4 from .dmg + `dep` as well. From a fresh clone of `fabric-sdk-go` I run 1.`make depend` and then 2. `make` and get the same errors. What about the jenkins tag that `build:failing`? Here is a pastebin from all the output https://pastebin.com/iSW81J5F

Taaanos (Fri, 16 Nov 2018 11:49:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=LaWMj8Qua6PeJWcjQ) Made a fresh install on an ubuntu VM and got exactly the same error.

Baha-sk (Fri, 16 Nov 2018 14:39:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CkSEmSxnaZdEcNELL) @nyet seems like Jenkins is not responding this morning, I can't see your build logs..

Baha-sk (Fri, 16 Nov 2018 14:40:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6ABKJfT6cNt3bX4qL) @Taaanos do you have Go 1.11 installed on your machine/vm by any chance? (along with 1.10.4)

Baha-sk (Fri, 16 Nov 2018 14:40:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6ABKJfT6cNt3bX4qL) @Taaanos do you have Go 1.11 installed your machine/vm by any chance?

Baha-sk (Fri, 16 Nov 2018 14:40:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6ABKJfT6cNt3bX4qL) @Taaanos do you have Go 1.11 installed on your machine/vm by any chance?

Baha-sk (Fri, 16 Nov 2018 14:43:28 GMT):
@Taaanos, also the metalinter binaries are not installed in `fabric-sdk-go`, they're installed in your GOAPTH's bin folder usually

Taaanos (Fri, 16 Nov 2018 14:44:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9oSprnbGwvbugmjyw) @Baha-sk no, downloaded and installed it `go1.10.4.linux-amd64.tar.gz`

Baha-sk (Fri, 16 Nov 2018 14:44:12 GMT):
so reinstalled `fabric-sdk-go` won't make any difference if the binaries have not been manually removed from the /bin folder

Baha-sk (Fri, 16 Nov 2018 14:44:12 GMT):
so reinstalling `fabric-sdk-go` won't make any difference if the binaries have not been manually removed from the /bin folder

Taaanos (Fri, 16 Nov 2018 14:45:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uGeLCcByLyCoWcS46) @Baha-sk removing them everytime after pulling `fabric-sdk-go`

Taaanos (Fri, 16 Nov 2018 14:46:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9eaTkMRi6HhyqgpR7) ``` cd $GOPATH/bin rm gometalinter deadcode dupl errcheck gas gochecknoglobals gochecknoinits goconst gocyclo goimports golint gosimple gotype ineffassign interfacer lll maligned megacheck misspell nakedret safesql staticcheck structcheck unconvert unparam unused varcheck ls ```

Baha-sk (Fri, 16 Nov 2018 14:47:21 GMT):
ok, that's what I was referring to..

Baha-sk (Fri, 16 Nov 2018 14:48:32 GMT):
and you're saying after `make depend` and `make all` you still get metalinter errors?

Baha-sk (Fri, 16 Nov 2018 14:50:08 GMT):
that's technically not possible, unless you're on a branch that has an older makefile/build scripts

Baha-sk (Fri, 16 Nov 2018 14:50:26 GMT):
this is how I got it to work for me

Taaanos (Fri, 16 Nov 2018 14:55:30 GMT):
``` ▶ git status On branch master Your branch is up to date with 'origin/master'. nothing to commit, working tree clean ```

Taaanos (Fri, 16 Nov 2018 14:56:40 GMT):
@Baha-sk

Taaanos (Fri, 16 Nov 2018 14:57:14 GMT):
``` ▶ go version go version go1.10.4 darwin/amd64 ```

Baha-sk (Fri, 16 Nov 2018 15:02:24 GMT):
and if you do `ls -l` on $GOPATH/bin after `make depend` do you see those binaries with an updated timestamp?

Taaanos (Fri, 16 Nov 2018 15:08:46 GMT):
After deleting all said bins:

Taaanos (Fri, 16 Nov 2018 15:09:06 GMT):

Screenshot 2018-11-16 at 16.08.39.png

Taaanos (Fri, 16 Nov 2018 15:09:47 GMT):
running make depend and make all and I will post a screenie

Taaanos (Fri, 16 Nov 2018 15:16:51 GMT):

Screenshot 2018-11-16 at 16.16.26.png

Taaanos (Fri, 16 Nov 2018 15:16:59 GMT):
@Baha-sk

Baha-sk (Fri, 16 Nov 2018 15:20:07 GMT):
seems right

Baha-sk (Fri, 16 Nov 2018 15:24:44 GMT):
not sure why it doesn't work for you @Taaanos , I guess you can wait for go 1.11 support, for now you can disable the linters in the `unit-test` target by setting `TEST_WITH_LINTER=false` in the makefile.. but it doesn't guarantee linting code you introduce/change in the sdk

habpygo (Fri, 16 Nov 2018 15:32:37 GMT):
Hi @Taaanos, Just to make 100% sure, I got these type of problems when upgrading to go version 1.11 and I had to downgrade to 1.10.4 again. However, after downgrading there remained some funnies. If you run `go version`, do you get 1.10.4? Running `which go` do you get the right path? On my Mac I get usr/local/go/bin Running `which gofmt` I get /usr/local/go/bin/gofmt. I remember that I had to delete gofmt in the wrong path.

habpygo (Fri, 16 Nov 2018 15:33:22 GMT):
Just check where 1.10.4 should reside and gofmt as well.

Taaanos (Fri, 16 Nov 2018 15:35:31 GMT):

Screenshot 2018-11-16 at 16.35.08.png

habpygo (Fri, 16 Nov 2018 15:36:10 GMT):
Looks good. Sorry, no other suggestions.

troyronda (Fri, 16 Nov 2018 15:38:21 GMT):
@Taaanos it's possible another tool installed gofmt for you.

troyronda (Fri, 16 Nov 2018 15:39:10 GMT):
I assume you have tried to delete gofmt and then run make depend and then run make all in one sequence?

troyronda (Fri, 16 Nov 2018 15:39:10 GMT):
I assume you have tried to delete gofmt and then run make depend and then run make unit-test in one sequence?

troyronda (Fri, 16 Nov 2018 15:40:18 GMT):
we should probably just upgrade to go 1.11 :P

troyronda (Fri, 16 Nov 2018 15:40:18 GMT):
on a side-note, we should probably just upgrade to go 1.11 :P

troyronda (Fri, 16 Nov 2018 15:40:18 GMT):
on a side-note, we should probably just upgrade to go 1.11 :P. This issue sounds annoying.

habpygo (Fri, 16 Nov 2018 15:42:33 GMT):
Hi, I get these error messages when trying to start the network ``` [Org2].Users[admin].Cert: source data must be an array or slice, got map [Org2].Users[User1].Cert: source data must be an array or slice, got map [ordererorg].Users[admin].Cert: source data must be an array or slice, got map [Org1].Users[admin].Cert: source data must be an array or slice, got map [Org1].Users[User1].Cert: source data must be an array or slice, got map ``` And the network comes back with `[fabsdk/fab] 2018/11/16 15:11:18 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [umcchannel] creator org [Org1MSP]]` Anyone an idea where to look for the error. Thanks

habpygo (Fri, 16 Nov 2018 15:42:33 GMT):
Hi, I get these error messages when trying to start the network ``` [Org2].Users[admin].Cert: source data must be an array or slice, got map [Org2].Users[User1].Cert: source data must be an array or slice, got map [ordererorg].Users[admin].Cert: source data must be an array or slice, got map [Org1].Users[admin].Cert: source data must be an array or slice, got map [Org1].Users[User1].Cert: source data must be an array or slice, got map ``` And the network comes back with `[fabsdk/fab] 2018/11/16 15:11:18 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [mychannel] creator org [Org1MSP]]` Anyone an idea where to look for the error. Thanks

troyronda (Fri, 16 Nov 2018 15:43:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9MQwwzPBs8XWBvRFC) @Baha-sk Is this error happening on a fresh SDK checkout??

troyronda (Fri, 16 Nov 2018 15:43:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9MQwwzPBs8XWBvRFC) @Baha-sk Is this error happening on a fresh SDK checkout?

troyronda (Fri, 16 Nov 2018 15:43:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9MQwwzPBs8XWBvRFC) @Baha-sk @Taaanos Is this error happening on a fresh SDK checkout?

habpygo (Fri, 16 Nov 2018 15:43:05 GMT):
umcchannel is mychannel

troyronda (Fri, 16 Nov 2018 15:44:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xe4xrwytJS8HBToAn) @habpygo What fn are you calling that with the map?

habpygo (Fri, 16 Nov 2018 15:46:07 GMT):
Yes, @Taaanos, that’s what I did as well (@Troyronda’s tip). I deleted `gofmt` and started from scratch.

habpygo (Fri, 16 Nov 2018 15:46:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yxTqETzp3BCXw4G8S) @troyronda targets, err := OrgTargetPeers([]string{setup.OrgID}, cfgBackends...)

habpygo (Fri, 16 Nov 2018 15:48:06 GMT):
I think that's where the error originates.

troyronda (Fri, 16 Nov 2018 15:48:56 GMT):
@sudeshrshetty ^^

habpygo (Fri, 16 Nov 2018 15:52:09 GMT):
Just for the info, I use HLF v1.3 and upgraded directly from 1.1

sudeshrshetty (Fri, 16 Nov 2018 16:13:18 GMT):
@habpygo Did you checkout fresh fabric-sdk-go? any change on top?

habpygo (Fri, 16 Nov 2018 16:14:17 GMT):
I deleted the old fabric-sdk-go and cloned it again.

sudeshrshetty (Fri, 16 Nov 2018 16:14:50 GMT):
any config update/override?

habpygo (Fri, 16 Nov 2018 16:14:50 GMT):
I ran the integration test with succes (exit 0)

habpygo (Fri, 16 Nov 2018 16:16:14 GMT):
I am not sure what to do with the override. I had them in the config file, deleted them, then put it back again.

habpygo (Fri, 16 Nov 2018 16:17:36 GMT):
@tanos one more try. You have your go paths configured correctly?

sudeshrshetty (Fri, 16 Nov 2018 16:18:15 GMT):
`source data must be an array or slice, got map` error pops up when you override config backend with unexpected strut types and config fails to resolve it

habpygo (Fri, 16 Nov 2018 16:19:32 GMT):
Not sure what you mean. Can you point me to a correct example in the sdk?

habpygo (Fri, 16 Nov 2018 16:21:16 GMT):
@Taaanos Did you correct the GOPATH and Root in the .bashrc or .profile files?

sudeshrshetty (Fri, 16 Nov 2018 16:22:37 GMT):
@habpygo here is the sample for overriding channels in config programmatically https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multi_orgs_ch_update_signatures_test.go#L317

sudeshrshetty (Fri, 16 Nov 2018 16:23:01 GMT):
similarly you can override other config elements

habpygo (Fri, 16 Nov 2018 16:23:31 GMT):
OK thanks @sudeshrshetty , I will try that out.

sudeshrshetty (Fri, 16 Nov 2018 16:24:03 GMT):
@habpygo just curious, which config element you are trying to override? Why don't you directly change config file?

habpygo (Fri, 16 Nov 2018 16:26:58 GMT):
@sudeshrshetty I'm not trying to override anything really. As I said I commented the overide from the config.yaml file out and tried without succes; then I put it in a separate file `local_entity_matchers,yaml` with no luck. At the moment I'm not overriding anything.

habpygo (Fri, 16 Nov 2018 16:26:58 GMT):
@sudeshrshetty I'm not trying to override anything really. As I said I commented the overide from the config.yaml file out and tried without succes; then I put it in a separate file `local_entity_matchers,yaml` with no luck. At the moment I'm not overriding anything. Whatever I try, I keep on getting this message.

habpygo (Fri, 16 Nov 2018 16:26:58 GMT):
@sudeshrshetty I'm not trying to override anything really. As I said I commented the overide from the config.yaml file out and tried without succes; then I put it in a separate file `local_entity_matchers,yaml` with no luck. At the moment I'm not overriding anything. Whatever I try, I keep on getting this message. Perhaps you could point me to an example in the sdk without overrides as well, so I can try it out?

sudeshrshetty (Fri, 16 Nov 2018 16:28:43 GMT):
So you have fresh config file from master. no additional changes

nyet (Fri, 16 Nov 2018 16:30:15 GMT):
The first set of errors are on network startup though, not the client

habpygo (Fri, 16 Nov 2018 16:30:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=HMHaznodZeP6Wgdea) @sudeshrshetty Yes, I changed a lot. All my orgs have different names (I'm not using Org1.example.com, but for example UMCorganisation.umc.com) and I created all the cyrpto material with those names. It worked fine with Fabric version 1.1

nyet (Fri, 16 Nov 2018 16:30:44 GMT):
@habpygo yes the example.com stuff is infuriating

nyet (Fri, 16 Nov 2018 16:30:52 GMT):
i really wish they had made templates at least

nyet (Fri, 16 Nov 2018 16:30:59 GMT):
to make whiteboxing a bit easier for POCs

nyet (Fri, 16 Nov 2018 16:31:34 GMT):
are you using all of the same certs and genesis blocks from your 1.1 setup?

nyet (Fri, 16 Nov 2018 16:31:48 GMT):
i had to blast all of mine and start from scratch to make it work

habpygo (Fri, 16 Nov 2018 16:31:51 GMT):
@nyet my problem really is that I'm battling with the configuration of Hyperledger Fabric all the time.

nyet (Fri, 16 Nov 2018 16:32:00 GMT):
yes, I feel your pain

nyet (Fri, 16 Nov 2018 16:32:34 GMT):
they should have made a slightly easier to use hierarcy where "default" values are baked in

habpygo (Fri, 16 Nov 2018 16:32:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GoGg9LMd5jB6ywFyC) @nyet No of course not. I created everything from scratch and created my own directory. Again, it use to work with 1.1

nyet (Fri, 16 Nov 2018 16:33:09 GMT):
I had to make a few changes to my config files when i transitioned

habpygo (Fri, 16 Nov 2018 16:33:24 GMT):
I had to make a lot (coming from 1.1)

nyet (Fri, 16 Nov 2018 16:34:11 GMT):
you can take a look at my repo if you want. It gets rid of all the example.com crap and templatizes it https://github.com/Blockdaemon/hlf-service-network

habpygo (Fri, 16 Nov 2018 16:34:36 GMT):
But let me try to look at @sudeshrshetty 's suggestion and see if I can find the error. If not, I'll be back. I I do find the solution, I'll post it.

habpygo (Fri, 16 Nov 2018 16:35:01 GMT):
Thanks @nyet I'll have a look at that as well.

nyet (Fri, 16 Nov 2018 16:46:40 GMT):
The main difference was me having to add a bunch of policies to configtx.yaml, and needing a channel name for the orderer genesis block (to avoid a warning) iirc

nyet (Fri, 16 Nov 2018 16:48:39 GMT):
But in general I share your frustration that a lot of the error reporting is cryptic, and generally unhelpful when tracking down problems.

midoblgsm (Fri, 16 Nov 2018 17:55:20 GMT):
Has joined the channel.

midoblgsm (Fri, 16 Nov 2018 18:25:49 GMT):
hi, I am new to using the sdk, I started writing my code to talk to the chaincode using the go sdk, I tried to use dep to make sure that my dependencies are setup correctly, but I am seeing errors in dep ensure

nyet (Fri, 16 Nov 2018 18:26:11 GMT):
I pretty much ditched dep entirely for now.

midoblgsm (Fri, 16 Nov 2018 18:26:25 GMT):
also the fabric-sdk-go is refering to fabric@release-1.1 not release1.3

nyet (Fri, 16 Nov 2018 18:26:34 GMT):
just use master, call it a day.

midoblgsm (Fri, 16 Nov 2018 18:26:50 GMT):
ok, I will give it a try

nyet (Fri, 16 Nov 2018 18:27:08 GMT):
although i do use fabric 1.3

nyet (Fri, 16 Nov 2018 18:27:12 GMT):
but i dont use dep for the sdk

nyet (Fri, 16 Nov 2018 18:27:33 GMT):
i just have 1.3 checked out in GOPATH

midoblgsm (Fri, 16 Nov 2018 18:27:37 GMT):
then how do you manage the dependencies if lets say you want to build in a docker container?

nyet (Fri, 16 Nov 2018 18:28:12 GMT):
for now, i'm using master for the sdk and 1.3 for fabric itself

midoblgsm (Fri, 16 Nov 2018 18:28:27 GMT):
ok, I will try that , thanks

Taaanos (Fri, 16 Nov 2018 18:37:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=P8Nm48DMH73CWXhqj) @nyet what are you using? Cause I am considering changing as well

nyet (Fri, 16 Nov 2018 18:40:34 GMT):
for the purposes of the fabric sdk.. i don't have a lot of dependencies for the small microservices projects.

nyet (Fri, 16 Nov 2018 18:40:52 GMT):
they're all relatively self contained and do not have a large number of external dependencies

nyet (Fri, 16 Nov 2018 18:41:14 GMT):
For larger projects, dep is all we have :/

Taaanos (Fri, 16 Nov 2018 18:44:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oh3e5QoZrXFzp7GfJ) @troyronda yeah. Deleted it and go get it again. Still same problem with a fresh pull and after rmed the said bins.

Taaanos (Fri, 16 Nov 2018 18:45:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=pna8Lb6eNjJTbEE9D) @troyronda Yes, fresh checkout

nyet (Fri, 16 Nov 2018 18:45:13 GMT):
@tanos and by larger projects i mean fabric itself, NOT the SDK

nyet (Fri, 16 Nov 2018 18:45:13 GMT):
@Taaanos and by larger projects i mean fabric itself, NOT the SDK

nyet (Fri, 16 Nov 2018 18:46:27 GMT):
@Taaanos for fabric it self, i cleaned out GOPATH/go/bin completely, checked out a fresh copy of fabric, ran `make depend` and `make`

nyet (Fri, 16 Nov 2018 18:47:03 GMT):
@Taaanos and make sure nothing is hiding in `/usr/local/bin` and you didn't isntall any OS go lint related packages

Taaanos (Fri, 16 Nov 2018 18:47:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PAMyh32xTeGE3AsXg) @nyet we are talking about `fabric-sdk-go` right?

nyet (Fri, 16 Nov 2018 18:47:30 GMT):
oh i was talking about the fabric self test

nyet (Fri, 16 Nov 2018 18:47:44 GMT):
not sdk.

nyet (Fri, 16 Nov 2018 18:47:45 GMT):
sorry :/

nyet (Fri, 16 Nov 2018 18:47:49 GMT):
i had progblems there too

nyet (Fri, 16 Nov 2018 18:47:56 GMT):
my mistake

Taaanos (Fri, 16 Nov 2018 18:48:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oB6WiPkB9w7qLcE2q) @nyet what do you mean by OS go lint related packages? I have tried brew (which installed 1.11.2) and then followed the procedure to uninstall and tried with 1.10.4 dmg. But I am getting the same on ubuntu with directly installing 1.10.4

nyet (Fri, 16 Nov 2018 18:49:32 GMT):
there are various metalint packages in both brew and .deb pkgs, maybe something ended up in `/usr/bin` or your `brew` path?

Taaanos (Fri, 16 Nov 2018 18:50:58 GMT):
will check this out as well

nyet (Fri, 16 Nov 2018 18:50:59 GMT):
for example, on debian, the golint package installs `/usr/bin/golint`

Taaanos (Fri, 16 Nov 2018 18:51:39 GMT):
I believe after some commit (2 months ago) version check for `go` got introduced

Taaanos (Fri, 16 Nov 2018 18:51:39 GMT):
I believe after some commit (2 months ago) there version check for go introduced

nyet (Fri, 16 Nov 2018 18:51:42 GMT):
but in practice, `$GOPATH/bin` should be before `/usr/local/bin` and `/usr/bin` in your `PATH`

nyet (Fri, 16 Nov 2018 18:53:08 GMT):
trying it now again in `fabric-sdk-go` on my machine

nyet (Fri, 16 Nov 2018 18:53:22 GMT):
```nyet@nyet-0:~/go/src/github.com/hyperledger/fabric-sdk-go$ make depend Checking Go version go version go1.10.4 linux/amd64 ``` etc

nyet (Fri, 16 Nov 2018 18:54:13 GMT):
the first thing `make depend` does is to install all the linters into `$GOPATH/bin`

nyet (Fri, 16 Nov 2018 18:54:42 GMT):
and if that is first in your PATH, everything should be fine ```$ echo $PATH /home/nyet/go/bin:/home/nyet/.local/bin:/home/nyet/bin:/home/nyet/.gvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin ```

Baha-sk (Fri, 16 Nov 2018 20:39:56 GMT):
yes, I had the same issue when I upgrade to go 1.11 then reverted backed to 1.10.4, brew did not downgrade `gofmt` and `goimport` binaries, I had to remove them and re install a fresh Go 1.10.4 from brew @Taaanos @nyet

Baha-sk (Fri, 16 Nov 2018 20:40:48 GMT):
@nyet apparently Jenkins was down till around 12:30-1:00 pm EST... I posted a `reverify-z` on your patch, the build is running

nyet (Fri, 16 Nov 2018 20:59:00 GMT):
@Baha-sk if you didn't change anything i suspect it will still randomly fail sometimes

nyet (Fri, 16 Nov 2018 20:59:51 GMT):
pewp this is new ```Creating network "fabsdkgo_default" with the default driver ERROR: Failed to Setup IP tables: Unable to enable NAT rule: (iptables failed: iptables --wait -t nat -I POSTROUTING -s 192.168.176.0/20 ! -o br-bf7d5f208766 -j MASQUERADE: (fork/exec /usr/sbin/iptables: no such file or directory)) make[1]: *** [Makefile:308: integration-tests-stable] Error 1 ```

nyet (Fri, 16 Nov 2018 21:00:03 GMT):
ignore

Baha-sk (Fri, 16 Nov 2018 21:00:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ttxJsxn4wvmA52JGK) @nyet I added retry invocations in the tests that were failing randomly

nyet (Fri, 16 Nov 2018 21:01:17 GMT):
this was from yesterday though no? unless you did a second rebase (i did not)

Baha-sk (Fri, 16 Nov 2018 21:05:28 GMT):
yes from yesterday.. the z build error yesterday you got after the rebase had no retries though..

Baha-sk (Fri, 16 Nov 2018 21:06:32 GMT):
I've seen it in the past, it's the only one for which I have not added a retry since it depends on the error type returned... I'll probably add a retry for it as well

nyet (Fri, 16 Nov 2018 21:06:34 GMT):
well i see the last build succeeded regardless ;)

Baha-sk (Fri, 16 Nov 2018 21:07:09 GMT):
yes, because the error is intermittent, it doesn't always happen

nyet (Fri, 16 Nov 2018 21:07:56 GMT):
Also i see that sudesh R+1 but then R-1 ... is this because I didn't add a test case? I can add one but the jenkins stuff made me not want to do it yet

Baha-sk (Fri, 16 Nov 2018 21:08:38 GMT):
yes, if you can add an assert call maybe

nyet (Fri, 16 Nov 2018 21:09:03 GMT):
I will time permitting but i have other things on my plate now :/

Baha-sk (Fri, 16 Nov 2018 21:10:05 GMT):
I think he saw your build was failing, so he removed the +1.. but adding an assert call is shorter than if err != nil

nyet (Fri, 16 Nov 2018 21:10:06 GMT):
You mean basically assert the default values by testing the new configImpl btw?

nyet (Fri, 16 Nov 2018 21:10:17 GMT):
oh i see

nyet (Fri, 16 Nov 2018 21:10:27 GMT):
i thought he meant actually test to see if the values were right

Baha-sk (Fri, 16 Nov 2018 21:10:44 GMT):
that too :)

Baha-sk (Fri, 16 Nov 2018 21:11:29 GMT):
it makes sense if defaults == true and that New() returned false values should fail

nyet (Fri, 16 Nov 2018 21:36:29 GMT):
@Baha-sk BTW are you implying I won't get a CR+1 until I write real unit tests? :)

Baha-sk (Fri, 16 Nov 2018 21:44:09 GMT):
@nyet I'm not implying anything, just answered your question about the R+1 above :)

nyet (Fri, 16 Nov 2018 21:44:45 GMT):
grin

Baha-sk (Fri, 16 Nov 2018 21:46:46 GMT):
well usually folks are inclined to give +1/+2 when their comments are addressed... just saying

nyet (Fri, 16 Nov 2018 22:51:14 GMT):
welp it was easy enough so i added a test case

BellaAdams (Sat, 17 Nov 2018 00:47:16 GMT):
Has joined the channel.

enriquebusti (Mon, 19 Nov 2018 09:40:54 GMT):
Hi!, i want to use the GO sdk but i don't know if i can use the 1.11 version, can you help me? Ty

Taaanos (Mon, 19 Nov 2018 12:32:48 GMT):
@nyet @Baha-sk Just to be sure, retried everything with a fresh ubuntu vm. Installed 1.10.4 from golang.org and go/bin is first in my path. I believe if you try it on a fresh installation it is easily replicable.

Baha-sk (Mon, 19 Nov 2018 15:35:45 GMT):
@enriquebusti Go 1.11 is not supported by Go SDK for now

Baha-sk (Mon, 19 Nov 2018 15:38:23 GMT):
not until Fabric 1.4 at least

Taaanos (Mon, 19 Nov 2018 15:47:59 GMT):
@Baha-sk could you post your `gometalinter.json` config?

Baha-sk (Mon, 19 Nov 2018 16:12:20 GMT):
@Taaanos it's in the root of Go SDK

Baha-sk (Mon, 19 Nov 2018 16:12:23 GMT):
I have not changed it

nyet (Mon, 19 Nov 2018 16:12:58 GMT):
@Baha-sk with regards to your adding retries to the unit tests: why doesn't the sdk have this functionality built in so the caller doesn't have to explicitly add retry code?

nyet (Mon, 19 Nov 2018 16:13:22 GMT):
@Taaanos did you run "make depend" first, before "make"

Baha-sk (Mon, 19 Nov 2018 16:14:22 GMT):
@nyet these retries are specific to the integration tests with a "test" code in case of specific errors... client apps should handle the retries following their own logic..

nyet (Mon, 19 Nov 2018 16:17:05 GMT):
@Baha-sk But this specific error is one I would expect to always potentially come up: 500 until the peer cc is ready, then either success or some other error. I could see this being a common issue; I don't see that there should be chain specific handling to avoid the race.

Baha-sk (Mon, 19 Nov 2018 16:19:08 GMT):
in this specific CC2CC invocation call, we expect and error code 10 (pb.TxValidationCode_ENDORSEMENT_POLICY_FAILURE).. error 500 is returned because the peer did not respond (due network lag or something).. so we retry until error 10 is returned or we exhaust the retries in which case it's a test failure

Baha-sk (Mon, 19 Nov 2018 16:20:12 GMT):
we don't wanna treat error 500 as a successful negative case in this test

nyet (Mon, 19 Nov 2018 16:20:13 GMT):
I understand that, but I feel the sdk should be tolerant of network lag (or whatever the transient problem is), since that should be covered by the retry options.

Baha-sk (Mon, 19 Nov 2018 16:20:43 GMT):
this is why retriable codes were introduced.. but each case is different

nyet (Mon, 19 Nov 2018 16:20:44 GMT):
the underlying transient issue should be invisible to the sdk client

Baha-sk (Mon, 19 Nov 2018 16:21:27 GMT):
the client cannot control the network.. ie what's acceptable for one client may not for another client.. this is why it's configurable

nyet (Mon, 19 Nov 2018 16:21:28 GMT):
So the question becomes, why don't the default retry options handle this case, and if it is because the values are not conservative enough, shouldn't the default values be increased accordingly?

nyet (Mon, 19 Nov 2018 16:21:53 GMT):
Or at least the retry options should be adjusted for this test case?

nyet (Mon, 19 Nov 2018 16:22:56 GMT):
I generally don't agree that these sorts of retry things should be wrapped around OTHER retry things unless they are unavoidable, and in either case, if it can't be compensated for by the extant retry mechanisms, this new, more complex mechanism should be includied in the sdk itself

Baha-sk (Mon, 19 Nov 2018 16:23:01 GMT):
this is why in the integration tests, we're using `retry.TestRetryOpts` as default error options

nyet (Mon, 19 Nov 2018 16:23:13 GMT):
Would increasing that have fixed the issue for htis test case?

nyet (Mon, 19 Nov 2018 16:23:53 GMT):
if not, why (e.g. it requires a diferent layer of retry), and if that is true, that layer should be provided as part of the extant retry mechanisms inside the sdk itself

Baha-sk (Mon, 19 Nov 2018 16:23:54 GMT):
this includes default retries.. but we can't enforce this in all the client invokes

nyet (Mon, 19 Nov 2018 16:25:06 GMT):
also `channel.WithRetry(retry.DefaultChannelOpts)` vs `retry.New(retry.TestRetryOpts)`

Baha-sk (Mon, 19 Nov 2018 16:25:10 GMT):
the # of retries and retry wait times are configurable, and the tests show how one can setup their own

Baha-sk (Mon, 19 Nov 2018 16:25:38 GMT):
yes, this is an example of adding a specific returnable options (for channel client for instance)

nyet (Mon, 19 Nov 2018 16:26:22 GMT):
Why can't this already be done without altering the `retry.DefaultChannelOpts`

nyet (Mon, 19 Nov 2018 16:26:22 GMT):
Why can't this already be done by altering the `retry.DefaultChannelOpts`

Baha-sk (Mon, 19 Nov 2018 16:26:33 GMT):
basically my additional invoker call (on top of channel.WithRetry(retry.DefaultChannelOpts)) will do retries on error 500

nyet (Mon, 19 Nov 2018 16:27:17 GMT):
My point is, if that is potentially a problem, it should be possible to ask for by adjusting the `WithRetry()`, and not by forcing the user to write a `NewInvoker()`

nyet (Mon, 19 Nov 2018 16:28:02 GMT):
With the understanding it is a network problem possibly not caught by `WithRetry()`

nyet (Mon, 19 Nov 2018 16:28:23 GMT):
In which case i think it SHOULD be caught by `WithRetry()` it self

Baha-sk (Mon, 19 Nov 2018 16:28:26 GMT):
I don't want to change real client code (retry.DefaultChannelOpts) because of a test issue ( happening on z build only)

nyet (Mon, 19 Nov 2018 16:28:50 GMT):
in my experience, race conditions that can occur in one case can always occur in another, it is just a matter of odds :)

nyet (Mon, 19 Nov 2018 16:29:22 GMT):
not trying to cause trouble btw I'm also asking these questions to leran.

Baha-sk (Mon, 19 Nov 2018 16:30:13 GMT):
hence the addition of the invoker.. this could happen in real world applications... this is why the sdk users can come up with their own retriable options to suit their specific environment on top of the default options

nyet (Mon, 19 Nov 2018 16:31:07 GMT):
As a user, I would be baffled though, if `WithRetry()` was not sufficient to catch the problem, and if the only solutiohn was to wrap it with a `retry.NewInvoker()`

Baha-sk (Mon, 19 Nov 2018 16:31:18 GMT):
for instance these codes ``` status.Code(pb.TxValidationCode_DUPLICATE_TXID), status.Code(pb.TxValidationCode_ENDORSEMENT_POLICY_FAILURE), status.Code(pb.TxValidationCode_MVCC_READ_CONFLICT), status.Code(pb.TxValidationCode_PHANTOM_READ_CONFLICT),``` are specific to the event server..

Baha-sk (Mon, 19 Nov 2018 16:32:17 GMT):
we can't mix these with app specific code.. this is why users can add their own invoke retry options on top of the defaults (not mixed with the defaults)

Baha-sk (Mon, 19 Nov 2018 16:32:17 GMT):
we can't mix these with app specific codes.. this is why users can add their own invoke retry options on top of the defaults (not mixed with the defaults)

nyet (Mon, 19 Nov 2018 16:32:25 GMT):
ok

nyet (Mon, 19 Nov 2018 16:34:00 GMT):
So out of curiosity, what is the transient error that is not 500 or `ENDORSEMENT_POLICY_FAILURE` in this case?

nyet (Mon, 19 Nov 2018 16:34:28 GMT):
(that the retry is ignoring)

nyet (Mon, 19 Nov 2018 16:35:06 GMT):
I suppose i could go look at the logs myself heeh

nyet (Mon, 19 Nov 2018 16:37:30 GMT):
```integration-tests_1 | expected: 10 integration-tests_1 | actual : 500```

nyet (Mon, 19 Nov 2018 16:37:43 GMT):
looks like your `Equal()` options are reversed btw

nyet (Mon, 19 Nov 2018 16:38:23 GMT):
oh wait you are expecting 10 but getting 500

nyet (Mon, 19 Nov 2018 16:39:04 GMT):
Wait, but your retry bails if it sees 500 unless I'm reading this wrong

nyet (Mon, 19 Nov 2018 16:39:18 GMT):
`if e != nil && strings.Contains(e.Error(), "500") {`

nyet (Mon, 19 Nov 2018 16:40:01 GMT):
why is that looking for `Contains(.. "500")` and not `stat.Code==500`

nyet (Mon, 19 Nov 2018 16:40:01 GMT):
why is that looking for `Contains(.. "500")` and not `status.FromError(err).Code==500`

nyet (Mon, 19 Nov 2018 16:41:30 GMT):
i geusse that saves having to trap other exceptions from `FromError` :/

nyet (Mon, 19 Nov 2018 16:44:08 GMT):
oh nvm, it makes the 500 a retry condition.

nyet (Mon, 19 Nov 2018 16:44:14 GMT):
I see.

nyet (Mon, 19 Nov 2018 16:47:06 GMT):
I still don't see why `WithRetry()` can handling the 500 case for you.

nyet (Mon, 19 Nov 2018 16:47:06 GMT):
I still don't see why `WithRetry()` can't handle the 500 case for you.

nyet (Mon, 19 Nov 2018 16:47:33 GMT):
is it not meant to?

Baha-sk (Mon, 19 Nov 2018 16:49:03 GMT):
I did paste error 10 earlier, it's `pb.TxValidationCode_ENDORSEMENT_POLICY_FAILURE`

nyet (Mon, 19 Nov 2018 16:50:12 GMT):
(again, not trying to cause trouble, trying to learn when `WithRetry()` can be used and when it can't)

Baha-sk (Mon, 19 Nov 2018 16:50:33 GMT):
that particular test is expecting this error due to expected endorsement failure.. that's what I was explaining before.. but error 500 is a system error.. we can probably add a retry default error.. but it's left to the user to handle for now

nyet (Mon, 19 Nov 2018 16:51:27 GMT):
Yah, i understand that the test is looking for 10.. is the problem because `RetryWith()` wll retry if it sees 10?

Baha-sk (Mon, 19 Nov 2018 16:53:07 GMT):
no, the client will not retry if endorsement error is 10, it just returns the error

Baha-sk (Mon, 19 Nov 2018 16:53:32 GMT):
the client will retry for these 2 error codes from the endorser server: ```status.EndorserServerStatus: { status.Code(common.Status_SERVICE_UNAVAILABLE), status.Code(common.Status_INTERNAL_SERVER_ERROR), },```

nyet (Mon, 19 Nov 2018 16:53:40 GMT):
So the default retry isn't working because it isn't conservative enough, not beecause of the specifics of the test?

Baha-sk (Mon, 19 Nov 2018 16:53:52 GMT):
as per `retry.DefaultChannelOpts`

nyet (Mon, 19 Nov 2018 16:54:28 GMT):
I'm trying to understand why (exactly) when the defeault retry meachinism will not work, and has to be wrapped with a different retry layer

Baha-sk (Mon, 19 Nov 2018 16:54:36 GMT):
the test should not retry on error code 10 because it expects it

nyet (Mon, 19 Nov 2018 16:55:07 GMT):
ya, so `RetryWith()` WILL retry if it sees 10?

Baha-sk (Mon, 19 Nov 2018 16:55:11 GMT):
the additional invoker call I added was to check if the error code is 500, to trigger a retry

Baha-sk (Mon, 19 Nov 2018 16:55:40 GMT):
no, it will not for code 10.. that's what I said earlier

nyet (Mon, 19 Nov 2018 16:55:58 GMT):
So why can't the normal retry mechanism be used?

nyet (Mon, 19 Nov 2018 16:56:13 GMT):
if it is just a case of # retries or timeout difference

Baha-sk (Mon, 19 Nov 2018 16:56:29 GMT):
` channel.WithRetry(retry.DefaultChannelOpts),` this is being used.. but it doesn't check for error code 500

nyet (Mon, 19 Nov 2018 16:56:42 GMT):
OK so it will NOT retry on 500 either

Baha-sk (Mon, 19 Nov 2018 16:56:57 GMT):
this is why `retry.NewInvoker(retry.New(retry.TestRetryOpts)).Invoke(` was added (to trigger retries on error 500)

nyet (Mon, 19 Nov 2018 16:57:01 GMT):
ok

Baha-sk (Mon, 19 Nov 2018 16:57:20 GMT):
only if this condition is met: ` if e != nil && strings.Contains(e.Error(), "500") `

nyet (Mon, 19 Nov 2018 16:57:42 GMT):
I think I see. The problem is that `WithRetry()` will NOT retry if it sees 500, it will return immediately with 500, no retries, and the wrapper retries around 500

nyet (Mon, 19 Nov 2018 16:57:50 GMT):
did I get that right?

Baha-sk (Mon, 19 Nov 2018 16:57:57 GMT):
yes, that's right :)

nyet (Mon, 19 Nov 2018 16:58:01 GMT):
got it, thanks :)

Baha-sk (Mon, 19 Nov 2018 16:58:09 GMT):
np :)

nyet (Mon, 19 Nov 2018 16:58:43 GMT):
Really. Thank you I appreciate it a lot

nyet (Mon, 19 Nov 2018 17:00:19 GMT):
Is there a sandbox place to put test merges for submission to jenkins? I'd like to do a couple reverify-z with your fix

nyet (Mon, 19 Nov 2018 17:00:43 GMT):
i dont want to clutter jenkins with a `git review`

Baha-sk (Mon, 19 Nov 2018 17:01:56 GMT):
@nyet interesting question (I'd like to know as well) you can post your question to #fabric-ci channel

Taaanos (Mon, 19 Nov 2018 17:48:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mj42eYFphPMkJhu6X) @nyet yes of course

nyet (Mon, 19 Nov 2018 17:49:23 GMT):
strange i just did it and it went fine.

nyet (Mon, 19 Nov 2018 17:49:45 GMT):
lemme try again

nyet (Mon, 19 Nov 2018 17:56:23 GMT):
```$ make depend Checking Go version go version go1.10.4 linux/amd64 Installing dependencies ... Installing github.com/alecthomas/gometalinter@v2 to /home/nyet/go/bin ... using tag v2.0.11 HEAD is now at 17a7ffa Update gochecknoglobals Copying gometalinter to /home/nyet/go/bin test/scripts/dependencies.sh: line 61: gometalinter: command not found make: *** [Makefile:246: depend] Error 127 ```

nyet (Mon, 19 Nov 2018 18:09:35 GMT):
@thanos to verfiy we are on the same page: just spun up a virgin vm. installed `make git golang curl`, installed docker gpg key, added docker-ce repo, `apt update` installed `docker-ce`, added user to `docker` group and `~/go/bin` to start of path, ran `make depend` then `make`

nyet (Mon, 19 Nov 2018 18:09:35 GMT):
@Taaanos @Baha-sk to verfiy we are on the same page: just spun up a virgin vm. `apt install make git golang curl`, installed docker gpg key, added docker-ce repo, `apt update` installed `docker-ce`, added user to `docker` group and `~/go/bin` to start of path, ran `go get github.com/hyperledger/fabric-sdk-go` `make depend` then `make`

nyet (Mon, 19 Nov 2018 18:09:35 GMT):
@Taaanos @Baha-sk to verfiy we are on the same page: just spun up a virgin vm. installed `make git golang curl`, installed docker gpg key, added docker-ce repo, `apt update` installed `docker-ce`, added user to `docker` group and `~/go/bin` to start of path, ran `make depend` then `make`

nyet (Mon, 19 Nov 2018 18:09:35 GMT):
@Taaanos @Baha-sk to verfiy we are on the same page: just spun up a virgin vm. `apt install make git golang curl`, installed docker gpg key, added docker-ce repo, `apt update` installed `docker-ce`, added user to `docker` group and `~/go/bin` to start of path, ran `make depend` then `make`

nyet (Mon, 19 Nov 2018 18:09:35 GMT):
@Taaanos @Baha-sk to verfiy we are on the same page: just spun up a virgin vm. `apt install make git golang curl`, installed docker gpg key, added docker-ce repo, `apt update` installed `docker-ce`, added user to `docker` group and `~/go/bin` to start of path, ran `github.com/hyperledger/fabric-sdk-go` `make depend` then `make`

nyet (Mon, 19 Nov 2018 18:09:47 GMT):
and .. sasme problem.

nyet (Mon, 19 Nov 2018 18:09:47 GMT):
and .. same problem that @Taaanos reported: ```Running metalinters... pkg/core/cryptosuite/common/pkcs11/contextHandle.go:465:2:warning: invalid operation: handle.ctx (variable of type *invalid type) has no field or method Destroy (interfacer, maligned, unconvert) pkg/core/cryptosuite/common/pkcs11/contextHandle.go:187:158:warning: unused struct field ObjectHandle not declared by package pkcs11 (structcheck) pkg/core/cryptosuite/common/pkcs11/contextHandle.go:300:45:warning: unused struct field SessionHandle not declared by package pkcs11 (structcheck) pkg/core/cryptosuite/common/pkcs11/contextHandle.go:355:3:warning: unused variable or constant Error not declared by package pkcs11 (varcheck) ```

Baha-sk (Mon, 19 Nov 2018 18:11:33 GMT):
@nyet why are you doing `make golang`? why not get it ?

nyet (Mon, 19 Nov 2018 18:11:41 GMT):
no installed it

Taaanos (Mon, 19 Nov 2018 18:11:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8c9eXsaqBCYCGHe29) @nyet yes and unit test will fail

nyet (Mon, 19 Nov 2018 18:11:51 GMT):
`apt get install make golang ... ` etc

Baha-sk (Mon, 19 Nov 2018 18:13:01 GMT):
and this installs go 1.10.4?

nyet (Mon, 19 Nov 2018 18:13:56 GMT):
$ go version go version go1.10.4 linux/amd64

Baha-sk (Mon, 19 Nov 2018 18:16:17 GMT):
what's he output of `make depend` ?

nyet (Mon, 19 Nov 2018 18:16:26 GMT):
works fine, no complaints

nyet (Mon, 19 Nov 2018 18:16:50 GMT):
```$ make depend Checking Go version go version go1.10.4 linux/amd64 Installing dependencies ... Installing github.com/alecthomas/gometalinter@v2 to /home/nyet/go/bin ... using tag v2.0.11 HEAD is now at 17a7ffa Update gochecknoglobals Copying gometalinter to /home/nyet/go/bin Installing: deadcode dupl errcheck gochecknoglobals gochecknoinits goconst gocyclo goimports golint gosec gosimple gotype gotypex ineffassign interfacer lll maligned megacheck misspell nakedret safesql staticcheck structcheck unconvert unparam unused varcheck Installing github.com/GoASTScanner/gas@4ae8c95 to /home/nyet/go/bin ... HEAD is now at 4ae8c95 Add an option for Go build tags (#201) Copying gas to /home/nyet/go/bin Installing github.com/golang/dep@v0.5.0 to /home/nyet/go/bin ... using tag v0.5.0 HEAD is now at 224a564a v0.5.0 release! Copying dep to /home/nyet/go/bin Creating docker images used by tests ... make[1]: Entering directory '/home/nyet/go/src/github.com/hyperledger/fabric-sdk-go' sha256:a941c87473a5e7c44b66400a2f71bb5a36f25fcff8aa69166d4d908a1fab4f37 make[1]: Leaving directory '/home/nyet/go/src/github.com/hyperledger/fabric-sdk-go' ```

nyet (Mon, 19 Nov 2018 18:17:52 GMT):
hrm i did forget docker compose, but no change

Baha-sk (Mon, 19 Nov 2018 18:30:29 GMT):
this is my output of `make depend` on a Mac.. ( I don't have the last line in your log, ie `make[1]: Leaving directory....`)

Baha-sk (Mon, 19 Nov 2018 18:30:33 GMT):
$ make depend Checking Go version go version go1.10.4 darwin/amd64 Last installed dependencies on 10-04-2018 with revision 7c970d52 Installing dependencies ... Installing github.com/alecthomas/gometalinter@v2 to /Users/baha-sk/work/go-workspace/bin ... using tag v2.0.11 HEAD is now at 17a7ffa Update gochecknoglobals Copying gometalinter to /Users/baha-sk/work/go-workspace/bin Installing: deadcode dupl errcheck gochecknoglobals gochecknoinits goconst gocyclo goimports golint gosec gosimple gotype gotypex ineffassign interfacer lll maligned megacheck misspell nakedret safesql staticcheck structcheck unconvert unparam unused varcheck Installing github.com/GoASTScanner/gas@4ae8c95 to /Users/baha-sk/work/go-workspace/bin ... HEAD is now at 4ae8c95 Add an option for Go build tags (#201) Copying gas to /Users/baha-sk/work/go-workspace/bin Installing github.com/golang/dep@v0.5.0 to /Users/baha-sk/work/go-workspace/bin ... using tag v0.5.0 HEAD is now at 224a564a v0.5.0 release! Copying dep to /Users/baha-sk/work/go-workspace/bin Creating docker images used by tests ... sha256:e2df9c71edd655d66ecca001aa17df51f35df28fb76dc8c3d4a74ffe520e8dd8

Baha-sk (Mon, 19 Nov 2018 18:30:33 GMT):
```$ make depend Checking Go version go version go1.10.4 darwin/amd64 Last installed dependencies on 10-04-2018 with revision 7c970d52 Installing dependencies ... Installing github.com/alecthomas/gometalinter@v2 to /Users/baha-sk/work/go-workspace/bin ... using tag v2.0.11 HEAD is now at 17a7ffa Update gochecknoglobals Copying gometalinter to /Users/baha-sk/work/go-workspace/bin Installing: deadcode dupl errcheck gochecknoglobals gochecknoinits goconst gocyclo goimports golint gosec gosimple gotype gotypex ineffassign interfacer lll maligned megacheck misspell nakedret safesql staticcheck structcheck unconvert unparam unused varcheck Installing github.com/GoASTScanner/gas@4ae8c95 to /Users/baha-sk/work/go-workspace/bin ... HEAD is now at 4ae8c95 Add an option for Go build tags (#201) Copying gas to /Users/baha-sk/work/go-workspace/bin Installing github.com/golang/dep@v0.5.0 to /Users/baha-sk/work/go-workspace/bin ... using tag v0.5.0 HEAD is now at 224a564a v0.5.0 release! Copying dep to /Users/baha-sk/work/go-workspace/bin Creating docker images used by tests ... sha256:e2df9c71edd655d66ecca001aa17df51f35df28fb76dc8c3d4a74ffe520e8dd8```

Baha-sk (Mon, 19 Nov 2018 18:34:26 GMT):
@nyet can you compare the binaries in @GOPATH/bin between the vm and your local machine? to see if the files differ in size?

Baha-sk (Mon, 19 Nov 2018 18:34:26 GMT):
@nyet can you compare the binaries in @GOPATH/bin between the vm you just created and your local machine? to see if the files differ in size?

Baha-sk (Mon, 19 Nov 2018 18:35:34 GMT):
for instance, on a Mac, varcheck binary on my machine is: `5326576`

nyet (Mon, 19 Nov 2018 18:38:10 GMT):
I litterally just copied them over

nyet (Mon, 19 Nov 2018 18:38:13 GMT):
from the working one to the new one

nyet (Mon, 19 Nov 2018 18:38:20 GMT):
and same issue, so it isn't the binaries

Baha-sk (Mon, 19 Nov 2018 18:43:14 GMT):
weird! the binaries should behave the same way.. unless the vm has a different os version, or there's a different copy accessible somewhere

nyet (Mon, 19 Nov 2018 18:45:09 GMT):
There is something else going on that has nothing to do with the binaries, not sure what

nyet (Mon, 19 Nov 2018 18:49:00 GMT):
why does `pkg/core/cryptosuite/common/pkcs11/contextHandle.go` import `"github.com/miekg/pkcs11"`? The package itself is named pkcs11

Baha-sk (Mon, 19 Nov 2018 18:50:43 GMT):
the sdk's pkg.core.cryptosuite.common.pkcs11 is using miekg's miekg.pkcs11 package

nyet (Mon, 19 Nov 2018 18:51:26 GMT):
A huge proportion of the warnings are from that file

nyet (Mon, 19 Nov 2018 18:59:50 GMT):
They're all about pkcs11 package issues. Is it a namespace issue?

nyet (Mon, 19 Nov 2018 19:01:09 GMT):
the vendor directories are very different between these two repos

nyet (Mon, 19 Nov 2018 19:01:14 GMT):
(working and non-working)

nyet (Mon, 19 Nov 2018 19:01:18 GMT):
something is wrong with dep

Baha-sk (Mon, 19 Nov 2018 19:01:18 GMT):
the ci would fail if metalinter failed

nyet (Mon, 19 Nov 2018 19:01:28 GMT):
i don't trust ci :)

nyet (Mon, 19 Nov 2018 19:01:38 GMT):
espcially when two users are seeing the same issue

nyet (Mon, 19 Nov 2018 19:01:43 GMT):
something is wrong with vendoring

Baha-sk (Mon, 19 Nov 2018 19:01:55 GMT):
delete the vendor folder and run `make populate`

nyet (Mon, 19 Nov 2018 19:04:02 GMT):
still different

nyet (Mon, 19 Nov 2018 19:07:28 GMT):
trying to figure out why dep isnt' doing the right thing

nyet (Mon, 19 Nov 2018 19:09:40 GMT):
```github.com/miekg/pkcs11 branch master branch master 95e2e42 95e2e42 1``` vs ```github.com/miekg/pkcs11 branch master branch master 88ac7c4 95e2e42 1```

nyet (Mon, 19 Nov 2018 19:09:40 GMT):
``github.com/miekg/pkcs11 branch master branch master 95e2e42 95e2e42 1``` vs ```github.com/miekg/pkcs11 branch master branch master 88ac7c4 95e2e42 1```

nyet (Mon, 19 Nov 2018 19:09:40 GMT):
```github.com/miekg/pkcs11 branch master branch master 95e2e42 95e2e42 1``` vs ```github.com/miekg/pkcs11 branch master branch master 88ac7c4 95e2e42 1```

nyet (Mon, 19 Nov 2018 19:09:40 GMT):
```github.com/miekg/pkcs11 branch master branch master 95e2e42 95e2e42 1 ``` vs ```github.com/miekg/pkcs11 branch master branch master 88ac7c4 95e2e42 1 ```

nyet (Mon, 19 Nov 2018 19:11:48 GMT):
err ignore

nyet (Mon, 19 Nov 2018 19:11:50 GMT):
thats the wrong one

chrim5 (Mon, 19 Nov 2018 20:19:38 GMT):
Has joined the channel.

chrim5 (Mon, 19 Nov 2018 20:38:56 GMT):
Is it somehow possible to avoid hosts entries like "127.0.0.1 ca.xyz.com" if you get "dial tcp: lookup ca.xyz.com on 1.1.1.1:53: no such host" ?

Baha-sk (Mon, 19 Nov 2018 20:52:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=thi6BEKvc2aijwxRR) @chrim5 you can add an entityMatchers section in config.yaml which will map your peer hosts to localhost like this https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml

chrim5 (Mon, 19 Nov 2018 21:28:42 GMT):
@Baha-sk Thanks. Then it looks like I misconfigured that part: - pattern: (\w*).xyz.(\w*) urlSubstitutionExp: https://ca.xyz.com:7054 mappedHost: localhost

Baha-sk (Mon, 19 Nov 2018 21:37:56 GMT):
mappedHost should match the peer id in your config

Baha-sk (Mon, 19 Nov 2018 21:42:56 GMT):
```- pattern: peer0.org1.example.(\w+). >>>> is the url pattern that will be converted urlSubstitutionExp: localhost:7051. >>>> will be converted to this url expression sslTargetOverrideUrlSubstitutionExp: peer0.org1.example.com. >>>> will convert the sslTargerOverride.. usually this matches your real peer name to match the cert subject (for SSL connectivity) mappedHost: peer0.org1.example.com. >>> this is the peer ID for which peer configs will be used for the particular matched pattern```

chrim5 (Mon, 19 Nov 2018 22:42:13 GMT):
@Baha-sk Thank you :)

nyet (Mon, 19 Nov 2018 22:49:25 GMT):
@Baha-sk @Taaanos I think i may have found the issue; the external `pkcs11` dependency will not build without `libltdl-dev`, and if it doesn't build, the linter doesn't know `pkcs11` is imported, it thinks it is the local package. I've seen simliar things with golang before if an `import` namespace matches the local `package`

nyet (Mon, 19 Nov 2018 22:49:25 GMT):
@Baha-sk @Taaanos I think i may have found the issue; the external `pkcs11` dependency will not build without `libltd-dev`, and if it doesn't build, the linter doesn't know `pkcs11` is imported, it thinks it is the local package. I've seen simliar things with golang before if an `import` namespace matches the local `package`

nyet (Mon, 19 Nov 2018 22:50:06 GMT):
I am not sure but i think it might be considered poor practice to have the local package match an import namespace.

Baha-sk (Mon, 19 Nov 2018 22:52:02 GMT):
@nyet thanks for digging deep into the issue.. probably best to rename the go sdk package.. @troyronda what do you think ^^^

nyet (Mon, 19 Nov 2018 22:52:15 GMT):
Basically, i did an `apt install libltdl-dev` and it worked. I think `"github.com/miekg/pkcs11"` should be ` mPkcs11 "github.com/miekg/pkcs11" or something similar in `contgextHandle.go`

nyet (Mon, 19 Nov 2018 22:52:15 GMT):
Basically, i did an `apt install libltdl-dev` and it worked. I think `"github.com/miekg/pkcs11"` should be ` mPkcs11 "github.com/miekg/pkcs11"` or something similar in `contgextHandle.go`, and all the references to `pkcs11.` edited accordingly

nyet (Mon, 19 Nov 2018 22:52:15 GMT):
@Taaanos Basically, i did an `apt install libltdl-dev` and it worked. I think `"github.com/miekg/pkcs11"` should be ` mPkcs11 "github.com/miekg/pkcs11"` or something similar in `contgextHandle.go`, and all the references to `pkcs11.` edited accordingly

Baha-sk (Mon, 19 Nov 2018 22:53:01 GMT):
yeah, we can also use a different label too.. probably less intrusive than renaming the package

nyet (Mon, 19 Nov 2018 22:54:07 GMT):
I will open a jira bug and issue a PR at some point unless somebody beats me to it

nyet (Mon, 19 Nov 2018 23:06:44 GMT):
@Taaanos @Baha-sk https://jira.hyperledger.org/browse/FABG-793

nyet (Mon, 19 Nov 2018 23:27:27 GMT):
Now i see ```vendor/github.com/miekg/pkcs11/pkcs11.go:26:10:warning: fatal error: ltdl.h: No such file or directory (gosimple, interfacer, maligned, megacheck, unconvert, unused, vet) ``` if libltdl-dev is not installed :)

nyet (Mon, 19 Nov 2018 23:27:40 GMT):
that seems a bit more friendly of an error

nyet (Tue, 20 Nov 2018 00:15:19 GMT):
@Baha-sk any chance I can get NACRs for either of these :)

huxiangdong (Tue, 20 Nov 2018 00:35:43 GMT):
Has joined the channel.

nyet (Tue, 20 Nov 2018 06:58:49 GMT):
BTW i voted up some PRs but none of them got marked NACR, even though I'm not the author.. any idea why?

andyz (Tue, 20 Nov 2018 08:50:40 GMT):
Has joined the channel.

andyz (Tue, 20 Nov 2018 08:53:50 GMT):
hello every:) I tried to use fabric-go-sdk to do invoke/query, but got the following error: `Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: could not find chaincode with name 'lscc'` But when I checkout version to git version f3fee0ed, it is OK to use lscc any idea on this?

andyz (Tue, 20 Nov 2018 08:53:50 GMT):
hello everyone:) I tried to use fabric-go-sdk to do invoke/query, but got the following error: `Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: could not find chaincode with name 'lscc'` But when I checkout version to git version f3fee0ed, it is OK to use lscc any idea on this?

andyz (Tue, 20 Nov 2018 08:53:50 GMT):
hello everyone:) I tried to use fabric-go-sdk to do invoke/query for system chaincode such as lscc, but got the following error: `Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: could not find chaincode with name 'lscc'` But when I checkout version to git version f3fee0ed, it is OK to use lscc any idea on this?

Kyroy (Tue, 20 Nov 2018 10:45:32 GMT):
https://jira.hyperledger.org/projects/FABG/issues/FABG-794

Kyroy (Tue, 20 Nov 2018 10:54:24 GMT):
Does anyone has the same problem that weird chaincodes are returned when using collection configs?

Kyroy (Tue, 20 Nov 2018 10:54:24 GMT):
Does anyone has the same problem that weird chaincodes are returned when using private collections?

Taaanos (Tue, 20 Nov 2018 13:55:40 GMT):
@nyet Great job! Thank you for looking into this! It works and I was glad to see this

Taaanos (Tue, 20 Nov 2018 13:55:56 GMT):

Screenshot 2018-11-20 at 14.12.15.png

Taaanos (Tue, 20 Nov 2018 13:56:49 GMT):
It was a `brew install libtool` away

Taaanos (Tue, 20 Nov 2018 15:13:38 GMT):
Now that the issue is solved I want to profile somethings. I would like to experiment with tests and get some profiles analyzed with gprof. Which network do i need to deploy in order for tests to be able to connect with the network?

Taaanos (Tue, 20 Nov 2018 15:14:56 GMT):
with `make docker-stable-up` I am not able to run individuals tests from inside the test dir

Taaanos (Tue, 20 Nov 2018 15:16:25 GMT):
e.g

Taaanos (Tue, 20 Nov 2018 15:16:28 GMT):
``` panic: failed to initialize channel: checking for joined targets failed: failed while checking if primary peer has already joined channel: failed to query channel for peer: cscc.GetChannels failed: SendProposal failed: Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.org1.example.com:7051] ```

Taaanos (Tue, 20 Nov 2018 15:17:57 GMT):
`go test` inside `/test/intergration/pkg/context/`

Baha-sk (Tue, 20 Nov 2018 15:31:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7i3Zibdexnyq4T8FN) @nyet +2d and merged ;)

Baha-sk (Tue, 20 Nov 2018 15:34:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=XEkhNEsDHDngX9XZu) @Taaanos this is possible.. you have to make sure whatever tests you're running separately is complete (ie channel is created, peers have joined the channel and CCs are installed and instantiated..)

Taaanos (Tue, 20 Nov 2018 15:35:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=HGAeEYh3dF7yKejdi) @Baha-sk is there an easy way do set up the particular network that is needed?

Baha-sk (Tue, 20 Nov 2018 15:37:45 GMT):
@Taaanos, you need to look at the test you're running and see if it depends on a setup() call or something.. also, if your test does the setup, you have to restart your network every time you run the test (or comment out the setup after the first run)

Baha-sk (Tue, 20 Nov 2018 15:37:45 GMT):
@Taaanos, you need to look at the test you're running and see if it depends on a setup() call or something.. also, if your test does the setup, you have to restart your network every time you run the test (or comment out the setup after the second run)

Taaanos (Tue, 20 Nov 2018 15:42:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=X3YRDWabEZ7gfJybb) @Baha-sk ok If I get it correctly, I need to check which network is needed and then `docker-compose up` the needed `.yaml` from `fixtures/dockerenv` ?

Taaanos (Tue, 20 Nov 2018 15:42:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=X3YRDWabEZ7gfJybb) @Baha-sk ok I get it correctly, I need to check which network is needed and then `docker-compose up` the needed `.yaml` from `fixtures/dockerenv` ?

Baha-sk (Tue, 20 Nov 2018 15:43:58 GMT):
@Taaanos `make docker-stable-up` should start the network for you.. let me try a test under context package and see..

Taaanos (Tue, 20 Nov 2018 15:44:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RoXmCNNWAP4KmfgDR) @Baha-sk any test that I can `go test` it in its dir is fine

Taaanos (Tue, 20 Nov 2018 15:44:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RoXmCNNWAP4KmfgDR) @Baha-sk any test that I can `go test` it in it's dir is fine

Baha-sk (Tue, 20 Nov 2018 15:45:10 GMT):
@Taaanos correction it's `make dockerenv-stable-up`

Baha-sk (Tue, 20 Nov 2018 15:45:10 GMT):
@Taaanos it

Taaanos (Tue, 20 Nov 2018 15:46:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=neTYv8frSShd8iHJK) @Baha-sk yes with that network I get time outs for failing to connect

Baha-sk (Tue, 20 Nov 2018 15:50:14 GMT):
I've tried with `make dockerenv-latest-up`

Baha-sk (Tue, 20 Nov 2018 15:50:54 GMT):
then in another terminal, cd into `test/integration/pkg/context`

Baha-sk (Tue, 20 Nov 2018 15:51:08 GMT):
and then run `go test -run TestParentContext`

Baha-sk (Tue, 20 Nov 2018 15:51:15 GMT):
it passed for me..

Baha-sk (Tue, 20 Nov 2018 15:52:26 GMT):
```$ go test -run TestParentContext # _/Users/baha-sk/work/hyperledger/fabric-sdk-go/test/integration/pkg/context (testmain) Installing and instantiating example chaincode...Done [19250 ms] [fabsdk/fab] 2018/11/20 15:49:35 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Canceled desc = context canceled] [fabsdk/fab] 2018/11/20 15:49:35 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Canceled desc = context canceled] PASS ok _/Users/baha-sk/work/hyperledger/fabric-sdk-go/test/integration/pkg/context 50.120s```

Taaanos (Tue, 20 Nov 2018 15:59:00 GMT):
Ok, with same steps I got

Taaanos (Tue, 20 Nov 2018 15:59:07 GMT):
``` ▶ go test -run TestParentContext panic: failed to initialize channel: checking for joined targets failed: failed while checking if primary peer has already joined channel: failed to query channel for peer: cscc.GetChannels failed: SendProposal failed: Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.org1.example.com:7051] ```

Taaanos (Tue, 20 Nov 2018 16:00:01 GMT):
``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3dab97eb117e hyperledger/fabric-peer:latest "peer node start" 7 minutes ago Up 7 minutes 0.0.0.0:7151->7151/tcp, 7152/tcp fabsdkgo_org1peer2_1_c797bc8c9105 0e279e6591e5 hyperledger/fabric-peer:latest "peer node start" 7 minutes ago Up 7 minutes 0.0.0.0:8051->8051/tcp, 8052/tcp fabsdkgo_org2peer1_1_f17e7e170f57 499e1abd0a27 hyperledger/fabric-peer:latest "peer node start" 7 minutes ago Up 7 minutes 0.0.0.0:7051->7051/tcp, 7052/tcp fabsdkgo_org1peer1_1_7e6ce99c640e 69ac8c57e507 hyperledger/fabric-peer:latest "peer node start" 7 minutes ago Up 7 minutes 0.0.0.0:9051->9051/tcp, 9052/tcp fabsdkgo_org2peer2_1_8a5c8121456e 7743a3fa7d47 hyperledger/fabric-baseimage:0.4.10 "tail -F anything" 7 minutes ago Up 7 minutes fabsdkgo_chaincoded_1_5efe486775a4 fb59771569c3 hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se…" 7 minutes ago Up 7 minutes 7054/tcp, 0.0.0.0:8054->8054/tcp fabsdkgo_org2ca1_1_cfe40181da08 b715da084ac8 hyperledger/fabric-baseos:0.4.10 "tail -F anything" 7 minutes ago Up 7 minutes fabsdkgo_golangruntime_1_5b38ab296d63 a991d09a65e6 hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se…" 7 minutes ago Up 7 minutes 0.0.0.0:7054->7054/tcp fabsdkgo_org1ca1_1_80a2a66b8858 7d199e1c2b9e hyperledger/fabric-ccenv:latest "tail -F anything" 7 minutes ago Up 7 minutes fabsdkgo_builder_1_5bcf6827fb9a 04fe4df19f8f hyperledger/fabric-orderer:latest "orderer" 7 minutes ago Up 7 minutes 0.0.0.0:7050->7050/tcp fabsdkgo_orderer1_1_90c4790ef67b ```

Baha-sk (Tue, 20 Nov 2018 16:00:46 GMT):
@Taaanos with `make dockerenv-latest-up` or `make dockerenv-stable-up`? (`make dockerenv-stable-up` failed for me as well.. ) but latest should work

Baha-sk (Tue, 20 Nov 2018 16:00:46 GMT):
@Taaanos with `make dockerenv-latest-up` or `make dockerenv-stable-up`? ( `make dockerenv-stable-up` failed for me as well.. ) but latest should work

midoblgsm (Tue, 20 Nov 2018 16:00:46 GMT):
Hi guys, I am trying to use fabrik sdk to invoke my chanincode but I am facing some issues ```error registering for TxStatus event: could not create client conn: could not connect to blockchain-org1peer1:30111``` is there any good document that I can follow? or can anybody help me find out the issue with my config?

Taaanos (Tue, 20 Nov 2018 16:01:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ASuvuzbq5EjjNnEKk) @Baha-sk `latest`

Baha-sk (Tue, 20 Nov 2018 16:02:31 GMT):
did you wait for the network to start prior to running the test?

Taaanos (Tue, 20 Nov 2018 16:03:03 GMT):
yes of course

Baha-sk (Tue, 20 Nov 2018 16:03:18 GMT):
for instance, in the network up command, I see this : ```org2peer1_1 | 2018-11-20 16:02:39.840 UTC [discovery] NewService -> INFO 024 Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000 org2peer1_1 | 2018-11-20 16:02:39.840 UTC [nodeCmd] registerDiscoveryService -> INFO 025 Discovery service activated org2peer1_1 | 2018-11-20 16:02:39.840 UTC [nodeCmd] serve -> INFO 026 Starting peer with ID=[name:"peer0.org2.example.com" ], network ID=[fabsdkgo], address=[peer0.org2.example.com:8051] org2peer1_1 | 2018-11-20 16:02:39.841 UTC [nodeCmd] serve -> INFO 027 Started peer with ID=[name:"peer0.org2.example.com" ], network ID=[fabsdkgo], address=[peer0.org2.example.com:8051] org2peer2_1 | 2018-11-20 16:02:39.843 UTC [discovery] NewService -> INFO 028 Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000 org2peer2_1 | 2018-11-20 16:02:39.843 UTC [nodeCmd] registerDiscoveryService -> INFO 029 Discovery service activated org2peer2_1 | 2018-11-20 16:02:39.843 UTC [nodeCmd] serve -> INFO 02a Starting peer with ID=[name:"peer1.org2.example.com" ], network ID=[fabsdkgo], address=[peer1.org2.example.com:9051] org2peer2_1 | 2018-11-20 16:02:39.844 UTC [nodeCmd] serve -> INFO 02b Started peer with ID=[name:"peer1.org2.example.com" ], network ID=[fabsdkgo], address=[peer1.org2.example.com:9051]``` then I star the test

Baha-sk (Tue, 20 Nov 2018 16:03:18 GMT):
for instance, in the network up command, I see this : ```org2peer1_1 | 2018-11-20 16:02:39.840 UTC [discovery] NewService -> INFO 024 Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000 org2peer1_1 | 2018-11-20 16:02:39.840 UTC [nodeCmd] registerDiscoveryService -> INFO 025 Discovery service activated org2peer1_1 | 2018-11-20 16:02:39.840 UTC [nodeCmd] serve -> INFO 026 Starting peer with ID=[name:"peer0.org2.example.com" ], network ID=[fabsdkgo], address=[peer0.org2.example.com:8051] org2peer1_1 | 2018-11-20 16:02:39.841 UTC [nodeCmd] serve -> INFO 027 Started peer with ID=[name:"peer0.org2.example.com" ], network ID=[fabsdkgo], address=[peer0.org2.example.com:8051] org2peer2_1 | 2018-11-20 16:02:39.843 UTC [discovery] NewService -> INFO 028 Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000 org2peer2_1 | 2018-11-20 16:02:39.843 UTC [nodeCmd] registerDiscoveryService -> INFO 029 Discovery service activated org2peer2_1 | 2018-11-20 16:02:39.843 UTC [nodeCmd] serve -> INFO 02a Starting peer with ID=[name:"peer1.org2.example.com" ], network ID=[fabsdkgo], address=[peer1.org2.example.com:9051] org2peer2_1 | 2018-11-20 16:02:39.844 UTC [nodeCmd] serve -> INFO 02b Started peer with ID=[name:"peer1.org2.example.com" ], network ID=[fabsdkgo], address=[peer1.org2.example.com:9051]``` then I start the test

Taaanos (Tue, 20 Nov 2018 16:04:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tKSDvsRfF62Pt2A6i) @Baha-sk speaking of it, is there a wait except to wait for everything to be stable, to know if the network is interconnected?

Baha-sk (Tue, 20 Nov 2018 16:04:39 GMT):
not really.. you just check the network logs

Taaanos (Tue, 20 Nov 2018 16:05:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CQxxdY4auQhfXs98B) @Baha-sk ``` org2ca1_1_c97331e3dd9b | WARNING: no logs are available with the 'none' log driver builder_1_2521bc7fb06f | WARNING: no logs are available with the 'none' log driver golangruntime_1_beb1407cc25e | WARNING: no logs are available with the 'none' log driver chaincoded_1_f346b30ba247 | WARNING: no logs are available with the 'none' log driver orderer1_1_7be1f9fd4712 | WARNING: no logs are available with the 'none' log driver org1ca1_1_b2cc522fe7b8 | WARNING: no logs are available with the 'none' log driver org1peer1_1_67ee609fbf12 | WARNING: no logs are available with the 'none' log driver org2peer1_1_67c5e5e897aa | WARNING: no logs are available with the 'none' log driver org1peer2_1_ff6de305df4d | WARNING: no logs are available with the 'none' log driver org2peer2_1_eac5004ac0d4 | WARNING: no logs are available with the 'none' log driver ```

Taaanos (Tue, 20 Nov 2018 16:05:34 GMT):
and kitematic reports 0 logs

Baha-sk (Tue, 20 Nov 2018 16:06:07 GMT):
also do you have a dns entry for those test peers in /etc/hosts? maybe locally the peers are not able to map the peers address

Baha-sk (Tue, 20 Nov 2018 16:06:32 GMT):
for instance I have these two entries: ```127.0.0.1 peer0.org1.example.com peer0.org2.example.com tlsca.example.com ca.org1.example.com ca.org2.example.com orderer.example.com 127.0.0.1 peer1.org1.example.com peer1.org2.example.com```

Taaanos (Tue, 20 Nov 2018 16:06:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dqfntTNkSMmKMR4jQ) @Baha-sk no

Baha-sk (Tue, 20 Nov 2018 16:07:24 GMT):
you can change the log level in docker compose maybe.. not sure why the logs are not showing INFO entries...

Baha-sk (Tue, 20 Nov 2018 16:07:37 GMT):
try to add these entries and see if it works

Taaanos (Tue, 20 Nov 2018 16:11:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NxZxyXGspJGYmoPBL) @Baha-sk yes! it works thank you!

Baha-sk (Tue, 20 Nov 2018 16:13:53 GMT):
you're welcome @Taaanos ... if you don't want to change `/etc/hosts`, you can run the integration-tests locally using one of these make targets: `integration-tests-local`, `integration-tests-stable-local` or `integration-tests-devstable-local` but they run all the tests not just the peers network

Taaanos (Tue, 20 Nov 2018 16:18:12 GMT):
Yeah, I want to do some profiling and running tests from the dirs is the easiest way

Baha-sk (Tue, 20 Nov 2018 16:19:23 GMT):
sure

midoblgsm (Tue, 20 Nov 2018 16:21:03 GMT):
Hi guys, I am trying to use fabrik sdk to invoke my chanincode but I am facing some issues ```error registering for TxStatus event: could not create client conn: could not connect to blockchain-org1peer1:30111``` is there any good document that I can follow? or can anybody help me find out the issue with my config?

Baha-sk (Tue, 20 Nov 2018 16:30:39 GMT):
@midoblgsm is your peer `blockchain-org1peer1` up and running and do you have msp credentials for your client to connect to it? look at the examples in /test/integration/e2e/end_to_end.go for an example creation of the sdk (client).. example configs are found in test/fixtures/config ... I assume you know how to start your peers network (without it, you can't do anything, look at the docker-compose yams files in /test/fixtures/dockerenv for examples)

Baha-sk (Tue, 20 Nov 2018 16:30:39 GMT):
@midoblgsm is your peer `blockchain-org1peer1` up and running and do you have msp credentials for your client to connect to it? look at the examples in /test/integration/e2e/end_to_end.go for an example creation of the sdk (client).. example configs are found in test/fixtures/config ... I assume you know how to start your peers network (without it, you can't do anything, look at the docker-compose yaml files in /test/fixtures/dockerenv for examples)

nyet (Tue, 20 Nov 2018 16:39:21 GMT):
@midoblgsm does your SDK have a way to resolve `blockchain-org1peer1` to an IP address? It needs to be in DNS, `/etc/hosts`, or `config.yaml entityMatchers` (preferably the latter)

jje (Tue, 20 Nov 2018 16:42:13 GMT):
Has joined the channel.

jje (Tue, 20 Nov 2018 16:42:42 GMT):
``` I have set up a Fabric Go SDK on a Raspberry Pi to talk to a remote fabric instance. I can query the ledger, but if I try to write transactions to the ledger (channel.Execute), a runtime error occurs. Most likely it is an issue with the 32 bit arm operating system, and atomic.addUint64() panics if the pointer to its argument is not 64byte aligned. Here is the error message: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0x11e08] goroutine 58 [running]: sync/atomic.loadUint64(0x11cea6c4, 0x11dc0848, 0x37545c) /home/pi/.gvm/gos/go1.10.3/src/sync/atomic/64bit_arm.go:10 +0x3c github.com/hyperledger/fabric-sdk-go/pkg/fab/events/service/dispatcher.(*Dispatcher).updateLastBlockNum(0x11cea680, 0x173, 0x0, 0x11dc0830, 0x1) /home/pi/go/src/github.com/hyperledger/fabric-sdk-go/pkg/fab/events/service/dispatcher/dispatcher.go:157 +0x28 github.com/hyperledger/fabric-sdk-go/pkg/fab/events/service/dispatcher.(*Dispatcher).HandleFilteredBlock(0x11cea680, 0x11eca300, 0x11c9f6b0, 0x10) /home/pi/go/src/github.com/hyperledger/fabric-sdk-go/pkg/fab/events/service/dispatcher/dispatcher.go:451 +0xb8 github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/dispatcher.(*Dispatcher).handleEvent(0x1202dc38, 0x5645a0, 0x1202fab0) /home/pi/go/src/github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/dispatcher/dispatcher.go:83 +0x1e8 github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/dispatcher.(*Dispatcher).(github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/dispatcher.handleEvent)-fm(0x5645a0, 0x1202fab0) /home/pi/go/src/github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/dispatcher/dispatcher.go:114 +0x2c github.com/hyperledger/fabric-sdk-go/pkg/fab/events/service/dispatcher.(*Dispatcher).Start.func1(0x11cea680) /home/pi/go/src/github.com/hyperledger/fabric-sdk-go/pkg/fab/events/service/dispatcher/dispatcher.go:137 +0x26c created by github.com/hyperledger/fabric-sdk-go/pkg/fab/events/service/dispatcher.(*Dispatcher).Start /home/pi/go/src/github.com/hyperledger/fabric-sdk-go/pkg/fab/events/service/dispatcher/dispatcher.go:121 +0xbc Is there any fix to this issue? ```

nyet (Tue, 20 Nov 2018 16:43:18 GMT):
@jje You're likely out of memory.

nyet (Tue, 20 Nov 2018 16:44:05 GMT):
Nvm read note about alignment. Still, thats a nil pointer not an alignment error exception

jje (Tue, 20 Nov 2018 16:44:40 GMT):
no, I think it is a memory alignment issue: https://github.com/golang/go/issues/23345

nyet (Tue, 20 Nov 2018 16:44:49 GMT):
ah i see.

nyet (Tue, 20 Nov 2018 16:49:55 GMT):
```type Dispatcher struct { params lastBlockNum uint64 updateLastBlockInfoOnly bool state int32 eventch chan interface{} blockRegistrations []*BlockReg filteredBlockRegistrations []*FilteredBlockReg handlers map[reflect.Type]Handler txRegistrations map[string]*TxStatusReg ccRegistrations map[string]*ChaincodeReg } ``` Indeed `lastBlockNum` might be unaligned :/

nyet (Tue, 20 Nov 2018 16:51:47 GMT):
```type params struct { eventConsumerBufferSize uint eventConsumerTimeout time.Duration initialLastBlockNum uint64 initialBlockRegistrations []*BlockReg initialFilteredBlockRegistrations []*FilteredBlockReg initialCCRegistrations []*ChaincodeReg initialTxStatusRegistrations []*TxStatusReg } ```

nyet (Tue, 20 Nov 2018 16:53:08 GMT):
@jje if you relocate `lastBlockNum` to be first, does it work?

jje (Tue, 20 Nov 2018 16:54:02 GMT):
need to check, didn't dare working on the SDK code so far...

nyet (Tue, 20 Nov 2018 16:54:17 GMT):
```diff --git a/pkg/fab/events/service/dispatcher/dispatcher.go b/pkg/fab/events/service/dispatcher/dispatcher.go index 2244c852..95a246f0 100755 --- a/pkg/fab/events/service/dispatcher/dispatcher.go +++ b/pkg/fab/events/service/dispatcher/dispatcher.go @@ -43,8 +43,8 @@ type HandlerRegistry map[reflect.Type]Handler // in order to avoid any race conditions and to ensure that events are processed in the order in which they are received. // This also avoids the need for synchronization. type Dispatcher struct { + lastBlockNum uint64 // must be 64 bit aligned params - lastBlockNum uint64 updateLastBlockInfoOnly bool state int32 eventch chan interface{} ```

nyet (Tue, 20 Nov 2018 16:54:19 GMT):
something like that

nyet (Tue, 20 Nov 2018 16:56:49 GMT):
@jje You should open a JIRA bug and include your link to the golang bug...

surendra-kushwaha (Tue, 20 Nov 2018 16:58:51 GMT):
Has joined the channel.

jje (Tue, 20 Nov 2018 17:00:26 GMT):
that actually helps!

nyet (Tue, 20 Nov 2018 17:03:32 GMT):
@jje glad to hear it!

nyet (Tue, 20 Nov 2018 17:05:17 GMT):
@Baha-sk @jje I have no idea how we would get test coverage on this unless we can convince jenkins to do a 32-bit vm

AvinashVazratkar (Tue, 20 Nov 2018 17:18:34 GMT):
Has joined the channel.

Baha-sk (Tue, 20 Nov 2018 19:06:35 GMT):
@nyet latest MacOS does not support 32-bit applications anymore

nyet (Tue, 20 Nov 2018 22:14:02 GMT):
Well technically even RPi are all now 64-bit.. do we care about fixing that bug?

nyet (Tue, 20 Nov 2018 22:14:30 GMT):
BTW thx for the CRs

midoblgsm (Tue, 20 Nov 2018 22:28:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CGGeLFYG2ijnv7wP5) @Baha-sk yes I do have that, I was able to test using peer cli successfully but not with the sdk

midoblgsm (Tue, 20 Nov 2018 22:29:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=A8yBoGWvq3FPoeiKP) @nyet I have it in the config.yaml, but I will check again the entity matcher configuration

Kyroy (Wed, 21 Nov 2018 07:44:55 GMT):
Is there any reason why there is currently no active development in the sdk? :(

cccc (Wed, 21 Nov 2018 08:36:04 GMT):
Has joined the channel.

Baha-sk (Wed, 21 Nov 2018 14:46:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=W5tYW5vY57uJXLeim) @midoblgsm `could not create connection` seems like a tls validation error, the server is not trusting the client creds.. make sure your config.yaml is set with the right peers and msp credentials, including the channel configs

Baha-sk (Wed, 21 Nov 2018 14:46:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=W5tYW5vY57uJXLeim) @midoblgsm `could not create client conn` seems like a tls validation error, the server is not trusting the client creds.. make sure your config.yaml is set with the right peers and msp credentials, including the channel configs

Baha-sk (Wed, 21 Nov 2018 14:52:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=afRYfFMSFNASR2dLz) @Kyroy the sdk is almost stable... unless we discover urgent fixes are needed, we will prioritize them.. eventually we will migrate to Fabric 1.4 level & Go 1.11 when we get a chance.. the community is welcome to contribute any features/fixes as well ... the Go SDK project is still active :)

Baha-sk (Wed, 21 Nov 2018 15:02:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=v5tryNhNWwhzHX2LL) @nyet if it fixes rpi 32bits and the CI is passing.. maybe it doesn't hurt to push a patch.. but we have to make sure current behav

Baha-sk (Wed, 21 Nov 2018 15:02:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=v5tryNhNWwhzHX2LL) @nyet if it fixes rpi 32bits and the CI is passing.. maybe it doesn't hurt to push a patch.. but we have to make sure current behaviour is not impacted

ArianStef (Wed, 21 Nov 2018 15:08:54 GMT):
Has joined the channel.

Kyroy (Wed, 21 Nov 2018 15:52:29 GMT):
@Baha-sk https://jira.hyperledger.org/projects/FABG/issues/FABG-794?filter=allissues&orderby=created+DESC%2C+priority+DESC%2C+updated+DESC

Baha-sk (Wed, 21 Nov 2018 16:03:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=P7KwzRrdrx4pqhb8s) @Kyroy is this related? https://gerrit.hyperledger.org/r/c/27416/

Kyroy (Wed, 21 Nov 2018 16:06:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5GZv4zk4wKzwGWddn) @Baha-sk I don't think so. It is not about getting the collection config. It is about: when using collections, "get instantiated chaincodes" breaks

Baha-sk (Wed, 21 Nov 2018 16:21:39 GMT):
feel free to help if this issue is urgent for you @Kyroy

nyet (Wed, 21 Nov 2018 16:24:28 GMT):
@Kyroy The comment mentions 02c1c6f948e0af668280d541d66fb62ff2582d79 - is that the last commit that works, or is it just older version that does? If the latter any chance you can fire up bisect to find the regression(s)?

nyet (Wed, 21 Nov 2018 16:24:28 GMT):
@Kyroy The comment mentions 02c1c6f948e0af668280d541d66fb62ff2582d79 - is that the last commit that works, or is it just one older version that does? If the latter any chance you can fire up bisect to find the regression(s)?

Kyroy (Wed, 21 Nov 2018 16:24:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5KpaBc7gQyp48BpXu) @Baha-sk I'd like to, but I cannot see any idfference between the code of the sdk and the code of the peer cli. And the peer cli is able to decode it :/

nyet (Wed, 21 Nov 2018 16:26:52 GMT):
Is the that copy/paste from the `peer` command accurate? Because it also prints garbage. That tells me something is definitely broken for both `peer` and the sdk.

nyet (Wed, 21 Nov 2018 16:26:52 GMT):
@Kyroy `peer` is also printing garbage... That tells me something is definitely broken for both `peer` and the sdk.

Baha-sk (Wed, 21 Nov 2018 16:32:56 GMT):
@troyronda @sudeshrshetty ^^^^ 02c1c6f948e0af668280d541d66fb62ff2582d79 is https://github.com/hyperledger/fabric-sdk-go/search?q=02c1c6f948e0af668280d541d66fb62ff2582d79&type=Commits collections seems make cc instantiate fail

nyet (Wed, 21 Nov 2018 16:41:41 GMT):
@jje Please CR+1 https://gerrit.hyperledger.org/r/#/c/27699/ if it works for you... thanks.

nyet (Wed, 21 Nov 2018 22:35:44 GMT):
@Baha-sk is there a formal convention for marking bugs closed?

nyet (Wed, 21 Nov 2018 22:36:57 GMT):
BTW thx @troyronda for your time

midoblgsm (Wed, 21 Nov 2018 22:41:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=pFdN9KD5b8RERc3i3) @Baha-sk do you have a config.yaml file that you can share ? that would really help! I will try to adjust my config.yaml to get the right tls config

nyet (Wed, 21 Nov 2018 22:49:52 GMT):
@midoblgsm you can try my POC sample if it helps https://github.com/Blockdaemon/hlf-database-app

nyet (Wed, 21 Nov 2018 22:52:34 GMT):
https://github.com/Blockdaemon/hlf-database-app/blob/master/templates/config.yaml.in

midoblgsm (Thu, 22 Nov 2018 00:23:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Q3JNkTDJrsF27tFQh) @nyet I will give it a try

midoblgsm (Thu, 22 Nov 2018 00:23:34 GMT):
thanks

Taaanos (Thu, 22 Nov 2018 11:47:26 GMT):
Are there containers available for arm? dockerenv-stable-up is not able to find containers for raspberry pi

Taaanos (Thu, 22 Nov 2018 12:08:31 GMT):
https://hub.docker.com/r/hyperledger/fabric-tools/tags/ no arm tags

Taaanos (Thu, 22 Nov 2018 12:09:16 GMT):
How would it be possible to `make dockerenv-stable-up` on my macbook and connect the Pi to that for running tests?

Taaanos (Thu, 22 Nov 2018 12:10:00 GMT):
Trying to profile `e2e` test on the Pi

GingerMoon (Thu, 22 Nov 2018 12:32:39 GMT):
I am trying to connect to the byfn network and query the key "a", however, an error returned :disappointed: "Failed to get endorsing peers: error getting endorsers from channel response: no endorsement combination can be satisfied"

GingerMoon (Thu, 22 Nov 2018 12:33:39 GMT):

config-payment - Copy.yaml.txt

GingerMoon (Thu, 22 Nov 2018 12:34:11 GMT):
I would appreciated if anyone can help... I have been block by it for a long time T_T

yacovm (Thu, 22 Nov 2018 12:38:14 GMT):
@GingerMoon - you probably don't have anchor peers in your network

yacovm (Thu, 22 Nov 2018 12:38:27 GMT):
or - the peers don't have external endpoints configured

Kyroy (Thu, 22 Nov 2018 12:39:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Gx7WrAPWPbnENMipj) @nyet Yes, it is a problem of the peer response. But I still want to get my chaincodes. At least the peer cli is able to read it

GingerMoon (Thu, 22 Nov 2018 12:40:19 GMT):
Thank you @yacovm , actually it's byfn in the offical site and there are anchor peers

yacovm (Thu, 22 Nov 2018 12:40:36 GMT):
what about external endpoints?

GingerMoon (Thu, 22 Nov 2018 12:41:00 GMT):
what does external endpoints mean?

yacovm (Thu, 22 Nov 2018 12:41:33 GMT):
the environment variable `CORE_PEER_GOSSIP_EXTERNALENDPOINT`

GingerMoon (Thu, 22 Nov 2018 12:42:59 GMT):
that's has already been set...

yacovm (Thu, 22 Nov 2018 12:46:34 GMT):
hmmm

yacovm (Thu, 22 Nov 2018 12:46:37 GMT):
do the peers know each other?

yacovm (Thu, 22 Nov 2018 12:46:39 GMT):
@GingerMoon

GingerMoon (Thu, 22 Nov 2018 12:47:30 GMT):
how to check that?

yacovm (Thu, 22 Nov 2018 12:49:49 GMT):
https://hyperledger-fabric.readthedocs.io/en/latest/discovery-cli.html

GingerMoon (Thu, 22 Nov 2018 13:02:59 GMT):
@yacovm thanks for sharing. I am reading it. However, I think the fabric network is good because it's a pure sample BYFN. I have already posted a more clear question https://stackoverflow.com/questions/53431595/failed-to-get-endorsing-peers-error-getting-endorsers-from-channel-response-no, I would appreciate if you could help me out T_T

GingerMoon (Thu, 22 Nov 2018 13:03:58 GMT):
I just want to make a sample to connect the BYFN, but it took me nearly two weeks T_T

yacovm (Thu, 22 Nov 2018 13:04:55 GMT):
you need to check

yacovm (Thu, 22 Nov 2018 13:04:59 GMT):
if the peers see each other

yacovm (Thu, 22 Nov 2018 13:05:04 GMT):
via querying the peer membership...

yacovm (Thu, 22 Nov 2018 13:05:07 GMT):
check the tutorial

yacovm (Thu, 22 Nov 2018 13:05:23 GMT):
once you verify that, we can troubleshoot further

GingerMoon (Thu, 22 Nov 2018 13:05:23 GMT):
OK, I will, thanks!

yacovm (Thu, 22 Nov 2018 13:05:38 GMT):
feel free to DM / PM me once you get that information

GingerMoon (Thu, 22 Nov 2018 13:08:48 GMT):
@yacovm I will and thank you in advance!

GingerMoon (Thu, 22 Nov 2018 14:02:08 GMT):
@yacovm I call discover from the cli container, user is org1's user. when access org2 peers, the error below returns: failed connecting to peer0.org2.example.com:7051: failed connecting to discovery service: failed to create new connection: context deadline exceeded

yacovm (Thu, 22 Nov 2018 14:04:49 GMT):
I guess you misconfigured the CLI

GingerMoon (Thu, 22 Nov 2018 14:05:23 GMT):
it seems correct, because the user is from org1

GingerMoon (Thu, 22 Nov 2018 14:06:34 GMT):
the error in peer0.org2.example.com: 2018-11-22 14:00:44.042 UTC [core/comm] ServerHandshake -> ERRO 056 TLS handshake failed with error remote error: tls: bad certificate {"server": "PeerServer", "remote address": "172.19.0.7:47298"}

GingerMoon (Thu, 22 Nov 2018 14:07:45 GMT):

discovery.output.tar.gz.txt

tbaud0n (Thu, 22 Nov 2018 15:17:52 GMT):
Has joined the channel.

tbaud0n (Thu, 22 Nov 2018 15:18:34 GMT):
Hi everyone, Is the fabrik-sdk-go is mature enough to be used in production?

tbaud0n (Thu, 22 Nov 2018 15:21:22 GMT):
The project seems steel in alpha but I'd like to work with it for a future project. I was wondering when the project will be stable.

Baha-sk (Thu, 22 Nov 2018 15:29:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DD5iRrogmFDsByokd) @nyet once a fix has been merged, you can go ahead and close the jira issue

Baha-sk (Thu, 22 Nov 2018 15:30:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bnC9jczXuGhvd8mCt) @midoblgsm the configs under https://github.com/hyperledger/fabric-sdk-go/tree/master/test/fixtures/config are good examples, partic

Baha-sk (Thu, 22 Nov 2018 15:30:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bnC9jczXuGhvd8mCt) @midoblgsm the configs under https://github.com/hyperledger/fabric-sdk-go/tree/master/test/fixtures/config are good examples, particularly config_e2e.yaml and config_test.yaml

Baha-sk (Thu, 22 Nov 2018 15:30:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bnC9jczXuGhvd8mCt) @midoblgsm the configs under https://github.com/hyperledger/fabric-sdk-go/tree/master/test/fixtures/config are good examples, particularly `config_e2e.yaml` and `config_test.yaml`

JaccobSmith (Fri, 23 Nov 2018 09:24:22 GMT):
hello,Dose the SDK implement the "Discovery" service ?

Kyroy (Fri, 23 Nov 2018 09:45:14 GMT):
@JaccobSmith yes, it does

Unni_1994 (Fri, 23 Nov 2018 10:31:31 GMT):
Has joined the channel.

Kyroy (Mon, 26 Nov 2018 14:11:41 GMT):
Anyone insterested in picking this up? https://jira.hyperledger.org/projects/FABG/issues/FABG-786 We are using the Go SDK in production and this is a VERY important feature of fabric. Especially with private collections... Unfortunately, I don't feel like contributing it myself because it is a bigger change than expected :(

JaccobSmith (Tue, 27 Nov 2018 01:02:38 GMT):
Is the Fabric a permissible System? I think it's not a problem,because even though someone can upgrade one peer‘s chaincode,Can he change all the chaincode of all the other peers

JaccobSmith (Tue, 27 Nov 2018 01:03:07 GMT):
Or other organizations

JordyBaylac (Tue, 27 Nov 2018 05:04:43 GMT):
Has joined the channel.

Kyroy (Tue, 27 Nov 2018 08:18:53 GMT):
That's true, but this is still a DoS attack

CedricHumbert (Tue, 27 Nov 2018 18:08:57 GMT):
Has joined the channel.

CedricHumbert (Tue, 27 Nov 2018 18:09:10 GMT):
lint

Taaanos (Wed, 28 Nov 2018 08:54:02 GMT):
Does the sdk use `openssl` by default?

Taaanos (Wed, 28 Nov 2018 08:54:02 GMT):
Does the sdk use`openssl` by default?

vladyslavmunin (Wed, 28 Nov 2018 17:04:33 GMT):
Hi , all . Is it possible to re-enroll user whose certificate has been revoked ?

byron1st (Thu, 29 Nov 2018 03:14:54 GMT):
Has joined the channel.

qin (Thu, 29 Nov 2018 06:00:56 GMT):
Has joined the channel.

qin (Thu, 29 Nov 2018 06:02:34 GMT):
Hello,Dose the SDK implement eventhub based on channel in Fabric v1.3

TopJohn (Thu, 29 Nov 2018 06:04:41 GMT):
Has joined the channel.

TopJohn (Thu, 29 Nov 2018 06:07:00 GMT):
I also want to know whether ths golang sdk support the channel-based-event,does anybody know that?:hamster:

TopJohn (Thu, 29 Nov 2018 06:10:14 GMT):
@qin

SandySun2000 (Thu, 29 Nov 2018 18:32:00 GMT):
Has joined the channel.

SandySun2000 (Thu, 29 Nov 2018 18:50:24 GMT):
I have a question on service discovery feature? I have two peers defined in the starter plan V1.2 network. I only have one peer add to my channel. but I got error when I invoke chaincode from Go SDK. The same application used to work on Fabric 1.1. Can some one please help?

SandySun2000 (Thu, 29 Nov 2018 18:50:54 GMT):

$5CEF598AFFCEB78A.jpg

yacovm (Thu, 29 Nov 2018 19:02:40 GMT):
@SandySun2000 - please check if your channel has anchor peers

yacovm (Thu, 29 Nov 2018 19:02:50 GMT):
and also check if the peers have external endpoints configured

SandySun2000 (Thu, 29 Nov 2018 19:21:20 GMT):
@yacovm From the debug log, I found that both peers were configured for endpoints, Since anchor peer is using address reference, I couldn't tell weather it is peer1 or peer2.

SandySun2000 (Thu, 29 Nov 2018 19:21:29 GMT):

$D3043170706EE59.jpg

SandySun2000 (Thu, 29 Nov 2018 19:21:41 GMT):

$65976DCAD2D10BEA.jpg

SandySun2000 (Thu, 29 Nov 2018 19:21:55 GMT):

$16C5B78834C46B25.jpg

SandySun2000 (Thu, 29 Nov 2018 19:22:35 GMT):
org2Peer1 was loaded first

lancelot96 (Fri, 30 Nov 2018 03:07:49 GMT):
Has joined the channel.

lancelot96 (Fri, 30 Nov 2018 03:09:44 GMT):
hi, everyone.

lancelot96 (Fri, 30 Nov 2018 03:10:21 GMT):
I have a problem when using go sdk to instantiate chaincode.

lancelot96 (Fri, 30 Nov 2018 03:11:23 GMT):
The error from method InstantiateCC() is "*panic: error registering for TxStatus event: no peers to connect to*"

lancelot96 (Fri, 30 Nov 2018 03:13:42 GMT):
And all operations above it have no error

lancelot96 (Fri, 30 Nov 2018 03:14:48 GMT):
I have no idea to debug it and want to get some advice, thank you.

Marveliu (Fri, 30 Nov 2018 05:32:14 GMT):
Has joined the channel.

ArpitKhurana1 (Fri, 30 Nov 2018 06:02:14 GMT):
Has joined the channel.

nyet (Fri, 30 Nov 2018 20:42:51 GMT):
add debugging to the client and see what it is failing at. `client.logging.level: debug`

nyet (Fri, 30 Nov 2018 20:43:13 GMT):
i was seeing this too, it had to do with my peer config but i do not recall what the issue was off hand.

nyet (Fri, 30 Nov 2018 20:43:42 GMT):
```client: logging: level: ```

nyet (Fri, 30 Nov 2018 20:43:42 GMT):
```client: logging: level: debug ```

lancelot96 (Sat, 01 Dec 2018 02:21:19 GMT):
thank you for your help, when i use debug mode, i found ` [fabsdk/fab] 2018/12/01 02:16:41 UTC - dispatcher.(*Dispatcher).publishFilteredBlockEvents -> DEBU No chaincode action found for TxID[336e2437bd1b27184e325b895d1c28d9b66106964809d8b78b04026b83187688], block[4], source URL[peer0.org1.example.com:7051] `

lancelot96 (Sat, 01 Dec 2018 02:22:04 GMT):
but i don't know what chaincode action is

MuhammedHafil (Mon, 03 Dec 2018 13:20:54 GMT):
How to register user with custom attributes and access it in chaincode? how to access the `role` or any key from `attrs` from chaincode? I have tried this, but not working https://pastebin.com/BKDJeegt

mallikarjunasai995 (Mon, 03 Dec 2018 14:51:26 GMT):
Has joined the channel.

mallikarjunasai995 (Mon, 03 Dec 2018 15:03:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wgis5zACurJiPMGgy) @SandySun2000 same question here .... i have two peers and i have installed some chaincode one peer and in the clinet profile .json channel column only it is showling like one peer has joined like that\

mallikarjunasai995 (Mon, 03 Dec 2018 15:04:39 GMT):
can you please help us on that and also how to debug and where to find anchor peers in ibm cloud blokchain starter plan?

Ice-Storm (Tue, 04 Dec 2018 02:31:46 GMT):
Has joined the channel.

Ice-Storm (Tue, 04 Dec 2018 02:32:07 GMT):

Clipboard - December 4, 2018 10:32 AM

Ice-Storm (Tue, 04 Dec 2018 02:34:13 GMT):
@MuhammedHafil you can use this attribute as default. More details can be found on https://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#attribute-based-access-control

vieiramanoel (Tue, 04 Dec 2018 02:47:58 GMT):
Hi! I've created my admin with fabric-ca and everything works fine in sdk-node

vieiramanoel (Tue, 04 Dec 2018 02:48:07 GMT):
but in sdk-go

vieiramanoel (Tue, 04 Dec 2018 02:48:10 GMT):
I got failed to get client context to create channel client user not found

vieiramanoel (Tue, 04 Dec 2018 02:48:28 GMT):
even admin path is right

vieiramanoel (Tue, 04 Dec 2018 02:48:45 GMT):
can someone help me?

Baha-sk (Tue, 04 Dec 2018 14:36:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=a9vkmQnJzFpMGoAHe) @Taaanos the Go sdk uses Fabric's encryption, which is compatible with openssl... see this integration test example that imports openssl ch config signatures into the sdk: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multi_orgs_ch_update_signatures_test.go#L85

Baha-sk (Tue, 04 Dec 2018 14:43:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NfFdbghyj5LErTsrf) @vieiramanoel have you created a context like in this test? https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/channel/channel_client_test.go#L45

vieiramanoel (Tue, 04 Dec 2018 14:56:58 GMT):
Yes and my problem is exactly on context creating @Baha-sk [ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gvw997P7Eyw8CtLji)

Baha-sk (Tue, 04 Dec 2018 16:21:52 GMT):
is the admin credential found in the config path @vieiramanoel (MSP config path)?

bandreghetti (Tue, 04 Dec 2018 17:04:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Fwz3bMWECaqfv4cEF) @Baha-sk I'm working with @vieiramanoel Our organizations section in config.yaml for sdk-go is as follows: ``` organizations: pmsp: mspid: pmspMSP cryptoPath: /crypto/users/admin@pmsp.gov/msp peers: - peer0.pmsp.gov certificateAuthorities: - ca.pmsp.gov ``` the cryptoPath folder tree contains the following files: ``` msp ├── admincerts │   └── cert.pem ├── cacerts │   └── ca-pmsp-gov-7054.pem ├── IssuerPublicKey ├── IssuerRevocationPublicKey ├── keystore │   └── 7456d57b4d153d45c0b05acdf1efe52319b32cf0fe6557e0112f6aaa9a14adb9_sk ├── signcerts │   └── cert.pem └── user ```

bandreghetti (Tue, 04 Dec 2018 17:04:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Fwz3bMWECaqfv4cEF) @Baha-sk I'm working with @vieiramanoel Our organizations section in config.yaml for sdk-go is as follows: ``` organizations: pmsp: mspid: pmspMSP cryptoPath: /crypto/users/admin@pmsp.gov/msp peers: - peer0.pmsp.gov certificateAuthorities: - ca.pmsp.gov ``` The cryptoPath folder tree contains the following files: ``` msp ├── admincerts │   └── cert.pem ├── cacerts │   └── ca-pmsp-gov-7054.pem ├── IssuerPublicKey ├── IssuerRevocationPublicKey ├── keystore │   └── 7456d57b4d153d45c0b05acdf1efe52319b32cf0fe6557e0112f6aaa9a14adb9_sk ├── signcerts │   └── cert.pem └── user ```

vieiramanoel (Tue, 04 Dec 2018 20:34:05 GMT):
Ok, no progress about it

vieiramanoel (Tue, 04 Dec 2018 20:34:19 GMT):
@Baha-sk or @troyronda can you help us?

vieiramanoel (Tue, 04 Dec 2018 20:35:21 GMT):
sdk can't find user anyway on sdk.ChannelContext("mainchannel", fabsdk.WithUser(user), fabsdk.WithOrg(org))

arjitkhullar (Wed, 05 Dec 2018 00:04:22 GMT):
Has joined the channel.

antitoine (Wed, 05 Dec 2018 07:41:47 GMT):
@vieiramanoel Are you on Windows ?

antitoine (Wed, 05 Dec 2018 07:42:37 GMT):
Because : https://github.com/chainHero/heroes-service/issues/29

bandreghetti (Wed, 05 Dec 2018 15:20:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wNWYj3qYumwQfpAeZ) @antitoine No we're not... We actually solved it by adding this config block: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e_pkcs11.yaml#L131

bandreghetti (Wed, 05 Dec 2018 15:20:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Tc7ncSjsbNGs99784) @vieiramanoel SDK-Go seems to be breaking precisely at this point: https://github.com/hyperledger/fabric-sdk-go/blob/cb4ad138c14fd98039c56ab6301e665254a930bc/pkg/client/channel/chclient.go#L62 From here on it begins getting hard to dig into the source code because my editor points me to the Interface of that return, not the implementation

bandreghetti (Wed, 05 Dec 2018 15:20:59 GMT):
No we're on Ubuntu, we solved it already adding this config to the SDK config file: [https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e_pkcs11.yaml#L131]

vieiramanoel (Wed, 05 Dec 2018 16:51:42 GMT):
But we are stuck at same point with a different error fabric-sdk-go says:

vieiramanoel (Wed, 05 Dec 2018 16:51:57 GMT):
``` [fabsdk/util] 2018/12/05 16:50:43 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [18.188.121.217:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [18.188.121.217:7051]. Will retry again later ```

vieiramanoel (Wed, 05 Dec 2018 16:52:12 GMT):
and peer says ```2018-12-05 16:51:42.931 UTC [core/comm] ServerHandshake -> ERRO 06a TLS handshake failed with error remote error: tls: bad certificate {"server": "PeerServer", "remote address": "18.188.121.217:45322"} ```

vieiramanoel (Wed, 05 Dec 2018 16:54:15 GMT):
I've already copied ca.crt from inside peer docker to rest-server folder in order to use it in rest-server, and it keeps complaining about tls

vieiramanoel (Wed, 05 Dec 2018 16:54:15 GMT):
I've already copied ca.crt from inside peer docker to rest-server folder in order to use it in rest-server, and peer keeps complaining about tls

vieiramanoel (Wed, 05 Dec 2018 17:25:30 GMT):
It is important to say that I'm sure that tls_Client is disabled at peer

bandreghetti (Wed, 05 Dec 2018 17:49:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hG7CJf9eYhWdA2vb7) @vieiramanoel SDK-Go seems to be breaking precisely at this point: https://github.com/hyperledger/fabric-sdk-go/blob/cb4ad138c14fd98039c56ab6301e665254a930bc/pkg/client/channel/chclient.go#L62 From here on it begins getting hard to dig into the source code because my editor points me to the Interface of that return, not the implementation

vieiramanoel (Wed, 05 Dec 2018 20:00:12 GMT):
some1?

vieiramanoel (Wed, 05 Dec 2018 20:00:12 GMT):
ANY1?

vieiramanoel (Wed, 05 Dec 2018 20:00:12 GMT):
any1?

vieiramanoel (Wed, 05 Dec 2018 22:52:06 GMT):
@Baha-sk @yacovm at the end of the day the 'user not found' error led us to two distincts points: if we set users under organizations like this ```organizations: pmsp: mspid: pmspMSP cryptoPath: /crypto/users/admin@pmsp.gov.br/msp] peers: - peer0.pmsp.gov.br certificateAuthorities: - ca.pmsp.gov.br ```

vieiramanoel (Wed, 05 Dec 2018 22:52:06 GMT):
@Baha-sk @yacovm at the end of the day the 'user not found' error led us to two distincts points: if we set users under organizations like this ```organizations: pmsp: mspid: pmspMSP cryptoPath: /crypto/users/admin@pmsp.gov.br/msp peers: - peer0.pmsp.gov.br certificateAuthorities: - ca.pmsp.gov.br ```

vieiramanoel (Wed, 05 Dec 2018 22:56:36 GMT):
@Baha-sk @yacovm at the end of the day the 'user not found' error led us to two distincts points: if we set users under organizations like this ```organizations: pmsp: mspid: pmspMSP cryptoPath: /crypto/users/admin@pmsp.gov.br/msp users admin: certs: path: /crypto/users/admin@pmsp.gov.br/msp/signcerts/cert.pem key: path: /crypto/users/admin@pmsp.gov.br/msp/signcerts/PRIVATE_KEY_HERE peers: - peer0.pmsp.gov.br certificateAuthorities: - ca.pmsp.gov.br ``` it can find admin user, but fails on any tls requisition to peer if we use organizations like this: ``` organizations: pmsp: mspid: pmspMSP cryptoPath: /crypto/users/{username}@pmsp.gov.br/msp peers: - peer0.pmsp.gov.br certificateAuthorities: - ca.pmsp.gov.br ``` it fails with user not found EVEN IF IT'S HARDCODED like this ```organizations: pmsp: mspid: pmspMSP cryptoPath: /crypto/users/admin@pmsp.gov.br/msp peers: - peer0.pmsp.gov.br certificateAuthorities: - ca.pmsp.gov.br ``` create a new context with user "admin" fails getting user and returns "user not found" too

yacovm (Wed, 05 Dec 2018 22:57:07 GMT):
hm but why are you tagging me

yacovm (Wed, 05 Dec 2018 22:57:17 GMT):
I'm not a go SDK developer

vieiramanoel (Wed, 05 Dec 2018 22:58:26 GMT):
@antitoine if you have any clue about it. we spent a lot of time today reading the go-sdk code itself

vieiramanoel (Wed, 05 Dec 2018 22:58:26 GMT):
@antitoine if you have any clue about it. we spent a lot of time today reading the go-sdk source code itself

vieiramanoel (Wed, 05 Dec 2018 22:58:26 GMT):
@antitoine if you have any clue about it. we spent a lot of time today reading the go-sdk source code itself

vieiramanoel (Wed, 05 Dec 2018 22:59:12 GMT):
@yacovm cuz you often have the answers :sweat_smile:

yacovm (Wed, 05 Dec 2018 22:59:39 GMT):
no, i only know the fabric core, and sometimes can apply common sense and basic deduction rules

vieiramanoel (Wed, 05 Dec 2018 23:04:34 GMT):
this is critical, and docs are not clear at all about user management through config file. We are about to move all our go-sdk based chaincode apis to node-sdk.

vieiramanoel (Wed, 05 Dec 2018 23:04:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xYKkwDZRSLPdjyQwn) @yacovm thanks anyway :)

srinivasd (Thu, 06 Dec 2018 03:48:10 GMT):
Has joined the channel.

mallikarjunasai995 (Thu, 06 Dec 2018 05:57:40 GMT):
Suppose there are two peers I want one one peer to setup the some rules or treaty then the second peer has to initialize the data , but while initializing it has to check and satisfy the treaty or rules created by another peer …. Where should I write this thing? hey hai if you can give me some idea for the above mentioned one if would be great

twoneks (Thu, 06 Dec 2018 12:28:06 GMT):
HI I can't really figured out how to decode or unmarshal a common.Block struct that I retrieve from a ledger.QueryBlock. I would like to access the list of transaction. It should be pretty common to do that. I saw that in node you could do this doing something like https://fabric-sdk-node.github.io/global.html#Block Any clue on how to make this work in go

rahulhegde (Thu, 06 Dec 2018 13:28:54 GMT):
Has joined the channel.

Baha-sk (Thu, 06 Dec 2018 17:17:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=MJodBLosMqoRRo9TC) @bandreghetti this is the equi

Baha-sk (Thu, 06 Dec 2018 17:17:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=MJodBLosMqoRRo9TC) @bandreghetti this is the equivalent of https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L261 but you're embedding the users credentials in the configs

Baha-sk (Thu, 06 Dec 2018 17:18:06 GMT):
both should work

Baha-sk (Thu, 06 Dec 2018 17:20:03 GMT):
@bandreghetti @vieiramanoel are you on latest master?

Baha-sk (Thu, 06 Dec 2018 17:23:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=HqpvQThpypfXipXk2) @vieiramanoel are you on Mac or Linux? try to provide a relative path instead of an absolute path (remove the `/` in front of `/crypto/users/`) and make sure the path is accessible to the config... also you might wanna escape the `@` maybe? or rename that folder to not have an @ and try again

Baha-sk (Thu, 06 Dec 2018 17:24:56 GMT):
this should work, otherwise the unit/integration tests would fail as well

Baha-sk (Thu, 06 Dec 2018 17:37:52 GMT):
you can also fully embed the cert inside the config by replace `path` field to `pem` field like ``` users: Admin: cert: pem: | -----your cert content------ -----here-----```

Baha-sk (Thu, 06 Dec 2018 17:37:52 GMT):
you can also fully embed the cert inside the config by replace `path` field to `pem` field like ``` users: Admin: cert: pem: | -----your cert content------ -----here-----```

Baha-sk (Thu, 06 Dec 2018 17:37:52 GMT):
you can also fully embed the cert inside the config by replacing `path` field to `pem` field like ``` users: Admin: cert: pem: | -----your cert content------ -----here-----```

Baha-sk (Thu, 06 Dec 2018 17:46:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fAsgCab6wnT8j2SR2) @twoneks the ledgerClient.QueryBlock() function returns an unmarshaled common.Block in go, see example: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/ledger/ledger_queries_test.go#L117

vieiramanoel (Thu, 06 Dec 2018 17:58:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yjJ4LbLzpsPgWyBQN) @Baha-sk we use docker at v1.3.0

vieiramanoel (Thu, 06 Dec 2018 17:59:04 GMT):
We use Linux, I will try the relative path solution

Baha-sk (Thu, 06 Dec 2018 18:12:20 GMT):
@vieiramanoel the go sdk supports fabric 1.3

vieiramanoel (Thu, 06 Dec 2018 18:14:52 GMT):
@Baha-sk using your suggestion ```Error instantiating Fabric SDK: failed to initialize configuration: unable to load endpoint config: failed to initialize endpoint config from config backend: network configuration load failed: failed to load channel configs: failed to load network TLSConfig: failed to load org TLSConfig : failed to load org cert: failed to load pem bytes from path users/admin@pmsp.gov.br/msp/signcerts/cert.pem: open users/admin@pmsp.gov.br/msp/signcerts/cert.pem: no such file or directory ```

vieiramanoel (Thu, 06 Dec 2018 18:15:03 GMT):
relative path won't work too

Baha-sk (Thu, 06 Dec 2018 18:16:49 GMT):
weird.. can you temporarily rename `admin@pmsp.gov.br` to `admin.pmsp.gov.br` physically and in the config?

vieiramanoel (Thu, 06 Dec 2018 18:16:57 GMT):
sure

vieiramanoel (Thu, 06 Dec 2018 18:18:34 GMT):
my org would be like this ``` pmsp: mspid: pmspMSP cryptoPath: users/admin.pmsp.gov.br/msp peers: - peer0.pmsp.gov.br certificateAuthorities: - ca.pmsp.gov.br ``` or this ```pmsp: mspid: pmspMSP cryptoPath: users/admin.pmsp.gov.br/msp users: admin: cert: path: users/admin.pmsp.gov.br/msp/signcerts/cert.pem peers: - peer0.pmsp.gov.br certificateAuthorities: - ca.pmsp.gov.br```

vieiramanoel (Thu, 06 Dec 2018 18:21:24 GMT):
for the first configuration I got user not found either for 'admin' or 'admin.psmp.gov.br' in withUser()

vieiramanoel (Thu, 06 Dec 2018 18:21:34 GMT):
let's see the second one

vieiramanoel (Thu, 06 Dec 2018 18:24:25 GMT):
same

Baha-sk (Thu, 06 Dec 2018 18:24:31 GMT):
users.admin.cert.path/pem are only available under organizations

vieiramanoel (Thu, 06 Dec 2018 18:24:52 GMT):
im under organizations

vieiramanoel (Thu, 06 Dec 2018 18:25:06 GMT):
```organizations: pmsp: mspid: pmspMSP cryptoPath: users/admin.pmsp.gov.br/msp users: admin.pmsp.gov.br: cert: path: /crypto/users/admin.pmsp.gov.br/msp/signcerts/cert.pem peers: - peer0.pmsp.gov.br certificateAuthorities: - ca.pmsp.gov.br ```

vieiramanoel (Thu, 06 Dec 2018 18:25:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GyXiEAAfPchwwidHE) on second config sdk does find user, but connection to peer fails due to bad cert

Baha-sk (Thu, 06 Dec 2018 18:26:40 GMT):
you can't put both crypto path and users.. it's either/or

Baha-sk (Thu, 06 Dec 2018 18:27:35 GMT):
if you choose to use users.. don't put cryptPath field in the config

Baha-sk (Thu, 06 Dec 2018 18:27:35 GMT):
if you choose to use users.. don't put cryptoPath field in the config

vieiramanoel (Thu, 06 Dec 2018 18:27:43 GMT):
ok, let me try it

Baha-sk (Thu, 06 Dec 2018 18:28:37 GMT):
and of course I assume you verified this path from where the config.yaml file is located, right? : `/crypto/users/admin.pmsp.gov.br/msp/signcerts/cert.pem`

vieiramanoel (Thu, 06 Dec 2018 18:29:09 GMT):
In this case I got:

vieiramanoel (Thu, 06 Dec 2018 18:29:13 GMT):
```rest-server | 2018/12/06 18:28:28 error getting identity: getting private key from cert failed: Failed getting key for SKI [[235 196 187 3 156 230 172 119 119 20 113 80 74 216 204 190 50 195 162 17 107 66 124 87 160 18 52 121 89 3 172 5]]: Key with SKI ebc4bb039ce6ac77771471504ad8ccbe32c3a2116b427c57a01234795903ac05 not found in /tmp/msp/keystore rest-server | 186.195.37.161 - - [06/Dec/2018:18:28:28 +0000] "GET /DiariaDeDiligencia HTTP/1.1" 401 314 ```

vieiramanoel (Thu, 06 Dec 2018 18:29:17 GMT):
and

vieiramanoel (Thu, 06 Dec 2018 18:29:26 GMT):
```rest-server | [fabsdk/fab] 2018/12/06 18:26:47 UTC - txn.SendProposal.func1 -> DEBU Received error response from txn proposal processing: Transaction processing for endorser [18.188.121.217:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [18.188.121.217:7051] rest-server | [fabsdk/common] 2018/12/06 18:26:47 UTC - retry.(*RetryableInvoker).Invoke -> DEBU Failed with err [queryChaincode failed: Transaction processing for endorser [18.188.121.217:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [18.188.121.217:7051]] on attempt #1. Checking if retry is warranted... rest-server | [fabsdk/common] 2018/12/06 18:26:47 UTC - retry.(*RetryableInvoker).Invoke -> DEBU ... retry for err [queryChaincode failed: Transaction processing for endorser [18.188.121.217:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [18.188.121.217:7051]] is NOT warranted after 1 attempt(s). rest-server | 2018/12/06 18:26:47 Error creating Channel Client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [18.188.121.217:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [18.188.121.217:7051] ```

vieiramanoel (Thu, 06 Dec 2018 18:29:32 GMT):
removindo cryptopath

vieiramanoel (Thu, 06 Dec 2018 18:29:32 GMT):
removing cryptopath

vieiramanoel (Thu, 06 Dec 2018 18:30:03 GMT):
if I let cryptopath and remove user, withUser() won't find they

Baha-sk (Thu, 06 Dec 2018 18:30:27 GMT):
I think the cert is not valid

Baha-sk (Thu, 06 Dec 2018 18:31:06 GMT):
not sure how you created the cert.. but the easiest way is to use the cryptogen tool from Fabric

vieiramanoel (Thu, 06 Dec 2018 18:31:30 GMT):
I need to use fabric-ca

vieiramanoel (Thu, 06 Dec 2018 18:31:46 GMT):
the certs generated are used successfully in node sdk

Baha-sk (Thu, 06 Dec 2018 18:31:53 GMT):
that's fine.. the sdk can use fabric-ca as well

Baha-sk (Thu, 06 Dec 2018 18:32:57 GMT):
`Key with SKI ebc4bb039ce6ac77771471504ad8ccbe32c3a2116b427c57a01234795903ac05 not found in /tmp/msp/keystore` sounds like the peer's keystone is missing something

Baha-sk (Thu, 06 Dec 2018 18:32:57 GMT):
`Key with SKI ebc4bb039ce6ac77771471504ad8ccbe32c3a2116b427c57a01234795903ac05 not found in /tmp/msp/keystore` sounds like the peer's keystore is missing something

Baha-sk (Thu, 06 Dec 2018 18:33:52 GMT):
try to put back the `@` in the folder name again

vieiramanoel (Thu, 06 Dec 2018 18:34:10 GMT):
ok

Baha-sk (Thu, 06 Dec 2018 18:35:33 GMT):
can you call the user `Admin` instead of `admin.pmsp.gov.br` in the config?

Baha-sk (Thu, 06 Dec 2018 18:36:04 GMT):
change ``` users: admin.pmsp.gov.br: cert:``` to ``` users: Admin: cert:```

vieiramanoel (Thu, 06 Dec 2018 18:43:42 GMT):
sure

vieiramanoel (Thu, 06 Dec 2018 18:44:07 GMT):
```rest-server | [fabsdk/msp] 2018/12/06 18:42:49 UTC - msp.NewIdentityManager -> WARN Cryptopath not provided for organization [pmsp], MSP stores not created rest-server | [fabsdk] 2018/12/06 18:42:49 UTC - fabsdk.initSDK -> DEBU SDK initialized successfully rest-server | 2018/12/06 18:42:49 Listening on port 3000... rest-server | 2018/12/06 18:43:22 error getting identity: getting private key from cert failed: Failed getting key for SKI [[235 196 187 3 156 230 172 119 119 20 113 80 74 216 204 190 50 195 162 17 107 66 124 87 160 18 52 121 89 3 172 5]]: Key with SKI ebc4bb039ce6ac77771471504ad8ccbe32c3a2116b427c57a01234795903ac05 not found in /tmp/msp/keystore ```

vieiramanoel (Thu, 06 Dec 2018 18:45:17 GMT):
for ```organizations: pmsp: mspid: pmspMSP users: admin: cert: path: /crypto/users/admin@pmsp.gov.br/msp/signcerts/cert.pem peers: - peer0.pmsp.gov.br certificateAuthorities: - ca.pmsp.gov.br ```

Baha-sk (Thu, 06 Dec 2018 19:04:18 GMT):
capital Admin

Baha-sk (Thu, 06 Dec 2018 19:04:35 GMT):
just like in https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e_pkcs11.yaml#L159

vieiramanoel (Thu, 06 Dec 2018 19:15:45 GMT):
```rest-server | 2018/12/06 19:15:33 error getting identity: getting private key from cert failed: Failed getting key for SKI [[235 196 187 3 156 230 172 119 119 20 113 80 74 216 204 190 50 195 162 17 107 66 124 87 160 18 52 121 89 3 172 5]]: Key with SKI ebc4bb039ce6ac77771471504ad8ccbe32c3a2116b427c57a01234795903ac05 not found in /tmp/msp/keystore rest-server | 186.195.37.161 - - [06/Dec/2018:19:15:33 +0000] "GET /DiariaDeDiligencia HTTP/1.1" 401 314 ```

Baha-sk (Thu, 06 Dec 2018 19:23:42 GMT):
what is your BCCSP config look like?

Baha-sk (Thu, 06 Dec 2018 19:23:55 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e_pkcs11.yaml#L43

Baha-sk (Thu, 06 Dec 2018 19:23:55 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e_pkcs11.yaml#L43 for PKCS11

Baha-sk (Thu, 06 Dec 2018 19:30:23 GMT):
or https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L84 for SW

bandreghetti (Thu, 06 Dec 2018 19:58:23 GMT):
our BCCSP config is: ``` BCCSP: security: enabled: true default: provider: "SW" hashAlgorithm: "SHA2" softVerify: true level: 256 ```

bandreghetti (Thu, 06 Dec 2018 19:59:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jyB3YLKTrQWvd9KXS) @Baha-sk exactly like this

Baha-sk (Thu, 06 Dec 2018 20:19:43 GMT):
from the error logs you pasted above, I can see it thrown here: https://github.com/hyperledger/fabric/blob/release-1.3/bccsp/sw/fileks.go#L262 it looks like the peer is not able to extract the cert from the keystore for some unknown reason

Baha-sk (Thu, 06 Dec 2018 20:20:12 GMT):
can you log in to the peer and see if /tmp/msp/keystore is empty or not?

bandreghetti (Thu, 06 Dec 2018 20:22:20 GMT):
you mean the peer machine? the /tmp folder in the peer is empty

bandreghetti (Thu, 06 Dec 2018 20:30:46 GMT):
in the machine running the sdk, `/tmp/msp/keystore/` exists but is also empty

bandreghetti (Thu, 06 Dec 2018 20:39:23 GMT):
even if we add `cryptoPath` line to the org config, `/tmp/msp/keystore` is still empty although in this case the error changes to: ``` 2018/12/06 20:37:14 Error creating Channel Client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [18.188.121.217:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [18.188.121.217:7051] ```

bandreghetti (Thu, 06 Dec 2018 20:41:13 GMT):
and peer logs are: ``` 2018-12-06 20:39:54.047 UTC [core/comm] ServerHandshake -> ERRO 5101 TLS handshake failed with error remote error: tls: bad certificate {"server": "PeerServer", "remote address": "18.188.121.217:34074"} 2018-12-06 20:39:54.048 UTC [grpc] handleRawConn -> DEBU 5102 grpc: Server.Serve failed to complete security handshake from "18.188.121.217:34074": remote error: tls: bad certificate ```

bandreghetti (Thu, 06 Dec 2018 20:51:41 GMT):
and if we remove the users section as you said and leave only cryptoPath, like below, we get an "user not found" error ``` organizations: pmsp: mspid: pmspMSP cryptoPath: /crypto/users/Admin@pmsp.gov.br/msp/ peers: - peer0.pmsp.gov.br certificateAuthorities: - ca.pmsp.gov.br ```

vieiramanoel (Thu, 06 Dec 2018 21:30:16 GMT):
oh mamaezinha

bandreghetti (Thu, 06 Dec 2018 21:46:20 GMT):
@Baha-sk by the way we are using the latest master revision `3081d7012d5ea745f5b93f05cd9d952569a0add0`

djtouchette (Thu, 06 Dec 2018 22:48:40 GMT):
Has joined the channel.

Baha-sk (Thu, 06 Dec 2018 23:16:02 GMT):
this is not normal..

Baha-sk (Thu, 06 Dec 2018 23:36:54 GMT):
@bandreghetti have you created a configtx.yaml file to create a genesis block with proper orgs info like the following: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/fabric/v1.3/config/configtx.yaml#L16 ?

JaccobSmith (Fri, 07 Dec 2018 03:36:14 GMT):
Hello, all, I want to enroll a identity with a sub ca like "ca1" or "ca2" in the CA server, how could I do ?

JaccobSmith (Fri, 07 Dec 2018 03:37:17 GMT):
With the msp.New function ,I could just choose the most external CA server in an organization

JaccobSmith (Fri, 07 Dec 2018 03:53:17 GMT):
OK, I directly change the CAconfig() interface to change the CAname temporarily and after enrolling has done then I restore this value

pkarolis (Fri, 07 Dec 2018 11:36:27 GMT):
Has joined the channel.

pkarolis (Fri, 07 Dec 2018 11:38:37 GMT):
I am struggling to setup sdk client with multiple MSPs. It seems go sdk only supports one MSP which is defined in client config. Do you have some guidelines how to setup sdk client with multiple msps?

nyet (Fri, 07 Dec 2018 15:48:12 GMT):
@pkarolis in `config.yaml` you can set up separate organizations, each with a different MSP

nyet (Fri, 07 Dec 2018 15:49:07 GMT):
Then, when you do `sdk.Context()` you pass it that `WithOrg()`

nyet (Fri, 07 Dec 2018 15:58:36 GMT):
I'm not sure but the top level `name` in `config.yaml` is probably also selectable but I confess I'm not sure how.

nyet (Fri, 07 Dec 2018 15:59:08 GMT):
(i.e. if you have multiple `name`d entities in `config.yaml`)

lay-z (Fri, 07 Dec 2018 18:49:51 GMT):
Has joined the channel.

cppchedy (Sat, 08 Dec 2018 15:56:16 GMT):
Has joined the channel.

funkol2007 (Mon, 10 Dec 2018 06:16:26 GMT):
Has joined the channel.

twoneks (Mon, 10 Dec 2018 10:00:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hoN7pPHn2MWCeC4qA) @Baha-sk @Baha-sk Thank for your answer. The point is that I can't understand how to unmarshal the informations. I saw the `XXX_Unmarshal` function but it's not so crear for me the way it works. I haven't found no test for reading the transactions from the block. Moreover even if I trigger 2 chaincode invocation in a row, they are not grouped in the same block as I expect but two blocks are produced.

twoneks (Mon, 10 Dec 2018 10:00:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hoN7pPHn2MWCeC4qA) @Baha-sk @Baha-sk Thanks for your answer. The point is that I can't understand how to unmarshal the informations. I saw the `XXX_Unmarshal` function but it's not so crear for me the way it works. I haven't found no test for reading the transactions from the block. Moreover even if I trigger 2 chaincode invocation in a row, they are not grouped in the same block as I expect but two blocks are produced.

twoneks (Mon, 10 Dec 2018 10:00:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hoN7pPHn2MWCeC4qA) @Baha-sk @Baha-sk Thanks for your answer. The point is that I can't understand how to unmarshal the informations. I saw the `XXX_Unmarshal` function but it's not so clear for me the way it works. I haven't found no test for reading the transactions from the block. Moreover even if I trigger 2 chaincode invocation in a row, they are not grouped in the same block as I expect but two blocks are produced.

xuchenhao001 (Tue, 11 Dec 2018 07:50:04 GMT):
Has left the channel.

greivinlopez (Tue, 11 Dec 2018 19:25:58 GMT):
Has joined the channel.

SandySun2000 (Wed, 12 Dec 2018 18:49:35 GMT):
[fabsdk/client] 2018/12/06 23:28:41 UTC - options.(*Params).SetPeerFilter -> DEBU PeerFilter: (options.PeerFilter)(0x8f9330) [fabsdk/client] 2018/12/06 23:28:41 UTC - fabricselection.(*selectionFilter).Exclude -> DEBU Calling peer filter on endpoint [nfbea5f93ecde437ca2b4fb18673bd617-org1-peer1.aus01.blockchain.ibm.com:31002] [fabsdk/client] 2018/12/06 23:28:41 UTC - fabricselection.(*selectionFilter).Exclude -> DEBU Excluding peer [nfbea5f93ecde437ca2b4fb18673bd617-org1-peer1.aus01.blockchain.ibm.com:31002] since it isn't in the set of peers returned by the discovery service [fabsdk/client] 2018/12/06 23:28:41 UTC - options.(*Params).SetPeerFilter -> DEBU PeerFilter: (options.PeerFilter)(0x8f9330) [fabsdk/client] 2018/12/06 23:28:41 UTC - fabricselection.(*selectionFilter).Exclude -> DEBU Calling peer filter on endpoint [nfbea5f93ecde437ca2b4fb18673bd617-org1-peer1.aus01.blockchain.ibm.com:31002] [fabsdk/client] 2018/12/06 23:28:41 UTC - fabricselection.(*selectionFilter).Exclude -> DEBU Excluding peer [nfbea5f93ecde437ca2b4fb18673bd617-org1-peer1.aus01.blockchain.ibm.com:31002] since it isn't in the set of peers returned by the discovery service [fabsdk/client] 2018/12/06 23:28:41 UTC - options.(*Params).SetPeerFilter -> DEBU PeerFilter: (options.PeerFilter)(0x8f9330) [fabsdk/client] 2018/12/06 23:28:41 UTC - fabricselection.(*selectionFilter).Exclude -> DEBU Calling peer filter on endpoint [nfbea5f93ecde437ca2b4fb18673bd617-org1-peer1.aus01.blockchain.ibm.com:31002] [fabsdk/client] 2018/12/06 23:28:41 UTC - fabricselection.(*selectionFilter).Exclude -> DEBU Excluding peer [nfbea5f93ecde437ca2b4fb18673bd617-org1-peer1.aus01.blockchain.ibm.com:31002] since it isn't in the set of peers returned by the discovery service I am receiving an error: fabricselection.(*selectionFilter).Exclude -> DEBU Excluding peer [nxxxxxxx:31002] since it isn't inthe set of peers returned by the discovery service

SandySun2000 (Wed, 12 Dec 2018 18:50:59 GMT):
I am receiving an error: fabricselection.(*selectionFilter).Exclude -> DEBU Excluding peer [nxxxxxxx:31002] since it isn't inthe set of peers returned by the discovery service

SandySun2000 (Wed, 12 Dec 2018 18:50:59 GMT):
I am receiving an error: fabricselection.(*selectionFilter).Exclude -> DEBU Excluding peer [nxxxxxxx:31002] since it isn't in the set of peers returned by the discovery service

SandySun2000 (Wed, 12 Dec 2018 18:52:10 GMT):
my question is where does the discovery service find the set of peers?

yacovm (Wed, 12 Dec 2018 19:08:12 GMT):
you can read about it in https://hyperledger-fabric.readthedocs.io/en/latest/discovery-overview.html I think, @SandySun2000

yacovm (Wed, 12 Dec 2018 19:08:20 GMT):
in case that helps somehow

SandySun2000 (Wed, 12 Dec 2018 19:16:17 GMT):
Thanks @yacovm . Just talked to our starter plan developer. "The Service discovery feature of Hyperledger Fabric v1.2 is not supported on the IBM Blockchain."

yacovm (Wed, 12 Dec 2018 21:32:36 GMT):
@dave.enyeart ^

yacovm (Wed, 12 Dec 2018 21:32:58 GMT):
@mastersingh24 ^

secmask (Thu, 13 Dec 2018 02:48:30 GMT):
Has joined the channel.

secmask (Thu, 13 Dec 2018 02:51:15 GMT):
hello

secmask (Thu, 13 Dec 2018 02:51:29 GMT):
I have read https://docs.google.com/document/d/17YwH4z2vf7B-85Z2Mr2YVH-LgqCu-Why-j6KMWGIId8/edit

secmask (Thu, 13 Dec 2018 02:52:12 GMT):
but I still did not understand what does entityMatcher do?

secmask (Thu, 13 Dec 2018 02:59:48 GMT):
currently, I'm in CLI container and try to run client app ``` SDK created Ressource management client created Unable to initialize the Fabric SDK: failed to make admin join channel: genesis block retrieval failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.superx9.com:7050] root@03872b2e381f:/opt/gopath/src/github.com/cclient# telnet orderer.superx9.com 7050 Trying 172.27.0.6... Connected to orderer.superx9.com. ```

secmask (Thu, 13 Dec 2018 03:00:41 GMT):
I can telnet to orderer endpoint, but the app keep say timeout???

secmask (Thu, 13 Dec 2018 03:01:09 GMT):
my config ``` orderers: orderer.superx9.com: url: orderer.superx9.com # these are standard properties defined by the gRPC library # they will be passed in as-is to gRPC client constructor grpcOptions: ssl-target-name-override: orderer.superx9.com # These parameters should be set in coordination with the keepalive policy on the server, # as incompatible settings can result in closing of connection. # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs allow-insecure: false tlsCACerts: # Certificate location absolute path path: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/superx9.com/tlsca/tlsca.superx9.com-cert.pem ```

secmask (Thu, 13 Dec 2018 03:01:46 GMT):
and ``` entityMatchers: orderer: - pattern: (\w*)orderer.superx9.(\w*) urlSubstitutionExp: orderer.superx9.com:7050 sslTargetOverrideUrlSubstitutionExp: orderer.superx9.com mappedHost: orderer.superx9.com ```

tinywell (Thu, 13 Dec 2018 03:26:13 GMT):

Clipboard - December 13, 2018 11:26 AM

tinywell (Thu, 13 Dec 2018 03:26:19 GMT):
hello i want to use the discovery api in the sdk,but i found the method of Client.Send() has a internal package param. does this mean i can's call this method directly

yacovm (Thu, 13 Dec 2018 09:24:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oL75cSnhkGZNjaZLv) @bstasyszyn @troyronda - can go SDK be configured without service discovery? If so - do you have a sample SDK network profile to point at?

secmask (Thu, 13 Dec 2018 09:37:40 GMT):
no one help in this channel?

javapriyan (Thu, 13 Dec 2018 11:07:24 GMT):
Has joined the channel.

javapriyan (Thu, 13 Dec 2018 11:18:52 GMT):
@secmask Still, you can

rahulhegde (Thu, 13 Dec 2018 12:49:50 GMT):
hello - I am trying to setup go-sdk on my system and using https://github.com/hyperledger/fabric-sdk-go/ However end up with following ``` developer@rahul-Inspiron-7573:~/workspace/go-ws/src/github.com/hyperledger/fabric-sdk-go$ make depend Dependencies script modified - will need to install dependencies Installing dependencies ... Installing github.com/alecthomas/gometalinter@v2 to /home/developer/workspace/go-ws//bin ... using tag v2.0.11 HEAD is now at 17a7ffa Update gochecknoglobals flag provided but not defined: -i usage: install [build flags] [packages] Install compiles and installs the packages named by the import paths, along with their dependencies. For more about the build flags, see 'go help build'. For more about specifying packages, see 'go help packages'. See also: go build, go get, go clean. Makefile:242: recipe for target 'depend' failed make: *** [depend] Error 2 ``` ``` developer@rahul-Inspiron-7573:~/workspace/go-ws/src/github.com/hyperledger/fabric-sdk-go$ git branch * (HEAD detached at ea10f6c5) master developer@rahul-Inspiron-7573:~/workspace/go-ws/src/github.com/hyperledger/fabric-sdk-go$ go version go version go1.9.7 linux/amd64 ```

rahulhegde (Thu, 13 Dec 2018 12:49:50 GMT):
hello - I am trying to setup go-sdk on my system and using https://github.com/hyperledger/fabric-sdk-go/ However end up with following ``` developer@rahul-Inspiron-7573:~/workspace/go-ws/src/github.com/hyperledger/fabric-sdk-go$ make depend Dependencies script modified - will need to install dependencies Installing dependencies ... Installing github.com/alecthomas/gometalinter@v2 to /home/developer/workspace/go-ws//bin ... using tag v2.0.11 HEAD is now at 17a7ffa Update gochecknoglobals flag provided but not defined: -i usage: install [build flags] [packages] Install compiles and installs the packages named by the import paths, along with their dependencies. For more about the build flags, see 'go help build'. For more about specifying packages, see 'go help packages'. See also: go build, go get, go clean. Makefile:242: recipe for target 'depend' failed make: *** [depend] Error 2 ``` ``` developer@rahul-Inspiron-7573:~/workspace/go-ws/src/github.com/hyperledger/fabric-sdk-go$ git branch * (HEAD detached at ea10f6c5) master developer@rahul-Inspiron-7573:~/workspace/go-ws/src/github.com/hyperledger/fabric-sdk-go$ go version go version go1.9.7 linux/amd64 ``` ``` DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS" ```

mattmaru (Thu, 13 Dec 2018 17:09:52 GMT):
Has joined the channel.

SandySun2000 (Fri, 14 Dec 2018 01:32:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=THF5KksarFYNxDARS) @yacovm Thanks @Yacovm! @bstasyszyn @troyronda Could you please provide the solution on how to invoke from Go SDK without using Service Discovery?

prasanths96 (Fri, 14 Dec 2018 10:29:27 GMT):
Has joined the channel.

prasanths96 (Fri, 14 Dec 2018 10:29:56 GMT):
Hi, does fabric v1.4 support go-sdk?

amitr (Fri, 14 Dec 2018 12:08:06 GMT):
Has joined the channel.

Ravi_Kashyap (Fri, 14 Dec 2018 12:24:52 GMT):
Has joined the channel.

mattmaru (Fri, 14 Dec 2018 13:01:24 GMT):
are there online some guide or tutorial about development on fabric go skd?

troyronda (Fri, 14 Dec 2018 15:19:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=THF5KksarFYNxDARS) @yacovm It is possible to override the SDK's usage of selection and discovery services in the SDK constructor. However, we don't really have samples as our focus is on versions of Fabric that support dynamic discovery.

troyronda (Fri, 14 Dec 2018 15:25:19 GMT):
The closest I have is the test code which overrides for test purposes. E.g., https://github.com/hyperledger/fabric-sdk-go/blob/04245219f7bfed096d917dc2001aecaf85e8ee18/test/integration/pkg/fabsdk/provider/sdk_dyndiscovery_test.go#L33

troyronda (Fri, 14 Dec 2018 15:25:19 GMT):
The closest I see is the test code which overrides for test purposes. E.g., https://github.com/hyperledger/fabric-sdk-go/blob/04245219f7bfed096d917dc2001aecaf85e8ee18/test/integration/pkg/fabsdk/provider/sdk_dyndiscovery_test.go#L33

nyet (Fri, 14 Dec 2018 15:50:28 GMT):
@troyronda Speaking of discovery, I still do not understand why the client needs to configure peer capabilities (see also FABG-788)

nyet (Fri, 14 Dec 2018 15:50:28 GMT):
@troyronda Speaking of discovery, I still do not understand why the client needs to configure peer capabilities (see also https://jira.hyperledger.org/browse/FABG-788)

nyet (Fri, 14 Dec 2018 15:51:04 GMT):
It overcomplicates the client config.yaml, which is already huge enough

nyet (Fri, 14 Dec 2018 17:47:05 GMT):
@troyronda btw that whole hook in FABG-788 doesn't work

nyet (Fri, 14 Dec 2018 17:48:08 GMT):
I'm not sure how to approach it but it is very broken

nyet (Fri, 14 Dec 2018 17:59:30 GMT):
is there a more concise way to do this ``` //Look for nil PeerChannelConfig, create empty one if it doesn't exist. // Let other setDefault()s below fill in what is required, since this hook will be called // again for the empty dataMap. if t == reflect.TypeOf(map[string]PeerChannelConfig{}) { dataMap, ok := data.(map[string]interface{}) if ok { for k, v := range dataMap { if v == nil { dataMap[k] = make(map[string]interface{}) } } return dataMap, nil } } ```

yacovm (Fri, 14 Dec 2018 18:47:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mzqmEP2TeqaTqmjLu) Thanks @troyronda ! @SandySun2000 please see Troy's answer

yacovm (Fri, 14 Dec 2018 18:47:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mzqmEP2TeqaTqmjLu) Thanks @troyronda ! @SandySun2000 please see Troy's answer

kostas (Sat, 15 Dec 2018 22:08:40 GMT):
Has left the channel.

chrim5 (Sun, 16 Dec 2018 13:44:24 GMT):
Has left the channel.

lay-z (Mon, 17 Dec 2018 11:34:18 GMT):
Hey guys, I'm having some issues where have upgraded chain code, but when I then go to call chain code on gosdk find that it calls the old version. Anywhere to specify version number from the SDK have not been able to find in the docs anywhere

yacovm (Mon, 17 Dec 2018 11:34:49 GMT):
you can't specify a version number

yacovm (Mon, 17 Dec 2018 11:35:00 GMT):
you need to forcefully kill and remove the old container

yacovm (Mon, 17 Dec 2018 11:35:05 GMT):
and then re-issue the invoke

yacovm (Mon, 17 Dec 2018 11:35:12 GMT):
in order for the new container to be created

lay-z (Mon, 17 Dec 2018 12:48:05 GMT):
ohhh, unfortunately we are working with IBMs platform, so they are in charge of containers, i can't just delete the old one and re-invoke :cry:

lay-z (Mon, 17 Dec 2018 12:52:36 GMT):
okay will go and work with ibm then

lay-z (Mon, 17 Dec 2018 12:52:45 GMT):
thanks @yacovm for your fast response!!

yacovm (Mon, 17 Dec 2018 12:55:51 GMT):
@lay-z

yacovm (Mon, 17 Dec 2018 12:56:08 GMT):
actually i think it should build it during the invoke

yacovm (Mon, 17 Dec 2018 12:56:14 GMT):
the new version chaincode, that is

yacovm (Mon, 17 Dec 2018 13:01:01 GMT):
so i was wrong

yacovm (Mon, 17 Dec 2018 13:01:19 GMT):
i'm not sure why it calls the old version - you should check, maybe the upgrade transaction didn't work

lay-z (Mon, 17 Dec 2018 13:04:40 GMT):
I think this is it, the upgrade didn't exactly work right. We had not invoked the new version. once we had done this. it was no issues. Is there any particular reason why we don't have the ability to use different versions of chaincode at the same time?? is this more particular towards fabric? I believe that the Nodesdk you can actually pass a version number in as well.

yacovm (Mon, 17 Dec 2018 13:05:21 GMT):
you can use different versions only in 2 different channels

yacovm (Mon, 17 Dec 2018 13:05:26 GMT):
a version is bound to the channel

yacovm (Mon, 17 Dec 2018 13:05:33 GMT):
that's what the upgrade transaction does

yacovm (Mon, 17 Dec 2018 13:05:46 GMT):
it links the version, and the chaincode code's hash - to the channel

yacovm (Mon, 17 Dec 2018 13:06:22 GMT):
so that if you invoke a chaincode later after the upgrade and a peer has a non upgraded chaincode, it will look the chaincode hash in the channel (ledger), and the hash computed from the file system, and compare

yacovm (Mon, 17 Dec 2018 13:07:07 GMT):
> I believe that the Nodesdk you can actually pass a version number in as well. if you can, then it has no sense.... since in a channel, at any given time - only a single version exists.

yacovm (Mon, 17 Dec 2018 13:07:26 GMT):
@mastersingh24 ^ is that true that you can pass a version in the node SDK ?

Rajatsharma (Mon, 17 Dec 2018 18:18:58 GMT):
Has joined the channel.

Rajatsharma (Mon, 17 Dec 2018 18:19:44 GMT):
can we create a channel using the SDK ??

nyet (Mon, 17 Dec 2018 18:19:49 GMT):
Yes.

Rajatsharma (Mon, 17 Dec 2018 18:20:27 GMT):
I'm unable to find the documentation of the same. Could you please help me out ?

nyet (Mon, 17 Dec 2018 18:20:50 GMT):
I just copied the samples

nyet (Mon, 17 Dec 2018 18:21:08 GMT):
create a resmgmt client, call SaveChannelRequest()

nyet (Mon, 17 Dec 2018 18:21:08 GMT):
create a resmgmt client, call SaveChannel()

nyet (Mon, 17 Dec 2018 18:21:30 GMT):
https://github.com/Blockdaemon/hlf-database-app/blob/master/blockchain/setup.go

Rajatsharma (Mon, 17 Dec 2018 18:22:43 GMT):
Okay Thanks. I'll look this up.

Rajatsharma (Mon, 17 Dec 2018 18:34:48 GMT):
@nyet Do we have any proper documentation of the same ?

Rajatsharma (Mon, 17 Dec 2018 18:35:04 GMT):
Of the GO SDK ?

nyet (Mon, 17 Dec 2018 18:35:13 GMT):
No, pretty much the entire SDK is "self documented" source code.

Rajatsharma (Mon, 17 Dec 2018 18:36:12 GMT):
Oh Okay !! Fine I'll go through your code only then. Thanks !!

nyet (Mon, 17 Dec 2018 18:37:53 GMT):
Also look at the SDK test cases

nyet (Mon, 17 Dec 2018 18:37:59 GMT):
they have pretty much everything in them

jrosmith (Mon, 17 Dec 2018 19:52:45 GMT):
@Rajatsharma you can also use the stock [godoc](https://godoc.org/github.com/hyperledger/fabric-sdk-go) rendering of the github project

lay-z (Mon, 17 Dec 2018 23:55:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7eHbSQekbsHBYJwSW) @yacovm okay cool. I'll do some double checking on this front. but good to know.

secmask (Tue, 18 Dec 2018 03:41:31 GMT):
hello, is it possible to query ledger data(value of a key, transaction for that key.. like so) without query chaincode?

rootDistress (Tue, 18 Dec 2018 13:58:57 GMT):
Has joined the channel.

rootDistress (Tue, 18 Dec 2018 14:16:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dnweS2E5RsoQPJCvK) @secmask @secmask (AFAIK) No, the query transaction like other invoke and instantation goes through the peer who hold the copy of ledger accessed by chaincode, not directly.

rootDistress (Tue, 18 Dec 2018 14:16:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dnweS2E5RsoQPJCvK) @secmask (AFAIK) No, the query transaction like other invoke and instantation goes through the peer who hold the copy of ledger accessed by chaincode, not directly.

rootDistress (Tue, 18 Dec 2018 14:16:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dnweS2E5RsoQPJCvK) @secmask (AFAIK) No, the query transaction like other invoke and instantation goes through the peer who hold the copy of ledger accessed by chaincode, not directly. EDIT: Query is not a transaction, sorry about that.

rootDistress (Tue, 18 Dec 2018 14:16:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dnweS2E5RsoQPJCvK) @secmask (AFAIK) No, the query ~transaction~ like other invoke and instantation goes through the peer who hold the copy of ledger accessed by chaincode, not directly. EDIT: Query is not a transaction, sorry about that.

rootDistress (Tue, 18 Dec 2018 14:21:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3TA3YBzzDiLmvP5hW) @Rajatsharma I used https://chainhero.io/2018/06/tutorial-build-blockchain-app-v1-1-0/ to figure out the sdk part. Not completely clear documentation but manageable. If someone has better source please do share.

Kyroy (Tue, 18 Dec 2018 15:47:24 GMT):
Is it normal that the payload of the `fab.CCEvent` is `nil` when using the event service? (In the block I can see it)

nyet (Tue, 18 Dec 2018 16:52:11 GMT):
@secmask in theory you can query couchdb directly

dave.enyeart (Tue, 18 Dec 2018 18:30:55 GMT):
@secmask the other pattern many people do is listen for block events and write whatever data they are interested in to another fit-for-purpose data store

NickXie (Wed, 19 Dec 2018 07:12:18 GMT):
Has joined the channel.

rootDistress (Wed, 19 Dec 2018 09:25:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qQ6XXuHgoTMBPHMva) @nyet In the config file `https://github.com/Blockdaemon/hlf-database-app/blob/master/templates/config.yaml.in` . What if i have multiple orgs, Do i just list the peers in network channel part ? what all are the changes to take care of ?

rootDistress (Wed, 19 Dec 2018 09:25:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qQ6XXuHgoTMBPHMva) @nyet In the config file `https://github.com/Blockdaemon/hlf-database-app/blob/master/templates/config.yaml.in` . What if i have multiple orgs, Do i just list the peers in network channel part ? what all are the changes to take care of ?

rootDistress (Wed, 19 Dec 2018 09:25:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qQ6XXuHgoTMBPHMva) @nyet In the config file `https://github.com/Blockdaemon/hlf-database-app/blob/master/templates/config.yaml.in` . What if i have multiple orgs, Do i just list the peers in network channel part ? what all are the changes to take care of ? EDIT: Fixed it, If anyone interested, the file is at *https://gist.github.com/thekaleidoscope/4eec4450f5c4aa9851cd983005d3c014*

maxrobot (Wed, 19 Dec 2018 11:07:24 GMT):
Has joined the channel.

Baha-sk (Wed, 19 Dec 2018 15:49:11 GMT):
@rootDistress you can see the different examples of config files in the Go SDK's integration tests fixture folder: https://github.com/hyperledger/fabric-sdk-go/tree/master/test/fixtures/config, you can look at the basic `config_e2e.yaml` that has 2 orgs configured

nyet (Wed, 19 Dec 2018 16:54:53 GMT):
@rootDistress you can add as many orgs as you like, my example is only for 1 peer org and 1 orderer org

govinda-attal (Thu, 20 Dec 2018 07:49:50 GMT):
Hello go sdk team! had a question is it possible to use go SDK with say fabric 1.2 or beyond but explicitly state that not to use discovery service ?

govinda-attal (Thu, 20 Dec 2018 07:49:50 GMT):
Hello go sdk team! had a question is it possible to use go SDK with say fabric 1.2 or beyond but explicitly state that not to use discovery service ?

govinda-attal (Thu, 20 Dec 2018 07:49:50 GMT):
Hello go sdk team! had a question is it possible to use go SDK with say fabric 1.2 or beyond but explicitly state that not to use discovery service ?

govinda-attal (Thu, 20 Dec 2018 07:49:50 GMT):
Hello go sdk team! had a question is it possible to use go SDK with say fabric 1.2 or beyond but explicitly state that not to use discovery service ?

govinda-attal (Thu, 20 Dec 2018 07:59:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qkvXapJ9m44geNYhJ) I think I got my answer based on above comments https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oL75cSnhkGZNjaZLv

czar0 (Thu, 20 Dec 2018 11:04:17 GMT):
Has joined the channel.

vladyslavmunin (Thu, 20 Dec 2018 13:10:00 GMT):
Hi guys,

vladyslavmunin (Thu, 20 Dec 2018 13:12:27 GMT):
Hi guys, first request to the endorsers peers takes much time ~ 15 sec . It's because of creation connections ti 'unkwown peers

vladyslavmunin (Thu, 20 Dec 2018 13:12:27 GMT):
Hi guys, first request to the endorsers peers takes much time ~ 15 sec . It's because of creation connections ti 'unkwown peers' . what is a reason of so long creation connection ~ 5sec. is it possible to cache conenction to endorsers before execute action? and what are best practice to set cache time for connections? Thanks

vladyslavmunin (Thu, 20 Dec 2018 13:14:32 GMT):
Hi guys, first request to the endorsers peers takes much time ~ 15 sec . It's because of creation connections ti 'unknown peers' . what is a reason of so long creation connection ~ 5sec. is it possible to cache conenction to endorsers before execute action? and what are best practice to set cache time for connections? Thanks

vladyslavmunin (Thu, 20 Dec 2018 13:14:32 GMT):
Hi guys, first request to the endorsers peers takes much time ( 15 sec ) . It's because of creation connections ti 'unknown peers' . what is a reason of so long creation connections (5sec ). is it possible to cache conenction to endorsers before execute action? and what are best practice to set cache time for connections? Thanks

vladyslavmunin (Thu, 20 Dec 2018 13:14:32 GMT):
Hi guys, first request to the endorsers peers takes much time ( 15 sec ) . It's because of creation connections to 'unknown peers' . what is a reason of so long creation of connections (5sec ). is it possible to cache connection to endorsers before execute action? and what are best practice to set cache time for connections? Thanks

vladyslavmunin (Thu, 20 Dec 2018 13:20:37 GMT):

Screen Shot 2018-12-20 at 15.17.44.png

govinda-attal (Thu, 20 Dec 2018 15:09:11 GMT):
hello guys, Is it possible to find/query instantiation policy of a an existing chaincode that has been deployed?

httran88 (Thu, 20 Dec 2018 15:53:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=cLd27Hg5cJ2XimfaT) @govinda-attal discovery service does not giveth the policy?

yacovm (Thu, 20 Dec 2018 16:08:41 GMT):
@httran88 you're right ;)

yacovm (Thu, 20 Dec 2018 16:08:53 GMT):
@httran88 he asks for instantiation policy

yacovm (Thu, 20 Dec 2018 16:08:55 GMT):
not endorsement policy

httran88 (Thu, 20 Dec 2018 16:11:49 GMT):
Oh! sorry its in the channel configs

mattmaru (Thu, 20 Dec 2018 16:54:31 GMT):
Hi guys ! I need to know how is possible add a resource like an artwork to a "peer". In my project i create a chaincode that works with artwork. But how i can add these to a specific peer?

nyet (Thu, 20 Dec 2018 18:14:39 GMT):
1) store on chain as a base64 encoded key/value (not recommened) 2) store off chain on network storage (e.g. IFS) and insert linkage information on chain 3) private data

nyet (Thu, 20 Dec 2018 18:14:39 GMT):
1) store on chain as a base64 encoded key/value (not recommended) 2) store off chain on network storage (e.g. IFS) and insert linkage information on chain 3) private data

nyet (Thu, 20 Dec 2018 18:26:45 GMT):
The concept of "specific" peer doesn't really exist outside of "is this the only peer on this channel"

greivinlopez (Thu, 20 Dec 2018 18:55:21 GMT):
Hello. Do you guys consider the Go SDK to be in stable enough state to be used in development of a new project?

greivinlopez (Thu, 20 Dec 2018 18:55:49 GMT):
I mean official HLF documentations stills refer only to Node.js and Java SDKs

nyet (Thu, 20 Dec 2018 18:58:52 GMT):
I've had more success with the go sdk than either tbh

httran88 (Thu, 20 Dec 2018 20:20:30 GMT):
GoLang Pwns All

govinda-attal (Fri, 21 Dec 2018 03:03:43 GMT):
Same here, I find go sdk helpful and haven't faced any issues @greivinlopez .. It is sometimes strange to receive some comments from some cloud providers when they offer blockchain as a service they say that they haven't tested with Go SDK and also IBM recently on IBP when supporting 1.2 on Starter plan have disabled discovery service (hopefully they don't do so on Enterprise Plan) and go SDK by default requiring discovery service... You may or may not run in to these issues but otherwise it has been rock solid

greivinlopez (Fri, 21 Dec 2018 12:24:23 GMT):
@nyet @govinda-attal @httran88 thanks for your feedback guys!. I will start working with it, I currently have a "middleware" layer between the HLF network and different REST APIs written with the Node.js SDK but sometimes found it difficult to maintain and modify and also very verbose like if it is more complex that it needs to be.

greivinlopez (Fri, 21 Dec 2018 14:04:06 GMT):
Ok the first issue I found was the SDK is not up to date with the go latest stable version as it require go 1.10 to 1.10.4 :neutral_face:

greivinlopez (Fri, 21 Dec 2018 14:50:46 GMT):
Then I create the most simple go file I could possible think of just "sdk, err := fabsdk.New(config.FromFile(config.yaml))" and then get a lot of missing packages and dependencies errors

greivinlopez (Fri, 21 Dec 2018 14:51:01 GMT):
Why are not those dependencies documented?

vladyslavmunin (Fri, 21 Dec 2018 15:27:31 GMT):
first connection to the peer takes 5 seconds : in logs I see that method waitConn in connector.go INFO start connection: peer0.org1.example.com:7051 2018-12-21 16:33:01.006726 +0200 EET m=+0.020311303 [fabsdk/fab] 2018/12/21 14:33:01 UTC - comm.(*CachingConnector).openConn -> INFO START WAIT CONN 2018-12-21 1*6:33:01.*00686 +0200 EET m=+0.020445692 [fabsdk/fab] 2018/12/21 14:33:06 UTC - comm.(*CachingConnector).openConn -> INFO END WAIT CONN 2018-12-21 *16:33:06.*020601 +0200 EET m=+5.034355040 how can I decrease the time of waiting the response? I've tried a lot of params and didn't get success.

vladyslavmunin (Fri, 21 Dec 2018 15:27:31 GMT):
first connection to the peer takes 5 seconds : in logs I see that method waitConn in connector.go INFO start connection: peer0.org1.example.com:7051 2018-12-21 16:33:01.006726 +0200 EET m=+0.020311303 [fabsdk/fab] 2018/12/21 14:33:01 UTC - comm.(*CachingConnector).openConn -> INFO START WAIT CONN 2018-12-21 *16:33:01*.00686 +0200 EET m=+0.020445692 [fabsdk/fab] 2018/12/21 14:33:06 UTC - comm.(*CachingConnector).openConn -> INFO END WAIT CONN 2018-12-21 *16:33:06.*020601 +0200 EET m=+5.034355040 how can I decrease the time of waiting the response? I've tried a lot of params and didn't get success.

habpygo (Fri, 21 Dec 2018 16:16:50 GMT):
Hi, does anyone know what a”constructing descriptor” is? I’m getting an error when trying to invoke a transaction like: error getting channel response for channel [mychannel]: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: failed constructing descriptor for chaincodes: Error is generated in the line of code: `response, err := client.Execute(channel.Request{setup.ChainCodeID, "invoke", args, nil, nil}, channel.WithRetry(retry.DefaultChannelOpts))` Thanks.

habpygo (Fri, 21 Dec 2018 16:25:36 GMT):
and in the Docker logs of peer0.org1 I get the message ‘[discovery] chaincodeQuery -> ERRO 044 Failed constructing descriptor for chaincode chaincodes: ,: cannot satisfy any principal combination`

habpygo (Fri, 21 Dec 2018 16:25:36 GMT):
and in the Docker logs of peer0.org1 I get the message `[discovery] chaincodeQuery -> ERRO 044 Failed constructing descriptor for chaincode chaincodes: ,: cannot satisfy any principal combination`

habpygo (Fri, 21 Dec 2018 16:25:36 GMT):
and in the Docker logs of peer0.org1 I get the message [discovery] chaincodeQuery -> ERRO 044 Failed constructing descriptor for chaincode chaincodes: ,: cannot satisfy any principal combination

troyronda (Fri, 21 Dec 2018 16:37:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RvGidi3rnDgx3v8My) @greivinlopez Go SDK relies on go dep to populate vendor.

greivinlopez (Fri, 21 Dec 2018 16:45:36 GMT):
@troyronda I now understand that but is not properly documented

greivinlopez (Fri, 21 Dec 2018 16:45:36 GMT):
@troyronda I now understand that but is not properly documented, I mean it indicates it as "optional". On the documentation part we should assume you are using the SDK on a completely clean environment so it should start by describing the dependencies and a step by step guide of how to properly setup the environment for development

yacovm (Fri, 21 Dec 2018 16:46:54 GMT):
@habpygo it seems that your peers might not know each other

yacovm (Fri, 21 Dec 2018 16:47:02 GMT):
or you may not have external endpoints configured

yacovm (Fri, 21 Dec 2018 16:47:25 GMT):
read https://hyperledger-fabric.readthedocs.io/en/latest/discovery-overview.html

habpygo (Fri, 21 Dec 2018 17:06:13 GMT):
Thanks @yacovm I'll have a look.

troyronda (Fri, 21 Dec 2018 18:46:04 GMT):
FYI: here is another usage of the Go SDK (with ~ Marbles chaincode): https://github.com/securekey/marbles-perf

nyet (Fri, 21 Dec 2018 20:09:49 GMT):
@greivinlopez i didn't even use dep for mine. I just did `go get` and `go build` https://github.com/Blockdaemon/hlf-database-app

greivinlopez (Fri, 21 Dec 2018 20:21:45 GMT):
@nyet it was not possible for me to just do a go get of the sdk and be able to build my code. I needed to install dep and run the "make" command on the SDK before able to compile my code.

nyet (Fri, 21 Dec 2018 20:22:06 GMT):
i dont recall having to do that

greivinlopez (Fri, 21 Dec 2018 20:22:56 GMT):
@nyet take into account I'm using a clean vm with a fresh go installation.

nyet (Fri, 21 Dec 2018 20:22:58 GMT):
let my tri it on mine

greivinlopez (Fri, 21 Dec 2018 20:24:31 GMT):
I'm also working on a multi-host network that does not rely on docker nor the nodes are running on the same machine but in the cloud.

nyet (Fri, 21 Dec 2018 20:24:46 GMT):
im just purely talking about building

greivinlopez (Fri, 21 Dec 2018 20:25:23 GMT):
yeah I know I was just clarifying that the host machine were you are building could have some other stuff

greivinlopez (Fri, 21 Dec 2018 20:25:40 GMT):
that I probably don't have installed

nyet (Fri, 21 Dec 2018 20:25:44 GMT):
```nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ rm -rf ../../hyperledger/fabric-sdk-gonyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ go clean nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ go get nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ go build nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ ```

nyet (Fri, 21 Dec 2018 20:25:44 GMT):
```nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ rm -rf ../../hyperledger/fabric-sdk-gonyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ go clean nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ go get nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ go build nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ ```

nyet (Fri, 21 Dec 2018 20:25:44 GMT):
```nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ rm -rf ../../hyperledger/fabric-sdk-go nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ go clean nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ go get nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ go build nyet@nyet-nested-vm:~/go/src/github.com/Blockdaemon/hlf-database-app$ ```

nyet (Fri, 21 Dec 2018 20:27:07 GMT):
hmm lemme rremove ~/.cache first too

nyet (Fri, 21 Dec 2018 20:27:57 GMT):
same result

greivinlopez (Fri, 21 Dec 2018 20:33:30 GMT):
Perhaps I'm missing something I just started this week playing with the go sdk

greivinlopez (Fri, 21 Dec 2018 20:34:08 GMT):
I'll let you know if I discover my problem or if I had more questions. Most probably the latter :sweat_smile:

nyet (Fri, 21 Dec 2018 20:34:57 GMT):
The makfile in the sdk is really only needed to run CI tests

nyet (Fri, 21 Dec 2018 20:35:16 GMT):
you can refer to the sdk in your code by just referring to the git repo

nyet (Fri, 21 Dec 2018 20:37:01 GMT):
I generally only use dep as a last resort (i.e. some upstream library is poorly designed so it is locked to some version)

nyet (Fri, 21 Dec 2018 20:37:01 GMT):
I generally only use dep as a last resort (i.e. some upstream library is poorly designed so it is locked to some version of another dependency)

greivinlopez (Fri, 21 Dec 2018 20:38:20 GMT):
Interesting. I'll continue by trying to connect to my HLF network and then will retry on a clean vm to see if it works

greivinlopez (Fri, 21 Dec 2018 20:38:32 GMT):
Now that I'm able to compile my code

greivinlopez (Fri, 21 Dec 2018 20:39:52 GMT):
Thanks for your help @nyet !

nyet (Fri, 21 Dec 2018 20:40:32 GMT):
no problem!

javapriyan (Mon, 24 Dec 2018 06:30:34 GMT):
I am running a network of multiple org. Able to do all the transactions using the tools/cli. Want them to integrate them with our web app . Any getting started guide for fbaric-go-sdk ?

habpygo (Mon, 24 Dec 2018 10:40:54 GMT):
@javapriyan have a look at https://github.com/chainHero/heroes-service These guys have come up with a very nice example on how to integrate HLF with/as a web application.

secmask (Mon, 24 Dec 2018 11:09:26 GMT):
@javapriyan I had the same question like you, you can have a look at here https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/resmgmt_test.go

secmask (Mon, 24 Dec 2018 11:09:56 GMT):
I can say that the most trouble step to me is setup config file for client

tuckerg (Mon, 24 Dec 2018 15:25:34 GMT):
Has joined the channel.

nyet (Tue, 25 Dec 2018 05:11:56 GMT):
I agree, it is overly complex and does not have enough sane default settings

nyet (Tue, 25 Dec 2018 05:12:07 GMT):
sort of like HLF in general :/

JaccobSmith (Wed, 26 Dec 2018 05:09:30 GMT):
Is there an interface of SDK for just verifying the password of an existing identity ? I really don't want to use the enroll or reenroll interface ,because both of them cause a new generating of the key file and the certificate file

javapriyan (Wed, 26 Dec 2018 05:14:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8YLKjCCyr3dAmThZr) @habpygo Yes, I did. Still having some issue in running them. I am having issue in the channel context creation ?

javapriyan (Wed, 26 Dec 2018 05:14:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=8YLKjCCyr3dAmThZr) @habpygo Yes, I did. Still having some issue in running them. I am having issue in the channel context creation.

javapriyan (Wed, 26 Dec 2018 05:16:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3GcmsyYHMStT4Sc4s) @secmask Yes, :-) This test is very deep. I will look into it for sure, Is there any other example that directly creates the client from the config file and call/invoke the installed cc ?

secmask (Wed, 26 Dec 2018 05:38:37 GMT):
basic set for channel client like this https://gist.github.com/secmask/cc37a10e0bfe3b6d7fea4479da45c5b6

secmask (Wed, 26 Dec 2018 05:39:12 GMT):
if you need to deploy chaincode instead, you will need to create rest management object like above test does.

javapriyan (Wed, 26 Dec 2018 05:47:51 GMT):
What I am trying to do is, just query the network as we are currently trying to keep the network ops manual

javapriyan (Wed, 26 Dec 2018 05:48:22 GMT):
So, I don't need a Resource management client right ?

habpygo (Wed, 26 Dec 2018 10:25:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=348jXeHXBjWB5fzR4) @javapriyan Contact antitoine, he is from chainHero and he will help you.

javapriyan (Wed, 26 Dec 2018 12:45:23 GMT):
Sure, thanks

nyet (Thu, 27 Dec 2018 18:17:30 GMT):
@javapriyan you can take a look at mine https://github.com/Blockdaemon/hlf-database-app

javapriyan (Fri, 28 Dec 2018 04:53:51 GMT):
@nyet Will check them out. Thanks !

javapriyan (Fri, 28 Dec 2018 04:53:51 GMT):
@nyet Will check out. Thanks !

GingerMoon (Sat, 29 Dec 2018 09:38:30 GMT):
could anyone please tell me how to set the log level of the sdk?

nyet (Sat, 29 Dec 2018 18:38:18 GMT):
client->logging->level its literally like the first thing in config.yaml

GingerMoon (Sun, 30 Dec 2018 03:07:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3jPxpYgG3ZFaxuHu6) @nyet thans nyet, but could you share more details? I am sory that I don't quite catch you..

nyet (Sun, 30 Dec 2018 03:19:47 GMT):
Look at your config.yaml.

GingerMoon (Sun, 30 Dec 2018 05:35:25 GMT):
thank you!

GingerMoon (Sun, 30 Dec 2018 05:35:54 GMT):
is there any detailed information about entityMatchers?

GingerMoon (Mon, 31 Dec 2018 01:30:50 GMT):
I am trying to make a client connecting to a fabric network (the sample in the byfn), but not able to connect to the peer in the fabric network. If I use url: peer0.org1.example.com:7051, the connection cannot be set up, if I use ip (localhost), the connection can be set up but the sdk will discard this peer due to some reason...

habpygo (Mon, 31 Dec 2018 08:26:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=cBXeABQyBS9anzmBG) @GingerMoon Assuming that you are running the network locally, did you adapt your etc/hosts file with lines like `127.0.0.1 peer0.org1.example.com` ?

vikimeng (Mon, 31 Dec 2018 10:18:03 GMT):
Has joined the channel.

vikimeng (Mon, 31 Dec 2018 10:36:55 GMT):
In the config yaml file, i don't understand why use credentialStore path and cryptoStore path as /tmp, because in /tmp folder, OS will cleanup it in sometime. Then we lost all the credential and key-value store. Can we change to another place to avoid this? Can we also support use ENVIRONMENT variable to dynamic config the path? I just tried, this part not support.

uboznikov (Tue, 01 Jan 2019 08:35:49 GMT):
Has joined the channel.

GingerMoon (Tue, 01 Jan 2019 09:27:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=34JH9R6CcbidYbmwd) @habpygo It doesn't work... I mean if the demo is not in the same docker network, setting hosts doesn't work.

Randyshu2018 (Wed, 02 Jan 2019 02:07:55 GMT):
Has joined the channel.

rootDistress (Wed, 02 Jan 2019 09:12:27 GMT):
I am trying to create a new channel in a consortium of existing orgs, can someone please guide on how to approach that? Mind I don't want to fix the channel name or the orgs(and anchor peers) which will join the channel.

javapriyan (Wed, 02 Jan 2019 09:18:15 GMT):
Guys, I am facing issue while running a client app. I am running the network in the same machine. When I call ch.Execute() I am getting the following: ```SDK created 2019/01/02 14:43:49 looping for 0 [fabsdk/client] 2019/01/02 09:15:25 UTC - fabricselection.(*Service).query -> WARN Received 1 response(s) and one or more errors from discovery client: From target: http://peer0.supplier.mycompany.com:9051: could not connect to http://peer0.supplier.mycompany.com:9051: dialing connection timed out [http://peer0.supplier.mycompany.com:9051] [fabsdk/client] 2019/01/02 09:15:40 UTC - dynamicdiscovery.(*ChannelService).queryPeers -> WARN Received 1 response(s) and one or more errors from discovery client: From target: http://peer0.supplier.mycompany.com:9051: could not connect to http://peer0.supplier.mycompany.com:9051: dialing connection timed out [http://peer0.supplier.mycompany.com:9051] [fabsdk/client] 2019/01/02 09:15:40 UTC - dynamicdiscovery.asPeers -> WARN Peer config not found for url [peer0.supplier.mycompany.com:7051] 2019/01/02 14:45:40 error on set at 0 - Transaction processing for endorser [peer0.brand.mycompany.com:7051]: Chaincode status Code: (500) UNKNOWN. Description: Cannot find the appropriate method to invoke for this arg [key0 0] 2019/01/02 14:45:40 looping for 1 [fabsdk/client] 2019/01/02 09:15:45 UTC - fabricselection.(*Service).query -> WARN Received 1 response(s) and one or more errors from discovery client: From target: http://peer0.supplier.mycompany.com:9051: could not connect to http://peer0.supplier.mycompany.com:9051: dialing connection timed out [http://peer0.supplier.mycompany.com:9051] 2019/01/02 14:45:50 error on set at 1 - Transaction processing for endorser [peer0.brand.mycompany.com:7051]: Chaincode status Code: (500) UNKNOWN. Description: Cannot find the appropriate method to invoke for this arg [key1 3] 2019/01/02 14:45:50 total time take for 2 round 120.645093 [fabsdk/client] 2019/01/02 09:16:00 UTC - dynamicdiscovery.(*ChannelService).queryPeers -> WARN Received 1 response(s) and one or more errors from discovery client: From target: http://peer0.supplier.mycompany.com:9051: could not connect to http://peer0.supplier.mycompany.com:9051: dialing connection timed out [http://peer0.supplier.mycompany.com:9051] [fabsdk/client] 2019/01/02 09:16:00 UTC - dynamicdiscovery.asPeers -> WARN Peer config not found for url [peer0.supplier.mycompany.com:7051] ```

javapriyan (Wed, 02 Jan 2019 09:19:29 GMT):
Obviously, It cannot connect to the peer0.supplier.mycompany.com:9051 I don't know why. I have added all of the service name in my hosts file and translated to localhost

Kyroy (Wed, 02 Jan 2019 10:29:14 GMT):
``` [fabsdk/client] 2019/01/02 09:16:00 UTC - dynamicdiscovery.asPeers -> WARN Peer config not found for url [peer0.supplier.mycompany.com:7051]``` @javapriyan it seems you are looking for `peer0....:7051` but it is not configured

Kyroy (Wed, 02 Jan 2019 10:29:14 GMT):
``` [fabsdk/client] 2019/01/02 09:16:00 UTC - dynamicdiscovery.asPeers -> WARN Peer config not found for url [peer0.supplier.mycompany.com:7051] ``` @javapriyan it seems you are looking for `peer0....:7051` but it is not configured

Kyroy (Wed, 02 Jan 2019 10:29:14 GMT):
``` [fabsdk/client] 2019/01/02 09:16:00 UTC - dynamicdiscovery.asPeers -> WARN Peer config not found for url [peer0.supplier.mycompany.com:7051] ``` @javapriyan it seems you are looking for `peer0....:7051` but it is not configured

Kyroy (Wed, 02 Jan 2019 10:29:14 GMT):
``` [fabsdk/client] 2019/01/02 09:16:00 UTC - dynamicdiscovery.asPeers -> WARN Peer config not found for url [peer0.supplier.mycompany.com:7051] ``` @javapriyan it seems you are looking for `peer0....:7051` but it is not configured

rbole (Wed, 02 Jan 2019 14:06:36 GMT):
Has joined the channel.

nyet (Wed, 02 Jan 2019 18:05:35 GMT):
@vikimeng Yes, I do not understand that rationale either. Even worse, /tmp would be shared by all users. It makes no sense.

vikimeng (Wed, 02 Jan 2019 18:33:16 GMT):
@nyet I think they maybe just easy to write code. If the credentialStorePath and cryptoStorePath also support environment variable such as ${GOPATH}, it will be better to customer the path. Unfortunately it not support.

nyet (Wed, 02 Jan 2019 18:34:45 GMT):
I got around that by making wrappers that generate `config.yaml`. It isn't ideal but it works.

nyet (Wed, 02 Jan 2019 18:34:45 GMT):
@vikimeng I got around that by making wrappers that generate `config.yaml`. It isn't ideal but it works.

vikimeng (Wed, 02 Jan 2019 18:38:04 GMT):
@nyet Get you point, you are using script to dynamic generate `config.yaml`

nyet (Wed, 02 Jan 2019 18:38:15 GMT):
@vikimeng yes

javapriyan (Thu, 03 Jan 2019 04:56:00 GMT):
Thanks @Kyroy , I did go through the config and found made a silly mistake.

rootDistress (Thu, 03 Jan 2019 05:05:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sdoa7gSbdd3yPbYgM) After going through the previous chats here I followed something @Baha-sk suggested to @bandreghetti of overriding the configs with `fabsdk.WithEndpointConfig(..)` and using https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L158 to create and join. However, I wasn't able to override the settings as it returned that `Unable to initialize the Fabric SDK: failed to create SDK for MRF: Error in option passed to New: option map[string]fab.ChannelEndpointConfig{"indianchannel":fab.ChannelEndpointConfig{Orderers:[]string(nil), Peers:map[string]fab.PeerChannelConfig{"peer0.mrf.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, "peer1.mrf.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}, "peer0.gabriel.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, "peer1.gabriel.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}}, Policies:fab.ChannelPolicies{QueryChannelConfig:fab.QueryChannelConfigPolicy{MinResponses:1, MaxTargets:1, RetryOpts:retry.Opts{Attempts:5, InitialBackoff:500000000, MaxBackoff:5000000000, BackoffFactor:2, RetryableCodes:map[status.Group][]status.Code(nil)}}}}} is not a sub interface of EndpointConfig, at least one of its functions must be implemented.` Someone please help. @Kyroy I noticed you too had used this function in the past, please help me solve this.

rootDistress (Thu, 03 Jan 2019 05:05:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sdoa7gSbdd3yPbYgM) After going through the previous chats here I followed something @Baha-sk suggested to @bandreghetti of overriding the configs with `fabsdk.WithEndpointConfig(..)` and using https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L158 to create and join. However, I wasn't able to override the settings as it returned that `Unable to initialize the Fabric SDK: failed to create SDK for MRF: Error in option passed to New: option map[string]fab.ChannelEndpointConfig{"somechannel":fab.ChannelEndpointConfig{Orderers:[]string(nil), Peers:map[string]fab.PeerChannelConfig{"peer0.mrf.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, "peer1.mrf.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}, "peer0.gabriel.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, "peer1.gabriel.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}}, Policies:fab.ChannelPolicies{QueryChannelConfig:fab.QueryChannelConfigPolicy{MinResponses:1, MaxTargets:1, RetryOpts:retry.Opts{Attempts:5, InitialBackoff:500000000, MaxBackoff:5000000000, BackoffFactor:2, RetryableCodes:map[status.Group][]status.Code(nil)}}}}} is not a sub interface of EndpointConfig, at least one of its functions must be implemented.` Someone please help. @Kyroy I noticed you too had used this function in the past, please help me solve this.

rootDistress (Thu, 03 Jan 2019 05:05:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sdoa7gSbdd3yPbYgM) After going through the previous chats here I followed something @Baha-sk suggested to @bandreghetti of overriding the configs with `fabsdk.WithEndpointConfig(..)` and using https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L158 to create and join. However, I wasn't able to override the settings as it returned that `Unable to initialize the Fabric SDK: failed to create SDK for MRF: Error in option passed to New: option fab.ChannelEndpointConfig{Orderers:[]string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{"peer0.mrf.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, "peer1.mrf.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}, "peer0.gabriel.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, "peer1.gabriel.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}}, Policies:fab.ChannelPolicies{QueryChannelConfig:fab.QueryChannelConfigPolicy{MinResponses:1, MaxTargets:1, RetryOpts:retry.Opts{Attempts:5, InitialBackoff:500000000, MaxBackoff:5000000000, BackoffFactor:2, RetryableCodes:map[status.Group][]status.Code(nil)}}}} is not a sub interface of EndpointConfig, at leastone of its functions must be implemented.` Someone please help. @Kyroy I noticed you too had used this function in the past, please help me solve this.

Kyroy (Thu, 03 Jan 2019 07:31:48 GMT):
@rootDistress Can u give us a code example?

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as ` channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } ` Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", } ` The FabricSetup has Implementation as ` // FabricSetup implementation type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client } ` Initialised using the function as ` func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil } ` Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as `channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, }` Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", } ` The FabricSetup has Implementation as ` // FabricSetup implementation type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client } ` Initialised using the function as ` func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil } ` Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as `channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, }`` Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", } ` The FabricSetup has Implementation as ` // FabricSetup implementation type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client } Initialised using the function as `func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil } ` Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", } ` The FabricSetup has Implementation as ` // FabricSetup implementation type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client } Initialised using the function as `func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil } ` Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", } ` The FabricSetup has Implementation as ` // FabricSetup implementation type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client } Initialised using the function as `func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil } ` Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", } ` The FabricSetup has Implementation as ` // FabricSetup implementation type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client } Initialised using the function as ` func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil } ` Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", } ` The FabricSetup has Implementation as ` // FabricSetup implementation type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client } Initialised using the function as func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil } Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", } ` The FabricSetup has Implementation as ` // FabricSetup implementation type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client } Initialised using the function as ` func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil }` Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as ` channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, }` Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", }` The FabricSetup has Implementation as `// FabricSetup implementation type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client } ` Initialised using the function as ` func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil }` Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as ` channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, }` Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", }` The FabricSetup has Implementation as `type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client }` Initialised using the function as ` func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil }` Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as ` channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, }` Passed the information to setup as `fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", }` The FabricSetup has Implementation as `type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client }```` ``` Initialised using the function as func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil } Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 07:36:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wMHJRgwAvaCSJMsFW) @Kyroy I created the config struct as ``` channelsConfig := map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, }``` Passed the information to setup as ```fSetupMRF := blockchain.FabricSetup{ // Network parameters OrdererID: "orderer.volkswagenag.com", // Channel parameters ChannelID: "indianchannel", // ChannelConfig: os.Getenv("GOPATH") + "/src/github.com/Volkswagen_World/fixtures/artifacts/volkswagen.channel.tx", ChannelEndpointConfig: channelsConfig, // Chaincode parameters ChainCodeID: "volkswagen_world", ChaincodeGoPath: os.Getenv("GOPATH"), ChaincodePath: "github.com/Volkswagen_World/chaincode/", OrgAdmin: "Admin", OrgName: "mrf", ConfigFile: "config.yaml", // User parameters UserName: "User1", }``` The FabricSetup has Implementation as ```type FabricSetup struct { ConfigFile string OrgID string OrdererID string ChannelID string ChainCodeID string initialized bool // ChannelConfig string ChannelEndpointConfig map[string]fab.ChannelEndpointConfig ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string UserName string client *channel.Client admin *resmgmt.Client sdk *fabsdk.FabricSDK event *event.Client }``` Initialised using the function as ```func (setup *FabricSetup) Initialize() error { if setup.initialized { return errors.New("sdk already initialized for MRF") } fmt.Println("SDK creation for MRF!!") sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig[setup.ChannelID])) if err != nil { return errors.WithMessage(err, "failed to create SDK for MRF") } setup.sdk = sdk fmt.Println("SDK created for MRF!!") return nil }``` Please let me know if any additional code is required for the context.

rootDistress (Thu, 03 Jan 2019 08:57:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GHS5LrGXnP4Hk7mBC) I realized I had to make the configs into a interface before passing so, I made them into ``` ```

rootDistress (Thu, 03 Jan 2019 08:57:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GHS5LrGXnP4Hk7mBC) I realized I had to make the configs into a interface before passing so, I made them into ``` ```

rootDistress (Thu, 03 Jan 2019 09:01:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GHS5LrGXnP4Hk7mBC) I realized the configs should be made into a Interface before passing to `fabsdk.WithEndpointConfig` function. So, I made ``` channelConfigImpl := channelsConfig["indianchannel"] endpointConfigImpls := []interface{}{ channelConfigImpl, }``` and passed it though setup with type `[]interface{}` Replaced the previous line by `sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig))` The problem still exists ```Unable to initialize the Fabric SDK: failed to create SDK for MRF: Error in option passed to New: option []interface {}{fab.ChannelEndpointConfig{Orderers:[]string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{"peer1.gabriel.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}, "peer0.mrf.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, "peer1.mrf.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}, "peer0.gabriel.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}}, Policies:fab.ChannelPolicies{QueryChannelConfig:fab.QueryChannelConfigPolicy{MinResponses:1, MaxTargets:1, RetryOpts:retry.Opts{Attempts:5, InitialBackoff:500000000, MaxBackoff:5000000000, BackoffFactor:2, RetryableCodes:map[status.Group][]status.Code(nil)}}}}} is not a sub interface of EndpointConfig, at least one of its functions must be implemented.```

rootDistress (Thu, 03 Jan 2019 09:01:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GHS5LrGXnP4Hk7mBC) I realized the configs should be made into a Interface before passing to `fabsdk.WithEndpointConfig` function. So, I made ``` channelConfigImpl := channelsConfig["somechannel"] endpointConfigImpls := []interface{}{ channelConfigImpl, }``` and passed it though setup with type `[]interface{}` Replaced the previous line by `sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointConfig))` The problem still exists ```Unable to initialize the Fabric SDK: failed to create SDK for : Error in option passed to New: option []interface {}{fab.ChannelEndpointConfig{Orderers:[]string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{"peer1.org2.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}, "peer0.org1.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, "peer1.org1.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:false, ChaincodeQuery:false, LedgerQuery:false, EventSource:false}, "peer0.org2.volkswagenag.com":fab.PeerChannelConfig{EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}}, Policies:fab.ChannelPolicies{QueryChannelConfig:fab.QueryChannelConfigPolicy{MinResponses:1, MaxTargets:1, RetryOpts:retry.Opts{Attempts:5, InitialBackoff:500000000, MaxBackoff:5000000000, BackoffFactor:2, RetryableCodes:map[status.Group][]status.Code(nil)}}}}} is not a sub interface of EndpointConfig, at least one of its functions must be implemented.```

Kyroy (Thu, 03 Jan 2019 09:23:05 GMT):
@rootDistress `is not a sub interface of EndpointConfig, at least one of its functions must be implemented.` the error message is pretty clear

Kyroy (Thu, 03 Jan 2019 09:23:51 GMT):
`fabsdk.WithEndpointConfig` expects a struct that implements functions of the interface

Kyroy (Thu, 03 Jan 2019 09:23:51 GMT):
`fabsdk.WithEndpointConfig` expects a struct that implements functions of the interface (does not have to be every function)

mattmaru (Thu, 03 Jan 2019 13:20:00 GMT):
Hi to everyone . I'm a beginner in this world and I've a question for you. I wrote a chaincode to manage artworks and I need to bring up a REST service. Can you show me any guides ,tutorials or steps to build it? I wrote chaincode in golang

nyet (Thu, 03 Jan 2019 22:54:47 GMT):
Make a REST server in golang and have it talk to a fabric network using the golang fabric sdk

PaulStuart (Thu, 03 Jan 2019 23:18:47 GMT):
I'm running into issues decoding the block data on block events -- I can get most of the data except the juicy bits that I'm after: the R/W sets for the transaction. I would appreciate any insights/pointers on this.

rootDistress (Fri, 04 Jan 2019 06:47:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rNGnc9ZK4zvpLPo8a) @Kyroy I made changes as you said and added an overriding function to `ChannelConfig( string)`. But the error hasn't changed. Here is the current code ``` var( channelsConfig = map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } channelConfigImpl = &exampleChannelConfig{} endpointConfigImpls = []interface{}{ channelConfigImpl, } ) type exampleChannelConfig struct{} func (m *exampleChannelConfig) ChannelConfig(name string) *fab.ChannelEndpointConfig { ch, ok := channelsConfig[strings.ToLower(name)] if !ok { return &fab.ChannelEndpointConfig{} } return &ch }``` `endpointConfigImpls` is passed as `ChannelEndpointCnf []interface{}` to my setup.go where I do the sdk initialization as ```sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointCnf))``` The error it shows is ```Unable to initialize the Fabric SDK: failed to create SDK for MRF: Error in option passed to New: option []interface {}{(*main.exampleChannelConfig)(0xfeb920)} is not a sub interface of EndpointConfig, at least one of its functions must be implemented. ```

rootDistress (Fri, 04 Jan 2019 06:47:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rNGnc9ZK4zvpLPo8a) @Kyroy I made changes as you said and added an overriding function to `ChannelConfig( string)`. But the error hasn't changed. Here is the current code ``` var( channelsConfig = map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } channelConfigImpl = &exampleChannelConfig{} endpointConfigImpls = []interface{}{ channelConfigImpl, } ) type exampleChannelConfig struct{} func (m *exampleChannelConfig) ChannelConfig(name string) *fab.ChannelEndpointConfig { ch, ok := channelsConfig[strings.ToLower(name)] if !ok { return &fab.ChannelEndpointConfig{} } return &ch }``` `endpointConfigImpls` is passed as `ChannelEndpointCnf []interface{}` to my setup.go where I do the sdk initialization as `sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointCnf))` The error it shows is `Unable to initialize the Fabric SDK: failed to create SDK for MRF: Error in option passed to New: option []interface {}{(*main.exampleChannelConfig)(0xfeb920)} is not a sub interface of EndpointConfig, at least one of its functions must be implemented. `

rootDistress (Fri, 04 Jan 2019 06:47:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rNGnc9ZK4zvpLPo8a) @Kyroy I made changes as you said and added an overriding function to `ChannelConfig( string)`. But the error hasn't changed. Here is the current code ``` var( channelsConfig = map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } channelConfigImpl = &exampleChannelConfig{} endpointConfigImpls = []interface{}{ channelConfigImpl, } ) type exampleChannelConfig struct{} func (m *exampleChannelConfig) ChannelConfig(name string) *fab.ChannelEndpointConfig { ch, ok := channelsConfig[strings.ToLower(name)] if !ok { return &fab.ChannelEndpointConfig{} } return &ch }``` `endpointConfigImpls` is passed as `ChannelEndpointCnf []interface{}` to my setup.go where I do the sdk initialization as `sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointCnf))` The error it shows is `Unable to initialize the Fabric SDK: failed to create SDK for MRF: Error in option passed to New: option []interface {}{(*main.exampleChannelConfig)(0xfeb920)} is not a sub interface of EndpointConfig, at least one of its functions must be implemented.`

rootDistress (Fri, 04 Jan 2019 06:47:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rNGnc9ZK4zvpLPo8a) @Kyroy I made changes as you said and added an overriding function to `ChannelConfig( string)`. But the error hasn't changed. Here is the current code ``` var( channelsConfig = map[string]fab.ChannelEndpointConfig{ "indianchannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.mrf.volkswagenag.com":{ }, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer: true, ChaincodeQuery: true, LedgerQuery: true, EventSource: true, }, "peer1.gabriel.volkswagenag.com":{ }, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } channelConfigImpl = &exampleChannelConfig{} endpointConfigImpls = []interface{}{ channelConfigImpl, } ) type exampleChannelConfig struct{} func (m *exampleChannelConfig) ChannelConfig(name string) *fab.ChannelEndpointConfig { ch, ok := channelsConfig[strings.ToLower(name)] if !ok { return &fab.ChannelEndpointConfig{} } return &ch }``` `endpointConfigImpls` is passed as `ChannelEndpointCnf []interface{}` to my setup.go where I do the sdk initialization as `sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointCnf))` The error it shows is `Unable to initialize the Fabric SDK: failed to create SDK for MRF: Error in option passed to New: option []interface {}{(*main.exampleChannelConfig)(0xfeb920)} is not a sub interface of EndpointConfig, at least one of its functions must be implemented.`

Kyroy (Fri, 04 Jan 2019 07:52:28 GMT):
@rootDistress I am not sure if the interface changed recently, but which version of the sdk are u using? Maybe u can also create a minimal compilable gist?

rootDistress (Fri, 04 Jan 2019 09:57:36 GMT):
I'm using Release v1.0.0-alpha4 of fabric-go-sdk, I've created a basic gist https://gist.github.com/thekaleidoscope/ba7a288ef735e1ab4af7e1109d70cce7 The main.go supplies configs to setup.go through `fSetupMRF.Initialize()`. setup.go does the actual function run of `sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointCnf))`

rootDistress (Fri, 04 Jan 2019 09:57:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7soG7NrgSRABX3b4g) @Kyroy I'm using Release v1.0.0-alpha4 of fabric-go-sdk, I've created a basic gist https://gist.github.com/thekaleidoscope/ba7a288ef735e1ab4af7e1109d70cce7 The main.go supplies configs to setup.go through `fSetupMRF.Initialize()`. setup.go does the actual function run of `sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointCnf))`

rootDistress (Fri, 04 Jan 2019 09:57:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7soG7NrgSRABX3b4g) @Kyroy I'm using Release v1.0.0-alpha4 of fabric-go-sdk, I've created a basic gist https://gist.github.com/thekaleidoscope/ba7a288ef735e1ab4af7e1109d70cce7 The main.go supplies configs to setup.go through `setup.Initialize()`. setup.go does the actual function run of `sdk,err := fabsdk.New(nil,fabsdk.WithEndpointConfig(setup.ChannelEndpointCnf))`

Kyroy (Fri, 04 Jan 2019 11:21:37 GMT):
@rootDistress https://github.com/hyperledger/fabric-sdk-go/blob/a906355f73d060d7bf95874a9e90dc17589edbb3/pkg/common/providers/fab/provider.go#L87 https://github.com/hyperledger/fabric-sdk-go/blob/a906355f73d060d7bf95874a9e90dc17589edbb3/pkg/fab/opts.go#L76-L78

rootDistress (Fri, 04 Jan 2019 11:23:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=r2aET384q9Fu9aqSH) @Kyroy I had realized that and change it, reflected in gist above too.

rootDistress (Fri, 04 Jan 2019 11:23:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=r2aET384q9Fu9aqSH) @Kyroy I had realized that and changed it, reflected in gist above too.

rootDistress (Fri, 04 Jan 2019 13:19:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FQoEXMZP5hNC7JSdf) So, I figured out the problem was that I hadn't unpacked the interface's before passing it to function like `fabsdk.WithEndpointConfig(setup.ChannelEndpointCnf...)` Thanks a lot.

rootDistress (Fri, 04 Jan 2019 13:19:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FQoEXMZP5hNC7JSdf) So, I figured out the problem was that I hadn't unpacked the interface's before passing it to function like `fabsdk.WithEndpointConfig(setup.ChannelEndpointCnf...)` Thanks a lot. @Kyroy

rootDistress (Fri, 04 Jan 2019 13:22:39 GMT):
I am now working to create channel dynamically using https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L163 however, at https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L318 I am required to pass the `.tx` file, I was under the impression that I could create channels dynamically, If so, how can I create the `.tx` file dynamically too ?

rootDistress (Fri, 04 Jan 2019 13:22:39 GMT):
I am now working to create channel dynamically using https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L163 however, at https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L318 I am required to pass the `channel.tx` file, I was under the impression that I could create channels dynamically, If so, how can I create the `channel.tx` file dynamically too ?

Kyroy (Fri, 04 Jan 2019 14:11:52 GMT):
@rootDistress You can call the configtx tool via Command or call Fabric code `MakeChannelCreationTransaction`

rootDistress (Fri, 04 Jan 2019 14:14:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sL4sDGu9KS6MdihEB) @Kyroy But since I'm defining channel config on the go I can't use the configtx tool,right ?

Kyroy (Fri, 04 Jan 2019 14:15:16 GMT):
@rootDistress You can. You have to dynamically create the config file and then call it via: https://golang.org/pkg/os/exec/

rootDistress (Fri, 04 Jan 2019 14:16:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Nvn7RNpbiECGePdtu) @Kyroy If you have an example can you please show me how to create config file dynamically?

Kyroy (Fri, 04 Jan 2019 14:20:02 GMT):
@rootDistress I created the file with Go's StringBuilder (not very pretty). Unfortunately I cannot share any code

rootDistress (Fri, 04 Jan 2019 14:33:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=qKYo6gXz2MoZv9CMo) @Kyroy No problem, Thanks for your help. In case you ever find time to show some sample (probably without proprietor stuff), please do so.

jellevdp (Fri, 04 Jan 2019 15:17:50 GMT):
Q: The node-sdk has a block-decoder to decode the base64 data element that gets returned by the QueryBlock function: https://github.com/hyperledger/fabric-sdk-node/blob/release-1.3/fabric-client/lib/BlockDecoder.js. Does the go-sdk have a similar function available?

jellevdp (Fri, 04 Jan 2019 15:57:33 GMT):
@PaulStuart similar issue here. The QueryBlock function seems to give me a json structure for the blockheader but for the data I receive a base64 string that, when decoded does not have any structure

ShajiThiyarathodi (Fri, 04 Jan 2019 20:20:02 GMT):
Has joined the channel.

PaulStuart (Sun, 06 Jan 2019 16:24:55 GMT):
@jellevdp the go data structures are all protobuf defines, but instead of having a Block struct with hierarchical structs representing the entire tree it seems to be mainly []byte payloads that need some magic decoder func. I found code that decodes blocks here: https://github.com/cendhu/fetch-block One point I realized after posting my comment is that I'm on alpha-3 of the SDK because IBM hosting lags horribly behind the releases, so it may be fixed in the latest rev.

mbanerjee (Mon, 07 Jan 2019 07:28:15 GMT):
Has joined the channel.

mattmaru (Mon, 07 Jan 2019 09:53:16 GMT):
Hi everyone. Do you know how can I build a REST SERVICE to use my chainconde written in go?

Kyroy (Mon, 07 Jan 2019 12:06:39 GMT):
I am experiencing multiple panics on goroutinges with the sdk (commit `1bd8071cf86c`). Scenario: Create a SDK, make some transactions with Admin-user and User-user. Revoke User-user via CRL in channel config (added with Admin-user).

Kyroy (Mon, 07 Jan 2019 12:06:39 GMT):
I am experiencing panics with the sdk (commit `1bd8071cf86c`). Scenario: Create a SDK, make some transactions with Admin-user and User-user. Revoke User-user via CRL in channel config (added with Admin-user).

Kyroy (Mon, 07 Jan 2019 12:13:50 GMT):
Tons of logs like this: ``` [fabsdk/fab] 2019/01/07 12:12:47 UTC - client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: got error status from deliver server: FORBIDDEN [fabsdk/fab] 2019/01/07 12:12:47 UTC - client.(*Client).monitorConnection -> WARN Attempting to reconnect... [fabsdk/fab] 2019/01/07 12:12:47 UTC - client.(*Client).reconnect -> INFO Event client has reconnected [fabsdk/fab] 2019/01/07 12:12:47 UTC - dispatcher.(*Dispatcher).handleDeliverResponseStatus -> WARN Got deliver response status event: &peer.DeliverResponse_Status{Status:403}. Disconnecting... ```

Kyroy (Mon, 07 Jan 2019 12:21:22 GMT):
When I then try to invoke with this user again: ``` runtime: nelems=512 nalloc=76 previous allocCount=58 nfreed=65518 fatal error: sweep increased allocation count ```

Kyroy (Mon, 07 Jan 2019 12:36:30 GMT):
~1800x `FORBIDDEN` -> 7200 messages

Kyroy (Mon, 07 Jan 2019 12:37:28 GMT):
When I wait 15 seconds before trying to invoke, no panic is send.

vikimeng (Mon, 07 Jan 2019 14:58:40 GMT):
Is anyone know how to get this user certificates are revoked or not from SDK?

mattmaru (Mon, 07 Jan 2019 15:13:15 GMT):
Hi guys. I have a question. I found nothing online. How can i build a rest service to invoke my chaincode? All is in golang

nyet (Mon, 07 Jan 2019 16:13:56 GMT):
@mattmaru make a rest server in go lang, call chaincode via the go sdk

vikimeng (Mon, 07 Jan 2019 16:14:30 GMT):
@mattmaru In you go web application, import go sdk and in http call, call go sdk

troyronda (Mon, 07 Jan 2019 20:23:28 GMT):
FYI: CI for Go SDK has been updated to Go 1.11

troyronda (Mon, 07 Jan 2019 20:23:28 GMT):
FYI: CI & tests / linter for Go SDK has been updated to Go 1.11

Randyshu2018 (Tue, 08 Jan 2019 03:24:05 GMT):

Clipboard - January 8, 2019 11:22 AM

rootDistress (Tue, 08 Jan 2019 04:54:09 GMT):
guys, Is there a way to actually remove/ destroy a channel after creation ?

Baha-sk (Tue, 08 Jan 2019 14:27:01 GMT):
@Randyshu2018 your stack trace shows Node SDK, not Go SDK..

natesmith (Tue, 08 Jan 2019 16:59:47 GMT):
Has joined the channel.

bstasyszyn (Tue, 08 Jan 2019 21:09:01 GMT):
@Kyroy I've pushed a change that should fix this issue: https://gerrit.hyperledger.org/r/#/c/28560/

Kyroy (Tue, 08 Jan 2019 21:09:51 GMT):
@bstasyszyn Thanks, I will have a look :)

rootDistress (Wed, 09 Jan 2019 04:53:39 GMT):
While instantiating sdk with overriding only containing channelconfig part like at https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/configless/endpointconfig_override_test.go, is it possible to get rest from a config file. What I mean is, if I try to override channel config with ``` channelConfigImpl = &exampleChannelConfig{} endpointConfigImpls = []interface{}{ channelConfigImpl, } ``` But want rest of the config from the `config.yaml` and I instantiate the sdk like `sdk,err := fabsdk.New(config.FromFile(setup.ConfigFile),fabsdk.WithEndpointConfig(endpointConfigImpls...))` does the sdk have config of channel in its chConfig cache ? because I'm not able to find the peers after creation and joining of a channel.

rootDistress (Wed, 09 Jan 2019 04:53:39 GMT):
While instantiating sdk with overriding only containing channelconfig part like at https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/configless/endpointconfig_override_test.go, is it possible to get rest from a config file. What I mean is, if I try to override channel config with ``` channelConfigImpl = &exampleChannelConfig{} endpointConfigImpls = []interface{}{ channelConfigImpl, } ``` But want rest of the config from the `config.yaml` and I instantiate the sdk like `sdk,err := fabsdk.New(config.FromFile(setup.ConfigFile),fabsdk.WithEndpointConfig(endpointConfigImpls...))` does the sdk have config of channel in its chConfig cache ? because I'm not able to find the peers after creation and joining of a channel. Also, I've commented out the channel part in `config.yaml`

rootDistress (Wed, 09 Jan 2019 08:28:26 GMT):
Can someone please help me with my error? It gives ` Failed to get channel client context: failed to get channel service to create channel clien t: could not get chConfig cache reference: no channel peers configured for channel [somechannel]` I

rootDistress (Wed, 09 Jan 2019 08:28:26 GMT):
Can someone please help me with my error? It gives ```Failed to get channel client context: failed to get channel service to create channel clien t: could not get chConfig cache reference: no channel peers configured for channel [somechannel]``` I've instantiated the sdk as ``` var ( channelsConfig = map[string]fab.ChannelEndpointConfig{ "somechannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } channelConfigImpl = &exampleChannelConfig{} endpointConfigImpls = []interface{}{ channelConfigImpl, } ) type exampleChannelConfig struct{} // ChannelConfig overrides EndpointConfig's ChannelConfig function which returns the channelConfig instance for the channel name arg func (m *exampleChannelConfig) ChannelConfig(channelName string) *fab.ChannelEndpointConfig { ch, ok := channelsConfig[strings.ToLower(channelName)] if !ok { // EntityMatchers are not used in this implementation, below is an example of how to use them if needed //matchingChannel, _, matchErr := m.tryMatchingChannelConfig(channelName) //if matchErr != nil { // return nil, errors.WithMessage(matchErr, "channel config not found") //} //return matchingChannel, nil return &fab.ChannelEndpointConfig{} } return &ch } sdk,err := fabsdk.New(config.FromFile(setup.ConfigFile),fabsdk.WithEndpointConfig(endpointConfigImpls...)) ```

rootDistress (Wed, 09 Jan 2019 08:28:26 GMT):
Can someone please help me with my error? It gives ```Failed to get channel client context: failed to get channel service to create channel clien t: could not get chConfig cache reference: no channel peers configured for channel [somechannel]``` I've instantiated the sdk as ``` var ( channelsConfig = map[string]fab.ChannelEndpointConfig{ "somechannel":{ Orderers: []string{"orderer.volkswagenag.com"}, Peers:map[string]fab.PeerChannelConfig{ "peer0.mrf.volkswagenag.com":{ EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, "peer0.gabriel.volkswagenag.com":{ EndorsingPeer:true, ChaincodeQuery:true, LedgerQuery:true, EventSource:true}, }, Policies: fab.ChannelPolicies{ QueryChannelConfig: fab.QueryChannelConfigPolicy{ MinResponses: 1, MaxTargets: 1, RetryOpts: retry.Opts{ Attempts: 5, InitialBackoff: 500 * time.Millisecond, MaxBackoff: 5 * time.Second, BackoffFactor: 2.0, }, }, }, }, } channelConfigImpl = &exampleChannelConfig{} endpointConfigImpls = []interface{}{ channelConfigImpl, } ) type exampleChannelConfig struct{} func (m *exampleChannelConfig) ChannelConfig(channelName string) *fab.ChannelEndpointConfig { ch, ok := channelsConfig[strings.ToLower(channelName)] if !ok { return &fab.ChannelEndpointConfig{} } return &ch } sdk,err := fabsdk.New(config.FromFile(setup.ConfigFile),fabsdk.WithEndpointConfig(endpointConfigImpls...)) ```

millengustavo (Wed, 09 Jan 2019 11:34:13 GMT):
Has joined the channel.

rootDistress (Wed, 09 Jan 2019 11:51:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fpF7P3hhPDxxXDMoL) Solved this, If anyone interested my error was I had to also use `channelPeersImpl` which queries peers and orderers for filling cache in sdk.

vikimeng (Wed, 09 Jan 2019 17:30:35 GMT):
User register and only allow enroll once. But the use lost the credential and crypto(private key), how to regenerate them?

nyet (Wed, 09 Jan 2019 18:10:13 GMT):
@vikimeng if they lost the priv key they have to re-enroll.

levinem (Wed, 09 Jan 2019 18:23:08 GMT):
Has joined the channel.

troyronda (Wed, 09 Jan 2019 20:52:58 GMT):
FYI: SDK tests have passed against a 1.4.0 release target. https://gerrit.hyperledger.org/r/c/28594/

troyronda (Wed, 09 Jan 2019 20:52:58 GMT):
FYI: SDK tests have passed against a fabric 1.4.0 release target. https://gerrit.hyperledger.org/r/c/28594/

nyet (Wed, 09 Jan 2019 22:13:35 GMT):
Are they out of -rc?

nyet (Wed, 09 Jan 2019 22:14:27 GMT):
oo they are!

nyet (Wed, 09 Jan 2019 22:14:51 GMT):
oh damn maybe not https://github.com/hyperledger/fabric/releases/tag/v1.4.0

nyet (Wed, 09 Jan 2019 22:14:51 GMT):
https://github.com/hyperledger/fabric/releases/tag/v1.4.0

rootDistress (Thu, 10 Jan 2019 04:05:35 GMT):
guys can I control the read-write access to orgs/peers joining a channel?

rootDistress (Thu, 10 Jan 2019 11:06:05 GMT):
Also, Is the process of updating a channel like adding a peer or an org similar to just channel creation and joining like at https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L163 ?

rootDistress (Thu, 10 Jan 2019 14:46:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FoENAN4oDty8xPJH3) Can someone please guide me here ?

wenjian (Thu, 10 Jan 2019 17:49:09 GMT):
Has joined the channel.

QwertyJack (Thu, 10 Jan 2019 18:03:29 GMT):
Has joined the channel.

QwertyJack (Thu, 10 Jan 2019 18:03:57 GMT):
Which version of `protoc` does release 1.3.0 use ?

QwertyJack (Thu, 10 Jan 2019 18:04:34 GMT):
I'm using protoc 3.0.0 to compile proto files. It seems that some pb.go change.

QwertyJack (Thu, 10 Jan 2019 18:04:47 GMT):
Thanks in advance.

vikimeng (Thu, 10 Jan 2019 18:34:04 GMT):
@nyet Thank you for your help. I tried, the reenroll still need the user old private key. With out private key, user can't invoke/query

nyet (Thu, 10 Jan 2019 19:27:31 GMT):
You will have to enroll as a new user

akoita (Fri, 11 Jan 2019 03:32:53 GMT):
Has joined the channel.

rootDistress (Fri, 11 Jan 2019 08:07:20 GMT):
I've encountered a problem, I was overriding the configs using https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/configless/endpointconfig_override_test.go and dynamically creating channels using https://github.com/hyperledger/fabric-sdk-go/blob/303f01c92fd71b2d0870932641b5c4460eb60202/test/integration/e2e/orgs/multiple_orgs_test.go#L163 The problem is that the peers not defined in channelsConfig are also joining the channel and are able to query chaincode. Can someone think what can cause this problem?

rootDistress (Fri, 11 Jan 2019 08:23:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Tj9ZPMZMbSttKmzv9) Sorry for spamming again, Found the solution, While saving the channel I had to add resmgmt.WithTargetEndpoints(targets..)

rootDistress (Fri, 11 Jan 2019 08:23:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FoENAN4oDty8xPJH3) Still stuck here though. :sweat_smile:

paul.sitoh (Fri, 11 Jan 2019 13:26:09 GMT):
Is this the new API for writing apps https://github.com/hyperledger/fabric-sdk-node/tree/release-1.4/fabric-network?

paul.sitoh (Fri, 11 Jan 2019 13:26:09 GMT):
Is this the new API for writing apps https://github.com/hyperledger/fabric-sdk-node/tree/release-1.4/fabric-network? As opposed to fabric-client?

paul.sitoh (Fri, 11 Jan 2019 13:26:09 GMT):
Is this the new API for writing apps https://github.com/hyperledger/fabric-sdk-node/tree/release-1.4/fabric-network? As opposed to https://github.com/hyperledger/fabric-sdk-node/tree/release-1.4/fabric-client?

Baha-sk (Fri, 11 Jan 2019 15:36:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4S6YPDePc8cqNgvSv) @rootDistress yes, you have to create the channel config block prior to creating the channel (this line references the pre-created the .tx file : https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L318)

Baha-sk (Fri, 11 Jan 2019 15:36:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4S6YPDePc8cqNgvSv) @rootDistress yes, you have to create the channel config block prior to creating the channel (this line references the pre-created .tx file : https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L318)

Baha-sk (Fri, 11 Jan 2019 15:38:12 GMT):
@rootDistress and the same thing for anchor peers channel config: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L330

Baha-sk (Fri, 11 Jan 2019 15:38:30 GMT):
these must be created first

vikimeng (Fri, 11 Jan 2019 18:15:06 GMT):
@nyet Thank you, this works

rootDistress (Sun, 13 Jan 2019 12:25:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xs9FMpo9cy2Co3W3o) @Baha-sk Thanks for the reply, I tried what you said. Here is what I did: * Created a configtx with only one org in the channel * Created artifacts accordingly * Did the resmgmt.SaveChannelRequest and chMgmtClient.SaveChannel for each of channeltx and anchor tx * Installed, instantiated a chaincode and queried something * Regenerated the configtx with both org in channel * Created artifacts again * Did resmgmt.SaveChannelRequest and tried to do chMgmtClient.SaveChannel for channeltx And it returned an error ``` Unable to Save Channel tx: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Server Status Code: (403) FORBIDDEN. Description: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied ``` I don't understand the error as I can't find any policies being set. Please help.

rootDistress (Sun, 13 Jan 2019 12:25:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xs9FMpo9cy2Co3W3o) @Baha-sk Thanks for the reply, I tried what you said. Here is what I did: * Created a configtx with only one org in the channel * Created artifacts accordingly * Did the resmgmt.SaveChannelRequest and chMgmtClient.SaveChannel for each of channeltx and anchor tx * Joined channel for the org * Installed, instantiated a chaincode and queried something * Regenerated the configtx with both org in channel * Created artifacts again * Did resmgmt.SaveChannelRequest and tried to do chMgmtClient.SaveChannel for channeltx And it returned an error ``` Unable to Save Channel tx: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Server Status Code: (403) FORBIDDEN. Description: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied ``` I don't understand the error as I can't find any policies being set. Please help.

rootDistress (Sun, 13 Jan 2019 12:25:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xs9FMpo9cy2Co3W3o) @Baha-sk Thanks for the reply, I tried what you said. Here is what I did: * Created a configtx with only one org in the channel * Created artifacts accordingly * Did the resmgmt.SaveChannelRequest and chMgmtClient.SaveChannel for each of channeltx and anchor tx * Joined channel for the org * Installed, instantiated a chaincode and queried something * Regenerated the configtx with both org in channel * Created artifacts again * Did resmgmt.SaveChannelRequest and tried to do chMgmtClient.SaveChannel for channeltx And it returned an error ``` Unable to Save Channel tx: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Server Status Code: (403) FORBIDDEN. Description: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied ``` I don't understand the error. Please help.

rootDistress (Sun, 13 Jan 2019 12:25:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xs9FMpo9cy2Co3W3o) @Baha-sk Thanks for the reply, I tried what you said. Here is what I did: * Created a configtx with only one org in the channel * Created artifacts accordingly * Did the resmgmt.SaveChannelRequest and chMgmtClient.SaveChannel for each of channeltx and anchor tx * Joined channel for the org * Installed, instantiated a chaincode and queried something * Regenerated the configtx with both org in channel * Created artifacts again * Did resmgmt.SaveChannelRequest and tried to do chMgmtClient.SaveChannel for channeltx And it returned an error ``` Unable to Save Channel tx: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Server Status Code: (403) FORBIDDEN. Description: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied ``` I don't understand the error. Please help.

rootDistress (Sun, 13 Jan 2019 12:25:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xs9FMpo9cy2Co3W3o) @Baha-sk Thanks for the reply, I tried what you said. Here is what I did: * Created a configtx with only one org in the channel * Created artifacts accordingly * Did the resmgmt.SaveChannelRequest and chMgmtClient.SaveChannel for each of channeltx and anchor tx * Joined channel for the org * Installed, instantiated a chaincode and queried something * Reset sdk with new endpointconfigs * Regenerated the configtx with both org in channel * Created artifacts again * Did resmgmt.SaveChannelRequest and tried to do chMgmtClient.SaveChannel for channeltx And it returned an error ``` Unable to Save Channel tx: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Server Status Code: (403) FORBIDDEN. Description: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied ``` I don't understand the error. Please help.

rootDistress (Sun, 13 Jan 2019 12:25:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xs9FMpo9cy2Co3W3o) @Baha-sk Thanks for the reply, I tried what you said. Here is what I did: * Created a configtx with only one org in the channel * Created artifacts accordingly * Did the resmgmt.SaveChannelRequest and chMgmtClient.SaveChannel for each of channeltx and anchor tx * Joined channel for the org * Installed, instantiated a chaincode and queried something * Reset sdk with new endpointconfigs * Regenerated the configtx with both org in channel * Created all artifacts again * Did resmgmt.SaveChannelRequest and tried to do chMgmtClient.SaveChannel for channeltx And it returned an error ``` Unable to Save Channel tx: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Server Status Code: (403) FORBIDDEN. Description: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied ``` I don't understand the error. Please help.

rootDistress (Mon, 14 Jan 2019 07:18:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=B3weHKrcmy3mMfPsm) So, Realized I might be going in completely wrong dir, Can someone confirm if i would have to use steps similar to https://hyperledger-fabric.readthedocs.io/en/release-1.3/channel_update_tutorial.html i.e fetch lates block and convert using config configtxlator and jq to add/remove headers, and the use resmgmt.SaveChannelRequest and chMgmtClient.SaveChannel to send update ? Any code example would be very much appreciated.

rootDistress (Mon, 14 Jan 2019 07:18:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=B3weHKrcmy3mMfPsm) So, Realized I might be going in completely wrong dir, Can someone confirm if i would have to use steps similar to add org to channel? https://hyperledger-fabric.readthedocs.io/en/release-1.3/channel_update_tutorial.html i.e fetch latest config and convert using config configtxlator and jq to add/remove headers, and the use resmgmt.SaveChannelRequest and chMgmtClient.SaveChannel to send update ? Any code example would be very much appreciated.

bjwswang (Mon, 14 Jan 2019 10:10:20 GMT):
Hi guys! Do we support raft-based-consensus now?

bjwswang (Mon, 14 Jan 2019 10:10:31 GMT):
If not ,what's the plan for this ?

atian15 (Mon, 14 Jan 2019 11:18:18 GMT):
Has joined the channel.

Kyroy (Mon, 14 Jan 2019 12:04:04 GMT):
@bjwswang I think you are in the wrong channel ;)

bjwswang (Mon, 14 Jan 2019 12:05:00 GMT):
I mean we might need to change something for new ordering service .

bjwswang (Mon, 14 Jan 2019 12:05:06 GMT):
in fabric-sdk-go

bjwswang (Mon, 14 Jan 2019 12:07:30 GMT):
especially when create channels, in RAFT based consensus , different channel will be using different order service nodes. In this way ,we will need to give the orderer list when create channels.

fische (Mon, 14 Jan 2019 16:12:40 GMT):
Has joined the channel.

fische (Mon, 14 Jan 2019 16:15:54 GMT):
Hello! I would like to create a PR on your gerrit but I can't sign in, while I have a linux foundation account. This is the error message I am getting: `Cannot assign user name "fische 3" to account 7741; name does not conform.`

fische (Mon, 14 Jan 2019 16:18:14 GMT):
(username has been generated at account creation and I can't change it unfortunatelly)

Baha-sk (Mon, 14 Jan 2019 20:46:24 GMT):
@rootDistress once the original channel config is saved in the orderer, you cannot save a newly regenerated config for the same channel.. the error above means the orderer does not trust the new request as the config signature is invalid (it is not aware of the newly added org)

rootDistress (Tue, 15 Jan 2019 04:57:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=noNcxF8n6zFMGLHKp) @Baha-sk Ohh, So, The only way to update the channel config is now to fetch the latest config block and append new MSP to the payload and send it as envelop right? Is there a way to do this through go sdk? I did read about using https://github.com/hyperledger/fabric-sdk-go/blob/36698e6d682b220fcd92b43560c3d719e9e984c6/pkg/fab/resource/config.go#L60 or https://github.com/hyperledger/fabric-sdk-go/blob/8e44ac8c2db8147d0d01448419edf1be11ff7507/test/integration/negative/revoked/revoked_test.go#L252 but I'm not exaclty how to go about it.

millengustavo (Tue, 15 Jan 2019 13:42:17 GMT):
What is the difference of using fabric-sdk-go or simple creating a _test.go chaincode file? seems like every example of the sdk is a test

nyet (Tue, 15 Jan 2019 15:22:41 GMT):
testcases will never be executed in chaincode containers.

zhuquanbin (Wed, 16 Jan 2019 06:23:31 GMT):
Has joined the channel.

sherbetlemon (Wed, 16 Jan 2019 22:12:12 GMT):
Has joined the channel.

sherbetlemon (Wed, 16 Jan 2019 22:14:56 GMT):
Hi! I have a Fabric network already set up and chaincode instantiated. I want to create and send transactions asynchronously using fabric sdk go. How should I start out?

sherbetlemon (Wed, 16 Jan 2019 22:22:48 GMT):
asynchronous

sherbetlemon (Thu, 17 Jan 2019 00:27:12 GMT):
I am following the steps here - https://github.com/chainHero/heroes-service. First issue I have run into is with setting the peer url in https://github.com/chainHero/heroes-service/blob/master/config.yaml. I have the peers and the cli set up in different nodes on cloud, each node has a single docker container. All docker containers are connected by docker swarm. Which URL should I use for the peer in config.yaml - peer's floating ip or private ip or something else?

nyet (Thu, 17 Jan 2019 05:48:20 GMT):
The ip you intend to connect to with the app using the go sdk

nyet (Thu, 17 Jan 2019 05:48:39 GMT):
you'll have to remove the entityMatchers section if that ip isn't localhost

nyet (Thu, 17 Jan 2019 05:50:10 GMT):
That example is ill suited for your PoC if the nodes are not in a local docker instance.

nyet (Thu, 17 Jan 2019 05:50:19 GMT):
In fact, most examples are :)

maxrobot (Thu, 17 Jan 2019 09:01:11 GMT):
Hi I am running a network with 2 peers blah blah... I have some chaincode deployed which moves some numbers around between accounts stored in my ledger. However when I query blocks in JSON format the arguments of the command do not format correct as below ``` {"ChaincodeProposalPayload":{"Input":{"ChaincodeSpec":{"ChaincodeId":{"Name":"ExampleCC","Version":"","Path":""},"Timeout":"0","Type":"GOLANG","Input":{"Args":["bW92ZQ""QQ""Qg""MQ"],"Decorations":[]}}},"TransientMap":[]} ``` Has anyone encountered this issue previously?

maxrobot (Thu, 17 Jan 2019 09:01:43 GMT):
I would expect the args to format more like `"Args":["bW92ZQ","QQ","Qg","MQ"]`

bjwswang (Thu, 17 Jan 2019 14:45:30 GMT):
Hi guys . Do we support mutual TLS now ?

bjwswang (Thu, 17 Jan 2019 14:45:30 GMT):
Hi guys . Do we support mutual TLS now? If not, is there any jira issue related to mutulTLS ?

sherbetlemon (Fri, 18 Jan 2019 02:41:29 GMT):
@nyet thanks for your help

sherbetlemon (Fri, 18 Jan 2019 02:42:06 GMT):
I am able to create and join the channel.

sherbetlemon (Fri, 18 Jan 2019 02:48:13 GMT):
But when I try to install chaincode as mentioned in setup.go of https://github.com/chainHero/heroes-service, a new container by the name of _networkname_-peer1.org1.example.com-_chaincodename_-_version_ starts up and I think the chaincode gets initialized there

sherbetlemon (Fri, 18 Jan 2019 02:49:03 GMT):
Because of that i think, I get the error: ``` Chaincode installed [fabsdk/fab] 2019/01/18 01:45:05 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = DeadlineExceeded desc = context deadline exceeded] [fabsdk/fab] 2019/01/18 01:45:05 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = DeadlineExceeded desc = context deadline exceeded] Unable to install and instantiate the chaincode: failed to instantiate the chaincode: sending deploy transaction proposal failed: Multiple errors occurred: Transaction processing for endorser [peer2:8051]: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded Transaction processing for endorser [peer3:9051]: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded```

sherbetlemon (Fri, 18 Jan 2019 02:51:19 GMT):
I am extremely unclear about where the code using the SDK should be run, how it knows which docker container to talk to, and with which fabric component does it interact with

sherbetlemon (Fri, 18 Jan 2019 02:51:29 GMT):
Can someone help me with that?

nyet (Fri, 18 Jan 2019 03:02:24 GMT):
@sherbetlemon Glad I could help. For that you will have to look at the peer log/console to see what their errors are.

nyet (Fri, 18 Jan 2019 03:02:41 GMT):
it looks like they can't contact the chaincode container.

nyet (Fri, 18 Jan 2019 03:03:43 GMT):
@sherbetlemon You can also take a peek at my own test stuff if it helps https://github.com/Blockdaemon/hlf-database-app

sherbetlemon (Fri, 18 Jan 2019 03:07:16 GMT):
sure, looking at it right now

sherbetlemon (Fri, 18 Jan 2019 03:09:56 GMT):
have you tested it for a multi-host setting using docker-swarm?

nyet (Fri, 18 Jan 2019 03:11:40 GMT):
no but I am working on k8s support on gke

sherbetlemon (Fri, 18 Jan 2019 03:12:49 GMT):

Clipboard - January 17, 2019 9:12 PM

nyet (Fri, 18 Jan 2019 03:13:54 GMT):
yea i was afraid of that

sherbetlemon (Fri, 18 Jan 2019 03:13:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=j7G68PD4sqRaBPoND) @nyet This is the error in the container which simply gets created somehow. The last line is the container which I intend to have peer2 in.

nyet (Fri, 18 Jan 2019 03:14:10 GMT):
i think the docker container cant resolve the peer endpoint

nyet (Fri, 18 Jan 2019 03:14:15 GMT):
err the chaincode container

nyet (Fri, 18 Jan 2019 03:14:38 GMT):
I'm working on that problem myself right now :/

nyet (Fri, 18 Jan 2019 03:14:58 GMT):
everything works great if its all in docker on a single host

sherbetlemon (Fri, 18 Jan 2019 03:15:25 GMT):
Yeah :/

nyet (Fri, 18 Jan 2019 03:15:45 GMT):
you'll need to dig around the log and see what the chaincode container thinks the peer ip is

nyet (Fri, 18 Jan 2019 03:16:20 GMT):
and see if it matches how that container woiuld actually talk to the peer. It's tricky because fabric does some hacky stuff to spin up the chaincode container. It also doesn't work well in k8s either

nyet (Fri, 18 Jan 2019 03:16:38 GMT):
i really wish they'd just fork/exec like normal people :/

nyet (Fri, 18 Jan 2019 03:16:44 GMT):
but hey its container world these days

sherbetlemon (Fri, 18 Jan 2019 03:16:59 GMT):
haha

nyet (Fri, 18 Jan 2019 03:17:27 GMT):
I'm assuming the example works great in just plain single host docker for you?

sherbetlemon (Fri, 18 Jan 2019 03:17:40 GMT):
yes

nyet (Fri, 18 Jan 2019 03:17:48 GMT):
as i feared ....

nyet (Fri, 18 Jan 2019 03:17:55 GMT):
good luck :) please message me if you figure it out

sherbetlemon (Fri, 18 Jan 2019 03:17:59 GMT):
unfortunately that's not what I am looking for.

nyet (Fri, 18 Jan 2019 03:18:06 GMT):
same here, sir!

nyet (Fri, 18 Jan 2019 03:18:25 GMT):
You're on the right track if its any consolation

nyet (Fri, 18 Jan 2019 03:18:57 GMT):
suffice to say it is a fabric issue, not an sdk issue, so you might want to get help from the fabric guys ...

sherbetlemon (Fri, 18 Jan 2019 03:21:11 GMT):
i think it is an interfacing issue. i am able to instantiate and invoke in multihost setting using the fabric cli image

nyet (Fri, 18 Jan 2019 03:22:25 GMT):
oh thats interesting

nyet (Fri, 18 Jan 2019 03:22:43 GMT):
so that would make it an sdk issue

nyet (Fri, 18 Jan 2019 03:23:17 GMT):
well when i get my multihost k8s thing working i'll have a another datapoint for you

nyet (Fri, 18 Jan 2019 03:23:46 GMT):
but it uses dind so ... im guessing the chaincode container is always local to the peer pod

nyet (Fri, 18 Jan 2019 03:23:51 GMT):
which might not be gthe case in docker-swarm

sherbetlemon (Fri, 18 Jan 2019 03:27:49 GMT):
in general, there isn't supposed to be an independent chaincode container, right?

nyet (Fri, 18 Jan 2019 03:30:01 GMT):
yes, each peer is supposed to spin up a container for every chaincode it "hosts"

nyet (Fri, 18 Jan 2019 03:30:24 GMT):
but the current way assumes that container is local to the peer;s docker instance

sherbetlemon (Fri, 18 Jan 2019 03:33:22 GMT):
oh, got it i think. So in my case, the sdk seems to be creating a chaincode instance in the same level as my peer instance, instead of inside my peer instance?

nyet (Fri, 18 Jan 2019 03:45:55 GMT):
its not up to the sdk, it is the peer that does it

nyet (Fri, 18 Jan 2019 03:46:17 GMT):
it shouldn't matter who asks the peer to instantiate chaincode, the peer should always act the same way

nyet (Fri, 18 Jan 2019 03:47:10 GMT):
but maybe the sdk is passing the wrong endpoint(s) to the peer (or chaincode) so the peer cant talk to its chaincode and/or vice versa (this is all a blind guess)

nyet (Fri, 18 Jan 2019 03:51:57 GMT):
well if its of any help i just got my hosted GKE working with multihosts

nyet (Fri, 18 Jan 2019 03:52:04 GMT):
it works fine.

nyet (Fri, 18 Jan 2019 03:52:26 GMT):
every peer/orderer is on a separate ip address, the peers are using dind to start up chaincode

nyet (Fri, 18 Jan 2019 03:53:00 GMT):
but the chaincode/peers talk to each other as localhost as far as i can tell

nyet (Fri, 18 Jan 2019 03:54:04 GMT):
``` - name: CORE_PEER_CHAINCODELISTENADDRESS value: "localhost:7052" # Chaincode will look for the peer here (dind)```

nyet (Fri, 18 Jan 2019 03:54:24 GMT):
You'll have to (maybe?) customize that for docker swarm.

nyet (Fri, 18 Jan 2019 03:55:11 GMT):
what is your `CORE_VM_ENDPOINT` set to

nyet (Fri, 18 Jan 2019 03:55:18 GMT):
(on the peer)

Akshay1997 (Fri, 18 Jan 2019 04:36:59 GMT):
Has joined the channel.

rootDistress (Fri, 18 Jan 2019 07:47:33 GMT):
I was trying to send channel update envelope but got this error i couldn't fix yet ```Rejecting broadcast of config message from 172.26.0.1:37706 because of error: initializing channelconfig failed: could not create channel Application sub-group config: failed to deserialize values: proto: can't skip unknown wire type 6 for msp.MSPConfig``` I'm unsure of what caused this.

Yair (Fri, 18 Jan 2019 11:04:47 GMT):
Has joined the channel.

sonukumar18 (Fri, 18 Jan 2019 11:56:38 GMT):
Has joined the channel.

sonukumar18 (Fri, 18 Jan 2019 11:57:34 GMT):
Hi Guys, How can i start hyperledger fabric with go language?

nyet (Fri, 18 Jan 2019 17:00:39 GMT):
Why is `config.yaml` `peers/orderers->hostname->url` required? Why not infer a default value from hostname?

nyet (Fri, 18 Jan 2019 17:00:39 GMT):
Why is `config.yaml` `peers/orderers/certificateAuthorites->->url` required? Why not infer a default value from hostname?

nyet (Fri, 18 Jan 2019 17:00:39 GMT):
Why is `config.yaml` `peers/orderers/certificateAuthorites->->url` required? Why not infer a default value from `hostname`?

nyet (Fri, 18 Jan 2019 17:22:26 GMT):
https://jira.hyperledger.org/projects/FABG/issues/FABG-814

nyet (Fri, 18 Jan 2019 17:23:01 GMT):
(working slowly towards simplifying `configl.yaml` - it is WAY longer than it needs to be)

sherbetlemon (Fri, 18 Jan 2019 17:30:38 GMT):
Here's my docker-compose -peer file - https://github.com/aashaka/hlf-docker-swarm/blob/master/network/org1/docker-compose-peer.yml

sherbetlemon (Fri, 18 Jan 2019 17:31:44 GMT):
I have the `CORE_VM_ENDPOINT` as unix:///host/var/run/docker.sock. Just added `CORE_PEER_CHAINCODELISTENADDRESS`, but almost the same result.

nyet (Fri, 18 Jan 2019 17:44:04 GMT):
If you shell into the peer/chaincode containers, can you contact the endpoints you specified?

nyet (Fri, 18 Jan 2019 17:44:12 GMT):
(via curl or whatever)

sherbetlemon (Fri, 18 Jan 2019 18:05:16 GMT):
can't resolve host: unix

sherbetlemon (Fri, 18 Jan 2019 18:06:06 GMT):
trying to figure out the correct `CORE_VM_ENDPOINT` for docker swarm now

nyet (Fri, 18 Jan 2019 18:06:27 GMT):
thats not a hostname, thats a socket

nyet (Fri, 18 Jan 2019 18:06:34 GMT):
does that file exist on your system

nyet (Fri, 18 Jan 2019 18:06:51 GMT):
actually thats how the peer creates the chaincode container

nyet (Fri, 18 Jan 2019 18:06:58 GMT):
it talks to the docker api on that socket

nyet (Fri, 18 Jan 2019 18:07:15 GMT):
if that didn't work you wouldn't see the chaincode container at all

sherbetlemon (Fri, 18 Jan 2019 18:08:19 GMT):
okay. i do see the chaincode container though.

sherbetlemon (Fri, 18 Jan 2019 18:11:44 GMT):
i see a /var/run/docker.sock

sherbetlemon (Fri, 18 Jan 2019 18:24:13 GMT):
And `docker -H localhost:7051 info` on the peer node gives me `Get http://localhost:7051/v1.38/info: net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x15\x03\x01\x00\x02\x02". * Are you trying to connect to a TLS-enabled daemon without TLS?`

sherbetlemon (Fri, 18 Jan 2019 18:24:13 GMT):
And `docker -H localhost:7051 info` on the peer node gives me `Get http://localhost:7051/v1.38/info: net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x15\x03\x01\x00\x02\x02". * Are you trying to connect to a TLS-enabled daemon without TLS?` So it seems to be working fine

nyet (Fri, 18 Jan 2019 18:43:37 GMT):
What about on the chaincode container? can it contact its peer?

nyet (Fri, 18 Jan 2019 18:44:48 GMT):
the peer will always be able to see itself on 7051 :), you need to know if the peer can see the chaincode container and vice versa

sherbetlemon (Fri, 18 Jan 2019 18:52:12 GMT):
from inside the chaincode container, it can ping all the docker swarm nodes - peers and orderers

sherbetlemon (Fri, 18 Jan 2019 18:57:23 GMT):
that's for peer1. For peer2, the chaincode container simply exits, so i can't get into it. I am following https://lists.hyperledger.org/g/fabric/topic/28145225 and will get back

sherbetlemon (Fri, 18 Jan 2019 18:57:40 GMT):
thanks for your continued help :)

nyet (Fri, 18 Jan 2019 22:56:13 GMT):
np, just make sure CORE_PEER_CHAINCODELISTENADDRESS is correct and the peer isn't just talking to itself and/or the chaincode isn't just talking to itself

rootDistress (Sat, 19 Jan 2019 10:48:20 GMT):
While joining a channel after adding that org to the channel I am faced with ```Client authorization revoked for deliver request from 192.168.64.1:33136: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied```. I read the docker logs and read ``` Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Application.Readers Orderer.Readers ]``` Here is how I added the org to channel: * Got the ConfigGroup of New org from configtxgen * Fetched the latest config block * Extracted the ConfigUpdate (One containing ReadSet) * Copied readset to make writeset * Unmarshalled writeset and added new org config group to` writeSet.Groups["Application"].Groups["NewOrg"]` * Updated the application version as `writeSet.Groups["Application"].Version++` * Received the `orderer.genesis.block` from local machine and unmarshalled to config update * changed the ReadSet, WriteSet and ChannelId of it * Got reader bytes from `createConfigEnvelopeReader(block.Data.Data[0], configUpdateBytes)` (block here is orderer.genesis.block) * Signed the request with existing org and did save channel * Tried to join the channel from newly added org, failed. Did I miss any step? Please let me know if policies also need to be changed in this case

rootDistress (Sat, 19 Jan 2019 10:48:20 GMT):
While joining a channel after adding that org to the channel I am faced with ```Client authorization revoked for deliver request from 192.168.64.1:33136: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied``` I read the docker logs and read ``` Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Application.Readers Orderer.Readers ]``` Here is how I added the org to channel: * Got the ConfigGroup of New org from configtxgen * Fetched the latest config block * Extracted the ConfigUpdate (One containing ReadSet) * Copied readset to make writeset * Unmarshalled writeset and added new org config group to` writeSet.Groups["Application"].Groups["NewOrg"]` * Updated the application version as `writeSet.Groups["Application"].Version++` * Received the `orderer.genesis.block` from local machine and unmarshalled to config update * changed the ReadSet, WriteSet and ChannelId of it * Got reader bytes from `createConfigEnvelopeReader(block.Data.Data[0], configUpdateBytes)` (block here is orderer.genesis.block) * Signed the request with existing org and did save channel * Tried to join the channel from newly added org, failed. Did I miss any step? Please let me know if policies also need to be changed in this case

rootDistress (Sat, 19 Jan 2019 10:48:20 GMT):
While joining a channel after adding that org to the channel I am faced with `Client authorization revoked for deliver request from 192.168.64.1:33136: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied` I read the docker logs and read ` Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Application.Readers Orderer.Readers ]` Here is how I added the org to channel: * Got the ConfigGroup of New org from configtxgen * Fetched the latest config block * Extracted the ConfigUpdate (One containing ReadSet) * Copied readset to make writeset * Unmarshalled writeset and added new org config group to` writeSet.Groups["Application"].Groups["NewOrg"]` * Updated the application version as `writeSet.Groups["Application"].Version++` * Received the `orderer.genesis.block` from local machine and unmarshalled to config update * changed the ReadSet, WriteSet and ChannelId of it * Got reader bytes from `createConfigEnvelopeReader(block.Data.Data[0], configUpdateBytes)` (block here is orderer.genesis.block) * Signed the request with existing org and did save channel * Tried to join the channel from newly added org, failed. Did I miss any step? Please let me know if policies also need to be changed in this case

rootDistress (Sat, 19 Jan 2019 10:48:20 GMT):
While joining a channel after adding that org to the channel I am faced with `Client authorization revoked for deliver request from 192.168.64.1:33136: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied` I read the docker logs and read ` Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Application.Readers Orderer.Readers ]` Here is how I added the org to channel: * Got the ConfigGroup of New org from configtxgen * Fetched the latest config block * Extracted the ConfigUpdate (One containing ReadSet) * Copied readset to make writeset * Unmarshalled writeset and added new org config group to `writeSet.Groups["Application"].Groups["NewOrg"]` * Updated the application version as `writeSet.Groups["Application"].Version++` * Received the `orderer.genesis.block` from local machine and unmarshalled to config update * changed the ReadSet, WriteSet and ChannelId of it * Got reader bytes from `createConfigEnvelopeReader(block.Data.Data[0], configUpdateBytes)` (block here is orderer.genesis.block) * Signed the request with existing org and did save channel * Tried to join the channel from newly added org, failed. Did I miss any step? Please let me know if policies also need to be changed in this case

rootDistress (Sat, 19 Jan 2019 11:00:46 GMT):
I am also getting docker logs with ``` 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 761 Proposed new policy Admins for Channel/Application/Org1MSP 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 762 Proposed new policy Readers for Channel/Application/Org1MSP 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 763 Proposed new policy Writers for Channel/Application/Org1MSP 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 764 Proposed new policy Reader for Channel/Application/Org2MSP 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 765 Proposed new policy Writer for Channel/Application/Org2MSP 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 766 Proposed new policy Admins for Channel/Application/Org2MSP 2019-01-19 10:30:08.156 UTC [policies] GetPolicy -> DEBU 767 Returning dummy reject all policy because Writers could not be found in Channel/Application/Org2MSP/Writers 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 768 Proposed new policy Writers for Channel/Application 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 769 Proposed new policy Admins for Channel/Application 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 76a Proposed new policy Org1MemberPolicy for Channel/Application 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 76b Proposed new policy Org2MemberPolicy for Channel/Application 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 76c Proposed new policy Org1Org2MemberPolicy for Channel/Application 2019-01-19 10:30:08.156 UTC [policies] GetPolicy -> DEBU 76d Returning dummy reject all policy because Readers could not be found in Channel/Application/Org2MSP/Readers ```

rootDistress (Sat, 19 Jan 2019 11:00:46 GMT):
I am also getting docker logs with ``` 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 761 Proposed new policy Admins for Channel/Application/Org1MSP 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 762 Proposed new policy Readers for Channel/Application/Org1MSP 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 763 Proposed new policy Writers for Channel/Application/Org1MSP 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 764 Proposed new policy Reader for Channel/Application/Org2MSP 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 765 Proposed new policy Writer for Channel/Application/Org2MSP 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 766 Proposed new policy Admins for Channel/Application/Org2MSP 2019-01-19 10:30:08.156 UTC [policies] GetPolicy -> DEBU 767 Returning dummy reject all policy because Writers could not be found in Channel/Application/Org2MSP/Writers 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 768 Proposed new policy Writers for Channel/Application 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 769 Proposed new policy Admins for Channel/Application 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 76a Proposed new policy Org1MemberPolicy for Channel/Application 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 76b Proposed new policy Org2MemberPolicy for Channel/Application 2019-01-19 10:30:08.156 UTC [policies] NewManagerImpl -> DEBU 76c Proposed new policy Org1Org2MemberPolicy for Channel/Application 2019-01-19 10:30:08.156 UTC [policies] GetPolicy -> DEBU 76d Returning dummy reject all policy because Readers could not be found in Channel/Application/Org2MSP/Readers ``` ``` 2019-01-19 10:30:08.158 UTC [policies] Manager -> DEBU 7ab Manager Channel/Application has managers Org1MSP 2019-01-19 10:30:08.158 UTC [policies] Manager -> DEBU 7ac Manager Channel/Application has managers Org2MSP ``` ``` 2019-01-19 10:31:19.740 UTC [policies] func1 -> DEBU 7f4 Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Org1MSP.Readers Org2MSP.Readers ] 2019-01-19 10:31:19.740 UTC [policies] Evaluate -> DEBU 7f5 Signature set did not satisfy policy /Channel/Application/Readers```

sherbetlemon (Sun, 20 Jan 2019 04:23:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NMkL2pgrAXzkdXWXF) @nyet Setting CORE_PEER_CHAINCODELISTENADDRESS to 0.0.0.0:7052 worked for me! The complete heroes-service application is running now in a multi-host setting! The environment variables are really important. I find that they are documented in form of comments across multiple docker-compose files, but couldn't find one single comprehensive documentation of what each of them means. There seems to be scope for something like this.

JaccobSmith (Mon, 21 Jan 2019 11:36:02 GMT):
Hello all,How could I invoke the lscc/GetDeploymentSpec?

JaccobSmith (Mon, 21 Jan 2019 11:37:40 GMT):
I changed the resouce code of go-sdk, and I used a client of resmgmt ,and called the lscc/GetDeploymentSpec,but I got "no ledger context" error

GavitMc (Mon, 21 Jan 2019 11:40:31 GMT):
Has joined the channel.

GavitMc (Mon, 21 Jan 2019 11:41:28 GMT):
if i return shim.error somewhere in the chaincode, where can i actually see that this error was returned and read the content? I think my chaincode is failing init returning shim.error but in the terminal i read some timeout endorsement

nyet (Mon, 21 Jan 2019 17:04:46 GMT):
@GavitMc I had this issue also; propogating shim errors from the chaincode back to the SDK. I think someone did some work on it recently, but I can't recall now what the solution was (or if it was merged).

troyronda (Mon, 21 Jan 2019 19:27:28 GMT):
@GavitMc @nyet Chaincode status numbers are stored in the ChaincodeStatus field.

troyronda (Mon, 21 Jan 2019 19:27:28 GMT):
@GavitMc @nyet Chaincode status codes are stored in the ChaincodeStatus field.

troyronda (Mon, 21 Jan 2019 19:28:13 GMT):
I'm trying to recall if there was a peer behavior where only status codes < 400 are returned though.

troyronda (Mon, 21 Jan 2019 19:28:28 GMT):
(Note shim.Error sets status code 500).

troyronda (Mon, 21 Jan 2019 19:29:12 GMT):
You can make your own version of shim.Error with a custom status code returned.

troyronda (Mon, 21 Jan 2019 19:29:43 GMT):
I think @sudeshrshetty worked on that, but he is currently away.

troyronda (Mon, 21 Jan 2019 19:29:43 GMT):
I think @sudeshrshetty worked on the ChaincodeStatus feature, but he is currently away.

nyet (Tue, 22 Jan 2019 01:49:27 GMT):
@troyronda Can you take a peek here? I have a few questions embedded in the CR ... thanks! https://gerrit.hyperledger.org/r/#/c/28878/

nyet (Tue, 22 Jan 2019 01:55:19 GMT):
Damn i lost my comments on my patch set push :/

nyet (Tue, 22 Jan 2019 05:12:00 GMT):
@GavitMc https://jira.hyperledger.org/browse/FABG-775

javapriyan (Tue, 22 Jan 2019 06:03:42 GMT):
Have any one exposed the SDK calls over a REST server ? If yes, What is the best way to manage the credentials and how to map them with the keys ?

mattmaru (Tue, 22 Jan 2019 08:03:43 GMT):
Hi guys. Someone of you know how setup a fabric-client application in go? I build it with node sdk and works perfect but i would to build it in golang. Have you suggestions or guide or tutorials ? I'm based on 1.3 version of fabric

antitoine (Tue, 22 Jan 2019 08:06:04 GMT):
@mattmaru You can take inspiration from this workshop held at the Hyperledger Global Forum 2018 (based on Hyperleger Fabric v1.3): https://github.com/chainHero/resource-manager

antitoine (Tue, 22 Jan 2019 08:07:18 GMT):
@javapriyan Have you looked at the REST SDK? Perhaps more suitable: https://github.com/hyperledger/fabric-sdk-rest

mattmaru (Tue, 22 Jan 2019 08:32:17 GMT):
REST sdk has been deprecated @antitoine

mattmaru (Tue, 22 Jan 2019 08:33:34 GMT):
I need to call existing peer and orderer to invoke and query my chaincode

aneb (Tue, 22 Jan 2019 09:39:11 GMT):
Hi guys, Currently, I am in the process of creating custom user stores and key stores for Redis and ScyllaDB as I dont want file based or memory based ones. Based on the MemoryUserStore and MemoryKeyStore I started in good spirit as it seems very straightforward. However, I quickly ran into the issue that the bccsp package is internal and blocks you from easily creating your own UserStore implementation (unless you copy the Cryptosuite or create your own implementation to match the interface as ` fabsdk.WithCorePkg` expects a suite). To fix this I can easily fork the SDK and just add my stores to the same folder as the Memory one. However, this is just asking for future package management mayhem. It is mostly the Key store that is the problem. The user store is very easy to implement as it does not use any internal packages. Anyone already succeeded in creating a custom user or key store based on the Memory store example to connect to a database for example? Or any tips on how to progress from here? Thanks

aneb (Tue, 22 Jan 2019 09:39:11 GMT):
Hi guys, Currently, I am in the process of creating custom user stores and key stores for Redis and ScyllaDB as I dont want file based or memory based ones. Based on the MemoryUserStore and MemoryKeyStore I started in good spirit as it seems very straightforward. However, I quickly ran into the issue that the bccsp package is internal and blocks you from easily creating your own KeyStore implementation (unless you copy the Cryptosuite or create your own implementation to match the interface as ` fabsdk.WithCorePkg` expects a suite). To fix this I can easily fork the SDK and just add my stores to the same folder as the Memory one. However, this is just asking for future package management mayhem. It is mostly the Key store that is the problem. The user store is very easy to implement as it does not use any internal packages. Anyone already succeeded in creating a custom user or key store based on the Memory store example to connect to a database for example? Or any tips on how to progress from here? Thanks

phantom.assasin (Tue, 22 Jan 2019 10:48:43 GMT):
Has joined the channel.

phantom.assasin (Tue, 22 Jan 2019 10:49:24 GMT):
Using fabric-sdk-go I have created a new peer instance but that is not showing up when i use this command: ```docker ps``` Also the port I have specified for the peer is free. Can anyone help me regarding how to get this new peer instance added to the network? peer url: grpcs://localhost:11051

phantom.assasin (Tue, 22 Jan 2019 10:49:48 GMT):
```func CreatePeerNode() []byte { // keepAliveParams := keepalive.ClientParameters{ // Time: (time.Duration(0) * time.Second), // Timeout: (time.Duration(20) * time.Second), // PermitWithoutStream: false, // } // type CommManager interface { // DialContext(ctx reqContext.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error) // ReleaseConn(conn *grpc.ClientConn) // } //endpointConfig := &fab.EndpointConfig{} grpcOpts := make(map[string]interface{}) grpcOpts["fail-fast"] = true grpcOpts["keep-alive-time"] = 0 * time.Second grpcOpts["keep-alive-timeout"] = 20 * time.Second grpcOpts["keep-alive-permit"] = false grpcOpts["ssl-target-name-override"] = "peer2.org1.example.com" grpcOpts["allow-insecure"] = true peerConfig := comFab.PeerConfig{ URL: "grpcs://localhost:11051", GRPCOptions: grpcOpts, } networkPeer := &comFab.NetworkPeer{ PeerConfig: peerConfig, MSPID: "Org1MSP", } const configTestFilePath = "../../../../../config-grpc.yaml" configBackends, err := cnfg.FromFile(configTestFilePath)() if err != nil { log.Fatalf("Unexpected error reading config backend: %s", err) } sampleConfig, err := fab.ConfigFromBackend(configBackends...) //url := "grpcs://localhost:11051" //grpc url peer.WithURL(url) //newPeer, err := peer.New(sampleConfig, peer.WithInsecure(), peer.WithURL(url), peer.WithTLSCert(mockfab.GoodCert), peer.FromPeerConfig(networkPeer)) newPeerInstance, err := peer.New(sampleConfig, peer.FromPeerConfig(networkPeer)) if err != nil { log.Fatal("Expected peer to be constructed") log.Panic(err) } log.Print("**************") log.Print("**************") log.Print("**************") log.Print(newPeerInstance.URL()) log.Print(newPeerInstance.MSPID()) log.Print("**************") log.Print("**************") log.Print("**************") res, _ := json.Marshal(newPeerInstance) return res }```

phantom.assasin (Tue, 22 Jan 2019 10:50:02 GMT):
`func CreatePeerNode() []byte { // keepAliveParams := keepalive.ClientParameters{ // Time: (time.Duration(0) * time.Second), // Timeout: (time.Duration(20) * time.Second), // PermitWithoutStream: false, // } // type CommManager interface { // DialContext(ctx reqContext.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error) // ReleaseConn(conn *grpc.ClientConn) // } //endpointConfig := &fab.EndpointConfig{} grpcOpts := make(map[string]interface{}) grpcOpts["fail-fast"] = true grpcOpts["keep-alive-time"] = 0 * time.Second grpcOpts["keep-alive-timeout"] = 20 * time.Second grpcOpts["keep-alive-permit"] = false grpcOpts["ssl-target-name-override"] = "peer2.org1.example.com" grpcOpts["allow-insecure"] = true peerConfig := comFab.PeerConfig{ URL: "grpcs://localhost:11051", GRPCOptions: grpcOpts, } networkPeer := &comFab.NetworkPeer{ PeerConfig: peerConfig, MSPID: "Org1MSP", } const configTestFilePath = "../../../../../config-grpc.yaml" configBackends, err := cnfg.FromFile(configTestFilePath)() if err != nil { log.Fatalf("Unexpected error reading config backend: %s", err) } sampleConfig, err := fab.ConfigFromBackend(configBackends...) //url := "grpcs://localhost:11051" //grpc url peer.WithURL(url) //newPeer, err := peer.New(sampleConfig, peer.WithInsecure(), peer.WithURL(url), peer.WithTLSCert(mockfab.GoodCert), peer.FromPeerConfig(networkPeer)) newPeerInstance, err := peer.New(sampleConfig, peer.FromPeerConfig(networkPeer)) if err != nil { log.Fatal("Expected peer to be constructed") log.Panic(err) } log.Print("**************") log.Print("**************") log.Print("**************") log.Print(newPeerInstance.URL()) log.Print(newPeerInstance.MSPID()) log.Print("**************") log.Print("**************") log.Print("**************") res, _ := json.Marshal(newPeerInstance) return res }`

phantom.assasin (Tue, 22 Jan 2019 10:50:13 GMT):
```func CreatePeerNode() []byte { // keepAliveParams := keepalive.ClientParameters{ // Time: (time.Duration(0) * time.Second), // Timeout: (time.Duration(20) * time.Second), // PermitWithoutStream: false, // } // type CommManager interface { // DialContext(ctx reqContext.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error) // ReleaseConn(conn *grpc.ClientConn) // } //endpointConfig := &fab.EndpointConfig{} grpcOpts := make(map[string]interface{}) grpcOpts["fail-fast"] = true grpcOpts["keep-alive-time"] = 0 * time.Second grpcOpts["keep-alive-timeout"] = 20 * time.Second grpcOpts["keep-alive-permit"] = false grpcOpts["ssl-target-name-override"] = "peer2.org1.example.com" grpcOpts["allow-insecure"] = true peerConfig := comFab.PeerConfig{ URL: "grpcs://localhost:11051", GRPCOptions: grpcOpts, } networkPeer := &comFab.NetworkPeer{ PeerConfig: peerConfig, MSPID: "Org1MSP", } const configTestFilePath = "../../../../../config-grpc.yaml" configBackends, err := cnfg.FromFile(configTestFilePath)() if err != nil { log.Fatalf("Unexpected error reading config backend: %s", err) } sampleConfig, err := fab.ConfigFromBackend(configBackends...) //url := "grpcs://localhost:11051" //grpc url peer.WithURL(url) //newPeer, err := peer.New(sampleConfig, peer.WithInsecure(), peer.WithURL(url), peer.WithTLSCert(mockfab.GoodCert), peer.FromPeerConfig(networkPeer)) newPeerInstance, err := peer.New(sampleConfig, peer.FromPeerConfig(networkPeer)) if err != nil { log.Fatal("Expected peer to be constructed") log.Panic(err) } log.Print("**************") log.Print("**************") log.Print("**************") log.Print(newPeerInstance.URL()) log.Print(newPeerInstance.MSPID()) log.Print("**************") log.Print("**************") log.Print("**************") res, _ := json.Marshal(newPeerInstance) return res }```

phantom.assasin (Tue, 22 Jan 2019 10:50:32 GMT):
Code i wrote to create an peer instance :point_up_2:

phantom.assasin (Tue, 22 Jan 2019 10:50:32 GMT):
Code that i am trying to use: :point_up_2:

phantom.assasin (Tue, 22 Jan 2019 10:51:26 GMT):
Can anyone please help me what I am doing wrong or what should I do next?

mfaisaltariq (Tue, 22 Jan 2019 12:25:01 GMT):
Has joined the channel.

GavitMc (Tue, 22 Jan 2019 14:05:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gyrRKpqv8b3C6SX8G) @nyet Than you...

GavitMc (Tue, 22 Jan 2019 14:05:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=gyrRKpqv8b3C6SX8G) @nyet Thank you...

GavitMc (Tue, 22 Jan 2019 14:07:04 GMT):
I am getting this error now while doing an invoke Failed to get endorsing peers: error getting endorsers from channel response: no endorsement combination can be satisfied i think it has something to do with the .yaml config gile for the sdk init but I don't know how to fix this...any suggestion?

xixuejia (Tue, 22 Jan 2019 15:32:54 GMT):
Hi guys, it seems to me that `client.Execute` in fabric-sdk-go will send proposals to peer and broadcast to orderer all in one function https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L172-L178 Does sdk-go provide functions to do these 2 steps in separated functions?

phantom.assasin (Tue, 22 Jan 2019 16:33:04 GMT):
Is it possible to dynamically add a peer node in existing blockchain network using fabric go sdk?

nyet (Tue, 22 Jan 2019 16:52:59 GMT):
Generally, a peer only needs CA certs and channel genesis blocks to join. There isn't much for the sdk to do.

Baha-sk (Tue, 22 Jan 2019 17:02:14 GMT):
@phantom.assasin , what @nyet said is right, the Go SDK does not manage the network, it's an SDK for client applications to communicate with peers/orderers (submit proposals, add channels, join peers to channels, enroll a user, etc.) there are multiple clients in the SDK to allow for these different types of communications, look at the different available clients here: https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/client and have a look at the integration tests to understand how these are used in different scenarios: https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/pkg/client.. look at the full end to end test to see how the SDK interacts with the network with a complete workflow example (ie create channel, join Chanel, create CC, invoke CC, etc.): https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end_test.go

Baha-sk (Tue, 22 Jan 2019 17:02:14 GMT):
@phantom.assasin , what @nyet is right, the Go SDK does not manage the network, it's an SDK for client applications to communicate with peers/orderers (submit proposals, add channels, join peers to channels, enrol a user, etc.) there are multiple clients in the SDK to allow for these different types of communications, look at the different available clients here: https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/client and have a look at the integration tests to understand how these are used in different scenarios: https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/pkg/client.. look at the full end to end test to see how the SDK interacts with the network with a complete workflow example (ie create channel, join Chanel, create CC, invoke CC, etc.): https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end_test.go

Baha-sk (Tue, 22 Jan 2019 17:02:14 GMT):
@phantom.assasin , what @nyet said is right, the Go SDK does not manage the network, it's an SDK for client applications to communicate with peers/orderers (submit proposals, add channels, join peers to channels, enrol a user, etc.) there are multiple clients in the SDK to allow for these different types of communications, look at the different available clients here: https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/client and have a look at the integration tests to understand how these are used in different scenarios: https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/pkg/client.. look at the full end to end test to see how the SDK interacts with the network with a complete workflow example (ie create channel, join Chanel, create CC, invoke CC, etc.): https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end_test.go

nyetnyet (Tue, 22 Jan 2019 18:02:33 GMT):
Has joined the channel.

incarose (Wed, 23 Jan 2019 00:26:37 GMT):
Has joined the channel.

GavitMc (Wed, 23 Jan 2019 07:26:43 GMT):
Does anyone ever experienced this erroe while doing an invoke from sdk? `Failed to get endorsing peers: error getting endorsers from channel response: no endorsement combination can be satisfied` Sorry for re-asking but really I don't know how to manage it...invocations from cli work..

GavitMc (Wed, 23 Jan 2019 09:14:46 GMT):
The problem is that at a certain point this function is called `func containsPeer(peers []fab.Peer, peer fab.Peer) bool { for _, p := range peers { if p.URL() == peer.URL() { return true } } return false }`

GavitMc (Wed, 23 Jan 2019 09:14:46 GMT):
The problem is that at a certain point this function is called ``` ```

GavitMc (Wed, 23 Jan 2019 09:14:46 GMT):
The problem is that at a certain point this function is called ``` func containsPeer(peers []fab.Peer, peer fab.Peer) bool { for _, p := range peers { if p.URL() == peer.URL() { return true } } return false } ```

GavitMc (Wed, 23 Jan 2019 09:14:46 GMT):
The problem is that at a certain point this function is called ``` func containsPeer(peers []fab.Peer, peer fab.Peer) bool { for _, p := range peers { if p.URL() == peer.URL() { return true } } return false } ``` It happens that p.url is `localhost:10051` and peer.URL is `peer1.org2.example.com:7051` How can i fix this? Note that i have noticed that before this one there is another search for endorsers that goes smooth without passing this filtering

GavitMc (Wed, 23 Jan 2019 09:31:16 GMT):
This is my config.yaml file. I am using the network of byfn hyperledger example ``` name: "byfn" # # Schema version of the content. Used by the SDK to apply the corresponding parsing rules. # version: 1.0.0 # # The client section used by GO SDK. # client: # Which organization does this application instance belong to? The value must be the name of an org # defined under "organizations" organization: Org1MSP logging: level: info # Global configuration for peer, event service and orderer timeouts # if this this section is omitted, then default values will be used (same values as below) # peer: # timeout: # connection: 10s # response: 180s # discovery: # # Expiry period for discovery service greylist filter # # The channel client will greylist peers that are found to be offline # # to prevent re-selecting them in subsequent retries. # # This interval will define how long a peer is greylisted # greylistExpiry: 10s # eventService: # # Event service type (optional). If not specified then the type is automatically # # determined from channel capabilities. # type: (deliver|eventhub) # the below timeouts are commented out to use the default values that are found in # "pkg/fab/endpointconfig.go" # the client is free to override the default values by uncommenting and resetting # the values as they see fit in their config file # timeout: # connection: 15s # registrationResponse: 15s # orderer: # timeout: # connection: 15s # response: 15s # global: # timeout: # query: 180s # execute: 180s # resmgmt: 180s # cache: # connectionIdle: 30s # eventServiceIdle: 2m # channelConfig: 30m # channelMembership: 30s # discovery: 10s # selection: 10m # Root of the MSP directories with keys and certs. cryptoconfig: path: ${GOPATH}/src/github.com/chainVote/crypto-config # Some SDKs support pluggable KV stores, the properties under "credentialStore" # are implementation specific credentialStore: path: /tmp/chainvote-service-store # [Optional]. Specific to the CryptoSuite implementation used by GO SDK. Software-based implementations # requiring a key store. PKCS#11 based implementations does not. cryptoStore: path: /tmp/chainvote-service-msp # BCCSP config for the client. Used by GO SDK. BCCSP: security: enabled: true default: provider: "SW" hashAlgorithm: "SHA2" softVerify: true level: 256 tlsCerts: # [Optional]. Use system certificate pool when connecting to peers, orderers (for negotiating TLS) Default: false systemCertPool: true # # [Optional]. But most apps would have this section so that channel objects can be constructed # based on the content below. If an app is creating channels, then it likely will not need this # section. # channels: # name of the channel mychannel: # Required. list of orderers designated by the application to use for transactions on this # channel. This list can be a result of access control ("org1" can only access "ordererA"), or # operational decisions to share loads from applications among the orderers. The values must # be "names" of orgs defined under "organizations/peers" # deprecated: not recommended, to override any orderer configuration items, entity matchers should be used. # orderers: # - orderer.example.com # Required. list of peers from participating orgs peers: peer0.org1.example.com: # [Optional]. will this peer be sent transaction proposals for endorsement? The peer must # have the chaincode installed. The app can also use this property to decide which peers # to send the chaincode install request. Default: true endorsingPeer: true # [Optional]. will this peer be sent query proposals? The peer must have the chaincode # installed. The app can also use this property to decide which peers to send the # chaincode install request. Default: true chaincodeQuery: true # [Optional]. will this peer be sent query proposals that do not require chaincodes, like # queryBlock(), queryTransaction(), etc. Default: true ledgerQuery: true # [Optional]. will this peer be the target of the SDK's listener registration? All peers can # produce events but the app typically only needs to connect to one to listen to events. # Default: true eventSource: true peer0.org2.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true ```

nyet (Wed, 23 Jan 2019 09:54:56 GMT):
@GavitMc Are you using `entityMatchers` to map `peer1.org2.example.com` to `localhost` or did you (erroneously) just add localhost to your peer list? If the latter, nothing is going to work because the hostnames dont match

GavitMc (Wed, 23 Jan 2019 10:00:36 GMT):
I thought it has something to do with `entityMarchers` but my config file seemed fine to me. I'll post it

nyet (Wed, 23 Jan 2019 10:01:08 GMT):
The basic problem is that everybody loves to use containers these days, so everything has a ton of DNS hacks, which confuses things.

nyet (Wed, 23 Jan 2019 10:01:30 GMT):
Especially since HLF really depends on TLS and DNS to be configured correctly.

GavitMc (Wed, 23 Jan 2019 10:02:35 GMT):
``` name: "byfn" # # Schema version of the content. Used by the SDK to apply the corresponding parsing rules. # version: 1.0.0 # # The client section used by GO SDK. # client: # Which organization does this application instance belong to? The value must be the name of an org # defined under "organizations" organization: Org1MSP logging: level: info # Global configuration for peer, event service and orderer timeouts # if this this section is omitted, then default values will be used (same values as below) # peer: # timeout: # connection: 10s # response: 180s # discovery: # # Expiry period for discovery service greylist filter # # The channel client will greylist peers that are found to be offline # # to prevent re-selecting them in subsequent retries. # # This interval will define how long a peer is greylisted # greylistExpiry: 10s # eventService: # # Event service type (optional). If not specified then the type is automatically # # determined from channel capabilities. # type: (deliver|eventhub) # the below timeouts are commented out to use the default values that are found in # "pkg/fab/endpointconfig.go" # the client is free to override the default values by uncommenting and resetting # the values as they see fit in their config file # timeout: # connection: 15s # registrationResponse: 15s # orderer: # timeout: # connection: 15s # response: 15s # global: # timeout: # query: 180s # execute: 180s # resmgmt: 180s # cache: # connectionIdle: 30s # eventServiceIdle: 2m # channelConfig: 30m # channelMembership: 30s # discovery: 10s # selection: 10m # Root of the MSP directories with keys and certs. cryptoconfig: path: ${GOPATH}/src/github.com/chainVote/crypto-config # Some SDKs support pluggable KV stores, the properties under "credentialStore" # are implementation specific credentialStore: path: /tmp/chainvote-service-store # [Optional]. Specific to the CryptoSuite implementation used by GO SDK. Software-based implementations # requiring a key store. PKCS#11 based implementations does not. cryptoStore: path: /tmp/chainvote-service-msp # BCCSP config for the client. Used by GO SDK. BCCSP: security: enabled: true default: provider: "SW" hashAlgorithm: "SHA2" softVerify: true level: 256 tlsCerts: # [Optional]. Use system certificate pool when connecting to peers, orderers (for negotiating TLS) Default: false systemCertPool: true # # [Optional]. But most apps would have this section so that channel objects can be constructed # based on the content below. If an app is creating channels, then it likely will not need this # section. # channels: # name of the channel mychannel: # Required. list of orderers designated by the application to use for transactions on this # channel. This list can be a result of access control ("org1" can only access "ordererA"), or # operational decisions to share loads from applications among the orderers. The values must # be "names" of orgs defined under "organizations/peers" # deprecated: not recommended, to override any orderer configuration items, entity matchers should be used. # orderers: # - orderer.example.com # Required. list of peers from participating orgs peers: peer0.org1.example.com: # [Optional]. will this peer be sent transaction proposals for endorsement? The peer must # have the chaincode installed. The app can also use this property to decide which peers # to send the chaincode install request. Default: true endorsingPeer: true # [Optional]. will this peer be sent query proposals? The peer must have the chaincode # installed. The app can also use this property to decide which peers to send the # chaincode install request. Default: true chaincodeQuery: true # [Optional]. will this peer be sent query proposals that do not require chaincodes, like # queryBlock(), queryTransaction(), etc. Default: true ledgerQuery: true # [Optional]. will this peer be the target of the SDK's listener registration? All peers can # produce events but the app typically only needs to connect to one to listen to events. # Default: true eventSource: true peer0.org2.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true ```

GavitMc (Wed, 23 Jan 2019 10:03:10 GMT):
``` policies: #[Optional] options for retrieving channel configuration blocks queryChannelConfig: #[Optional] min number of success responses (from targets/peers) minResponses: 1 #[Optional] channel config will be retrieved for these number of random targets maxTargets: 1 #[Optional] retry options for query config block retryOpts: #[Optional] number of retry attempts attempts: 5 #[Optional] the back off interval for the first retry attempt initialBackoff: 500ms #[Optional] the maximum back off interval for any retry attempt maxBackoff: 5s #[Optional] he factor by which the initial back off period is exponentially incremented backoffFactor: 2.0 # # list of participating organizations in this network # organizations: Org1MSP: mspid: Org1MSP cryptoPath: peerOrganizations/org1.example.com/users/{userName}@org1.example.com/msp peers: - peer0.org1.example.com - peer1.org1.example.com Org2MSP: mspid: Org2MSP cryptoPath: peerOrganizations/org2.example.com/users/{userName}@org2.example.com/msp peers: - peer0.org2.example.com - peer1.org2.example.com Ordererorg: mspID: OrdererMSP cryptoPath: ordererOrganizations/example.com/users/{username}@example.com/msp # # List of orderers to send transaction and channel create/update requests to. For the time # being only one orderer is needed. If more than one is defined, which one get used by the # SDK is implementation specific. Consult each SDK's documentation for its handling of orderers. # orderers: orderer.example.com: url: localhost:7050 # these are standard properties defined by the gRPC library # they will be passed in as-is to gRPC client constructor grpcOptions: ssl-target-name-override: orderer.example.com # These parameters should be set in coordination with the keepalive policy on the server, # as incompatible settings can result in closing of connection. # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs allow-insecure: false tlsCACerts: # Certificate location absolute path path: ${GOPATH}/src/github.com/chainVote/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem # # List of peers to send various requests to, including endorsement, query # and event listener registration. # peers: peer0.org1.example.com: # this URL is used to send endorsement and query requests url: localhost:7051 # eventUrl is only needed when using eventhub (default is delivery service) eventUrl: localhost:7053 ```

GavitMc (Wed, 23 Jan 2019 10:03:31 GMT):
``` grpcOptions: ssl-target-name-override: peer0.org1.example.com # These parameters should be set in coordination with the keepalive policy on the server, # as incompatible settings can result in closing of connection. # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs allow-insecure: false tlsCACerts: # Certificate location absolute path path: ${GOPATH}/src/github.com/chainVote/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem ```

GavitMc (Wed, 23 Jan 2019 10:03:35 GMT):
``` peer1.org1.example.com: # this URL is used to send endorsement and query requests url: localhost:8051 # eventUrl is only needed when using eventhub (default is delivery service) eventUrl: localhost:8053 grpcOptions: ssl-target-name-override: peer1.org1.example.com # These parameters should be set in coordination with the keepalive policy on the server, # as incompatible settings can result in closing of connection. # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs allow-insecure: false tlsCACerts: # Certificate location absolute path path: ${GOPATH}/src/github.com/chainVote/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem peer0.org2.example.com: # this URL is used to send endorsement and query requests url: localhost:9051 # eventUrl is only needed when using eventhub (default is delivery service) eventUrl: localhost:9053 grpcOptions: ssl-target-name-override: peer0.org2.example.com # These parameters should be set in coordination with the keepalive policy on the server, # as incompatible settings can result in closing of connection. # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs allow-insecure: false tlsCACerts: # Certificate location absolute path path: ${GOPATH}/src/github.com/chainVote/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem peer1.org2.example.com: # this URL is used to send endorsement and query requests url: localhost:10051 # eventUrl is only needed when using eventhub (default is delivery service) eventUrl: localhost:10053 grpcOptions: ssl-target-name-override: peer1.org2.example.com # These parameters should be set in coordination with the keepalive policy on the server, # as incompatible settings can result in closing of connection. # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs allow-insecure: false tlsCACerts: # Certificate location absolute path path: ${GOPATH}/src/github.com/chainVote/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem # # Fabric-CA is a special kind of Certificate Authority provided by Hyperledger Fabric which allows # certificate management to be done via REST APIs. Application may choose to use a standard # Certificate Authority instead of Fabric-CA, in which case this section would not be specified. # certificateAuthorities: entityMatchers: peer: - pattern: (\w*)peer0.org1.example.com(\w*) urlSubstitutionExp: localhost:7051 eventUrlSubstitutionExp: localhost:7053 sslTargetOverrideUrlSubstitutionExp: peer0.org1.example.com mappedHost: peer0.org1.example.com - pattern: (\w*)peer1.org1.example.com(\w*) urlSubstitutionExp: localhost:8051 eventUrlSubstitutionExp: localhost:8053 sslTargetOverrideUrlSubstitutionExp: peer1.org1.example.com mappedHost: peer1.org1.example.com - pattern: (\w*)peer0.org2.example.com(\w*) urlSubstitutionExp: localhost:9051 eventUrlSubstitutionExp: localhost:9053 sslTargetOverrideUrlSubstitutionExp: peer0.org2.example.com mappedHost: peer0.org2.example.com - pattern: (\w*)peer1.org2.example.com(\w*) urlSubstitutionExp: localhost:10051 eventUrlSubstitutionExp: localhost:10053 sslTargetOverrideUrlSubstitutionExp: peer1.org2.example.com mappedHost: peer1.org2.example.com orderer: - pattern: (\w*)orderer.example.com(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.example.com mappedHost: orderer.example.com certificateAuthorities: ```

nyet (Wed, 23 Jan 2019 10:06:01 GMT):
that actually looks fine

nyet (Wed, 23 Jan 2019 10:08:50 GMT):
where is `peer1.org2.example.com:7051` coming from? it doesn't appear anywhere that i can see

GavitMc (Wed, 23 Jan 2019 10:13:44 GMT):
that it's actually a value I found through debugger. At a certain point the function I mentioned above is called but the comparisons fail because the url format is different, like if it has not been replaced

GavitMc (Wed, 23 Jan 2019 10:13:44 GMT):
that it's actually a value I found through debugger. At a certain point the function I mentioned above is called but the comparisons fail because the urls format is different, like if the have not been replaced

GavitMc (Wed, 23 Jan 2019 10:39:50 GMT):
There is even a post on stackoverflow but I don't get how he solved the issue. But it's exactly the same issue https://stackoverflow.com/questions/53431595/not-able-to-query-the-byfn-via-fabric-sdk-go-due-to-the-error-no-endorsement-c/54310576#54310576

GavitMc (Wed, 23 Jan 2019 12:21:42 GMT):
Does anyone has a working multi-org network app and configuration I can use and then I can install my own chaincode in it? Because I've only found single org example online...with this I could circumvent the issue maybe..

GavitMc (Wed, 23 Jan 2019 14:47:46 GMT):
seems that the replacement defined in entity matchers does not happen...if in the url section i write let's say orderer.example.com:7050 instead of localhost:7050 I receive this error when I run saveChannel in sdk ``` SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050] ```

GavitMc (Wed, 23 Jan 2019 14:52:53 GMT):
I thought this would be replaced by entityMatchers...but doesn't seem so...if I put in the url localhost:7050 channel is saved...I think this the problem that leads to the other issue...is it possible that i have some mapping function disabled?

GavitMc (Wed, 23 Jan 2019 14:52:53 GMT):
I thought this would be replaced by entityMatchers...but doesn't seem so...if I put in the url localhost:7050 channel is saved...I think this is the problem that leads to the other issue...is it possible that i have some mapping function disabled?

dan13 (Wed, 23 Jan 2019 15:48:35 GMT):
Has joined the channel.

nyet (Wed, 23 Jan 2019 16:41:06 GMT):
You can look at mine if you like https://github.com/Blockdaemon/hlf-service-network

nyet (Wed, 23 Jan 2019 16:42:50 GMT):
What is the difference between yours and the original?

nyet (Wed, 23 Jan 2019 16:46:21 GMT):
That function is part of the discovery service client. Can you enable debugging via `client->logging->level` in config.yaml or `CLIENT_CONFIG_LOGGING_LEVEL` in env?

nyet (Wed, 23 Jan 2019 16:46:21 GMT):
Can you enable debugging via `client->logging->level` in config.yaml or `CLIENT_CONFIG_LOGGING_LEVEL` in env?

nyet (Wed, 23 Jan 2019 16:52:36 GMT):
is it failing in `getAdditionalEndorsers`?

nyet (Wed, 23 Jan 2019 16:53:53 GMT):
I think you should put the REAL url in `peers` (not `localhost`) and let the matcher munge it to `localhost` instead.

GavitMc (Wed, 23 Jan 2019 17:22:44 GMT):
@nyet It was failing in`GetEndorsersForChaincode` while performing an invoke. This is with localhost in url in `peers`. If I put the real URL in `peers` I get ``` SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050] ``` this while trying to save the channel...so with this config it is not even able to configure the channel. It seems like the replacement to localhost does not happen

GavitMc (Wed, 23 Jan 2019 17:22:44 GMT):
@nyet It was failing in `GetEndorsersForChaincode` while performing an invoke. This is with localhost in url in `peers`. If I put the real URL in `peers` I get ``` SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050] ``` this while trying to save the channel...so with this config it is not even able to configure the channel. It seems like the replacement to localhost does not happen

nyet (Wed, 23 Jan 2019 17:24:04 GMT):
Thats odd, the whole point to `entityMatchers` is to replace the url wiht the right thing

nyet (Wed, 23 Jan 2019 17:24:24 GMT):
the `url` in `peers` needs to be right or i dont think anything will work

nyet (Wed, 23 Jan 2019 17:24:56 GMT):
can you enable debugging?

GavitMc (Wed, 23 Jan 2019 17:25:39 GMT):
yes of course

nyet (Wed, 23 Jan 2019 17:26:51 GMT):
Also i dont see `peer1.orgx` in `channel->mychannel->peers` is that intentional?

GavitMc (Wed, 23 Jan 2019 17:28:41 GMT):
@nyet should i put all the peers? I thought it was only the anchor peers

nyet (Wed, 23 Jan 2019 17:28:59 GMT):
not sure if it matters. I don't think it should

GavitMc (Wed, 23 Jan 2019 17:29:35 GMT):
I enabled the debugging, what should I do know?

nyet (Wed, 23 Jan 2019 17:29:53 GMT):
lets start by putting in the correct url (not localhost) and seeing why the matcher isn't working

GavitMc (Wed, 23 Jan 2019 17:35:19 GMT):
``` [fabsdk/core] 2019/01/23 17:31:40 UTC - sw.getOptsByConfig -> DEBU Initialized SW cryptosuite [fabsdk/fab] 2019/01/23 17:31:40 UTC - sw.(*fileBasedKeyStore).createKeyStoreIfNotExists -> DEBU KeyStore path [/tmp/chainvote-service-msp/keystore] missing [true]: [] [fabsdk/fab] 2019/01/23 17:31:40 UTC - sw.(*fileBasedKeyStore).createKeyStore -> DEBU Creating KeyStore at [/tmp/chainvote-service-msp/keystore]... [fabsdk/fab] 2019/01/23 17:31:40 UTC - sw.(*fileBasedKeyStore).createKeyStore -> DEBU KeyStore created at [/tmp/chainvote-service-msp/keystore]. [fabsdk/fab] 2019/01/23 17:31:40 UTC - sw.(*fileBasedKeyStore).openKeyStore -> DEBU KeyStore opened at [/tmp/chainvote-service-msp/keystore]...done [fabsdk/fab] 2019/01/23 17:31:40 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU Client is: {Organization:Org1MSP TLSCerts:{Client:{Key:{Path: Pem: bytes:[]} Cert:{Path: Pem: bytes:[]}}}} ```

GavitMc (Wed, 23 Jan 2019 17:35:38 GMT):
``` [fabsdk/fab] 2019/01/23 17:31:40 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU channels are: map[mychannel:{Orderers:[] Peers:map[peer0.org1.example.com:{EndorsingPeer:true ChaincodeQuery:true LedgerQuery:true EventSource:true} peer0.org2.example.com:{EndorsingPeer:true ChaincodeQuery:true LedgerQuery:true EventSource:true}] Policies:{QueryChannelConfig:{MinResponses:1 MaxTargets:1 RetryOpts:{Attempts:5 InitialBackoff:500ms MaxBackoff:5s BackoffFactor:2 RetryableCodes:map[]}}}}] [fabsdk/fab] 2019/01/23 17:31:40 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU organizations are: map[org1msp:{MSPID:Org1MSP CryptoPath:peerOrganizations/org1.example.com/users/{userName}@org1.example.com/msp Users:map[] Peers:[peer0.org1.example.com peer1.org1.example.com] CertificateAuthorities:[]} org2msp:{MSPID:Org2MSP CryptoPath:peerOrganizations/org2.example.com/users/{userName}@org2.example.com/msp Users:map[] Peers:[peer0.org2.example.com peer1.org2.example.com] CertificateAuthorities:[]} ordererorg:{MSPID:OrdererMSP CryptoPath:ordererOrganizations/example.com/users/{username}@example.com/msp Users:map[] Peers:[] CertificateAuthorities:[]}] [fabsdk/fab] 2019/01/23 17:31:40 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU orderers are: map[orderer.example.com:{URL:orderer.example.com:7050 GRPCOptions:map[ssl-target-name-override:orderer.example.com keep-alive-time:0s keep-alive-timeout:20s keep-alive-permit:false fail-fast:false allow-insecure:false] TLSCACerts:{Path:${GOPATH}/src/github.com/chainVote/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem Pem: bytes:[]}}] [fabsdk/fab] 2019/01/23 17:31:40 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU peers are: map[peer1.org2.example.com:{URL:peer1.org2.example.com:10051 EventURL:peer1.org2.example.com:10053 GRPCOptions:map[keep-alive-time:0s keep-alive-timeout:20s keep-alive-permit:false fail-fast:false allow-insecure:false ssl-target-name-override:peer1.org2.example.com] TLSCACerts:{Path:${GOPATH}/src/github.com/chainVote/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem Pem: bytes:[]}} peer0.org1.example.com:{URL:peer0.org1.example.com:7051 EventURL:peer0.org1.example.com:7053 GRPCOptions:map[keep-alive-permit:false fail-fast:false allow-insecure:false ssl-target-name-override:peer0.org1.example.com keep-alive-time:0s keep-alive-timeout:20s] TLSCACerts:{Path:${GOPATH}/src/github.com/chainVote/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem Pem: bytes:[]}} peer1.org1.example.com:{URL:peer1.org1.example.com:8051 EventURL:peer1.org1.example.com:8053 GRPCOptions:map[keep-alive-timeout:20s keep-alive-permit:false fail-fast:false allow-insecure:false ssl-target-name-override:peer1.org1.example.com keep-alive-time:0s] TLSCACerts:{Path:${GOPATH}/src/github.com/chainVote/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem Pem: bytes:[]}} peer0.org2.example.com:{URL:peer0.org2.example.com:9051 EventURL:peer0.org2.example.com:9053 GRPCOptions:map[keep-alive-timeout:20s keep-alive-permit:false fail-fast:false allow-insecure:false ssl-target-name-override:peer0.org2.example.com keep-alive-time:0s] TLSCACerts:{Path:${GOPATH}/src/github.com/chainVote/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem Pem: bytes:[]}}] ```

GavitMc (Wed, 23 Jan 2019 17:36:16 GMT):
``` [fabsdk/fab] 2019/01/23 17:31:40 UTC - fab.(*EndpointConfig).compileMatchers -> DEBU Matchers are: {matchers:map[peer:[{Pattern:(\w*)peer0.org1.example.com(\w*) URLSubstitutionExp:localhost:7051 EventURLSubstitutionExp:localhost:7053 SSLTargetOverrideURLSubstitutionExp:peer0.org1.example.com MappedHost:peer0.org1.example.com MappedName:} {Pattern:(\w*)peer1.org1.example.com(\w*) URLSubstitutionExp:localhost:8051 EventURLSubstitutionExp:localhost:8053 SSLTargetOverrideURLSubstitutionExp:peer1.org1.example.com MappedHost:peer1.org1.example.com MappedName:} {Pattern:(\w*)peer0.org2.example.com(\w*) URLSubstitutionExp:localhost:9051 EventURLSubstitutionExp:localhost:9053 SSLTargetOverrideURLSubstitutionExp:peer0.org2.example.com MappedHost:peer0.org2.example.com MappedName:} {Pattern:(\w*)peer1.org2.example.com:(\w*) URLSubstitutionExp:localhost:10051 EventURLSubstitutionExp:localhost:10053 SSLTargetOverrideURLSubstitutionExp:peer1.org2.example.com MappedHost:peer1.org2.example.com MappedName:}] orderer:[{Pattern:(\w*)orderer.example.com(\w*) URLSubstitutionExp:localhost:7050 EventURLSubstitutionExp: SSLTargetOverrideURLSubstitutionExp:orderer.example.com MappedHost:orderer.example.com MappedName:}]]} [fabsdk/core] 2019/01/23 17:31:40 UTC - tls.(*certPool).loadSystemCertPool -> DEBU Loaded system cert pool of size: 174 [fabsdk/msp] 2019/01/23 17:31:40 UTC - msp.(*IdentityConfig).loadIdentityConfigEntities -> DEBU Client is: {Organization:Org1MSP Logging:{Level:debug} CryptoConfig:{Path:${GOPATH}/src/github.com/chainVote/crypto-config} TLSCerts:{Client:{Key:{Path: Pem: bytes:[]} Cert:{Path: Pem: bytes:[]}}} CredentialStore:{Path:/tmp/chainvote-service-store CryptoStore:{Path:/tmp/chainvote-service-msp}}} ```

GavitMc (Wed, 23 Jan 2019 17:36:22 GMT):
``` [fabsdk/msp] 2019/01/23 17:31:40 UTC - msp.(*IdentityConfig).loadIdentityConfigEntities -> DEBU organizations are: map[org2msp:{MSPID:Org2MSP CryptoPath:peerOrganizations/org2.example.com/users/{userName}@org2.example.com/msp Users:map[] Peers:[peer0.org2.example.com peer1.org2.example.com] CertificateAuthorities:[]} ordererorg:{MSPID:OrdererMSP CryptoPath:ordererOrganizations/example.com/users/{username}@example.com/msp Users:map[] Peers:[] CertificateAuthorities:[]} org1msp:{MSPID:Org1MSP CryptoPath:peerOrganizations/org1.example.com/users/{userName}@org1.example.com/msp Users:map[] Peers:[peer0.org1.example.com peer1.org1.example.com] CertificateAuthorities:[]}] [fabsdk/msp] 2019/01/23 17:31:40 UTC - msp.(*IdentityConfig).loadIdentityConfigEntities -> DEBU certificateAuthorities are: map[] [fabsdk/msp] 2019/01/23 17:31:40 UTC - msp.(*IdentityConfig).compileMatchers -> DEBU Matchers are: {matchers:map[peer:[{Pattern:(\w*)peer0.org1.example.com(\w*) URLSubstitutionExp:localhost:7051 MappedHost:peer0.org1.example.com MappedName:} {Pattern:(\w*)peer1.org1.example.com(\w*) URLSubstitutionExp:localhost:8051 MappedHost:peer1.org1.example.com MappedName:} {Pattern:(\w*)peer0.org2.example.com(\w*) URLSubstitutionExp:localhost:9051 MappedHost:peer0.org2.example.com MappedName:} {Pattern:(\w*)peer1.org2.example.com:(\w*) URLSubstitutionExp:localhost:10051 MappedHost:peer1.org2.example.com MappedName:}] orderer:[{Pattern:(\w*)orderer.example.com(\w*) URLSubstitutionExp:localhost:7050 MappedHost:orderer.example.com MappedName:}]]} [fabsdk/client] 2019/01/23 17:31:40 UTC - resmgmt.(*Client).SaveChannel -> DEBU saving channel: mychannel [fabsdk/fab] 2019/01/23 17:31:40 UTC - txn.CreateChannelHeader -> DEBU buildChannelHeader - headerType: CONFIG_UPDATE channelID: mychannel txID: %!d(fab.TransactionID=ca87bca8778b39d65a16f6eac54f25fc49374808bee79cb146c4d7836d4aeaac) epoch: haincodeID: timestamp: 0001-01-01 00:00:00 +0000 UTC [fabsdk/fab] 2019/01/23 17:31:40 UTC - txn.sendBroadcast -> DEBU Broadcasting envelope to orderer :orderer.example.com:7050 [fabsdk/fab] 2019/01/23 17:31:40 UTC - comm.(*CachingConnector).DialContext -> DEBU DialContext: orderer.example.com:7050 [fabsdk/fab] 2019/01/23 17:31:40 UTC - comm.(*CachingConnector).createConn -> DEBU creating connection [orderer.example.com:7050] [fabsdk/fab] 2019/01/23 17:31:40 UTC - comm.(*CachingConnector).createConn -> DEBU storing connection [orderer.example.com:7050] [fabsdk/fab] 2019/01/23 17:31:55 UTC - txn.sendBroadcast -> DEBU Receive Error Response from orderer :Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050] [fabsdk/common] 2019/01/23 17:31:55 UTC - retry.(*RetryableInvoker).Invoke -> DEBU Failed with err [SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050]] on attempt #1. Checking if retry is warranted... [fabsdk/common] 2019/01/23 17:31:55 UTC - retry.(*RetryableInvoker).Invoke -> DEBU ... retry for err [SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050]] is NOT warranted after %!d(MISSING) attempt(s). Unable to initialize the Fabric SDK: failed to save channel: create channel failed: SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050] ```

GavitMc (Wed, 23 Jan 2019 17:38:05 GMT):
@nyet The error happens while trying to save the channel, probably the last part of the log (last message) should have something that is interesting

nyet (Wed, 23 Jan 2019 17:42:51 GMT):
with my matchers i get ` [fabsdk/fab] 2019/01/23 17:42:17 UTC - txn.sendEnvelope -> DEBU Broadcasting envelope to orderer :localhost:7050`

GavitMc (Wed, 23 Jan 2019 17:43:19 GMT):
what are your matchers?

nyet (Wed, 23 Jan 2019 17:43:33 GMT):
``` orderer: - pattern: (\w*)orderer0.hlf.blockdaemon.io(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer0.hlf.blockdaemon.io mappedHost: orderer0.hlf.blockdaemon.io ```

nyet (Wed, 23 Jan 2019 17:43:33 GMT):
``` orderer: - pattern: (\w*)orderer0.hlf.blockdaemon.io(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer0.hlf.blockdaemon.io mappedHost: orderer0.hlf.blockdaemon.io ```

nyet (Wed, 23 Jan 2019 17:43:33 GMT):
``` orderer: - pattern: (\w*)orderer0.hlf.blockdaemon.io(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer0.hlf.blockdaemon.io mappedHost: orderer0.hlf.blockdaemon.io ```

nyet (Wed, 23 Jan 2019 17:43:33 GMT):
``` entityMatchers: ... orderer: - pattern: (\w*)orderer0.hlf.blockdaemon.io(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer0.hlf.blockdaemon.io mappedHost: orderer0.hlf.blockdaemon.io ```

nyet (Wed, 23 Jan 2019 17:43:52 GMT):
```orderers: orderer0.hlf.blockdaemon.io: url: orderer0.hlf.blockdaemon.io:7050 # these are standard properties defined by the gRPC library # they will be passed in as-is to gRPC client constructor grpcOptions: ssl-target-name-override: orderer0.hlf.blockdaemon.io tlsCACerts: # Certificate location absolute path path: /home/nyet/go/src/github.com/Blockdaemon/hlf-service-network/crypto-config/ordererOrganizations/hlf.blockdaemon.io/tlsca/tlsca.hlf.blockdaemon.io-cert.pem ```

GavitMc (Wed, 23 Jan 2019 17:45:48 GMT):
``` orderer: - pattern: (\w*)orderer.example.com(\w*) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.example.com mappedHost: orderer.example.com ```

GavitMc (Wed, 23 Jan 2019 17:46:27 GMT):
``` orderers: orderer.example.com: url: orderer.example.com:7050 # these are standard properties defined by the gRPC library # they will be passed in as-is to gRPC client constructor grpcOptions: ssl-target-name-override: orderer.example.com # These parameters should be set in coordination with the keepalive policy on the server, # as incompatible settings can result in closing of connection. # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs allow-insecure: false tlsCACerts: # Certificate location absolute path path: ${GOPATH}/src/github.com/chainVote/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem ```

nyet (Wed, 23 Jan 2019 17:46:49 GMT):
```$ egrep -a \(orderer\|7050\) log [fabsdk/fab] 2019/01/23 17:42:17 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU orderers are: map[orderer0.hlf.blockdaemon.io:{URL:orderer0.hlf.blockdaemon.io:7050 GRPCOptions:map[ssl-target-name-override:orderer0.hlf.blockdaemon.io] TLSCACerts:{Path:/home/nyet/go/src/github.com/Blockdaemon/hlf-service-network/crypto-config/ordererOrganizations/hlf.blockdaemon.io/tlsca/tlsca.hlf.blockdaemon.io-cert.pem Pem: bytes:[]}}] [fabsdk/fab] 2019/01/23 17:42:17 UTC - fab.(*EndpointConfig).compileMatchers -> DEBU Matchers are: {matchers:map[peer:[{Pattern:(\w*)peer0.prod.hlf.blockdaemon.io(\w*) URLSubstitutionExp:localhost:7051 SSLTargetOverrideURLSubstitutionExp:peer0.prod.hlf.blockdaemon.io MappedHost:peer0.prod.hlf.blockdaemon.io MappedName: IgnoreEndpoint:false} {Pattern:(\w*)peer1.prod.hlf.blockdaemon.io(\w*) URLSubstitutionExp:localhost:8051 SSLTargetOverrideURLSubstitutionExp:peer1.prod.hlf.blockdaemon.io MappedHost:peer1.prod.hlf.blockdaemon.io MappedName: IgnoreEndpoint:false}] orderer:[{Pattern:(\w*)orderer0.hlf.blockdaemon.io(\w*) URLSubstitutionExp:localhost:7050 SSLTargetOverrideURLSubstitutionExp:orderer0.hlf.blockdaemon.io MappedHost:orderer0.hlf.blockdaemon.io MappedName: IgnoreEndpoint:false}] certificateauthorities:[{Pattern:(\w*)ca.prod.hlf.blockdaemon.io(\w*) URLSubstitutionExp:http://localhost:7054 SSLTargetOverrideURLSubstitutionExp: MappedHost:ca.prod.hlf.blockdaemon.io MappedName: IgnoreEndpoint:false}]]} [fabsdk/msp] 2019/01/23 17:42:17 UTC - msp.(*IdentityConfig).compileMatchers -> DEBU Matchers are: {matchers:map[certificateauthorities:[{Pattern:(\w*)ca.prod.hlf.blockdaemon.io(\w*) URLSubstitutionExp:http://localhost:7054 SSLTargetOverrideURLSubstitutionExp: MappedHost:ca.prod.hlf.blockdaemon.io MappedName: IgnoreEndpoint:false}] peer:[{Pattern:(\w*)peer0.prod.hlf.blockdaemon.io(\w*) URLSubstitutionExp:localhost:7051 SSLTargetOverrideURLSubstitutionExp:peer0.prod.hlf.blockdaemon.io MappedHost:peer0.prod.hlf.blockdaemon.io MappedName: IgnoreEndpoint:false} {Pattern:(\w*)peer1.prod.hlf.blockdaemon.io(\w*) URLSubstitutionExp:localhost:8051 SSLTargetOverrideURLSubstitutionExp:peer1.prod.hlf.blockdaemon.io MappedHost:peer1.prod.hlf.blockdaemon.io MappedName: IgnoreEndpoint:false}] orderer:[{Pattern:(\w*)orderer0.hlf.blockdaemon.io(\w*) URLSubstitutionExp:localhost:7050 SSLTargetOverrideURLSubstitutionExp:orderer0.hlf.blockdaemon.io MappedHost:orderer0.hlf.blockdaemon.io MappedName: IgnoreEndpoint:false}]]} [fabsdk/fab] 2019/01/23 17:42:17 UTC - txn.sendEnvelope -> DEBU Broadcasting envelope to orderer :localhost:7050 [fabsdk/fab] 2019/01/23 17:42:17 UTC - comm.(*CachingConnector).DialContext -> DEBU DialContext: localhost:7050 [fabsdk/fab] 2019/01/23 17:42:17 UTC - comm.(*CachingConnector).createConn -> DEBU creating connection [localhost:7050] [fabsdk/fab] 2019/01/23 17:42:17 UTC - comm.(*CachingConnector).createConn -> DEBU storing connection [localhost:7050] [fabsdk/fab] 2019/01/23 17:42:17 UTC - comm.(*CachingConnector).openConn -> DEBU connection was opened [localhost:7050] [fabsdk/fab] 2019/01/23 17:42:17 UTC - orderer.(*Orderer).SendDeliver -> DEBU Requesting blocks from ordering service [fabsdk/fab] 2019/01/23 17:42:17 UTC - orderer.blockStream -> DEBU Received block from ordering service [fabsdk/fab] 2019/01/23 17:42:17 UTC - orderer.blockStream -> DEBU Received deliver response status from ordering service: SUCCESS [fabsdk/fab] 2019/01/23 17:42:17 UTC - comm.(*CachingConnector).ReleaseConn -> DEBU ReleaseConn [localhost:7050] [fabsdk/fab] 2019/01/23 17:42:17 UTC - comm.(*CachingConnector).flush -> DEBU flushing connection [localhost:7050] ```

GavitMc (Wed, 23 Jan 2019 17:46:51 GMT):
seems the same :O

nyet (Wed, 23 Jan 2019 17:47:11 GMT):
are you using `master` of the sdk

GavitMc (Wed, 23 Jan 2019 17:50:09 GMT):
It should be like that I just ran `go get -u github.com/hyperledger/fabric-sdk-go` to get the sdk. I've actually vendored it in application folder but it should have nothing to do with this

nyet (Wed, 23 Jan 2019 17:50:09 GMT):
those logs aren't of invoke though

nyet (Wed, 23 Jan 2019 17:50:20 GMT):
lemme run an invoke

nyet (Wed, 23 Jan 2019 17:50:24 GMT):
sec

GavitMc (Wed, 23 Jan 2019 17:51:02 GMT):
@nyet neither mine...if I put the real urls in `peer` I am not even able to save the channel

nyet (Wed, 23 Jan 2019 17:53:30 GMT):
are you using `WithOrdererEndpoint` on your `resmgmt.Client` calls

nyet (Wed, 23 Jan 2019 17:54:00 GMT):
``` req := resmgmt.SaveChannelRequest{ChannelID: setup.ChannelID, ChannelConfigPath: setup.ChannelConfig, SigningIdentities: []msp.SigningIdentity{*setup.adminIdentity}} txID, err := setup.resClient.SaveChannel(req, resmgmt.WithOrdererEndpoint(setup.OrdererID)) ```

GavitMc (Wed, 23 Jan 2019 17:55:24 GMT):
``` req := resmgmt.SaveChannelRequest{ChannelID: setup.ChannelID, ChannelConfigPath: setup.ChannelConfig, SigningIdentities: []msp.SigningIdentity{org1AdminUser, org2AdminUser}} txID, err := chMgmtClient.SaveChannel(req, resmgmt.WithRetry(retry.DefaultResMgmtOpts), resmgmt.WithOrdererEndpoint("orderer.example.com")) ```

GavitMc (Wed, 23 Jan 2019 17:55:44 GMT):
mine it's like that

nyet (Wed, 23 Jan 2019 17:55:48 GMT):
weird

GavitMc (Wed, 23 Jan 2019 17:58:17 GMT):
I copy pasted from `multiple_orgs_test.go`

nyet (Wed, 23 Jan 2019 18:05:07 GMT):
I can't figure it out; youll have to add debug code to the matcher and see why it isn't subsituting localhost like it should

GavitMc (Wed, 23 Jan 2019 18:09:43 GMT):
where should the replacement actually happen? I don't know how to debug this.. and if I want to use your multi org app and just put my chaincode where is it? the one you linked me seems without config.yaml for sdk.. p.s thank you very much for all the help

nyet (Wed, 23 Jan 2019 18:13:02 GMT):
its not multiorg unfortunately, but i dont think you are having a multi org problem

nyet (Wed, 23 Jan 2019 18:13:43 GMT):
sorry there is two parts to my thing https://github.com/Blockdaemon/hlf-database-app is the app side

nyet (Wed, 23 Jan 2019 18:14:12 GMT):
i'd back out to single org for now and see if you can get the matchers working

GavitMc (Wed, 23 Jan 2019 18:15:10 GMT):
thank you, actually I have also already run that tutorial on chainhero...but the weird thing is that it works but it has the localhosts in the url is config.yaml file

nyet (Wed, 23 Jan 2019 18:15:26 GMT):
well the matchers will always overwrite it anyway

nyet (Wed, 23 Jan 2019 18:15:29 GMT):
(or should)

GavitMc (Wed, 23 Jan 2019 18:18:22 GMT):
in which part of the code should the replace of the url happen?

nyet (Wed, 23 Jan 2019 18:19:02 GMT):
that i don't know, unfortunately, i'd have to dig around.

GavitMc (Wed, 23 Jan 2019 18:23:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hckiNq4wYwmk2co2v) @nyet does it overwrite even in the opposite direction? I mean when i put the localhost in the url it does not work but for the invoke, i am wondering why the invoke on the example is working

GavitMc (Wed, 23 Jan 2019 18:23:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hckiNq4wYwmk2co2v) @nyet does it overwrite even in the opposite direction? I mean when i put the localhost in the url it does not work for the invoke but it works for saving the channel and other previous stuff, i am wondering why the invoke on the example is working

GavitMc (Wed, 23 Jan 2019 18:23:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=hckiNq4wYwmk2co2v) @nyet does it overwrite even in the opposite direction? I mean when i put the localhost in the url it does not work for the invoke but it works for saving the channel and other previous stuff, i am wondering why the invoke on the chainhero example is working

nyet (Wed, 23 Jan 2019 18:24:44 GMT):
Because the invoke goes to the peer, not the orderer

nyet (Wed, 23 Jan 2019 18:24:54 GMT):
invoke is a normal client call

nyet (Wed, 23 Jan 2019 18:25:02 GMT):
not a resmgmt call (i think)

GavitMc (Wed, 23 Jan 2019 18:28:19 GMT):
I mean my code fails because the url is `localhost` and `peer.x` but I don't get why in the same point of the code the other one should not have `localhost` as me. I think the replacement is `peer.x-->localhost` not also the opposite right?

GavitMc (Wed, 23 Jan 2019 18:28:19 GMT):
I mean my code fails because the url is `localhost` and not `peer.x` but I don't get why in the same point of the code the other one should not have `localhost` as me. I think the replacement is `peer.x-->localhost` not also the opposite right?

nyet (Wed, 23 Jan 2019 18:28:31 GMT):
yes

nyet (Wed, 23 Jan 2019 18:28:56 GMT):
the matcher is ONLY for the very top level repleacment (its a hack around docker being stupid and not having real dns entries)

nyet (Wed, 23 Jan 2019 18:29:24 GMT):
its only to remap an endpoint to a docker endpoint, which is always localhost and might be a weird port

GavitMc (Wed, 23 Jan 2019 18:31:20 GMT):
still don't get then why the other one is working putting localhost in url and mine it's not lol

nyet (Wed, 23 Jan 2019 18:37:50 GMT):
Me neither

nyet (Wed, 23 Jan 2019 18:42:04 GMT):
@troyronda @Baha-sk Really simple PR, can you approve? https://gerrit.hyperledger.org/r/#/c/28929/ thx

troyronda (Wed, 23 Jan 2019 20:02:50 GMT):
@nyet done

nyet (Thu, 24 Jan 2019 03:36:00 GMT):
@troyronda Thanks!

rootDistress (Thu, 24 Jan 2019 07:40:42 GMT):
In my consortium, Assume I have two orgs, I dynamically created a channel with org1 in it then added Org2 to the channel, I now want to remove org2 from the channel, Here If I use Org2 to fetch the Config Block from the orderer like ``` clientContext := setup.sdk.Context(fabsdk.WithUser("Admin"), fabsdk.WithOrg(strings.ToLower("Org2"))) org2Peers, err := DiscoverLocalPeers(clientContext) if err != nil { return errors.WithMessage(err, "failed to create new channel client by"+Org2), nil } channelClientCtx := setup.sdk.ChannelContext(setup.ChannelID, fabsdk.WithUser("Admin"), fabsdk.WithOrg("Org2")) ledgerClient, err := ledger.New(channelClientCtx) if err != nil { return errors.Wrap(err, "failed to get ledger"), nil } chCfg, err := ledgerClient.QueryConfig(ledger.WithTargets(org0Peers[0])) block, err := ledgerClient.QueryBlock(chCfg.BlockNumber(), ledger.WithTargets(org0Peers[0])) if err != nil { return errors.Wrap(err, "failed to get block"), nil } ``` I get error as ``` [fabsdk/fab] 2019/01/24 07:09:56 UTC - membership.(*identityImpl).Validate -> ERRO failed to deserialize identity: MSP org2.example.com is unknown Unable Get Orgs From Channel: failed to get block: QueryBlock failed: failed to verify response from localhost:8051: Endorser Client Status Code: (8) SIGNATURE_VERIFICATION_FAILED. Description: the creator certificate is not valid ``` The thing is this works fine when I use Org1 to get block

rootDistress (Thu, 24 Jan 2019 07:42:52 GMT):
Can someone please suggest possible solution?

rootDistress (Thu, 24 Jan 2019 08:32:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KFzSpHgckvXf5LcYJ) Update: If I create channel with Org2 first then add Org1 the situation is reversed, i.e org1 not able to fetch block

rootDistress (Thu, 24 Jan 2019 08:32:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KFzSpHgckvXf5LcYJ) Update: If I create channel with Org2 first then add Org1 the situation is reversed, i.e org1 not able to fetch block

rootDistress (Thu, 24 Jan 2019 08:32:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=KFzSpHgckvXf5LcYJ) Update: If I create channel with Org2 first then add Org1 the situation is reversed, i.e org1 not able to fetch block also If I create a cli with org1 msp content then I'm able to fetch block from docker but not sdk.

phantom.assasin (Thu, 24 Jan 2019 11:51:51 GMT):
Hi, Is there any way to fetch a node info using the sdk?

phantom.assasin (Thu, 24 Jan 2019 11:52:29 GMT):
I came across, ```comm.NetworkPeerConfig``` Does this fetches the peer config from the network?

allanlee2019 (Thu, 24 Jan 2019 17:14:11 GMT):
Has joined the channel.

nyet (Thu, 24 Jan 2019 20:40:07 GMT):
@troyronda @Baha-sk Can you guys take a peek here and give me feedback? or maybe pass it along to somebody who can tell me more about the ca-server config section? I'm new to all of this and I can't make head or tail of what proper behavoir SHOULD be in the sdk https://gerrit.hyperledger.org/r/#/c/28878/11/pkg/msp/identityconfig.go@321

troyronda (Thu, 24 Jan 2019 20:53:47 GMT):
@aleksandar.likic might have some pointers

nyet (Fri, 25 Jan 2019 01:12:39 GMT):
@troyronda yea I backed out some stuff and opened https://jira.hyperledger.org/browse/FABG-817

nyet (Fri, 25 Jan 2019 01:30:41 GMT):
@troyronda Also house cleaning JIRA. Hopefully I dont break anything :)

rootDistress (Fri, 25 Jan 2019 07:06:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CrwB7fzT9X8gEooNT) I was able to fix this, If anyone is interested I overrode the default CA from config.yaml using https://github.com/hyperledger/fabric-sdk-go/blob/cb4ad138c14fd98039c56ab6301e665254a930bc/test/integration/e2e/configless/endpointconfig_override_test.go and Ensured that the sdk re-initialization was done correctly. Not exactly sure where the problem was.

Maxim_Samarin (Fri, 25 Jan 2019 07:55:19 GMT):
Has joined the channel.

Maxim_Samarin (Fri, 25 Jan 2019 07:57:02 GMT):
Hello all, I’m learning hyperledger fabric and during testing I noted that Golang sdk for hyperledger allows to do only syncronious (modification) calls to fabric. Am I correct? Here is explanation. I have deployed “fabcar” example and tested different approaches of working with chaincode. My client is written on Golang so I’m using Go-sdk to connect to ledger. I have subscribed on block events, to receive notification, when new block is attached to the ledger. During chaincode invokation with adding new data into ledger, I noted that block event is received earlier than code, which invoked ledger change, finished. For example: First in code I’m registering block event listener: breg, beventch, err := eventClient.RegisterBlockEvent() … select { case e, ok := <-beventch: if ok { log.Println("Block event is received") } … And then invoking chaincode to update ledger: response, err = chClient.Execute(channel.Request{ ChaincodeID: chaincode_id, Fcn: fcn, Args: args, }, channel.WithRetry(retry.DefaultChannelOpts)) log.Print("HLF Invoking ended") And output appeares in this order: “Block event is received” “HLF Invoking ended” I.e. new block event is received earlier than code which “created” that block finishes. It looks strange for me, because I thought, that we just send request to orderer service and not waiting competion of transaction. But it looks like in this request there is a waiting until tx(new block) will be added into ledger. During sdk investigation I found, that code, which sends a proposal to orderer, subscribes on transaction event and waits until transaction status is received. I.e. transaction is commited. Code links: Initial invoke from my code: channel.Execute() line 108: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/chclient.go Send proposal from go-sdk: invoke.Handle() line 167: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go Here on line 171 it subscribes on tx event: reg, statusNotifier, err := clientContext.EventService.RegisterTxStatusEvent(string(txnID)) Then sends TX to orderer: _, err = createAndSendTransaction(clientContext.Transactor, requestContext.Response.Proposal, requestContext.Response.Responses) And wait until tx event is received: select { case txStatus := <-statusNotifier: o Is my understanding correct and “Execute” method is syncronius and it will return response only after transaction is commited to ledger, i.e. new block is added to chain? o To make is async it’s possible to run “Execute” in separate go routine, but the process will live untill transaction is commited. I.e. if I run 1000 txs, in memory will be 1000 processes which will run at the same time. So if it’s necessary 1 hour to get reponse from all of them, but I send new request (# 1001), it will stuck untill these 1000 txs are processed. Am I right? o Is that possible to do an async request? Is it necessary override "Execute" method and manually send requests to peers, collect responses and then send propsal request to orderer(without subscribing on tx events). Correct? Thanks in advance for help.

Rajatsharma (Fri, 25 Jan 2019 10:10:46 GMT):
Has anyone used `GetQueryResultWithPagination()` ?

Rajatsharma (Fri, 25 Jan 2019 10:10:55 GMT):
or anyone could help me with a example or a sample code for the same.

Kyroy (Fri, 25 Jan 2019 11:58:33 GMT):
There is a larger problem with the recently introduced access denied handling. The SDK also disconnects when a channel is not available at the peer because of the access denied error. https://jira.hyperledger.org/projects/FABG/issues/FABG-818

iserikov (Fri, 25 Jan 2019 12:41:21 GMT):
Has joined the channel.

e-nikolov (Fri, 25 Jan 2019 17:24:57 GMT):
We are using the IBM Managed Blockchain based on fabric 1.2, and using the Go SDK @5e291d3a34f59beb9a8ae2bcbba388515648dc73. When we try to invoke the chaincode we have installed on the peers, we get a "no peers to connect to" error: [fabsdk/fab] 2019/01/25 12:25:57 UTC - dispatcher.(*Dispatcher).Start.func1 -> DEBU Listening for events... [fabsdk/fab] 2019/01/25 12:25:57 UTC - client.(*Client).connect -> DEBU ... got error in connection response: no peers to connect to [fabsdk/common] 2019/01/25 12:25:57 UTC - retry.(*RetryableInvoker).Invoke -> DEBU Failed with err [error registering for TxStatus event: no peers to connect to] on attempt #1. Checking if retry is warranted... [fabsdk/util] 2019/01/25 12:25:57 UTC - lazyref.(*Reference).setTimerRunning -> DEBU Timer started [fabsdk/common] 2019/01/25 12:25:57 UTC - retry.(*RetryableInvoker).Invoke -> DEBU ... retry for err [error registering for TxStatus event: no peers to connect to] is NOT warranted after 1 attempt(s). [fabsdk/util] 2019/01/25 12:25:57 UTC - lazyref.checkTimeStarted -> DEBU Starting timer After putting some extra logging of our own it looks like the failure happens because the peer discovery service (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/common/discovery/dynamicdiscovery/chservice.go#L72) doesn't return any peers in its response. The targets seem to be set correctly. After dumping the GRPC response, we get (*discovery.Response)(0xc4205cd600)(results: > > > ) We also set up a different fabric network on our own with the same chaincode, which works properly and the same dump shows this instead (some parts were redacted): " > membership_info:" > identity:"" > peers:" signature:"" > membership_info:" signature:"" > identity:"" > > > peers_by_org:" signature:"" > membership_info:" > identity:"" > peers:" signature:"" > membership_info:" signature:"" > identity:"" > > > > > I am unsure if the issue is in the configuration of the SDK or the IBM Managed fabric network. Has anyone seen this behaviour before? I searched the rocket chat for the "no peers to connect to" error, and some results came up, but they seemed to be caused by other reasons, such as the peers being excluded by the sdk, not due to the response to the discovery request.

e-nikolov (Fri, 25 Jan 2019 17:24:57 GMT):
We are using the IBM Managed Blockchain based on fabric 1.2, and using the Go SDK @5e291d3a34f59beb9a8ae2bcbba388515648dc73. When we try to invoke the chaincode we have installed on the peers, we get a "no peers to connect to" error: [fabsdk/fab] 2019/01/25 12:25:57 UTC - dispatcher.(*Dispatcher).Start.func1 -> DEBU Listening for events... [fabsdk/fab] 2019/01/25 12:25:57 UTC - client.(*Client).connect -> DEBU ... got error in connection response: no peers to connect to [fabsdk/common] 2019/01/25 12:25:57 UTC - retry.(*RetryableInvoker).Invoke -> DEBU Failed with err [error registering for TxStatus event: no peers to connect to] on attempt #1. Checking if retry is warranted... [fabsdk/util] 2019/01/25 12:25:57 UTC - lazyref.(*Reference).setTimerRunning -> DEBU Timer started [fabsdk/common] 2019/01/25 12:25:57 UTC - retry.(*RetryableInvoker).Invoke -> DEBU ... retry for err [error registering for TxStatus event: no peers to connect to] is NOT warranted after 1 attempt(s). [fabsdk/util] 2019/01/25 12:25:57 UTC - lazyref.checkTimeStarted -> DEBU Starting timer After putting some extra logging of our own it looks like the failure happens because the peer discovery service (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/common/discovery/dynamicdiscovery/chservice.go#L72) doesn't return any peers in its response. The targets seem to be set correctly. After dumping the GRPC response, we get (*discovery.Response)(0xc4205cd600)(results: > > > ) We also set up a different fabric network on our own with the same chaincode, which works properly and the same dump shows this instead (some parts were redacted): " > membership_info:" > identity:"" > peers:" signature:"" > membership_info:" signature:"" > identity:"" > > > peers_by_org:" signature:"" > membership_info:" > identity:"" > peers:" signature:"" > membership_info:" signature:"" > identity:"" > > > > > I am unsure if the issue is in the configuration of the SDK or the IBM Managed fabric network. If it is the IBM network, then it seems that somehow the peers aren't aware that they are members of an organization. Has anyone seen this behaviour before? I searched the rocket chat for the "no peers to connect to" error, and some results came up, but they seemed to be caused by other reasons, such as the peers being excluded by the sdk, not due to the response to the discovery request.

jellevdp (Fri, 25 Jan 2019 17:46:44 GMT):
@mastersingh24 or any other IBMer that can help with this?

nyet (Fri, 25 Jan 2019 18:51:31 GMT):
@troyronda another easy one... https://gerrit.hyperledger.org/r/#/c/28960/ TIA :)

nyet (Fri, 25 Jan 2019 18:51:31 GMT):
@troyronda some more easy ones... https://gerrit.hyperledger.org/r/#/c/28960/ https://gerrit.hyperledger.org/r/#/c/28961/ TIA :)

yacovm (Fri, 25 Jan 2019 20:03:44 GMT):
@e-nikolov are you using starter plan?

yacovm (Fri, 25 Jan 2019 20:04:35 GMT):
You need to configure anchor peers and make the peers have external endpoints, @e-nikolov

e-nikolov (Fri, 25 Jan 2019 21:37:22 GMT):
@yacovm is this something that can be done via the SDK, or does it need to happen in the configuration of the peer?

yacovm (Fri, 25 Jan 2019 21:52:19 GMT):
@e-nikolov in the configuration of the peers

yacovm (Fri, 25 Jan 2019 21:52:26 GMT):
I answered you on stackoverflow

andrew-zubko (Sat, 26 Jan 2019 02:39:21 GMT):
Has joined the channel.

Moolkothari (Sat, 26 Jan 2019 12:35:01 GMT):
Has joined the channel.

Moolkothari (Sat, 26 Jan 2019 13:27:42 GMT):
Hello guy I have installed chiancode written in Go , I can instantiate , invoke the chaincode using CLI, it is working fine, How I can create REST APIs for all the operations I am doing in chiancode, can anybody assist me?

troyronda (Sat, 26 Jan 2019 16:23:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zyKMdPpjta2cXt3HL) @nyet Done

nyet (Sat, 26 Jan 2019 16:41:04 GMT):
@troyronda i was looking for a good place to put those port constants

nyet (Sat, 26 Jan 2019 16:41:09 GMT):
any advice?

nyet (Sat, 26 Jan 2019 16:41:19 GMT):
in each file or is there a good global place for them

Swarnalatha (Mon, 28 Jan 2019 09:14:01 GMT):
Has joined the channel.

rootDistress (Mon, 28 Jan 2019 13:46:45 GMT):
In here https://docs.oracle.com/en/cloud/paas/blockchain-cloud/user/manage-channels.html#GUID-C1BCCB26-0901-4DC1-B8AC-547ED407CDCE at point 5 `MSP ID ACL `it mentions org permission always set to `ReaderWriter` and other members can be set to `ReaderOnly`. What does this mean? Read what ? I read through https://hyperledger-fabric.readthedocs.io/en/release-1.3/access_control.html and realized we can make policies for org, peers and create new policies and set them using channel config. However, I didn't understand how did we decide who will be in readers, writers? as the configtx.yaml specifies mspid.member or mspid.admin for each of the policy in the org. How is the member mapped to the peer ? or am I missing something big and simple here?

nyet (Mon, 28 Jan 2019 14:37:25 GMT):
As I understand it, peers can only endorse, query, and get events. `ReaderWriter` and `ReaderOnly` would be for users (signing entities) only

Swarnalatha (Tue, 29 Jan 2019 06:11:47 GMT):
Iam trying to install go sdk but iam getting an error while make . in check_version.sh script GO_MIN_VER is not specified in ci.properties properly

Swarnalatha (Tue, 29 Jan 2019 06:12:45 GMT):
has anybody got such type of error . please suggest...

Swarnalatha (Tue, 29 Jan 2019 06:14:03 GMT):
but GO_MIN_VER is specified in ci.properties file.

rootDistress (Tue, 29 Jan 2019 07:00:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jcBP94H5RMRhWXAAm) @nyet So, If i skip the `Writers` policy in the org declaration in `configtx.yaml`, I'm essentially making it ReadOnly ?

rootDistress (Tue, 29 Jan 2019 07:09:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=LXM37nYBNtgAoz28R) @Swarnalatha Please provide more info like from where are you installing it? I would recommend using official docs, Read through https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html to install fabric and use https://chainhero.io/2018/04/tutorial-hyperledger-fabric-how-to-build-your-first-network/ to install go-sdk.

DieYoungWsn (Tue, 29 Jan 2019 08:44:34 GMT):
Has joined the channel.

DieYoungWsn (Tue, 29 Jan 2019 08:44:45 GMT):
I meet a problem when invokes chaincode, error is "no endorsement combination can be satisfied", anyone help me ?

aneb (Thu, 31 Jan 2019 00:38:37 GMT):
@DieYoungWsn It can be many problems. It is a high level error message and in some cases masks the cause of the real problem. Either way, either you have actually not matched the endorsement policy that you set when instantiating the chaincode. (not enough peers, too strict endorsement policy, etc) If you think there is actually nothing wrong with your endorsement policy I bet that the problem is the CORE_PEER_GOSSIP_EXTERNALENDPOINT and CORE_PEER_GOSSIP_BOOTSTRAP settings in your docker compose file that are missing are not correct. If those settings are wrong the SDK is telling you the endorsement policy cannot be satisfied. Which is true, however the real problem is that your discovery service is not able to find the peers in the first place. The final cause of the problem could be you forgetting to set an anchor peers as well.

aneb (Thu, 31 Jan 2019 00:38:37 GMT):
@DieYoungWsn It can be many problems. It is a high level error message and in some cases masks the cause of the real problem. Either way, either you have actually not matched the endorsement policy that you set when instantiating the chaincode. (not enough peers, too strict endorsement policy, etc) If you think there is actually nothing wrong with your endorsement policy I bet that the problem is the CORE_PEER_GOSSIP_EXTERNALENDPOINT and CORE_PEER_GOSSIP_BOOTSTRAP settings in your docker compose file that are missing or are not correct. If those settings are wrong the SDK is telling you the endorsement policy cannot be satisfied. Which is true, however the real problem is that your discovery service is not able to find the peers in the first place. The final cause of the problem could be you forgetting to set an anchor peers as well.

aneb (Thu, 31 Jan 2019 00:40:09 GMT):
This is assuming you are using the dynamic discovery service and not targetting your peers directly for each transaction.

DieYoungWsn (Thu, 31 Jan 2019 02:02:33 GMT):

Clipboard - January 31, 2019 10:02 AM

DieYoungWsn (Thu, 31 Jan 2019 02:05:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dDHezgArwcmW34MzZ) @aneb @aneb CORE_PEER_GOSSIP_EXTERNALENDPOINT and CORE_PEER_GOSSIP_BOOTSTRAP settings are domain. This fabric just is an example, server is up ,but sdk's url doesn't match

govinda-attal (Thu, 31 Jan 2019 02:53:28 GMT):
hello all does go sdk for fabric supports signing of invocation requests with idemix ??

govinda-attal (Thu, 31 Jan 2019 02:53:28 GMT):
hello all does go sdk for fabric supports signing of invocation requests with idemix ??, also if it is not now supported, when is it likely to be supported. pointer to JIRA item will help too :-)

helpsolution (Thu, 31 Jan 2019 07:50:36 GMT):
Hello. Help me please/ How I can find chat with java sdk?

rootDistress (Thu, 31 Jan 2019 09:04:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=86g6zxeL4iaw9pKGw) @helpsolution https://chat.hyperledger.org/channel/fabric-sdk-java

helpsolution (Thu, 31 Jan 2019 09:32:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=2m2sPPZw5htE2TEDD) @rootDistress Thanks

troyronda (Thu, 31 Jan 2019 14:51:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uyzwxR5pwjCK7WYtC) @govinda-attal idemix hasn't yet been implemented into the Go SDK. I'm not aware of any contributors/volunteers who are implementing it yet.

sherbetlemon (Fri, 01 Feb 2019 00:08:39 GMT):
does `client.Execute` return after the transaction has been executed on the peer, made it into a block and committed by the peer?

nyet (Fri, 01 Feb 2019 00:13:54 GMT):
@sherbetlemon You'll need a notifier from `RegisterChainCodeEvent()` for that

nyet (Fri, 01 Feb 2019 00:14:48 GMT):
@sherbetlemon This might be helpful https://github.com/Blockdaemon/hlf-database-app/blob/master/blockchain/invoke.go

sherbetlemon (Fri, 01 Feb 2019 00:16:02 GMT):
I went through https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/chclient.go#L108, which makes me think that it returns after the transaction is endorsed by the peers.

sherbetlemon (Fri, 01 Feb 2019 00:17:54 GMT):
@nyet I went through that. I am trying to get the time from the logs post-run. I just need the performance numbers and don't want to change performance by adding event listeners

nyet (Fri, 01 Feb 2019 00:19:37 GMT):
@sherbetlemon it depends on what you are trying to measure; if you want end to end transaction you need a listener; there is no blocking call in the sdk like that

nyet (Fri, 01 Feb 2019 00:20:24 GMT):
You dont HAVE to wait before you can submit another transaction

nyet (Fri, 01 Feb 2019 00:21:01 GMT):
There are also a ton of tuning parameters you can do to determine scatter/gather requirements etc

sherbetlemon (Fri, 01 Feb 2019 00:21:52 GMT):
I was thinking of tracing from logs which tx went into which block and getting the block commit time for all peers to get end to end time

nyet (Fri, 01 Feb 2019 00:22:22 GMT):
If you do that you dont need to wait for the event

nyet (Fri, 01 Feb 2019 00:22:26 GMT):
just keep submitting transactions

nyet (Fri, 01 Feb 2019 00:22:56 GMT):
it will eventually back up but you can see the throughput on the commit side

sherbetlemon (Fri, 01 Feb 2019 00:24:43 GMT):
This issue is slightly different. I have a fixed number of client go-routines preforming setup.clients[i].Execute for some number of txs. I increased batchtimeout and the time I had to wait for sending the next round of txs increased. I think this should only be the case if Execute returns after the transaction makes it into a block. I wonder if that is the case?

nyet (Fri, 01 Feb 2019 00:25:21 GMT):
Execute() returns LONG before anything is actually committed

nyet (Fri, 01 Feb 2019 00:25:31 GMT):
Its basically instantaneous

nyet (Fri, 01 Feb 2019 00:26:26 GMT):
well not instasntaneous; it returns when the Orderer() accepts the transaction

nyet (Fri, 01 Feb 2019 00:26:26 GMT):
well not instasntaneous; it returns when the Orderer accepts the proposal

nyet (Fri, 01 Feb 2019 00:26:36 GMT):
err the proposal anyway

sherbetlemon (Fri, 01 Feb 2019 00:27:00 GMT):
and forms a block out of it, I assume?

nyet (Fri, 01 Feb 2019 00:27:18 GMT):
No. It sends it to other peers first for endorsements ...

nyet (Fri, 01 Feb 2019 00:27:43 GMT):
it doesn't get commited until it has enough endorsements, then it sends the results to the peers

nyet (Fri, 01 Feb 2019 00:27:52 GMT):
including the one who prposed it

nyet (Fri, 01 Feb 2019 00:29:43 GMT):
https://hyperledger-fabric.readthedocs.io/en/release-1.3/arch-deep-dive.html#the-ordering-service-delivers-a-transactions-to-the-peers

nyet (Fri, 01 Feb 2019 00:29:43 GMT):
https://hyperledger-fabric.readthedocs.io/en/release-1.4/arch-deep-dive.html#the-ordering-service-delivers-a-transactions-to-the-peers

sherbetlemon (Fri, 01 Feb 2019 00:29:46 GMT):
Wait. I think the proposal goes around between peers until it gets enough endorsements, and then the client submits the endorsed proposal to the orderer, which simply checks the endorsements and cuts a block?

nyet (Fri, 01 Feb 2019 00:30:36 GMT):
the peer(s) actually cut the blocks. the orderer just says if the block is good or not

sherbetlemon (Fri, 01 Feb 2019 00:32:10 GMT):
omg. I will have to look at the architecture again. Did it change across releases or what :/

nyet (Fri, 01 Feb 2019 00:32:17 GMT):
no its been the same iirc

nyet (Fri, 01 Feb 2019 00:32:27 GMT):
at least since 1.1

nyet (Fri, 01 Feb 2019 00:33:06 GMT):
that dotted line on the very left of that picture is the event

nyet (Fri, 01 Feb 2019 00:33:14 GMT):
on client(C)

nyet (Fri, 01 Feb 2019 00:34:02 GMT):
I belive `Execute()` is the solid line under (2)

nyet (Fri, 01 Feb 2019 00:34:02 GMT):
I belive `Execute()` returns on the solid line under (2)

nyet (Fri, 01 Feb 2019 00:35:46 GMT):
Err sorry the peer gathers all the endorsements too

nyet (Fri, 01 Feb 2019 00:35:58 GMT):
actually i think you're right. The local peer cuts the block if it gets enough endorsements

nyet (Fri, 01 Feb 2019 00:36:08 GMT):
after `Execute()`. Wow you made me rethink this :)

nyet (Fri, 01 Feb 2019 00:36:23 GMT):
Never ask me anything again, im' clearly unreliable

sherbetlemon (Fri, 01 Feb 2019 00:38:27 GMT):
Haha. All help counts :)

sherbetlemon (Fri, 01 Feb 2019 00:38:56 GMT):
I am sure it is the orderer which cuts blocks

sherbetlemon (Fri, 01 Feb 2019 00:40:03 GMT):
By cutting block, I mean gather all txs into a block and deliver to other peers. That is what the orderering service is about, right.

sherbetlemon (Fri, 01 Feb 2019 00:40:03 GMT):
By cutting block, I mean gather all txs into a block and deliver to other peers. That is what the orderering service is about, right?

nyet (Fri, 01 Feb 2019 00:40:38 GMT):
yes

nyet (Fri, 01 Feb 2019 00:41:10 GMT):
i mean the block itself is stored on the peer (but i supposed thats obvious0

nyet (Fri, 01 Feb 2019 00:41:10 GMT):
i mean the block itself is stored on the peer (but i supposed thats obvious)

nyet (Fri, 01 Feb 2019 00:41:42 GMT):
i'm just unsure where Execute() returns in the diagram

nyet (Fri, 01 Feb 2019 00:42:46 GMT):
if its under (2), the (local) peer has already updated the readset with the endorsed transaction, but if it is waiting for (4) it can't commit the block yet, which makes no sense

nyet (Fri, 01 Feb 2019 00:45:04 GMT):
https://vitalflux.com/blockchain-transaction-hyperledger-blockchain-network/

sherbetlemon (Fri, 01 Feb 2019 00:47:23 GMT):
That's great :D

nyet (Fri, 01 Feb 2019 00:49:18 GMT):
Sort of. I still dont know when `Execute()` returns :(

sherbetlemon (Fri, 01 Feb 2019 00:50:43 GMT):
Exactly...

nyet (Fri, 01 Feb 2019 00:53:45 GMT):
If you find out please let me know. It can't be after "Send proposal-response" so it must be after "Send transaction"

sherbetlemon (Fri, 01 Feb 2019 00:54:26 GMT):
Sure!

Maxim_Samarin (Fri, 01 Feb 2019 10:39:59 GMT):
Hello @sherbetlemon, @nyet, Two cents from me regarding Execute call (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/chclient.go#L108) and my investigations on this question. @sherbetlemon I think you are right and "Execute" responds after tx was committed by peer. This method calls cc.InvokeHandler (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/chclientrun.go#L35), which uses chain of handlers created by "invoke.NewExecuteHandler()" By these handlers we can check which operations are done, but the most interesting for us is the last one "NewCommitHandler(next...)" (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L220) In its "Handle" method (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L167) we can see that it registers tx event listener (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L171) sends tx to orderer (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L178) and waits for event (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L184) and quits the method only after timeout or event is received. So per my understanding "Execute" is synchronous method for sending transactions to blockchain. Accordingly if there is a loop of txs to be sent in one thread, each next will wait until previous one has went through the full flow, i.e. committed to blockchain. So it seems that with increasing number of txs, time will be increased, i.e. each new will wait for completion of previous transactions. So it seems, that it's necessary to send each tx (call execute) in it's own goroutine (thread). Please correct me if I missed something or wrong.

rootDistress (Fri, 01 Feb 2019 12:20:20 GMT):
Guys, If i remove an org from a channel using configtxlator, the peers aren't actually unjoined i.e stop processing its blocks and delete associated ledger and state DB. So,If I plan to add that org again to the channel it gives `Cannot create ledger from genesis block, due to LedgerID already exists`. does anyone have a solution/suggestion to either of this problem ?

rootDistress (Fri, 01 Feb 2019 12:20:20 GMT):
Guys, If i remove an org from a channel using configtxlator, the peers aren't actually unjoined i.e stop processing its blocks and delete associated ledger and state DB. So,If I plan to add that org again to the channel it gives `Cannot create ledger from genesis block, due to LedgerID already exists`.quick lookup says its because the peers have already joined, does anyone have a solution/suggestion to either of this problem ?

troyronda (Fri, 01 Feb 2019 15:14:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=H3qHfmPt8hYgW8HuE) @nyet awesome, thanks!

habpygo (Fri, 01 Feb 2019 15:57:44 GMT):
@troyronda just upgraded to go 1.11.5. I get an error: ± |master ✓| → make depend Checking Go version go version go1.11.5 darwin/amd64 You should install go 1.11 to 1.11.4 to run hyperledger fabric sdk tests make: *** [version] Error 1 I can’t find the error message in the fabric-sdk-go directory. How can I set this to 1.11.5?

troyronda (Fri, 01 Feb 2019 15:59:09 GMT):
@habpygo this line should be changed: https://github.com/hyperledger/fabric-sdk-go/blob/master/ci.properties#L9

habpygo (Fri, 01 Feb 2019 16:04:22 GMT):
Thanks!

nyet (Fri, 01 Feb 2019 16:42:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DP7wDSd2LenpQTwMy) @troyronda I was going to ask if that is going to be permanent at some point.. was going to issue a PR but I figured you would get to it when you were ready.

nyet (Fri, 01 Feb 2019 16:46:37 GMT):
@Maxim_Samarin Could you comment on my use of `RegisterChaincodeEvent()` here then? https://github.com/Blockdaemon/hlf-database-app/blob/master/blockchain/invoke.go It was copied from example chaincode file... is it necessary? What is it waiting for if `Execute()` is synchronous?

nyet (Fri, 01 Feb 2019 16:46:37 GMT):
@Maxim_Samarin Could you comment on my use of `RegisterChaincodeEvent()` here then? https://github.com/Blockdaemon/hlf-database-app/blob/master/blockchain/invoke.go It was copied from an example chaincode client... is it necessary? What is it waiting for if `Execute()` is synchronous?

habpygo (Fri, 01 Feb 2019 17:02:23 GMT):
@troyronda make depend not working Checking Go version go version go1.11.5 darwin/amd64 Installing dependencies ... Installing github.com/alecthomas/gometalinter@v2 to /Users/harryboer/Developer/DappDevelopment/Blockchain_Projects/Gowork/bin ... fatal: ambiguous argument 'v2': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' make: *** [depend] Error 128

habpygo (Fri, 01 Feb 2019 17:03:22 GMT):
Tried to run make, but it got stuck with running metalinters. Is this a big job from your side? If so, I'll downgrade to go version 1.11.4 again. Please advise.

nyet (Fri, 01 Feb 2019 18:47:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=b9b6zxgdZi2R5fxS4) @habpygo I'm seeing the same issue

nyet (Fri, 01 Feb 2019 18:50:49 GMT):
@habpygo ``` diff --git a/test/scripts/dependencies.sh b/test/scripts/dependencies.sh index f9e2b23c..5775e35d 100755 --- a/test/scripts/dependencies.sh +++ b/test/scripts/dependencies.sh @@ -48,7 +48,7 @@ function installGoDep { function installGoMetalinter { declare repo="github.com/alecthomas/gometalinter" - declare revision="v2" + declare revision="v2.0.12" declare pkg="github.com/alecthomas/gometalinter" ```

nyet (Fri, 01 Feb 2019 18:50:49 GMT):
@habpygo @troyronda @Baha-sk ``` diff --git a/test/scripts/dependencies.sh b/test/scripts/dependencies.sh index f9e2b23c..5775e35d 100755 --- a/test/scripts/dependencies.sh +++ b/test/scripts/dependencies.sh @@ -48,7 +48,7 @@ function installGoDep { function installGoMetalinter { declare repo="github.com/alecthomas/gometalinter" - declare revision="v2" + declare revision="v2.0.12" declare pkg="github.com/alecthomas/gometalinter" ```

Baha-sk (Fri, 01 Feb 2019 20:56:15 GMT):
@nyet @troyronda yes, my patch should fix the metalinter error... wait till it's merged

sherbetlemon (Fri, 01 Feb 2019 23:08:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=c6Y2C3ryQCqJZPmD3) @Maxim_Samarin @Maxim_Samarin, I can empirically confirm this. I spawned different number (say x) of go-routine clients per experiment each `Execute()`ing multiple txs sequentially, and found that each time the number of txs included in a block was x. Thanks for digging deep and getting to the root of this! For my purpose, I will try to change the sdk to not wait for an event. Wondering if there is another way

sherbetlemon (Fri, 01 Feb 2019 23:08:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=c6Y2C3ryQCqJZPmD3) @Maxim_Samarin , I can empirically confirm this. I spawned different number (say x) of go-routine clients per experiment each `Execute()`ing multiple txs sequentially, and found that each time the number of txs included in a block was x. Thanks for digging deep and getting to the root of this! For my purpose, I will try to change the sdk to not wait for an event. Wondering if there is another way

sherbetlemon (Fri, 01 Feb 2019 23:14:52 GMT):
It _could_ be implemented asynchronously in Node SDK, so I am thinking of checking that out too

sherbetlemon (Fri, 01 Feb 2019 23:16:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FXfMZuZjkcW3t5y5T) @nyet Maybe it gets triggered instantaneously after Execute returns. You might want to put some timers and check if that is the case

nyet (Fri, 01 Feb 2019 23:20:53 GMT):
@sherbetlemon time permitting I will do just that.

rootDistress (Sat, 02 Feb 2019 05:42:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PJ4ctdYkNrYL98ngb) Shall I assume, there isn't a solution for this right now ?

rootDistress (Sat, 02 Feb 2019 06:17:27 GMT):
Also, How do I know if an org is part of consortium already? like https://hyperledger-fabric.readthedocs.io/en/release-1.3/configtx.html#permitted-configuration-groups-and-values suggests that the config contains info of the consortium but when I fetched the config block I got nothing about it.

rootDistress (Sat, 02 Feb 2019 07:12:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yWxeKjctmPtEB8FDH) Found that the `testchainid` created by default, will contain system config including Consortium.

yacovm (Sat, 02 Feb 2019 11:00:04 GMT):
@rootDistress there is a workaround but I never tried it

yacovm (Sat, 02 Feb 2019 11:00:19 GMT):
you can shutdown the peer, delete its index and then start it up

yacovm (Sat, 02 Feb 2019 11:00:26 GMT):
but be warned that I never tried it before

yacovm (Sat, 02 Feb 2019 11:00:53 GMT):
so you can try to shutdown the peer, backup the file system

yacovm (Sat, 02 Feb 2019 11:01:07 GMT):
and then try it and worst case - restore from backup

yacovm (Sat, 02 Feb 2019 11:01:29 GMT):
I think a solution is being developed to un-join a channel - @manish-sethi correct me if I'm wrong?

manish-sethi (Sat, 02 Feb 2019 11:01:29 GMT):
Has joined the channel.

yacovm (Sat, 02 Feb 2019 11:01:42 GMT):
(or @dave.enyeart )

rootDistress (Sat, 02 Feb 2019 11:05:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=MFRcpDpgfCEZZmNRN) @yacovm Thanks for your answer, I'll update here if i find some success.

rootDistress (Sat, 02 Feb 2019 13:49:05 GMT):
Can someone tell me how do I send consortium update to orderer with update envelope using Orderer Admin? Like do I have to include the signing identities like for channel update ? Dummy examples would be highly appreciated.

nyet (Sat, 02 Feb 2019 18:12:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=D8SvPgXTW2ZAh8gN6) @yacovm Minus the index? What is safe to delete and what isn't? If you just nuke the peer entirely, it can reconstruct whatever it needs via gossip (assuming there was at least one other peer on each of the channels you want it to preserve)?

yacovm (Sat, 02 Feb 2019 18:52:04 GMT):
it can reconstruct, given you have the genesis block handy

yacovm (Sat, 02 Feb 2019 18:52:13 GMT):
or can fetch it from another peer/orderer

nyet (Sat, 02 Feb 2019 21:58:32 GMT):
Is there anything that really needs to be backed up then? Outside of worrying how long it will take to resynch? Can it use another peer's files to speed that up?

manish-sethi (Sat, 02 Feb 2019 22:01:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4Hff728az7etffkpK) @yacovm Not being developed at the moment @yacovm

yacovm (Sat, 02 Feb 2019 22:18:39 GMT):
but is it planned @manish-sethi ?

manish-sethi (Sat, 02 Feb 2019 23:45:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Mr9dFEZFBofYPvMpp) @yacovm Its talked about a couple of time but I am not sure if it is included for a specific release.

PMHF (Sun, 03 Feb 2019 00:47:21 GMT):
Has joined the channel.

PMHF (Sun, 03 Feb 2019 00:48:09 GMT):
I played around with v1.4 and had to tweak some settings to make the balance_transfer example work. Here is the code if it helps anyone. https://github.com/PanMat/balance_transfer

habpygo (Sun, 03 Feb 2019 13:28:37 GMT):
Hi @troyronda , please note that some integration tests fail with HLF 1.4 and go version 1.11.5 integration-tests_1 | Running integration.sh integration-tests_1 | Enabling data race detection integration-tests_1 | Code level stable (Fabric v1.4) integration-tests_1 | Running integration tests ... integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/e2e 37.560s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/e2e/configless 1.747s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/e2e/orgs 248.140s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/channel 816.071s integration-tests_1 | --- FAIL: TestDiscoveryClientEndorsers (158.83s) integration-tests_1 | --- FAIL: TestDiscoveryClientEndorsers/Policy:_Org2_Only (116.47s) Error Trace: discoveryclient_test.go:284 integrat | discoveryclient_test.go:184 integratError: | Received unexpected error: integrat | Test status Code: (12) UNKNOWN. Description: failed constructing descriptor for chaincodes: integratTest: | TestDiscoveryClientEndorsers/Policy:_Org2_Only integration-tests_1 | FAIL integration-tests_1 | FAIL github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/common/discovery 159.859s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/common/selection 323.677s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/event 5.860s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/ledger 5.128s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/msp 7.403s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/resmgmt 24.909s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/context 2.588s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/fab 12.559s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/fabsdk/provider 5.655s integration-tests_1 | ? github.com/hyperledger/fabric-sdk-go/test/integration/util/runner [no test files] fabsdkgo_integration-tests_1 exited with code 1

habpygo (Sun, 03 Feb 2019 13:30:27 GMT):
Anything on my part?

habpygo (Sun, 03 Feb 2019 15:18:52 GMT):
Hmm...also build errors:

habpygo (Sun, 03 Feb 2019 15:18:57 GMT):
Build ... ../github.com/hyperledger/fabric-sdk-go/pkg/fab/comm/connector.go:16:2: cannot find package "google.golang.org/grpc/connectivity" in any of: /usr/local/go/src/google.golang.org/grpc/connectivity (from $GOROOT)

habpygo (Sun, 03 Feb 2019 15:19:20 GMT):
and

habpygo (Sun, 03 Feb 2019 15:19:22 GMT):
../github.com/hyperledger/fabric-sdk-go/pkg/common/errors/status/status.go:22:2: cannot find package "google.golang.org/grpc/status" in any of: /usr/local/go/src/google.golang.org/grpc/status (from $GOROOT)

habpygo (Sun, 03 Feb 2019 15:22:58 GMT):
connectivity and status are not existing in the grpc package

habpygo (Sun, 03 Feb 2019 15:22:58 GMT):
I see that connectivity and status are not existing in the grpc package

nyet (Sun, 03 Feb 2019 18:33:30 GMT):
Go devs seem to be almost as bad as container devs; they have no idea how to keep an API consistent. This whole "pin my entire project on a SINGLE COMMIT in a dozen different libraries, each" is ridiculous :/

Maxim_Samarin (Mon, 04 Feb 2019 14:18:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FXfMZuZjkcW3t5y5T) @nyet Hello @nyet , If in this code "RegisterChaincodeEvent" is used as an event that Tx was committed, then you are right. There is no much sense for registering for that, as "Execute" will return only when tx is committed and event is caught by client. But if you want to know, that specific chaincode was executed, then this listener is correct. Also if after subscription(line 23), but before "Execute" (line 30) another hlf client (any other app) will do call to same chaincode (and his tx was successfully added into chain), listener on line 46 will get event of his "Execute" (not of "Execute from line 30"). Then you should receive second cc event for you tx. I.e. chaincode listener just receives event that chaincode was successfully executed, but by which Tx specified inside event itself (TxID field). Per my understanding there are only two actual types of events - "Block" and "Filtered Block". Filtered block is same as "Block", just with truncated data (for example there is no "payload" in it. More details - https://hyperledger-fabric.readthedocs.io/en/release-1.4/peer_event_services.html) So thsese three types of event listeners (which we are able to register by sdk - Block, Tx, Chaincode), just different layers of abstraction, which represent same "physical" event (Block or Filtered Block). Inside "Block event" there is info about transactions and about chaincodes (which were executed by those transactions). So client sdk just receives "Block" and "Filtered Block" events. But already inside sdk, if we have registered chaincode listener, sdk will take data about chaincode from "Block event" and if it matches pattern, registered callback will be executed. Same for tx listener. This might be visible here for block - https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha4/pkg/fab/events/service/dispatcher/dispatcher.go#L301 and here for filtered block - https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha4/pkg/fab/events/service/dispatcher/dispatcher.go#L314 Both handlers for publishing "cc" and "tx" events use same "publishFilteredBlockEvents". I.e. sdk receives 1 Block event and 1 Filtered Block event, and depending on registered listeners, decides which callbacks to call(blocks, chaincodes or transactions) And it seems, that there is no way to get tx event if we are using "Execute". "RegisterTxStatusEvent" requires TxID, which is generated inside "Execute" and returned when method is finished. But due to "Execute" itself catches "Tx" event, listener registered after Execute function will fail by timeout. (At least my test works only if tx listener inside "Execute" is disabled) @troyronda , is my understanding regarding "Abstraction layers of events" and "inability to subscribe on tx" is correct? Could you help with that please, or point to right person to discuss, thanks.

Maxim_Samarin (Mon, 04 Feb 2019 14:18:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FXfMZuZjkcW3t5y5T) Hello @nyet , If in this code "RegisterChaincodeEvent" is used as an event that Tx was committed, then you are right. There is no much sense for registering for that, as "Execute" will return only when tx is committed and event is caught by client. But if you want to know, that specific chaincode was executed, then this listener is correct. Also if after subscription(line 23), but before "Execute" (line 30) another hlf client (any other app) will do call to same chaincode (and his tx was successfully added into chain), listener on line 46 will get event of his "Execute" (not of "Execute from line 30"). Then you should receive second cc event for you tx. I.e. chaincode listener just receives event that chaincode was successfully executed, but by which Tx specified inside event itself (TxID field). Per my understanding there are only two actual types of events - "Block" and "Filtered Block". Filtered block is same as "Block", just with truncated data (for example there is no "payload" in it. More details - https://hyperledger-fabric.readthedocs.io/en/release-1.4/peer_event_services.html) So thsese three types of event listeners (which we are able to register by sdk - Block, Tx, Chaincode), just different layers of abstraction, which represent same "physical" event (Block or Filtered Block). Inside "Block event" there is info about transactions and about chaincodes (which were executed by those transactions). So client sdk just receives "Block" and "Filtered Block" events. But already inside sdk, if we have registered chaincode listener, sdk will take data about chaincode from "Block event" and if it matches pattern, registered callback will be executed. Same for tx listener. This might be visible here for block - https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha4/pkg/fab/events/service/dispatcher/dispatcher.go#L301 and here for filtered block - https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha4/pkg/fab/events/service/dispatcher/dispatcher.go#L314 Both handlers for publishing "cc" and "tx" events use same "publishFilteredBlockEvents". I.e. sdk receives 1 Block event and 1 Filtered Block event, and depending on registered listeners, decides which callbacks to call(blocks, chaincodes or transactions) And it seems, that there is no way to get tx event if we are using "Execute". "RegisterTxStatusEvent" requires TxID, which is generated inside "Execute" and returned when method is finished. But due to "Execute" itself catches "Tx" event, listener registered after Execute function will fail by timeout. (At least my test works only if tx listener inside "Execute" is disabled) @troyronda , is my understanding regarding "Abstraction layers of events" and "inability to subscribe on tx" is correct? Could you help with that please, or point to right person to discuss, thanks.

Maxim_Samarin (Mon, 04 Feb 2019 14:18:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FXfMZuZjkcW3t5y5T) Hello @nyet , If in this code "RegisterChaincodeEvent" is used as an event that Tx was committed, then you are right. There is no much sense for registering for that, as "Execute" will return only when tx is committed and event is caught by client. But if you want to know, that specific chaincode was executed, then this listener is correct. Also if after subscription(line 23), but before "Execute" (line 30) another hlf client (any other app) will do call to same chaincode (and his tx was successfully added into chain), listener on line 46 will get event of his "Execute" (not of "Execute from line 30"). Then you should receive second cc event for you tx. I.e. chaincode listener just receives event that chaincode was successfully executed, but by which Tx specified inside event itself (TxID field). Per my understanding there are only two actual types of events - "Block" and "Filtered Block". Filtered block is same as "Block", just with truncated data (for example there is no "payload" in it. More details - https://hyperledger-fabric.readthedocs.io/en/release-1.4/peer_event_services.html) So thsese three types of event listeners (which we are able to register by sdk - Block, Tx, Chaincode), just different layers of abstraction, which represent same "physical" event (Block or Filtered Block). Inside "Block event" there is info about transactions and about chaincodes (which were executed by those transactions). So client sdk just receives "Block" and "Filtered Block" events. But already inside sdk, if we have registered chaincode listener, sdk will take data about chaincode from "Block event" and if it matches pattern, registered callback will be executed. Same for tx listener. This might be visible here for block - https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha4/pkg/fab/events/service/dispatcher/dispatcher.go#L301 and here for filtered block - https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha4/pkg/fab/events/service/dispatcher/dispatcher.go#L314 Both handlers for publishing "cc" and "tx" events use same "publishFilteredBlockEvents". I.e. sdk receives 1 Block event and 1 Filtered Block event, and depending on registered listeners, decides which callbacks to call(blocks, chaincodes or transactions) And it seems, that there is no way to get tx event if we are using "Execute". "RegisterTxStatusEvent" requires TxID, which is generated inside "Execute" and returned when method is finished. But due to "Execute" itself catches "Tx" event, listener registered after Execute function will fail by timeout. (At least my test works only if tx listener inside "Execute" is disabled) @troyronda , is my understanding regarding "Abstraction layers of events" and "inability to subscribe on tx" is correct? Could you help with that please, or point to right person to discuss, thanks.

Maxim_Samarin (Mon, 04 Feb 2019 14:18:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FXfMZuZjkcW3t5y5T) Hello @nyet , If in this code "RegisterChaincodeEvent" is used as an event that Tx was committed, then you are right. There is no much sense for registering for that, as "Execute" will return only when tx is committed and event is caught by client. But if you want to know, that specific chaincode was executed, then this listener is correct. Also if after subscription(line 23), but before "Execute" (line 30) another hlf client (any other app) will do call to same chaincode (and his tx was successfully added into chain), listener on line 46 will get event of his "Execute" (not of "Execute from line 30"). Then you should receive second cc event for you tx. I.e. chaincode listener just receives event that chaincode was successfully executed, but by which Tx specified inside event itself (TxID field). Per my understanding there are only two actual types of events - "Block" and "Filtered Block". Filtered block is same as "Block", just with truncated data (for example there is no "payload" in it. More details - https://hyperledger-fabric.readthedocs.io/en/release-1.4/peer_event_services.html) So thsese three types of event listeners (which we are able to register by sdk - Block, Tx, Chaincode), just different layers of abstraction, which represent same "physical" event (Block or Filtered Block). Inside "Block event" there is info about transactions and about chaincodes (which were executed by those transactions). So client sdk just receives "Block" and "Filtered Block" events. But already inside sdk, if we have registered chaincode listener, sdk will take data about chaincode from "Block event" and if it matches pattern, registered callback will be executed. Same for tx listener. This might be visible here for block - https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha4/pkg/fab/events/service/dispatcher/dispatcher.go#L301 and here for filtered block - https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha4/pkg/fab/events/service/dispatcher/dispatcher.go#L314 Both handlers for publishing "cc" and "tx" events use same "publishFilteredBlockEvents". I.e. sdk receives 1 Block event and 1 Filtered Block event, and depending on registered listeners, decides which callbacks to call(blocks, chaincodes or transactions) And it seems, that there is no way to get tx event if we are using "Execute". "RegisterTxStatusEvent" requires TxID, which is generated inside "Execute" and returned when method is finished. But due to "Execute" itself catches "Tx" event, listener registered after Execute function will fail by timeout. (At least my test works only if tx listener inside "Execute" is disabled) @troyronda , is my understanding regarding "Abstraction layers of events" and "inability to subscribe on tx" is correct? Could you help with that please, or point to right person to discuss, thanks.

Maxim_Samarin (Mon, 04 Feb 2019 14:18:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FXfMZuZjkcW3t5y5T) Hello @nyet , If in this code "RegisterChaincodeEvent" is used as an event that Tx was committed, then you are right. There is no much sense for registering for that, as "Execute" will return only when tx is committed and event is caught by client. But if you want to know, that specific chaincode was executed, then this listener is correct. Also if after subscription(line 23), but before "Execute" (line 30) another hlf client (any other app) will do call to same chaincode (and his tx was successfully added into chain), listener on line 46 will get event of his "Execute" (not of "Execute from line 30"). Then you should receive second cc event for you tx. I.e. chaincode listener just receives event that chaincode was successfully executed, but by which Tx specified inside event itself (TxID field). Per my understanding there are only two actual types of events - "Block" and "Filtered Block". Filtered block is same as "Block", just with truncated data (for example there is no "payload" in it. More details - https://hyperledger-fabric.readthedocs.io/en/release-1.4/peer_event_services.html) So thsese three types of event listeners (which we are able to register by sdk - Block, Tx, Chaincode), just different layers of abstraction, which represent same "physical" event (Block or Filtered Block). Inside "Block event" there is info about transactions and about chaincodes (which were executed by those transactions). So client sdk just receives "Block" and "Filtered Block" events. But already inside sdk, if we have registered chaincode listener, sdk will take data about chaincode from "Block event" and if it matches pattern, registered callback will be executed. Same for tx listener. This might be visible here for block - https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha4/pkg/fab/events/service/dispatcher/dispatcher.go#L301 and here for filtered block - https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha4/pkg/fab/events/service/dispatcher/dispatcher.go#L314 Both handlers for publishing "cc" and "tx" events use same "publishFilteredBlockEvents". I.e. sdk receives 1 Block event and 1 Filtered Block event, and depending on registered listeners, decides which callbacks to call(blocks, chaincodes or transactions) And it seems, that there is no way to get tx event if we are using "Execute". "RegisterTxStatusEvent" requires TxID, which is generated inside "Execute" and returned when method is finished. But due to "Execute" itself catches "Tx" event, listener registered after Execute function will fail by timeout. (At least my test works only if tx listener inside "Execute" is disabled)

Maxim_Samarin (Mon, 04 Feb 2019 14:20:29 GMT):
@troyronda , is my understanding regarding "Abstraction layers of events" and "inability to subscribe on tx" is correct (above)? Could you help with that please, or point to right person to discuss, thanks.

mahoney1 (Mon, 04 Feb 2019 15:24:25 GMT):
Has joined the channel.

mahoney1 (Mon, 04 Feb 2019 15:24:39 GMT):
hi Fabric Developers just letting you know about the "Hyperledger Fabric Developer" community call (lasts approx 30-60 mins) currently scheduled for Thursday February 7th 5pm UTC (5pm UK, 12pm ET, 9am PT).  The plan is to initially host this community call bi-weekly via Zoom webconference and is aimed at : - helping the worldwide Fabric Developer community grow in their development journey (eg. developing applications, smart contracts, chaincode, developing clients, using the SDK etc - eg. whether its NodeJS, Java, Go etc etc) - caters for the developer perspective and the developer community. - help developers understand / hear more about exciting new things in Fabric,eg. features upcoming or work in progress - ie things that appeal to the developer - to foster more interest, best practices etc in developing with Hyperledger Fabric. - opportunity to ask questions of the Fabric team eg. you may have feedback/questions on your experiences developing with Fabric - to share stuff you've done with the community, eg sample code / sample use cases that others may be interested in If you wish to share content on a call, just let me know via email direct or DM me on Rocketchat (ID: mahoney1) and I'll put an item on the agenda. Provide the following: - the topic (state whether its presentation, or demo etc) - the full name of the presenter, and - approx length of your pitch in minutes The Zoom webconference ID is https://zoom.us/my/hyperledger.community  and the aim is to grow interest in the Fabric developer ecosystem (this 'Fabric Developer' call clearly has a much broader scope as indicated - feel free to make suggestions too !). The current agenda is shown here -> https://wiki.hyperledger.org/display/fabric/Fabric+Developer+-+Meeting+Agendas+ many thanks for your time - feel free to forward this email if you think it is of interest to a colleague. Paul O'Mahony Community Lead Fabric Developer

vignesh (Mon, 04 Feb 2019 16:14:47 GMT):
Has joined the channel.

nyet (Mon, 04 Feb 2019 18:09:10 GMT):
@Maxim_Samarin Thank you for that excellent explanation. I am bothered by the code though (which I copied from elsewhere) regarding the reuse of "eventInvoke" as `eventID`, since, as you say, another chaincode caller that calls the same function will register for that `eventID`. If it is true that a concurrent caller might get the CC event for another caller (since they use the same `eventID`), does it makes sense for each call to generate a unique `eventID`, or would that not serve any purpose, since 1) `Execute()` blocks (as expected) and 2) the whole rigamarole of waiting for an Event is therefore pointless anyway (unless there was a real reason to do cross-client event waiting for some application specific use?)

nyet (Mon, 04 Feb 2019 18:09:10 GMT):
@Maxim_Samarin Thank you for that excellent explanation. I am bothered by the code though (which I copied from elsewhere) regarding the reuse of "eventInvoke" as `eventID`, since, as you say, another chaincode caller that calls the same function will register for that `eventID`. If it is true that a concurrent caller might get the CC event for another caller (since they use the same `eventID`), does it makes sense for each call to generate a unique `eventID`, or would that not serve any purpose, since 1) `Execute()` blocks (as expected) and 2) the whole rigamarole of waiting for an Event is therefore pointless anyway (unless there was a real reason to do cross-client event waiting for some application specific use

nyet (Mon, 04 Feb 2019 18:09:10 GMT):
@Maxim_Samarin Thank you for that excellent explanation. I am bothered by the code though (which I copied from elsewhere) regarding the reuse of "eventInvoke" as `eventID`, since, as you say, another chaincode caller that calls the same function will register for that `eventID`. If it is true that a concurrent caller might get the CC event for another caller (since they use the same `eventID`), does it makes sense for each call to generate a unique `eventID`, or would that not serve any purpose, since 1) `Execute()` blocks (as expected) and 2) the whole rigamarole of waiting for an Event is therefore pointless anyway (unless there was a real reason to do cross-client event waiting for some application specific use)?

nyet (Mon, 04 Feb 2019 18:09:10 GMT):
@Maxim_Samarin Thank you for that excellent explanation. I am bothered by the code though (which I copied from elsewhere) regarding the reuse of `"eventInvoke"` as `eventID`, since, as you say, another chaincode caller that calls the same function will register for that `eventID`. If it is true that a concurrent caller might get the CC event for another caller (since they use the same `eventID`), does it makes sense for each call to generate a unique `eventID`, or would that not serve any purpose, since 1) `Execute()` blocks (as expected) and 2) the whole rigamarole of waiting for an Event is therefore pointless anyway (unless there was a real reason to do cross-client event waiting for some application specific use)?

nyet (Mon, 04 Feb 2019 18:09:10 GMT):
@Maxim_Samarin Thank you for that excellent explanation. I am bothered by the code though (which I copied from elsewhere) regarding the reuse of `"eventInvoke"` as `eventID`, since, as you say, another chaincode caller that calls the same function will register for that same `eventID`. If it is true that a concurrent caller might get the CC event for another caller (since they use the same `eventID`), does it makes sense for each call to generate a unique `eventID`, or would that not serve any purpose, since 1) `Execute()` blocks (as expected) and 2) the whole rigamarole of waiting for an Event is therefore pointless anyway (unless there was a real reason to do cross-client event waiting for some application specific use)?

nyet (Mon, 04 Feb 2019 18:14:12 GMT):
@Maxim_Samarin Alternately, the other use I can see for that registration code sequence is to trap some sort of time out condition where `Execute()` might succeed but some other (unspecified) problem causes a timeout that can only be detected by waiting for the CC event.

MHBauer (Wed, 06 Feb 2019 22:31:18 GMT):
Is there an automated way to create an sdk config? Every example I see is "download this file for this example network" or "copy this gigantic text document into a file for the preconfigured network". o

nyet (Wed, 06 Feb 2019 23:54:39 GMT):
@MHBauer I have been working on giving the SDK a lot more sane defaults so the damn config isn't so big. You can look at https://github.com/Blockdaemon/hlf-database-app to see my approach.

nyet (Wed, 06 Feb 2019 23:54:39 GMT):
@MHBauer I have been working on giving the SDK a lot more sane defaults so the damn config isn't so big. You can look at https://github.com/Blockdaemon/hlf-database-app to see my approach. Your complaint is literally my biggest peeve about fabric in general; huge overly complex configuration files with zero sane defaults.

nyet (Wed, 06 Feb 2019 23:54:39 GMT):
@MHBauer I have been working on giving the SDK a lot more sane defaults so the damn config isn't so big. You can look at https://github.com/Blockdaemon/hlf-database-app to see my approach. Your complaint is literally my biggest peeve about fabric in general; huge overly complex configuration files with zero sane defaults. It is a combination of some IBM thing plus the way dockerbois do War and Peace yaml.

MHBauer (Wed, 06 Feb 2019 23:57:37 GMT):
I worked on docker, I don't think docker can be accused of not having defaults.

MHBauer (Wed, 06 Feb 2019 23:57:49 GMT):
but yes, sane defaults, all over.

MHBauer (Wed, 06 Feb 2019 23:57:53 GMT):
nice to meet you

nyet (Wed, 06 Feb 2019 23:57:56 GMT):
:)

nyet (Wed, 06 Feb 2019 23:58:16 GMT):
Can I ask you to fix variable expansion in docker/docker-compose, thanks :)

MHBauer (Wed, 06 Feb 2019 23:58:26 GMT):
and if you need any docker changes or issues to look at, let me know, maybe we can scratch each others back.

MHBauer (Wed, 06 Feb 2019 23:58:38 GMT):
compose, no,

MHBauer (Wed, 06 Feb 2019 23:58:42 GMT):
core docker, maybe.

nyet (Wed, 06 Feb 2019 23:59:06 GMT):
yea it goes along with the config file complexity peeve... a lot of the pain could be fixed if you could variable subsitute yaml, but unfortuantely yaml doesn't work that way w/o templating engines

MHBauer (Thu, 07 Feb 2019 00:00:15 GMT):
big problem in the kube world as well.

nyet (Thu, 07 Feb 2019 00:06:39 GMT):
yea, i'm doing everything with my own jinja wrappers :/

nyet (Thu, 07 Feb 2019 00:07:10 GMT):
I have to do the same thing here https://github.com/Blockdaemon/hlf-service-network

nyet (Thu, 07 Feb 2019 00:07:12 GMT):
:/

MHBauer (Thu, 07 Feb 2019 00:10:43 GMT):
yup, lot of internal use of jinja here as well. (not by me, can't help)

MHBauer (Thu, 07 Feb 2019 00:11:35 GMT):
repo looks interesting. may try. see if i can install my chaincode on it.

nyet (Thu, 07 Feb 2019 00:12:01 GMT):
there's k8 stuff there too, works on minikube and gke

nyet (Thu, 07 Feb 2019 00:12:50 GMT):
I'm a docker/k8s noob so if you see anything obviously dumb please let me know!

nyet (Thu, 07 Feb 2019 00:21:43 GMT):
@MHBauer How about this one heh https://github.com/docker/for-linux/issues/264 (if you're serious grin)

nyet (Thu, 07 Feb 2019 00:25:34 GMT):
even worse, my comment got hidden i think https://github.com/docker/for-linux/issues/264#issuecomment-429588648

nyet (Thu, 07 Feb 2019 06:38:35 GMT):
```# github.com/hyperledger/fabric-sdk-go/pkg/common/providers/test/mockfab ../../hyperledger/fabric-sdk-go/pkg/common/providers/test/mockfab/mockfab.gen.go:43:8: m.ctrl.T undefined (type *gomock.Controller has no field or method T)``` ```../../hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/metrics/prometheus/provider.go:25:20: cannot use "github.com/hyperledger/fabric-sdk-go/vendor/github.com/prometheus/client_golang/prometheus".CounterOpts literal (type "github.com/hyperledger/fabric-sdk-go/vendor/github.com/prometheus/client_golang/prometheus".CounterOpts) as type "github.com/prometheus/client_golang/prometheus".CounterOpts in argument to "github.com/go-kit/kit/metrics/prometheus".NewCounterFrom ../../hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/metrics/prometheus/provider.go:39:18: cannot use "github.com/hyperledger/fabric-sdk-go/vendor/github.com/prometheus/client_golang/prometheus".GaugeOpts literal (type "github.com/hyperledger/fabric-sdk-go/vendor/github.com/prometheus/client_golang/prometheus".GaugeOpts) as type "github.com/prometheus/client_golang/prometheus".GaugeOpts in argument to "github.com/go-kit/kit/metrics/prometheus".NewGaugeFrom ../../hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/metrics/prometheus/provider.go:53:22: cannot use "github.com/hyperledger/fabric-sdk-go/vendor/github.com/prometheus/client_golang/prometheus".HistogramOpts literal (type "github.com/hyperledger/fabric-sdk-go/vendor/github.com/prometheus/client_golang/prometheus".HistogramOpts) as type "github.com/prometheus/client_golang/prometheus".HistogramOpts in argument to "github.com/go-kit/kit/metrics/prometheus".NewHistogramFrom```

nyet (Thu, 07 Feb 2019 06:53:06 GMT):
Adding prometheus pretty much broke building my app :/'

mahoney1 (Thu, 07 Feb 2019 12:41:23 GMT):
a reminder that the Fabric Developer Community call later today is at 5pm UTC (5pm UK, 12pm ET, 9am PT) using Zoom: https://zoom.us/my/hyperledger.community .  The agenda is here -> https://wiki.hyperledger.org/display/fabric/Fabric+Developer+-+Meeting+Agendas+ . Please come join us, hear about exciting new work in progress, give feedback, ask questions or share your stories ! More info on the call can be found in this mail -> https://lists.hyperledger.org/g/fabric/message/5475 ... later, Paul (Fabric Developer Community Lead)

dabbertorres (Thu, 07 Feb 2019 15:05:49 GMT):
Has joined the channel.

Baha-sk (Thu, 07 Feb 2019 15:18:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=WeHEPv9mxCruvwoLJ) @nyet @nyet I assume you pulled the latest sdk change, can you build the sdk from scratch? delete vendor folder and do make all

Baha-sk (Thu, 07 Feb 2019 15:20:15 GMT):
fyi mockgen has been updated as well, you should not see `(type *gomock.Controller has no field or method T)` anymore since T is now available, but you need to update the mockgen library in vendor.. this is way it's safer to remove the vendor folder then do make all

Baha-sk (Thu, 07 Feb 2019 15:20:15 GMT):
fyi mockgen has been updated as well, you should not see `(type *gomock.Controller has no field or method T)` anymore since T is now available, but you need to update the mockgen library in vendor.. this is why it's safer to remove the vendor folder then do make all

vanitas92 (Thu, 07 Feb 2019 15:34:37 GMT):
Hello guys, We started upgrading to 1.4 but since the upgrade we are experiencing lots of latency even in read operations. We are talking about seconds of reading data. This has never happened before on 1.0 or 1.2. It is very curious since executing the same API paths there are some times where there is almost no latency, whereas other we got up to 15 seconds of latency. I do not know if someone has experienced this problem and how did you guys solve it. Attaching the image of the logging of our application.

vanitas92 (Thu, 07 Feb 2019 15:35:24 GMT):

Clipboard - February 7, 2019 4:35 PM

nyet (Thu, 07 Feb 2019 16:29:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dBRotCLc8tk4YrtuX) @Baha-sk Yea I had to delete vendor folder and do "dep ensure". Problem solved.

knibals (Thu, 07 Feb 2019 17:56:06 GMT):
Has joined the channel.

plato (Thu, 07 Feb 2019 17:56:14 GMT):
Has joined the channel.

billd100 (Thu, 07 Feb 2019 18:44:38 GMT):
Has joined the channel.

billd100 (Thu, 07 Feb 2019 18:50:55 GMT):
For a team with language flexibility, is this the recommended SDK? Wondering in light of 1.4 tutorials written for Node and the programming model updates being uncertain for the Go SDK in 2.0 while already being implemented in 1.4 for Node.

HaydenG (Thu, 07 Feb 2019 19:17:24 GMT):
Has joined the channel.

govinda-attal (Thu, 07 Feb 2019 23:58:18 GMT):
hello all, Any examples on Unit tests with respect to Privacy collections using golang for chaincode implementation? Or please guide me a valid channel where I could post this question :-)

rootDistress (Fri, 08 Feb 2019 05:34:28 GMT):
I have a situation here, I'm creating dynamic channel and adding orgs, peers to it with overriding endpoint config and using dynamic discovery, however when using discoverPeers (https://github.com/hyperledger/fabric-sdk-go/blob/768766943cc713f3ffcc439be3d4c99d4f72c6c5/test/integration/e2e/orgs/multiple_orgs_minconfig_test.go#L110) I see it only returns random number of peers in channel and not all of them and retries to reach expected number. Can someone tell me why that happens? I believe there might be times when the network gets too large and this might fail, Is there a counter method to get peers in channel or even peers of the org that are in channel ?

yacovm (Fri, 08 Feb 2019 12:18:46 GMT):
@rootDistress check the logs of the peer to see what it returns in response to the discovery queryt

yacovm (Fri, 08 Feb 2019 12:19:34 GMT):
you can also try to use the [discovery CLI](https://hyperledger-fabric.readthedocs.io/en/latest/discovery-cli.html) to see if it's a problem in the peer, or in the SDK

rootDistress (Fri, 08 Feb 2019 12:57:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4eAEjX9biqgkpQNcr) @yacovm Idealy, Should it return all the peers all the time in a query?

yacovm (Fri, 08 Feb 2019 12:59:08 GMT):
in a peer query? yes.

yacovm (Fri, 08 Feb 2019 12:59:58 GMT):
note that if you have from some reason - membership changes in the peers - you will see them in the peer logs: "membership changed" or something like that, if you're in v1.4

haardikkk (Sun, 10 Feb 2019 05:12:23 GMT):
Has joined the channel.

circlespainter (Sun, 10 Feb 2019 14:56:39 GMT):
Has joined the channel.

ArpitKhurana1 (Mon, 11 Feb 2019 06:48:02 GMT):
Hey, I am trying to get the exact error message returned by chaincode, during execute transaction. Go channel client returns a response object and error. While error has that message but it also has other errors wrapped around the chaincode shim error. And I cant find the same in Response object either. How can I fetch the exact error message?

nyet (Mon, 11 Feb 2019 06:56:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=vy3FLrD8JX9ksQHs4) @ArpitKhurana1 Possibly related: https://jira.hyperledger.org/browse/FABG-775

ArpitKhurana1 (Mon, 11 Feb 2019 07:17:04 GMT):
@nyet Is it merged? I am not sure (new to gerrit)

nyet (Mon, 11 Feb 2019 07:18:24 GMT):
No it is unfortunately stuck in CR awaiting test cases.

ArpitKhurana1 (Mon, 11 Feb 2019 07:24:57 GMT):
@nyet Okay Thanks

xDxD (Mon, 11 Feb 2019 08:06:26 GMT):
Has joined the channel.

xDxD (Mon, 11 Feb 2019 08:16:56 GMT):
Guys , How can I update channel config used go sdk ? Such as adding an organization, Is there any example?

mtng (Mon, 11 Feb 2019 09:46:41 GMT):
Has joined the channel.

mtng (Mon, 11 Feb 2019 09:48:49 GMT):
Hi everyone, I would like to create users and manage them in my api with the sdk, is there any documentation?

mtng (Mon, 11 Feb 2019 09:48:49 GMT):
Hi everyone, I would like to create users and manage them in my api with the sdk and the fabric-ca, is there any documentation?

ArpitKhurana1 (Mon, 11 Feb 2019 11:43:32 GMT):
@nyet The changes done to fix that are not enough, I had to do few more to actually make the response come back in case of error

nyet (Mon, 11 Feb 2019 22:46:06 GMT):
@ArpitKhurana1 Any chance you can add to the PR and maybe make a few test cases? I'm sure the sdk maintainers would like to close the PR

ArpitKhurana1 (Tue, 12 Feb 2019 10:43:48 GMT):
@nyet OK I will try , probably will need to have a better understanding of project

phantom.assasin (Tue, 12 Feb 2019 19:10:17 GMT):
Is there a way to remove a peer from an channel in fabric?

MHBauer (Tue, 12 Feb 2019 20:19:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rMkru4gkRJNmkmwbB) @nyet good comment. I can think of a couple reasons it's broke the way it is. Win and Mac are in VMs, so I'll bet there's a specific-to-the-vm config going on there. It looks like compose supports setting the extra_hosts, which is what I'd suggest as a workaround. The last thing, is I'm very concerned that anyone is doing that at all. I don't understand the use case. The containers shouldn't talk to the host.

nyet (Tue, 12 Feb 2019 21:45:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9JNwkReXitwpQPQRt) @MHBauer Ironically, for me, it was to get a useful DNS resolver... but in some of my other projects, proxies, VPN endpoints, etc.

MHBauer (Tue, 12 Feb 2019 22:07:19 GMT):
hmn, I've not done a lot with configuring the networking. I think there are some flags, but they might be on the daemon.

nyet (Tue, 12 Feb 2019 22:08:20 GMT):
The main thing is that I needed to resolve hosts on an internal DNS server, and not 8.8.8.8

nyet (Tue, 12 Feb 2019 22:08:43 GMT):
e.g. split horizon

nyet (Tue, 12 Feb 2019 22:09:48 GMT):
Imagine my suprise when they all hit 8.8.8.8 ```# intercept google dns requests -A PREROUTING -d 8.8.8.8 -i eth1 -p udp -m udp --dport 53 -j DNAT --to-destination 192.168.19.1 -A PREROUTING -d 8.8.4.4 -i eth1 -p udp -m udp --dport 53 -j DNAT --to-destination 192.168.19.1 -A PREROUTING -d 8.8.8.8 -i eth1 -p tcp -m tcp --dport 53 -j DNAT --to-destination 192.168.19.1 -A PREROUTING -d 8.8.4.4 -i eth1 -p tcp -m tcp --dport 53 -j DNAT --to-destination 192.168.19.1 ```

nyet (Tue, 12 Feb 2019 22:10:53 GMT):
(apologies to the channel for non-fabric content ..) we can take this to DM if you'd prefer :)

Ferok (Wed, 13 Feb 2019 07:30:29 GMT):
Has joined the channel.

rickr (Wed, 13 Feb 2019 17:00:49 GMT):
Has joined the channel.

Baha-sk (Wed, 13 Feb 2019 20:23:35 GMT):
@phantom.assasin a channel is configured with organizations (MSPs) .. by updating the channel config block, you can add/remove organizations.. peers are managed by the organizations, each org can have as many peers as they want, the number of peers is not managed by the channel

phantom.assasin (Thu, 14 Feb 2019 00:11:54 GMT):
Hi, I am trying to create a channel using go sdk. I am getting below error: ```2019/02/13 15:28:31 create channel failed: SendEnvelope failed: calling orderer 'orderer.example.com:7050' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: error authorizing update: error validating ReadSet: readset expected key [Group] /Channel/Application at version 0, but got version 1```

phantom.assasin (Thu, 14 Feb 2019 00:12:13 GMT):
Any clue as to what is the issue? My orderer is running perfectly fine.

phantom.assasin (Thu, 14 Feb 2019 00:31:37 GMT):

Screen Shot 2019-02-13 at 4.31.20 PM.png

phantom.assasin (Thu, 14 Feb 2019 00:56:17 GMT):
Ok so turns out, channel was already created

haardikkk (Fri, 15 Feb 2019 03:55:15 GMT):
Hey guys, somewhat newbie question, the main app i build using the fabric go sdk which will be responsible for installing chaincode etc, who will hold that? the network admin? does this pose any sort of security issues if private data is being sent over the network can he/they spy on stuff?

nyet (Fri, 15 Feb 2019 03:59:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nfFgd4oHFskT43FmK) @haardikkk The peer and orderer private tls certificates secure the connections. Anyone who has either key can sniff the data on the wire.

haardikkk (Fri, 15 Feb 2019 04:01:02 GMT):
understood, so the queries to the blockchain etc will show encrypted data? or are they only for basic blocks/network info and not being able to read information about specific structs being passed around?

nyet (Fri, 15 Feb 2019 04:03:30 GMT):
see also TLS and GRPC, sort of beyond the scope of fabric itself.

haardikkk (Fri, 15 Feb 2019 04:03:56 GMT):
alright, thank you!

haardikkk (Fri, 15 Feb 2019 04:04:52 GMT):
im basically concerned that since im learning and working towards building a network where the different peers dont necessarily trust each other, i want to limit access to information as much as possible and keep it secure

haardikkk (Fri, 15 Feb 2019 04:05:07 GMT):
was worried the network admin could sniff on private data

nyet (Fri, 15 Feb 2019 04:05:25 GMT):
If the network admin has access to any private keys, he can do just that.

haardikkk (Fri, 15 Feb 2019 04:05:46 GMT):
so you suggest the network admin not be someone who owns a peer node ?

haardikkk (Fri, 15 Feb 2019 04:06:30 GMT):
is there any way to improve the security around this? i cant imagine a 'overlord' organization fit for my network which would be trusted by all the peers

nyet (Fri, 15 Feb 2019 04:06:36 GMT):
If he owns the peer node he can see anything the peer node can decrypt

nyet (Fri, 15 Feb 2019 04:06:42 GMT):
I don't think you really understand how TLS works :/

haardikkk (Fri, 15 Feb 2019 04:06:51 GMT):
aaah so only what he can decrypt right

haardikkk (Fri, 15 Feb 2019 04:06:52 GMT):
thats ok

haardikkk (Fri, 15 Feb 2019 04:07:00 GMT):
by private data i meant the link you mentioned to me earlier in the morning

haardikkk (Fri, 15 Feb 2019 04:07:06 GMT):
itll show up encrypted right

nyet (Fri, 15 Feb 2019 04:08:13 GMT):
If the peer is supposed to be able to decrypt the data, then yes, anyone who has access to that peer's private keys can see that data. If th peer's private key is not sufficient to decrypt the data, the peer's private key can't be used by anyone to decrypt it.

haardikkk (Fri, 15 Feb 2019 04:08:25 GMT):
so when such a peer 'installs chaincode' through the application, does it only install on their node? can he 'invite' other nodes to also update their chaincode to that model or do they have to do it themselves through their apps? (cant find documentation regarding this)

haardikkk (Fri, 15 Feb 2019 04:08:35 GMT):
I understand that now, thanks for the clarification

nyet (Fri, 15 Feb 2019 04:08:54 GMT):
all peers on the same channel get the same chaincode if they are endorsing peers

haardikkk (Fri, 15 Feb 2019 04:10:02 GMT):
understood, thanks a lot!

nyet (Fri, 15 Feb 2019 04:10:25 GMT):
NP but i highly suggest you do a bit of TLS and encryption research in general

nyet (Fri, 15 Feb 2019 04:10:49 GMT):
e.g. the difference between what the TLS keys do and what the endorsing keys do...

nyet (Fri, 15 Feb 2019 04:13:31 GMT):
The problem is that Fabric's security model is extremely confusing.. so you may want to back up a bit and look in to some of the more simple systems first.

avkkiran (Fri, 15 Feb 2019 05:53:28 GMT):
Has joined the channel.

Rajatsharma (Fri, 15 Feb 2019 11:07:25 GMT):
Is there anyway I could get to know or print what's in Iterator that is returned from any query ? Are there only two functions HasNext() and Next(), in that.

Rajatsharma (Fri, 15 Feb 2019 11:08:49 GMT):
I wanted to know how does GetQueryResult() work. Does it fetch all the records at once and then we iterate in those records. Or do we hit our ledger for every next value ?

dave.enyeart (Fri, 15 Feb 2019 13:08:48 GMT):
@Rajatsharma Chaincode api questions are more appropriate for #fabric-chaincode-dev . The short answer is that chaincode will request result sets in batches of 1000 from couchdb. If you iterate down to the 1001st record, chaincode will query couchdb for the next 1000. See more details at https://logs.hyperledger.org/production/vex-yul-hyp-jenkins-3/fabric-docs-build-x86_64/1334/html/couchdb_as_state_database.html#couchdb-pagination

Rajatsharma (Fri, 15 Feb 2019 13:21:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7xfbMQqvKWQvfFwCG) @dave.enyeart Thanks !

Rajatsharma (Fri, 15 Feb 2019 13:26:21 GMT):
Actually I wanted to perform update on those records, that's why I was using `GetQueryResult()`. because `GetQueryResultWithPagination()` is read-only. I've done the part to fetch top records but I'm facing some issues as I'm hitting the ledger before the whole data gets committed. So I'm working on that. Still thanks for inputs on both channels. I'll try to se them.

Rajatsharma (Fri, 15 Feb 2019 13:26:21 GMT):
Actually I wanted to perform update on those records, that's why I was using `GetQueryResult()`. because `GetQueryResultWithPagination()` is read-only. I've done the part to fetch top records but I'm facing some issues as I'm hitting the ledger before the whole data gets committed. So I'm working on that. Still thanks for inputs on both channels. I'll try to use them.

JonasM (Fri, 15 Feb 2019 15:16:34 GMT):
Has joined the channel.

Jgnuid (Mon, 18 Feb 2019 03:31:02 GMT):
Has joined the channel.

Jgnuid (Mon, 18 Feb 2019 03:33:07 GMT):
Hi. Can I set the client msp path to use the go sdk? Instead of using the fabric ca for enrolling

nyet (Mon, 18 Feb 2019 03:33:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=zubfv7zFmqWaY2tGY) @Jgnuid Yes.

Jgnuid (Mon, 18 Feb 2019 03:34:08 GMT):
Any idea how? Every example I see involves a yaml defining the CA service...

nyet (Mon, 18 Feb 2019 03:35:46 GMT):
`client->credentialStore->cryptoStore`

nyet (Mon, 18 Feb 2019 03:36:34 GMT):
`organizations->->cryptoPath`

Jgnuid (Mon, 18 Feb 2019 03:45:00 GMT):
@nyet , not sure I understand what do yo mean.

Jgnuid (Mon, 18 Feb 2019 03:45:39 GMT):
Do you mean setting up the path by code?

nyet (Mon, 18 Feb 2019 03:46:01 GMT):
@Jgnuid No, in `config.yaml`

Jgnuid (Mon, 18 Feb 2019 03:51:48 GMT):
Oh ok. So then in cryptopath I should put the msp path that contains the MSP of the client, which contains the signcerts and keystore folders, right?

nyet (Mon, 18 Feb 2019 03:51:58 GMT):
yep

Jgnuid (Mon, 18 Feb 2019 03:52:04 GMT):
Sorry. Cryptostore

nyet (Mon, 18 Feb 2019 03:52:10 GMT):
no path, not store

Jgnuid (Mon, 18 Feb 2019 03:52:15 GMT):
In cryptopath there aren't krystores

nyet (Mon, 18 Feb 2019 03:52:19 GMT):
store is for enrollment

Jgnuid (Mon, 18 Feb 2019 03:54:28 GMT):
Cryptostore.path will contain keystore folder.

Jgnuid (Mon, 18 Feb 2019 03:54:33 GMT):
Right.

Jgnuid (Mon, 18 Feb 2019 03:55:19 GMT):
The paths of the msp in the organization sections are only x509 of the CAs... No keys there. Right?

nyet (Mon, 18 Feb 2019 03:56:17 GMT):
The MSP generally has 4 subdirs, each with a single file

nyet (Mon, 18 Feb 2019 03:56:50 GMT):
err 5

Jgnuid (Mon, 18 Feb 2019 03:56:54 GMT):
Yeah.. but only in the cryptostore msp there should be the keystore folder

nyet (Mon, 18 Feb 2019 03:57:07 GMT):
yea

Jgnuid (Mon, 18 Feb 2019 03:57:13 GMT):
Because for other orgs I don't have them

Jgnuid (Mon, 18 Feb 2019 03:57:14 GMT):
Cool

nyet (Mon, 18 Feb 2019 03:57:15 GMT):
keystore is the only private key

nyet (Mon, 18 Feb 2019 03:57:19 GMT):
the other 4 have pems

Jgnuid (Mon, 18 Feb 2019 03:57:27 GMT):
Excellent

Jgnuid (Mon, 18 Feb 2019 03:58:18 GMT):
Another quick question... Does fabric consider expiration dates of certs? Should I care in 5 years of renewing the CA certs?

Jgnuid (Mon, 18 Feb 2019 03:58:24 GMT):
That would be painful

nyet (Mon, 18 Feb 2019 04:52:28 GMT):
Yes, that is a big problem with fabric: distributing new keys. No clue how to go about it, maybe somebody else can chime in.

donamKim (Mon, 18 Feb 2019 04:59:34 GMT):
Has joined the channel.

donamKim (Mon, 18 Feb 2019 04:59:57 GMT):
Hello

donamKim (Mon, 18 Feb 2019 05:07:44 GMT):
Is there a way to create a FabricSDK instance without a config.yaml file?

donamKim (Mon, 18 Feb 2019 05:11:06 GMT):
When a fabric network is fully deployed, is there a way to access it with only url in fabric-sdk-go?

nyet (Mon, 18 Feb 2019 05:14:32 GMT):
Yes config.yaml can be empty now

nyet (Mon, 18 Feb 2019 05:14:59 GMT):
Not all of the defaults make sense still though.

nyet (Mon, 18 Feb 2019 05:15:10 GMT):
I have been working towards it.

nyet (Mon, 18 Feb 2019 05:15:44 GMT):
But you can do everything via environment variables or command line arguments; you'll just have to set up your code to do so.

nyet (Mon, 18 Feb 2019 05:16:15 GMT):
you still need (minimally) orderer, peer, MSP though.

donamKim (Mon, 18 Feb 2019 05:23:00 GMT):
I don`t understand what you mean. Can you show me the example config.yaml file you mentioned?

nyet (Mon, 18 Feb 2019 05:43:25 GMT):
I mean you can have an empty one

nyet (Mon, 18 Feb 2019 05:43:41 GMT):
and fill in the config in code instaead, based on command line or getenv()

rootDistress (Mon, 18 Feb 2019 06:18:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Wgit69mbcTGMEchag) @nyet or endpointconfig

rootDistress (Mon, 18 Feb 2019 06:36:36 GMT):
@nyet To add to that question, In case we use endpoint config and identity config to dynamically change the channel config etc, Is there a way to get back the config in situation the process running main.go crashes?

rootDistress (Mon, 18 Feb 2019 06:36:36 GMT):
@nyet To add to that question, In case we use endpoint config and identity config to dynamically change the channel config etc, Is there a way to get back the config in situation the process running main.go crashes? while the docker containers are still intact.

donamKim (Mon, 18 Feb 2019 06:49:11 GMT):
@nyet Can you explain specifically what it says to type the command line?

nyet (Mon, 18 Feb 2019 06:49:56 GMT):
@donamKim No, i mean in your own go program you can parse command line options, build a config, and instantate a sdk

nyet (Mon, 18 Feb 2019 06:50:17 GMT):
@rootDistress No, that doesn't seem to be possible afaik

nyet (Mon, 18 Feb 2019 06:50:59 GMT):
@donamKim I do some things via `getenv()` in my project

donamKim (Mon, 18 Feb 2019 06:54:41 GMT):
@nyet Well, thank you. I'll try it.

Jgnuid (Mon, 18 Feb 2019 11:58:32 GMT):
@nyet thanks for your help. Gonna ask in fabric-questions and see if we can have other insights

mahoney1 (Mon, 18 Feb 2019 17:29:58 GMT):
fyi / heads-up : next Fabric Developer Community call is planned for this Thurs February 21st - https://wiki.hyperledger.org/display/fabric/Meeting+Agendas%3A+Community+Call - contributions are welcome to the agenda ! More info on the call can be found [here](https://lists.hyperledger.org/g/fabric/topic/hyperledger_fabric_developer/29654592?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,29654592)

devplayg (Tue, 19 Feb 2019 00:13:57 GMT):
Has joined the channel.

devplayg (Tue, 19 Feb 2019 00:14:19 GMT):
Morning~ :)

mtng (Tue, 19 Feb 2019 07:44:37 GMT):
Hi! Are wallets implemented in the go sdk? I can't not find them https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/wallet.html?highlight=identity

AVK (Tue, 19 Feb 2019 08:46:00 GMT):
Has joined the channel.

AVK (Tue, 19 Feb 2019 09:07:25 GMT):
Hi! I have several questions: 1. Why on Go SDK is not listed in SDK list here https://hyperledger-fabric.readthedocs.io/en/latest/fabric-sdks.html ? What is current status of the project? 2. So far i found two good examples of SDK usage. SecureKey CLI client, with great coverage of functionality, but a bit hard to understand right away, because of using a lot of abstraction and cobra related structures. And Chainhero tutorial, witch is pretty basic, but great for start. Is there any other good examples? 3. What about documentation, i guess it is still in plans and not published anywhere? Thanks in advance!

AVK (Tue, 19 Feb 2019 09:07:25 GMT):
Hi! I have several questions: 1. Why Go SDK is not listed in SDK list here https://hyperledger-fabric.readthedocs.io/en/latest/fabric-sdks.html ? What is current status of the project? 2. So far i found two good examples of SDK usage. SecureKey CLI client, with great coverage of functionality, but a bit hard to understand right away, because of using a lot of abstraction and cobra related structures. And Chainhero tutorial, witch is pretty basic, but great for start. Is there any other good examples? 3. What about documentation, i guess it is still in plans and not published anywhere? Thanks in advance!

nyet (Tue, 19 Feb 2019 16:50:18 GMT):
@AVK it isn't listed mostly because there is no documentation to link to, maybe :/ You can look at my simple app for an example https://github.com/Blockdaemon/hlf-database-app

Jgnuid (Tue, 19 Feb 2019 18:26:59 GMT):
Question: When doing .sdk.ChannelContext() I get an error "user not found". In the yaml, in "client"->"cryptoconfig"->"path", I have the full path of the folder that has the cryptomaterial In "organizations"->"myOrg"->"cryptoPath", I have the relative path to the 'msp' folder of the client. What might I be doing wrong?

Baha-sk (Tue, 19 Feb 2019 18:35:50 GMT):
@Jgnuid have you tried to add the {username} dynamic variable as in this path for your org? https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L261 ... user not found is usually the crypto material folder doesn't have the user your connecting with or your not passing a user

Baha-sk (Tue, 19 Feb 2019 18:36:45 GMT):
we usually pass in the user to the context as in this example: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L101

Jgnuid (Tue, 19 Feb 2019 18:37:01 GMT):
Yes, in fact my cryptopath is literally: peerOrganizations/myorg.com/users/{userName}@myorg.com/msp

Baha-sk (Tue, 19 Feb 2019 18:37:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=26p8y2jhaifLorAuT) @mtng wallets are not supported by Go SDK (for now), it's a Node SDK concept as per the docs

Baha-sk (Tue, 19 Feb 2019 18:39:32 GMT):
@Jgnuid did you use `fabsdk.WithUser("yourUserID")` when creating the client context?

Jgnuid (Tue, 19 Feb 2019 18:40:14 GMT):
@Baha-sk , yes. Additionally, if I concatenate cryptoconfig.path and cryptoPath to get the full path, and I paste it in the vm and do 'cd PASTEHERE', the folder really exists (changing {userName} to the user I want to use)

Baha-sk (Tue, 19 Feb 2019 18:40:15 GMT):
for instance `fabsdk.WithUser("Admin")` can be passed

Baha-sk (Tue, 19 Feb 2019 18:42:15 GMT):
under that crypto path for your org, do you have a folder called `users`?

Jgnuid (Tue, 19 Feb 2019 18:43:13 GMT):
mm in cryptopath ?

Baha-sk (Tue, 19 Feb 2019 18:44:16 GMT):
`"organizations"->"myOrg"->"cryptoPath"`

Baha-sk (Tue, 19 Feb 2019 18:45:29 GMT):
or this relative path from what you pasted earlier : `peerOrganizations/myorg.com/`

Baha-sk (Tue, 19 Feb 2019 18:45:50 GMT):
there should be a folder called users and in it folders for each user

Jgnuid (Tue, 19 Feb 2019 18:45:59 GMT):
There I have: 'cacerts', 'IssuerPublicKey', 'IsserrevocationpublicKey', 'keystore', 'signcerts', and 'user' But the 'user' folder is empty.

Jgnuid (Tue, 19 Feb 2019 18:46:12 GMT):
But the cryptoPath has the username in its path

Jgnuid (Tue, 19 Feb 2019 18:46:19 GMT):
is the msp for the user

Jgnuid (Tue, 19 Feb 2019 18:46:27 GMT):
why should have things in 'user'?

Baha-sk (Tue, 19 Feb 2019 18:46:32 GMT):
ie folder like `Admin@myorg.com`

Baha-sk (Tue, 19 Feb 2019 18:46:48 GMT):
not user, `users`

Jgnuid (Tue, 19 Feb 2019 18:46:56 GMT):
No.. that folder isn't there.

Jgnuid (Tue, 19 Feb 2019 18:47:13 GMT):
But lookin in your example: cryptoPath: peerOrganizations/org1.example.com/users/{username}@org1.example.com/msp The cryptoPath is already into the users folder

Jgnuid (Tue, 19 Feb 2019 18:48:02 GMT):
Maybe I'm thinking something wrong.

Baha-sk (Tue, 19 Feb 2019 18:48:08 GMT):
you can run `make integration-tests` and see the msp structure generated under `fabric-sdk-go/test/fixtures/fabric/v1/crypto-config`

Jgnuid (Tue, 19 Feb 2019 18:49:12 GMT):
Sorry, I understanded your question wrong.

Baha-sk (Tue, 19 Feb 2019 18:49:22 GMT):
in it, you can find the relative path for `Admin` and `User1` folders (as per the config under: `peerOrganizations/org1.example.com/users/{username}@org1.example.com/msp`)

Baha-sk (Tue, 19 Feb 2019 18:49:22 GMT):
in it, you can find the relative path for `Admin@org1.example.com` and `User1@org1.example.com` folders (as per the config under: `peerOrganizations/org1.example.com/users/{username}@org1.example.com/msp`)

Jgnuid (Tue, 19 Feb 2019 18:49:55 GMT):
Yes... I've already checked that the folder really exists

Jgnuid (Tue, 19 Feb 2019 18:50:17 GMT):
In peerOrganizations/myorg.com/, I have the users folder

Baha-sk (Tue, 19 Feb 2019 18:50:42 GMT):
what are user folders do you have in there?

Jgnuid (Tue, 19 Feb 2019 18:51:12 GMT):
admin@myorg.com Only that folder

Jgnuid (Tue, 19 Feb 2019 18:51:29 GMT):
fabsdk.WithUser("admin") is how I configured it in code

Baha-sk (Tue, 19 Feb 2019 18:52:13 GMT):
ok, then this should be good .. does admin@myorg.com have `msp` and `tls` folders

Jgnuid (Tue, 19 Feb 2019 18:52:59 GMT):
Yes, both.

Jgnuid (Tue, 19 Feb 2019 18:53:21 GMT):
And into msp, I have: cacerts IssuerPublicKey IssuerRevocationPublicKey keystore signcerts user

Baha-sk (Tue, 19 Feb 2019 18:53:42 GMT):
msp has keystore and a private key in it?

Jgnuid (Tue, 19 Feb 2019 18:53:45 GMT):
The only 'weird' thing is that into 'user' there's nothing. Is that a problem?

Jgnuid (Tue, 19 Feb 2019 18:54:04 GMT):
yes, 'keystore' folder has the private keys

Baha-sk (Tue, 19 Feb 2019 18:54:34 GMT):
what is the path of 'user' you're referring to?

Jgnuid (Tue, 19 Feb 2019 18:57:13 GMT):
The path is /peerOrganizations/myorg.com/users/admin@myorg.com/msp

Baha-sk (Tue, 19 Feb 2019 18:57:51 GMT):
under this path, there should be no 'user' folder

Baha-sk (Tue, 19 Feb 2019 18:57:59 GMT):
only 'tls' and 'msp'

Jgnuid (Tue, 19 Feb 2019 18:58:22 GMT):
the 'user' folder is in /peerOrganizations/myorg.com/users/admin@myorg.com/msp

Jgnuid (Tue, 19 Feb 2019 18:58:26 GMT):
not in '/peerOrganizations/myorg.com/users/admin@myorg.com

Jgnuid (Tue, 19 Feb 2019 18:58:45 GMT):
in /peerOrganizations/myorg.com/users/admin@myorg.com there is only msp and tls

Baha-sk (Tue, 19 Feb 2019 18:59:11 GMT):
under msp there should be admincerts, cacerts, keystore, signcerts and tlscacerts

Baha-sk (Tue, 19 Feb 2019 18:59:18 GMT):
this is the standard msp structure

Jgnuid (Tue, 19 Feb 2019 18:59:50 GMT):
yes, that's the structure.

Baha-sk (Tue, 19 Feb 2019 19:01:01 GMT):
when you said `The only 'weird' thing is that into 'user' there's nothing. Is that a problem?` do you mean the msp folder is empty?

Jgnuid (Tue, 19 Feb 2019 19:01:27 GMT):
No, I mean that the 'user' folder into 'msp' is empty. Which I guess is ok because the 'user' folder in that folder isn't neccessary

Jgnuid (Tue, 19 Feb 2019 19:01:32 GMT):
(it was generate by the ca)

Baha-sk (Tue, 19 Feb 2019 19:01:52 GMT):
or you mean the username `user@myorg.com` is not created?

Baha-sk (Tue, 19 Feb 2019 19:02:08 GMT):
yes, the CA generates it

Jgnuid (Tue, 19 Feb 2019 19:02:33 GMT):
I'm running in circles :/

Jgnuid (Tue, 19 Feb 2019 19:02:38 GMT):
All seems OK

Jgnuid (Tue, 19 Feb 2019 19:03:01 GMT):
I hope I don't have to lookup the code and print some kind of path that the code is looking for... just to check what it's trying to do

Jgnuid (Tue, 19 Feb 2019 19:03:12 GMT):
There's something that im missing

Baha-sk (Tue, 19 Feb 2019 19:04:32 GMT):
if you want more users, then you have tell the CA create more users, you can do that in the cryptogen.yaml file then run the cryptogen cli command again, so the Go SDK example here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/fabric/v1/config/cryptogen.yaml#L21

Baha-sk (Tue, 19 Feb 2019 19:04:32 GMT):
if you want more users, then you have tell the CA to create more users, you can do that in the cryptogen.yaml file then run the cryptogen cli command again, so the Go SDK example here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/fabric/v1/config/cryptogen.yaml#L21

Baha-sk (Tue, 19 Feb 2019 19:04:32 GMT):
if you want more users, then you have tell the CA to create more users, you can do that in the cryptogen.yaml file then run the cryptogen cli command again, see the Go SDK example here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/fabric/v1/config/cryptogen.yaml#L21

Baha-sk (Tue, 19 Feb 2019 19:04:32 GMT):
if you want more users, then you have to tell the CA to create more users, you can do that in the cryptogen.yaml file then run the cryptogen cli command again, see the Go SDK example here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/fabric/v1/config/cryptogen.yaml#L21

Jgnuid (Tue, 19 Feb 2019 19:24:11 GMT):
But I don't want more users... still looking for the problem

Baha-sk (Tue, 19 Feb 2019 19:25:34 GMT):
`(it was generate by the ca)` it is weird, the Go SDK's example doesn't generate a 'user' folder under msp, what version of Fabric are you using?

Baha-sk (Tue, 19 Feb 2019 19:27:55 GMT):
also can you try `fabsdk.WithUser("Admin")` (instead of `fabsdk.WithUser("admin")`) ?

Jgnuid (Tue, 19 Feb 2019 19:30:52 GMT):
@Baha-sk , the CA is 1.3 I tried with "Admin", but have the same problem.

Baha-sk (Tue, 19 Feb 2019 19:32:34 GMT):
gryptogen should be the same though... only peerOrganizations have 'users' folder, the underlying peers/users msp folders don't have 'user'

Baha-sk (Tue, 19 Feb 2019 19:33:53 GMT):
your value of `"client"->"cryptoconfig"->"path"` points to the full path of the crypto-config folder, right?

Jgnuid (Tue, 19 Feb 2019 19:34:05 GMT):
yes

Baha-sk (Tue, 19 Feb 2019 19:34:31 GMT):
also, the reason why I asked for 'Admin' instead of 'admin' is because the ca creates it with a capital 'A'

Jgnuid (Tue, 19 Feb 2019 19:34:39 GMT):
In that path, is where is the 'peerOrganizations' folder

Baha-sk (Tue, 19 Feb 2019 19:34:48 GMT):
yes

Jgnuid (Tue, 19 Feb 2019 19:34:49 GMT):
yes.. I understood that you wanna try that

Jgnuid (Tue, 19 Feb 2019 19:37:46 GMT):
mmm

Jgnuid (Tue, 19 Feb 2019 19:38:06 GMT):
the pem filename under signcerts should comply a particular format?

Baha-sk (Tue, 19 Feb 2019 19:39:39 GMT):
it's standard format as well... I was gonna ask, under users/Admin@myorg.com/msp/signcerts... do you have the cert file named as `Admin@myorg.com-cert.pem` ?

Jgnuid (Tue, 19 Feb 2019 19:40:24 GMT):
Damn, that was the problem

Baha-sk (Tue, 19 Feb 2019 19:40:49 GMT):
yes.. this is how the SDK loads the cert in order to create the user identity

Baha-sk (Tue, 19 Feb 2019 19:41:18 GMT):
this is why we follow the CA's structure to the letter

Jgnuid (Tue, 19 Feb 2019 19:41:38 GMT):
Well but there's a problem

Jgnuid (Tue, 19 Feb 2019 19:41:46 GMT):
I used the fabric-ca-client

Jgnuid (Tue, 19 Feb 2019 19:41:52 GMT):
and it named that file cert.pem

Baha-sk (Tue, 19 Feb 2019 19:42:16 GMT):
weird.. the examples use the cryptogen cli command

Jgnuid (Tue, 19 Feb 2019 19:42:28 GMT):
yeah, maybe cryptogen does it correctly

Jgnuid (Tue, 19 Feb 2019 19:42:36 GMT):
But the Fabric CA not..

Jgnuid (Tue, 19 Feb 2019 19:42:39 GMT):
i cant believe it :/

Baha-sk (Tue, 19 Feb 2019 19:42:54 GMT):
you have another option, by embedding the cert directly in the config

Jgnuid (Tue, 19 Feb 2019 19:43:12 GMT):
I didn't know that was possible

Jgnuid (Tue, 19 Feb 2019 19:43:15 GMT):
and what about the keys?

Jgnuid (Tue, 19 Feb 2019 19:43:57 GMT):
can I put both the cert and privkey in pem format in the yaml?

Baha-sk (Tue, 19 Feb 2019 19:45:44 GMT):
one sec.. let me double check..

Baha-sk (Tue, 19 Feb 2019 19:50:01 GMT):
actually yes... you should be able to use the `users` tag instead of `cryptoPath in your config.yaml`, like this: ```users: Admin: key: pem: | -----BEGIN PRIVATE KEY----- YOURKEYHERE -----END PRIVATE KEY----- cert: pem: | -----BEGIN CERTIFICATE----- YOURCERTHERE -----END CERTIFICATE-----```

Baha-sk (Tue, 19 Feb 2019 19:50:01 GMT):
actually yes... you should be able to use the `users` tag instead of `cryptoPath' in your 'config.yaml`, like this: ```users: Admin: key: pem: | -----BEGIN PRIVATE KEY----- YOURKEYHERE -----END PRIVATE KEY----- cert: pem: | -----BEGIN CERTIFICATE----- YOURCERTHERE -----END CERTIFICATE-----```

Baha-sk (Tue, 19 Feb 2019 19:50:01 GMT):
actually yes... you should be able to use the `users` tag instead of `cryptoPath` in your `config.yaml`, like this: ```users: Admin: key: pem: | -----BEGIN PRIVATE KEY----- YOURKEYHERE -----END PRIVATE KEY----- cert: pem: | -----BEGIN CERTIFICATE----- YOURCERTHERE -----END CERTIFICATE-----```

Baha-sk (Tue, 19 Feb 2019 19:51:35 GMT):
instead of embedding the key/cert, you can also use `path` instead of `pem` and put in the full path of your cert/key (this is safer than adding a raw private key in your config)

nyet (Tue, 19 Feb 2019 19:51:35 GMT):
Err that is crazy. That needs to be fixed

nyet (Tue, 19 Feb 2019 19:52:04 GMT):
what about just symlinking the pem into the right location

Baha-sk (Tue, 19 Feb 2019 19:52:13 GMT):
this is an option (if you don't want to use `cryptoPath`)

Baha-sk (Tue, 19 Feb 2019 19:52:42 GMT):
yes, this is why you can use `path` instead of `pem`

Jgnuid (Tue, 19 Feb 2019 19:53:55 GMT):
Now I'm getting an error: failed constructing descriptor for chaincodes: I didn't put all the peers on the yaml, only one that is the one I'm doing the query. I also see some errors in service.discovery but I think they're not important (I guess).

Jgnuid (Tue, 19 Feb 2019 19:54:38 GMT):
(I double checked, my chaincode name is 'mychaincodes'.. I can call it using the cli peer chaincode query)

Baha-sk (Tue, 19 Feb 2019 19:57:29 GMT):
not sure, this comes from Fabric, could be an endorsement policy error or something. If you have multiple peers for your org, I would suggest listing all the peers under the org in the config

Jgnuid (Tue, 19 Feb 2019 19:58:11 GMT):
Its a query invoke, so the policy shoudn't complain.. gonna add the other peer just to check, but doesnt make much sense for me

Jgnuid (Tue, 19 Feb 2019 19:58:27 GMT):
can I disable discovery in the yaml? Just to be sure isn't producing this

Baha-sk (Tue, 19 Feb 2019 20:01:44 GMT):
it's ok to get discovery errors at the beginning as peers are not found etc... it is needed eventually to communicate with the network and discover other orgs/peers on a channel

Jgnuid (Tue, 19 Feb 2019 20:03:21 GMT):
In the peer I see the error: 2019-02-19 19:56:00.827 UTC [discovery] chaincodeQuery -> ERRO 04e Failed constructing descriptor for chaincode chaincodes: ,: cannot satisfy any principal combination

Baha-sk (Tue, 19 Feb 2019 20:04:57 GMT):
not sure how you created the CC.. I would say create it through the SDK, then you can query it... I suspect you used another org/credential to create the CC on the peer

Baha-sk (Tue, 19 Feb 2019 20:07:39 GMT):
can you compare the certs ?

Jgnuid (Tue, 19 Feb 2019 20:07:52 GMT):
but why i can query it with peer chaincode query with this user?

Jgnuid (Tue, 19 Feb 2019 20:08:07 GMT):
and wh yis this error in the [discovery] tag?.. i don't want any discovery

Jgnuid (Tue, 19 Feb 2019 20:08:10 GMT):
just query the chaincode

Baha-sk (Tue, 19 Feb 2019 20:09:12 GMT):
the peer depends on 'discovery' service to sync blocks between the orderer and other (peer) endorsers

Baha-sk (Tue, 19 Feb 2019 20:10:34 GMT):
you can probably follow the Go SDK end to end example, if you want to create the CC through the SDK: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go#L45

Jgnuid (Tue, 19 Feb 2019 20:12:22 GMT):
I can't recreate the channel, it already has data

Jgnuid (Tue, 19 Feb 2019 20:12:39 GMT):
moreover, it doesn't seem reasonable why then 'peer chaincode query' works...

Baha-sk (Tue, 19 Feb 2019 20:14:41 GMT):
can you copy the user cert from the peer into the sdk config?

Baha-sk (Tue, 19 Feb 2019 20:14:41 GMT):
can you copy the user cert and key from the peer into the sdk config?

Jgnuid (Tue, 19 Feb 2019 20:19:15 GMT):
@Baha-sk , gotta go now. Later I'll continue.. thanks for your help, was really useful. I'll let you know how I continue

Baha-sk (Tue, 19 Feb 2019 20:19:41 GMT):
you're welco @Jgnuid

Baha-sk (Tue, 19 Feb 2019 20:19:41 GMT):
you're welcome @Jgnuid

Baha-sk (Tue, 19 Feb 2019 20:19:48 GMT):
and good luck

yacovm (Tue, 19 Feb 2019 20:26:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fTRk6Z4Bbfv6NLpGb) @what do you mean depends on? It provides the service, it doesnt depend on it

yacovm (Tue, 19 Feb 2019 20:26:21 GMT):
@Baha-sk

Baha-sk (Tue, 19 Feb 2019 20:30:32 GMT):
@yacovm I meant, the peer provides the service and uses it as well (just like the SDKs can use it too), isn't this the case?

Jgnuid (Tue, 19 Feb 2019 20:39:51 GMT):
@yacovm , any idea about my error (not in the pc now, but I can ask :): Failed constructing descriptor for chaincode chaincodes: ,: cannot satisfy any principal combination ?

Jgnuid (Tue, 19 Feb 2019 20:40:12 GMT):
@yacovm , with 'peer chaincode query' it works ok.

yacovm (Tue, 19 Feb 2019 20:49:57 GMT):
@Baha-sk no, the peer doesnt use service discovery...

nyet (Tue, 19 Feb 2019 20:51:03 GMT):
@yacovm It's only for external applications?

yacovm (Tue, 19 Feb 2019 20:53:08 GMT):
Only for clients

yacovm (Tue, 19 Feb 2019 20:53:28 GMT):
Trust me i know 😁

yacovm (Tue, 19 Feb 2019 20:54:25 GMT):
@Jgnuid you probably dont have anchor peers or didnt confihure external endpoints on the peers

nyet (Tue, 19 Feb 2019 20:55:03 GMT):
@yacovm i need your opinion on a cryptogen-less deploy. In theory, it should be possible to deploy an entire network by ONLY 1) instantiating a CA server, 2) distributing a) CA pub cert b) CA admin login/password... no other external stuff is needed

nyet (Tue, 19 Feb 2019 20:55:22 GMT):
is that accurate? adding orderers, peers, clients can all be done via enrollment?

nyet (Tue, 19 Feb 2019 20:56:10 GMT):
I am trying to simplify the workflow from the (silly, imo) crpytogen based examples to something more funcionaly useful

nyet (Tue, 19 Feb 2019 20:57:07 GMT):
I plan to do this all using the sdk, and possibly configtx, without cryptogen

nyet (Tue, 19 Feb 2019 20:57:25 GMT):
(and openssl to generate the initial ca/tlsca keypair(s))

yacovm (Tue, 19 Feb 2019 20:57:42 GMT):
Yes it should be possible

nyet (Tue, 19 Feb 2019 20:57:52 GMT):
OK thanks, just confirming my concept is sound

yacovm (Tue, 19 Feb 2019 20:58:02 GMT):
But....

yacovm (Tue, 19 Feb 2019 20:58:19 GMT):
Separate between your TLS CA and the enrollement CA

yacovm (Tue, 19 Feb 2019 20:58:23 GMT):
Best practice

nyet (Tue, 19 Feb 2019 20:58:26 GMT):
yea i plan to

nyet (Tue, 19 Feb 2019 20:58:38 GMT):
so technically, TWO ca pub keys?

yacovm (Tue, 19 Feb 2019 20:58:43 GMT):
Aha

nyet (Tue, 19 Feb 2019 20:59:07 GMT):
or same cert that generaties both key pairs (and distriubte the top CA pubkey)?

nyet (Tue, 19 Feb 2019 20:59:34 GMT):
or they should be entirely separate CA roots

yacovm (Tue, 19 Feb 2019 21:00:01 GMT):
Just make 2 CAs

yacovm (Tue, 19 Feb 2019 21:00:16 GMT):
But i'm not an that versed in fabric-CA

nyet (Tue, 19 Feb 2019 21:00:54 GMT):
ok thats fine, i can work it out. I know i can use a common root and issue intermediate cas for tlsca and hlf itself, but wondering if you have an opinion if thats ok or not

yacovm (Tue, 19 Feb 2019 21:01:11 GMT):
What you propose would also work....

yacovm (Tue, 19 Feb 2019 21:01:18 GMT):
It is up to you

nyet (Tue, 19 Feb 2019 21:01:21 GMT):
ok thanks!

nyet (Tue, 19 Feb 2019 21:01:40 GMT):
its going to be incremental work anyway. intially having separate CA/TLSCA would be smart either way

yacovm (Tue, 19 Feb 2019 21:01:57 GMT):
In your case you will have the same root for both

nyet (Tue, 19 Feb 2019 21:02:03 GMT):
yep

nyet (Tue, 19 Feb 2019 21:02:18 GMT):
just not sure which CA to distribute to the varous people

yacovm (Tue, 19 Feb 2019 21:02:31 GMT):
But separate is more secure because you destribute the keys

nyet (Tue, 19 Feb 2019 21:02:39 GMT):
I'll work it out as I go. Nod.

Jgnuid (Tue, 19 Feb 2019 21:49:18 GMT):
@yacovm , where I can check the current anchor peers for the orgs?

Jgnuid (Tue, 19 Feb 2019 21:50:24 GMT):
Because in this channel I added a new org... but I thought that the channel configuration to add the org also setted the anchor peers of that org.

Jgnuid (Tue, 19 Feb 2019 21:50:31 GMT):
But I guess that's not maybe the case

nyet (Tue, 19 Feb 2019 21:50:49 GMT):
anchor peers apply to channels, not orgs

Jgnuid (Tue, 19 Feb 2019 21:51:06 GMT):
right

Jgnuid (Tue, 19 Feb 2019 21:51:30 GMT):
but when i added the org to the channel, does it include te anchor peers that where defined in the configtx.yaml?

Jgnuid (Tue, 19 Feb 2019 21:51:49 GMT):
Because I'm looking at the current configuration of the channel and I dont see any anchor peers fields

nyet (Tue, 19 Feb 2019 21:52:01 GMT):
adding an org to a channel only has meaning with respect to channel policy, not what peers are anchor peers

Jgnuid (Tue, 19 Feb 2019 21:52:23 GMT):
well that could explain then my problem with the sdk..

Jgnuid (Tue, 19 Feb 2019 21:52:50 GMT):
I'm going to try doing a configtxgen with -outputAnchorPeers with the yaml and cross my fingers

Jgnuid (Tue, 19 Feb 2019 21:53:01 GMT):
sounds reasonable?

Baha-sk (Tue, 19 Feb 2019 21:54:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=a652a338-c770-459c-abfd-cfdc63a43784) @yacovm so I guess the peers communicate between themselves and the orderer via gossip and provide the discovery service for SDKs/client apps ?

nyet (Tue, 19 Feb 2019 21:54:25 GMT):
@Jgnuid or `-outputAnchorPeersUpdate`

nyet (Tue, 19 Feb 2019 21:54:32 GMT):
so, yes :)

nyet (Tue, 19 Feb 2019 21:55:15 GMT):
and `-asOrg`

yacovm (Tue, 19 Feb 2019 21:56:50 GMT):
@Baha-sk betwern themselves via gossip, but to the orderer directly via the Deliver API

yacovm (Tue, 19 Feb 2019 21:57:04 GMT):
*between

Baha-sk (Tue, 19 Feb 2019 21:57:19 GMT):
I see.. thanks for clarifying this @yacovm

yacovm (Tue, 19 Feb 2019 21:59:24 GMT):
No problem

Jgnuid (Tue, 19 Feb 2019 22:01:45 GMT):
ReadSet: readset expected key [Group] /Channel/Application at version 1, but got version 2

Jgnuid (Tue, 19 Feb 2019 22:01:55 GMT):
I guess it's beecause I've already updated the channel configuration before

Jgnuid (Tue, 19 Feb 2019 22:02:12 GMT):
so it isnt correct to generate the outputanchorpeers from the .yaml...

Jgnuid (Tue, 19 Feb 2019 22:03:09 GMT):
Is this the case?

Jgnuid (Tue, 19 Feb 2019 22:05:44 GMT):
@nyet , how can I generate the update .tx of the anchorpeers from the current channel configuration?

Jgnuid (Tue, 19 Feb 2019 22:10:26 GMT):
Damn, configtxgen can't be used... from --help: Creates an config update to update an anchor peer (works only with the default channel creation, and only for the first update)

Jgnuid (Tue, 19 Feb 2019 22:10:36 GMT):
:s

yacovm (Tue, 19 Feb 2019 22:31:34 GMT):
@jyellick is this ^ the item you have been working on lately?

Jgnuid (Tue, 19 Feb 2019 22:52:17 GMT):
@yacovm , why in the 'Build your first network' example, it does to updates of anchor peers and doesn't have the problem of versions?

Jgnuid (Tue, 19 Feb 2019 22:52:42 GMT):
two*

Jgnuid (Tue, 19 Feb 2019 22:53:02 GMT):
Maybe I'm missing something.

ShajiThiyarathodi (Tue, 19 Feb 2019 23:14:49 GMT):
is there an a way to query for a range of blocks on a given channel for a given time frame?

Jgnuid (Wed, 20 Feb 2019 00:05:24 GMT):
@yacovm , @nyet , @Baha-sk , I managed to update the anchor peers when the version is not 1... basically old-school deserialization of protos to json, modify by hand, and re-proto and send update. All great. Unfortunately (or fortunately, don't know what to say), the error changed when trying to query using the GO SDK: failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: target(s) required Any idea? (I can't believe problems never end :( )

Jgnuid (Wed, 20 Feb 2019 00:11:33 GMT):
Oh, I managed to solve it.. this is was my fault. (After a bunch of millions tests.. )

Jgnuid (Wed, 20 Feb 2019 00:23:02 GMT):
Yep, confirmed. I could successfully queryed the chaincode. Tomorrow gonna try invoking it...but I guess shoudnt be an issue. Moral of this story: 1) fabric-ca-client didnt name the signcert correctly (as it seems to do cryptogen) 2) Anchors peers where a problem if they weren defined (with a too cryptic message... thanks @yacovm, woudn't be impossible without your hint) 3) the tools doesn't allow to update the anchor peers if the version of the channel configuration is not 1... Pretty crazy...

Jgnuid (Wed, 20 Feb 2019 00:24:52 GMT):
This kind of things makes me wonder using this in production... Thankfully here there are good souls to help us out, but better tools and documentation are urgently needed. Hope in some months I can have some spare time and help with some documentation about this...

nyet (Wed, 20 Feb 2019 03:12:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=369d3689-ea45-4453-bd1d-61b447c1fac6) @yacovm This doesn't seem to work. There is no way to tell the ca-server to use a seperate TLSCA for tls signing, it seems to always use `FABRIC_CA_SERVER_CA_KEYFILE`. `FABRIC_CA_SERVER_TLS_KEYFILE` is only for the TLS endpoint, it isn't a ca cert. `FABRIC_CA_SERVER_TLSCA_KEYFILE` doesn't seem to do anything.

nyet (Wed, 20 Feb 2019 03:15:12 GMT):
it looks like o would have to start a second instance of `ca-server` to sign TLS certs with a different CA

nyet (Wed, 20 Feb 2019 04:48:48 GMT):
Wow digging through this, its baffling. The fabric examples have the ca-server use the peer ca certs for both signging AND tls endpoint?? thats crazy

nyet (Wed, 20 Feb 2019 04:49:55 GMT):
and the *orderer* has the tlsca, but not the ca-server. that is just ... weird

nyet (Wed, 20 Feb 2019 05:58:16 GMT):
@yacovm I can't figure out how to get tls certs from the `ca-server`

nyet (Wed, 20 Feb 2019 05:58:24 GMT):
there is zero documentation anywhere that i can find

xDxD (Wed, 20 Feb 2019 06:13:57 GMT):
@nyet In java sdk , like this : //This shows how to get a client TLS certificate from Fabric CA // we will use one client TLS certificate for orderer peers etc. final EnrollmentRequest enrollmentRequestTLS = new EnrollmentRequest(); enrollmentRequestTLS.addHost("localhost"); enrollmentRequestTLS.setProfile("tls"); final Enrollment enroll = ca.enroll("admin", "adminpw", enrollmentRequestTLS); final String tlsCertPEM = enroll.getCert(); final String tlsKeyPEM = getPEMStringFromPrivateKey(enroll.getKey());

nyet (Wed, 20 Feb 2019 06:14:53 GMT):
@xDxD Thanks! Which cert will it use to sign it?

nyet (Wed, 20 Feb 2019 06:15:28 GMT):
`FABRIC_CA_SERVER_CA_KEYFILE` or `FABRIC_CA_SERVER_TLS_KEYFILE`

nyet (Wed, 20 Feb 2019 06:16:38 GMT):
and is it possible to just use the `fabric-ca-client` binary, or will I have to write code..

xDxD (Wed, 20 Feb 2019 06:18:48 GMT):
@nyet Sorry, I am not so used

nyet (Wed, 20 Feb 2019 08:42:29 GMT):
Ah nvm got the `fabric-ca-client` to work. However, it can only sign using `FABRIC_CA_SERVER_CA_KEYFILE`

phantom.assasin (Thu, 21 Feb 2019 18:16:03 GMT):
can we use fabric go sdk to generate channel.tx which is required to create a channel?

suppandi (Thu, 21 Feb 2019 20:48:26 GMT):
Has joined the channel.

suppandi (Thu, 21 Feb 2019 20:49:47 GMT):
Hi, i am trying to use the latest fabric-sdk-go against the latest fabric master branch and i am getting this message ``` From target: grpcs://peer0:7051: discovery service refused our Request: rpc error: code = Unimplemented desc = unknown service discovery.Discovery ``` Has anyone seen this before?

bjwswang (Fri, 22 Feb 2019 03:12:34 GMT):
hi guys . Can we support connection profiles with certs and keys embedded in ?

haardikkk (Fri, 22 Feb 2019 03:53:26 GMT):
The documentation for `GetState` says that `If the key does not exist in the state database, (nil, nil) is returned.`

haardikkk (Fri, 22 Feb 2019 03:53:44 GMT):
I snooped around the code for `handleGetState` in fabric and it doesnt seem like this is true

haardikkk (Fri, 22 Feb 2019 03:53:49 GMT):
Nowwhere does it return `nil, nil`

haardikkk (Fri, 22 Feb 2019 03:54:04 GMT):
Can I expect it to return an error if the key does not exist?

mahoney1 (Fri, 22 Feb 2019 09:48:20 GMT):
hi everyone - just to say: the recording of the Fabric Developer Community Call yesterday (02/21) can be downloaded from https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings FYI

Jgnuid (Fri, 22 Feb 2019 13:21:48 GMT):
@haardikkk , are you sure that 'return responseMsg.Payload, nil', responseMsg.Payload can't be nil?

dave.enyeart (Fri, 22 Feb 2019 15:36:42 GMT):
@haardikkk @Jgnuid When key does not exist, ledger returns nil to handleGetState, and handleGetState returns nil to chaincode

haardikkk (Fri, 22 Feb 2019 18:51:49 GMT):
I see, weird naming of variables in there maybe they should check for nil and be more explicit

haardikkk (Fri, 22 Feb 2019 18:51:54 GMT):
Thank you!

Kyroy (Tue, 26 Feb 2019 15:54:50 GMT):
When using a connection profile, specifying my org, my peers, orderers, my channel. I want to query a chaincode in the channel that is not installed on my peer (or the policy does not include me/requires more orgs). Without specifying `channel.WithTargetEndpoints("peer0.otherorg.com:7051")`, I get a ``` Client Status Code: (6) NO_PEERS_FOUND. Description: targets were not provided ``` But shouldn't it be possible for the sdk to use the discovery service and find these peers itself? Using fabric 1.3.0, anchor peers set for all organizations

Baha-sk (Tue, 26 Feb 2019 21:56:31 GMT):
@Kyroy most probably the discovery service failed for some reason

Kyroy (Tue, 26 Feb 2019 22:14:07 GMT):
@Baha-sk Hmm, I enabled debug logs and cannot find any errors. I also cannot find the peer from the other org. Discovery service works when using the fabric CLI to query it. I can also see that the channel config is loaded: ```chconfig.extractConfig -> DEBU loaded channel config: &{id:interop-channel blockNumber:100 msps:[0xc00040a440 0xc00040a840 0xc00040ac40] anchorPeers:[0xc0001d5e90 0xc000414210] orderers:[orderer0.water-chdix.example.com:7050] versions:0xc00030ba60 capabilities:map[:map[V1_1:true] Orderer:map[V1_1:true]]}```

Baha-sk (Wed, 27 Feb 2019 15:04:00 GMT):
@kyroy, that's the channel config, it only stores the anchor peers... you can get the discovery service from the channel service like this: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_minconfig_test.go#L117 and then do discovery.GetPeers()..

Baha-sk (Wed, 27 Feb 2019 15:32:01 GMT):
@Kyroy also you might wanna double check how Handle() is called in your client as the first check is about verifying at the context's Targets option (it is probably manually by the client, ie the SDK doesn't add Targets on the fly, but it's better to double check your call) : https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L37

Baha-sk (Wed, 27 Feb 2019 15:32:01 GMT):
@Kyroy also you might wanna double check how Handle() is called in your client as the first check is about verifyin the context's Targets option (it is probably manually by the client, ie the SDK doesn't add Targets on the fly, but it's better to double check your call) : https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L37

Baha-sk (Wed, 27 Feb 2019 15:32:01 GMT):
@Kyroy also you might wanna double check how Handle() is called in your client as the first check is about verifyin the context's Targets option (it is probably manually set by the client, ie the SDK doesn't add Targets on the automatically, but it's better to double check your call) : https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L37

Baha-sk (Wed, 27 Feb 2019 15:32:01 GMT):
@Kyroy also you might wanna double check how Handle() is called in your client as the first check is about verifyin the context's Targets option (it is probably manually set by the client, ie the SDK doesn't add Targets automatically, but it's better to double check your call) : https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/invoke/txnhandler.go#L37

Kyroy (Thu, 28 Feb 2019 08:54:05 GMT):
https://jira.hyperledger.org/projects/FABG/issues/FABG-818 This is a very critical problem that is causing lots of trouble in our applications.

rootDistress (Thu, 28 Feb 2019 11:23:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YhbHXfvmSwAHho9qZ) @Kyroy I second this, saw this when I had removed an org from channel after a few peers joined it. Also, @Kyroy Does pruning peer's data unjoin them from channel ?

Kyroy (Thu, 28 Feb 2019 11:50:03 GMT):
@rootDistress Yes, you have to join the peer again

rootDistress (Thu, 28 Feb 2019 13:58:28 GMT):
Can I have same chaincode installed on same orgs on different channels containing only those same orgs? I got `VSCCValidateTx for transaction txId = 503d20fac1de3e0d1c1d3af5481e8e4fbd60f429692882205db3c3fc4e32294f returned error: Chaincode somename is already instantiated`

rootDistress (Thu, 28 Feb 2019 14:01:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5etMXA2M2mg4zkEgL) scenario is like * Channel1 * Org1 - chaincode installed -> somename * Org2 - chaincode installed and instantiated -> somename * Channel2 * Org1 - chaincode installed -> somename * Org2 - chaincode installed and instantiated -> somename

rootDistress (Thu, 28 Feb 2019 14:01:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5etMXA2M2mg4zkEgL) scenario is like * Channel1 =>Org1 - chaincode installed -> somename => Org2 - chaincode installed and instantiated -> somename * Channel2 => Org1 - chaincode installed -> somename => Org2 - chaincode installed and instantiated -> somename

phantom.assasin (Fri, 01 Mar 2019 01:10:37 GMT):
I know this is not the platform but just in case if anyone is interested, Please DM me. http://jobs.jobvite.com/nutanix/job/oaKw9fwj

phantom.assasin (Fri, 01 Mar 2019 01:11:38 GMT):
I know this is not the platform but just in case if anyone is interested, Please DM me or you can directly apply. http://jobs.jobvite.com/nutanix/job/oaKw9fwj

rootDistress (Fri, 01 Mar 2019 08:04:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5etMXA2M2mg4zkEgL) Shit, I'm not even able to replicate the error anymore.

vahuja4 (Fri, 01 Mar 2019 10:06:29 GMT):
Has joined the channel.

vahuja4 (Fri, 01 Mar 2019 10:10:24 GMT):
`package main import ( "github.com/hyperledger/fabric-sdk-go/pkg/core/config" "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk" ) const ( channelID = "mychannel" chaincodeID = "fabcar" ) func main() { sdk, err := fabsdk.New(config.FromFile("../../basic-network/connection.yaml")) } `

vahuja4 (Fri, 01 Mar 2019 10:26:37 GMT):
Can someone please tell me how to install the g-fabric-sdk. The github repo just says that I need to do `go get -u github.com/hyperledger/fabric-sdk-go`. But when I run a very simple piece of code using the fabric sdk, I get the following errors:

vahuja4 (Fri, 01 Mar 2019 10:27:16 GMT):
cannot find package "github.com/golang/protobuf/proto" cannot find package "github.com/go-kit/kit/metrics/prometheus"

vahuja4 (Fri, 01 Mar 2019 10:27:59 GMT):
I see that there is a GoPkg.toml file which has a list of required packages, but I don't know how to use it. Please help

habpygo (Fri, 01 Mar 2019 12:21:44 GMT):
Just to make sure, you have set your `$GOPATH` variable and have your github.com directory under `$GOPATH/src` ?

habpygo (Fri, 01 Mar 2019 12:22:58 GMT):
or...which Go version are you using. Note that 1.11 will work, but 1.11.5 or 4 or 3 won't

vahuja4 (Fri, 01 Mar 2019 14:54:07 GMT):
go version go1.11.4 linux/amd64 /home/iseadmin/go/src/github.com/hyperledger/fabric-sdk-go

vahuja4 (Fri, 01 Mar 2019 14:54:47 GMT):
I don't have my `GOPATH` set because I read that if the `go` directory is in home, then it is fine

habpygo (Fri, 01 Mar 2019 15:08:14 GMT):
Go version 1.11.4 and 1.11.5 don't work. Downgrade to 1.11

habpygo (Fri, 01 Mar 2019 15:08:14 GMT):
Go version 1.11.4 and 1.11.5 don't work. Downgrade to 1.11 . At least it didn't with me at the time. I also had to run `make populate`

vahuja4 (Fri, 01 Mar 2019 15:12:59 GMT):
I see. Can you please tell me if there is an official note somewhere mentioning this?

vahuja4 (Fri, 01 Mar 2019 15:13:11 GMT):
BTW, thank you for your response

habpygo (Fri, 01 Mar 2019 16:46:51 GMT):
Nope. There’s no official mentioning of this other than the fabric-ask-go github site. Note that Go version 1.11 is mentioned which is not 1.11.xx.

habpygo (Fri, 01 Mar 2019 20:47:02 GMT):
Fabric-sdk-go 😉

vahuja4 (Sat, 02 Mar 2019 03:44:01 GMT):
@habpygo, thanks to you, I am able to use the fabric-sdk-go in my code. This is the first time I am using it, so I am a little lost. I developed a sample application using golang which I deployed on the 'basic-network' that is available in fabric-samples. Now, my question is 'how to create the config.yaml file needed here: `sdk, err := fabsdk.New(config.FromFile("../../basic-network/connection.yaml"))`

vahuja4 (Sat, 02 Mar 2019 03:45:34 GMT):
As you can see, I tried using the `connection.yaml` inside the `basic-network` directory, but I got the followingw errors: [fabsdk/fab] 2019/03/02 03:39:39 UTC - fab.detectDeprecatedNetworkConfig -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration [fabsdk/fab] 2019/03/02 03:39:39 UTC - fab.detectDeprecatedNetworkConfig -> WARN visit https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml for samples failed to initialize configuration: unable to load identity config: failed to initialize identity config from config backend: failed to create identity config from backends: failed to load all CA configs : failed to load server certs: open : no such file or directory failed to create SDK

vahuja4 (Sat, 02 Mar 2019 07:10:15 GMT):
Can someone please tell me how to generate/write the correct config.yaml

vahuja4 (Sat, 02 Mar 2019 07:10:15 GMT):
Can someone please tell me how to generate/write the correct config.yaml for the first-network available in fabric-samples

gen_el (Sat, 02 Mar 2019 12:01:05 GMT):
I have a problem and its becoming a real problem. I will appreciate some help. I have a network of 3 orgs with 2 peers per org (thats a total of 6 peers). They are installed on across 3 servers on a docker swarm cluster. I use the overlay network. Sometimes, chaincode upgrades (done via the go sdk) works fine on first try. On other times, instantiation times out on 4 peers. It seems to just happen randomly. We usually have to restart the peers multiple times, before it works. Its is really beginning to look like Hyperledger fabric peers are unstable. What do you think is the problem?

gen_el (Sat, 02 Mar 2019 12:01:05 GMT):
I have a problem and its becoming a real problem. I will appreciate some help. I have a network of 3 orgs with 2 peers per org (thats a total of 6 peers). They are installed on across 3 servers on a docker swarm cluster. I use the overlay network. Sometimes, chaincode upgrades (done via the go sdk) works fine on first try. On other times, instantiation times out on as much as `4 peers`. It seems to just happen randomly. We usually have to restart the peers multiple times, before it works. Its is really beginning to look like Hyperledger fabric peers are unstable. What do you think is the problem?

gen_el (Sat, 02 Mar 2019 12:13:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6kKE92DJBRskJKAuN) @vahuja4 You will have to use the one in the fabric-samples as template to create yours.

gen_el (Sat, 02 Mar 2019 12:13:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6kKE92DJBRskJKAuN) @vahuja4 You will have to use the one in the fabric-sdk-go source code as template to create yours. Check the fixtures folder.

gen_el (Sat, 02 Mar 2019 12:13:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6kKE92DJBRskJKAuN) @vahuja4 You will have to use the one in the fabric-sdk-go source code as template to create yours. Check the `fixtures` folder.

gen_el (Sat, 02 Mar 2019 12:13:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6kKE92DJBRskJKAuN) @vahuja4 You will have to use the one in the fabric-sdk-go source code as template to create yours. Check the `test/fixtures/config` folder.

phantom.assasin (Sat, 02 Mar 2019 20:32:25 GMT):
byfn end to end test is failing with this message: ```===================== Querying on peer0.org1 on channel 'mychannel'... ===================== Attempting to Query peer0.org1 ...3 secs + peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}' + res=0 + set +x Attempting to Query peer0.org1 ...7 secs + peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}' + res=0 + set +x Attempting to Query peer0.org1 ...10 secs + peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}' + res=0 + set +x 100 !!!!!!!!!!!!!!! Query result on peer0.org1 is INVALID !!!!!!!!!!!!!!!!```

phantom.assasin (Sat, 02 Mar 2019 20:32:33 GMT):
Any clues as to why this is happening?

habpygo (Sat, 02 Mar 2019 20:50:06 GMT):
@gen_el I have a similar problem when initializing the blockchain. I have two organizations with each organization having one endorsing peer. Sometimes it works immediately, sometimes it won’t. I notice that the chaincode is sometimes not immediately initialized on the second peer. And yes, it happens randomly. Checking the status of the containers (via Kitematics on my Mac) I see that the chaincode is not initialized, BUT this will happen after a query. The only thing I can think of, is that the gossiping takes some time; however, I’m also completely in the dark here. To see what happens, wrap your error in a panic(..).

gen_el (Sat, 02 Mar 2019 22:07:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=vbdkyMuiNYE88NHMx) @habpygo Initialisation on query is something i have not had to consider since i moved away from Composer. Thanks for the info.

vahuja4 (Sun, 03 Mar 2019 02:38:15 GMT):
@gen_el and @habpygo, thank you for you responses. I have one quick question. When using the node sdk, the connection.json file, which looks fairly simple, is used to start communicating with the chaincode. Why does the go-sdk require more information?

habpygo (Sun, 03 Mar 2019 10:02:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=swrp9Y7goA5bKQEPF) @vahuja4 I have no idea. I think you should ask the guys from SecureKey Technologies.

tstonely (Sun, 03 Mar 2019 13:48:21 GMT):
Has joined the channel.

tstonely (Sun, 03 Mar 2019 13:51:47 GMT):
I am attempting to use the fabric sdk with the byfn network. From my understanding chaincode runs in an isolated docker container, so I don't understand how we are able to provide the configuration file to "fabsdk.New(config.FromFile(...))". If anyone is able to direct me in the proper way to give the configuration file to the sdk I would be very grateful!

tstonely (Sun, 03 Mar 2019 13:51:47 GMT):
I am attempting to use the fabric sdk with the byfn network. From my understanding chaincode runs in an isolated docker container, so I don't understand how we are able to provide the configuration file to "fabsdk.New(config.FromFile(...))" as this container is spun up automatically and I am not able to provide this file to it. If anyone is able to direct me in the proper way to give the configuration file to the sdk I would be very grateful!

tstonely (Sun, 03 Mar 2019 14:03:26 GMT):
@vahuja4 I see you are attempting to do something similar and seem to be a few steps ahead. Could you help?

vahuja4 (Sun, 03 Mar 2019 14:37:07 GMT):
@tstonely, the fabsdk has to be provided with the config file which describes your network. So, it should be present in the same vm/machine on which your fabsdk will run. You are not supposed to be fetching the config file from the docker instance. Hope this helps

vahuja4 (Sun, 03 Mar 2019 14:38:04 GMT):
In other words, `config.FromFile("path to the config file on the same machine"`)

tstonely (Sun, 03 Mar 2019 14:48:31 GMT):
@vahuja4 Thanks for your reply. So you are saying that the fabric-sdk should not be run as part of the chaincode but instead on it's own machine. I am currently trying to setup the sdk in my chaincode, is this wrong?

rootDistress (Sun, 03 Mar 2019 16:09:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dbbiPADCtGMvB4Mg8) @tstonely Yeah, What you're trying to do isn't ideal, better pass the sdk instance as a pointer to the function.

zZz (Sun, 03 Mar 2019 17:47:45 GMT):
Has joined the channel.

demonkm (Mon, 04 Mar 2019 03:29:48 GMT):
Has joined the channel.

venkat_nagaraj (Mon, 04 Mar 2019 05:45:37 GMT):
Has joined the channel.

mahoney1 (Mon, 04 Mar 2019 10:15:35 GMT):
fyi / heads-up : next Fabric Developer Community call is planned for this Thurs March 7th - https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call - contributions are welcome to the agenda ! More info on the call can be found [here](https://lists.hyperledger.org/g/fabric/topic/next_hyperledger_fabric/30211987?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,30211987)

Kyroy (Mon, 04 Mar 2019 12:42:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6tuThe3G6acgMwQ2Q) @Baha-sk Handle is called 2 times. The first time, it is called with my own (configured) peer. The second time with empty targets. `discovery.GetPeers()` also only returns my own peer. I initialize the SDK like this. ``` sdk, err := fabsdk.New(config.FromFile(connectionProfile)) ```

twoneks (Mon, 04 Mar 2019 14:02:39 GMT):
Hi! I would like to write tests form my chaincode that is actualli using cid library to perform som checks over identities attributes. How could I mock the invoke method with a valid certificate??

Baha-sk (Mon, 04 Mar 2019 15:19:12 GMT):
@Kyroy this may be done implicitly when doing fabsdk.New... but can you explicitly add the discovery service option like this: `sdk, err := fabsdk.New(configProvider, fabsdk.WithServicePkg(&DynamicDiscoveryProviderFactory{}))`

Baha-sk (Mon, 04 Mar 2019 15:26:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dbbiPADCtGMvB4Mg8) @tstonely the SDK is meant to communicate with a peer and not to be executed within the peer. It is usually created in a client app that invokes some chaincode queries or executes transactions on a channel where multiple orgs (each with 1 or more peers) participate. You can see the SDK as being used in the client app that talks to the Fabric network. The client app is usually not part of the network.

rootDistress (Tue, 05 Mar 2019 06:53:02 GMT):
Hi, I was looking through way data is stored in each peer and orderer docker container, and found much of everything stored in `/var/hyperledger/production/`. My question is as the ledgerData is stored here in case of peer, is there a way to use this to manipulate and unjoin a peer from a specific channel instead of pruning and unjoining from all channels.

n_marcetic (Tue, 05 Mar 2019 14:25:36 GMT):
Has joined the channel.

n_marcetic (Tue, 05 Mar 2019 14:27:26 GMT):
Hey folks, I have a problem with SDK after upgrade from Fabric v1.1 to V1.4 My network with custom setup works , chaincodes are deployed and everything is working. When I try to make transaction and call chaincode I am getting following error from my service `failed to create channel client: event service creation failed: could not get chConfig cache reference: read configuration for channel peers failed"` Any idea ?

n_marcetic (Tue, 05 Mar 2019 16:56:54 GMT):
anyone pls ? :)

nyet (Wed, 06 Mar 2019 02:39:01 GMT):
```# github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations ../../hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string) ```

nguansak (Wed, 06 Mar 2019 10:06:48 GMT):
Has joined the channel.

kariyappal (Wed, 06 Mar 2019 11:15:42 GMT):
Has joined the channel.

tstonely (Wed, 06 Mar 2019 20:35:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NDS8voJDugdTjydFN) @Baha-sk OK I understand this now, thank you!

tstonely (Wed, 06 Mar 2019 20:39:08 GMT):
Could anyone help me in regards to which section of the configuration file is responsible for setting the path to the 'keystore' directory. It is currently being created in the same directory as where my application runs, so I am assuming that I am not supplying the value and it is defaulting to empty or ./

tstonely (Wed, 06 Mar 2019 20:40:28 GMT):
The sdk is looking for the private key in crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/

tstonely (Wed, 06 Mar 2019 20:40:42 GMT):
But it expects it to be in the current dir

zhoutong (Thu, 07 Mar 2019 09:03:20 GMT):
Has joined the channel.

zhoutong (Thu, 07 Mar 2019 09:03:52 GMT):
#fabric-sdk

troyronda (Thu, 07 Mar 2019 15:29:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YhbHXfvmSwAHho9qZ) @Kyroy @bstasyszyn has pushed a change related to this issue.

troyronda (Thu, 07 Mar 2019 15:29:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YhbHXfvmSwAHho9qZ) @Kyroy @bstasyszyn has now pushed a change related to this issue.

Kyroy (Thu, 07 Mar 2019 15:34:13 GMT):
@troyronda @bstasyszyn Yes, I saw this. Thank's a lot!! It really helps to solve our production issues. I also closed the issue ;)

troyronda (Thu, 07 Mar 2019 15:59:13 GMT):
Excellent!

mahoney1 (Thu, 07 Mar 2019 18:22:46 GMT):
FYI - posted the recording file: `2019-0307-fabricdevcommunitycall.zip` (incl MP4 and chat transcript) from today's Fabric Developer Community Call at -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings

rootDistress (Fri, 08 Mar 2019 07:33:48 GMT):
Is entity matchers necessary for hlf applications? Like docker creates the containers on `localhost` so, is there a way to not use a workaround like entity matchers to map it but instead use the actual endpoint like `peer0.org1.example.com` or any other solution.

sstone1 (Fri, 08 Mar 2019 11:20:47 GMT):
Has joined the channel.

sstone1 (Fri, 08 Mar 2019 11:23:36 GMT):
I'm trying to use the Go SDK to enroll a user, but I'm getting the following error: `failed to create identity manager provider: failed to initialize identity manager for organization: org1: Either a cryptopath or an embedded list of users is required` why do I need either of those things? i don't have any existing identities, just an enrolment ID and secret.

sstone1 (Fri, 08 Mar 2019 11:24:07 GMT):
my program is basically: ``` config := config.FromFile("connection-org1.yaml") sdk, err := fabsdk.New(config) <- this returns the error ```

jwrb2g16 (Fri, 08 Mar 2019 12:09:57 GMT):
Has joined the channel.

jwrb2g16 (Fri, 08 Mar 2019 12:11:07 GMT):
Hey, Apologies if this isn't the correct place to ask. I have a network setup and want to be able to query it using the Go SDK, I've been looking online but not really sure where to start. Could someone give me some pointers in the right direction?

liaoruohuai (Sat, 09 Mar 2019 04:17:42 GMT):
Has joined the channel.

rootDistress (Sat, 09 Mar 2019 06:37:49 GMT):
I was looking for creating health checks for the fabric network and containers and found that fabric 1.4 has them inbuilt with `healthz`, I'm currently using v1.2 and fear a lot of stuff may break with 1.4, If someone already uses it, can you tell if it's worth the work of upgrading and does go-sdk have way to use this service?

nyet (Sat, 09 Mar 2019 07:11:07 GMT):
@rootDistress it's meant to be used by prometheus.

nyet (Sat, 09 Mar 2019 07:11:24 GMT):
(or pushed to a statsd server)

rootDistress (Sat, 09 Mar 2019 08:14:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=smtBDMtZCqDA9JtK6) @nyet So, you mean I'll have to first install prometheus the upgrade and use healthz ?

rootDistress (Sat, 09 Mar 2019 08:14:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=smtBDMtZCqDA9JtK6) @nyet So, you mean I'll have to first install prometheus then upgrade fabric and use healthz ?

nyet (Sat, 09 Mar 2019 20:35:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wDLBzHayTjnnyEaZH) @rootDistress You can deploy prometheus whenever. Unlike the statsd interface, it just listens for requests.

MuhammedHafil (Sun, 10 Mar 2019 16:56:48 GMT):
getting `error: [BaseWallet]: setUserContext: identity 'admin' isn't enrolled, or loaded` while enrolling admin

MuhammedHafil (Sun, 10 Mar 2019 16:56:48 GMT):
getting `error: [BaseWallet]: setUserContext: identity 'admin' isn't enrolled, or loaded` while connecting to gateway

MuhammedHafil (Sun, 10 Mar 2019 17:31:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4gv2Sv6Lrmz6RbwQK) it worked after making some delay after enrolling

donamKim (Mon, 11 Mar 2019 05:52:50 GMT):
How to make multiple smartcontract within chaincode ?

ycarmel (Mon, 11 Mar 2019 08:51:45 GMT):
Has joined the channel.

AwesmeShikhar (Mon, 11 Mar 2019 10:48:13 GMT):
Has joined the channel.

mtng (Mon, 11 Mar 2019 15:56:57 GMT):
Hi, I'm trying to listen events, but when i receive the event the payload is empty

mtng (Mon, 11 Mar 2019 15:57:15 GMT):
Received chaincode event: &fab.CCEvent{TxID:"5bd9d9b1857bd30aff5b57619082d6d2bbf0e8b2f6b2cc299e08d30a055f5a69", ChaincodeID:"mycc", EventName:"eventName", Payload:[]uint8(nil), BlockNumber:0x21, SourceURL:"grpc://localhost:7051"}

mtng (Mon, 11 Mar 2019 15:57:27 GMT):
what could be the problem?

mtng (Mon, 11 Mar 2019 15:58:14 GMT):
From the chaincode, the event is the following stub.SetEvent("eventName", []byte("This is a event"))

mtng (Mon, 11 Mar 2019 15:58:19 GMT):
thank you very much

yacovm (Mon, 11 Mar 2019 17:01:48 GMT):
@mtng you can try to see if the event payloaf exists in the block itself or not

Baha-sk (Mon, 11 Mar 2019 18:36:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=b98faz6uZMdfj8pzP) @nyet @rootDistress the channel performance test package in the Go SDK has been upgraded to Fabric's latest `healthz` package, have a look at https://github.com/hyperledger/fabric-sdk-go/tree/master/test/performance/pkg/client/channel to see how you can add metrics and configure Prometheus for your app..

Baha-sk (Mon, 11 Mar 2019 18:39:11 GMT):
@rootDistress you can refer to the configs under https://github.com/hyperledger/fabric-sdk-go/tree/master/test/performance/prometheus to setup your prometheus server

KyunghoKim (Tue, 12 Mar 2019 03:11:53 GMT):
Has joined the channel.

briansan (Tue, 12 Mar 2019 04:47:23 GMT):
Has joined the channel.

rootDistress (Tue, 12 Mar 2019 04:50:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=EAhGbLaqN2SQrssBh) @Baha-sk Thanks a lot! This was much needed.

mtng (Tue, 12 Mar 2019 08:59:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=efc01adf-2a66-4414-a340-b0586ad69714) @yacovm Hi! thanks for answering, yes, the event exists in the block. I have analyse the blocks in the following file on my peer /var/hyperledger/production/ledgersData/chains/chains/mychannel/blockfile_000000

yacovm (Tue, 12 Mar 2019 09:24:51 GMT):
do you see the event being sent in the peer logs @mtng ?

yacovm (Tue, 12 Mar 2019 09:25:13 GMT):
is it also empty in the peer logs?

mtng (Tue, 12 Mar 2019 10:02:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jAyrgc4uLtvoSgihC) @yacovm this logs are the shown in the docker logs? I have executed docker logs -f peer0.org1.example.com and I can see when a block is committed but I can not see the event

mtng (Tue, 12 Mar 2019 10:07:42 GMT):
I have changed in the sdk, the level of the logs to debug and the log trace is the following: [fabsdk/fab] 2019/03/12 10:04:00 UTC - dispatcher.(*Dispatcher).publishFilteredBlockEvents -> DEBU Publishing filtered block event: &peer.FilteredBlock{ChannelId:"mychannel", Number:0x6, FilteredTransactions:[]*peer.FilteredTransaction{(*peer.FilteredTransaction)(0xc000376e60)}, XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0}

mtng (Tue, 12 Mar 2019 10:07:42 GMT):
I have changed in the sdk, the level of the logs to debug and the log trace is the following: [fabsdk/fab] 2019/03/12 10:04:00 UTC - dispatcher.(*Dispatcher).publishFilteredBlockEvents -> DEBU Publishing filtered block event: &peer.FilteredBlock{ChannelId:"mychannel", Number:0x6, FilteredTransactions:[]*peer.FilteredTransaction{(*peer.FilteredTransaction)(0xc000376e60)}, XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0} In the peer logs I can see the following: 2019-03-12 10:39:45.200 UTC [common.deliverevents] DeliverFiltered -> DEBU 370e Starting new DeliverFiltered handler 2019-03-12 10:39:45.200 UTC [aclmgmt] CheckACL -> DEBU 3711 acl policy not found in config for resource event/FilteredBlock 2019-03-12 10:39:50.599 UTC [common.deliverevents] func1 -> DEBU 3894 Closing Deliver stream

yacovm (Tue, 12 Mar 2019 10:42:08 GMT):
this is filtered transaction, @mtng

yacovm (Tue, 12 Mar 2019 10:42:49 GMT):
the payload is not part of the filtering result (

yacovm (Tue, 12 Mar 2019 10:42:49 GMT):
the payload is not part of the filtering result :/

yacovm (Tue, 12 Mar 2019 10:43:05 GMT):
let me point you to the code

yacovm (Tue, 12 Mar 2019 10:43:30 GMT):
https://github.com/hyperledger/fabric/blob/master/core/peer/deliverevents.go#L249-L256

yacovm (Tue, 12 Mar 2019 10:43:45 GMT):
the payload is not added

yacovm (Tue, 12 Mar 2019 10:44:04 GMT):
``` filteredAction := &peer.FilteredChaincodeAction{ ChaincodeEvent: &peer.ChaincodeEvent{ TxId: ccEvent.TxId, ChaincodeId: ccEvent.ChaincodeId, EventName: ccEvent.EventName, Payload: ccEvent.Payload, // <--- this is missing }, } ```

mtng (Tue, 12 Mar 2019 10:46:23 GMT):
@yacovm and how can I fixed, is this a problem of the SDK? I am in the last commit

mtng (Tue, 12 Mar 2019 10:46:23 GMT):
@yacovm and how can I fix it, is this a problem of the SDK? I am in the last commit

yacovm (Tue, 12 Mar 2019 10:55:51 GMT):
no, it's a "problem" in fabric :)

yacovm (Tue, 12 Mar 2019 10:55:55 GMT):
you can use not filtered blocks

yacovm (Tue, 12 Mar 2019 10:55:58 GMT):
normal blocks

yacovm (Tue, 12 Mar 2019 10:56:01 GMT):
in the go SDK

yacovm (Tue, 12 Mar 2019 10:56:11 GMT):
and then you get the payload of the event @mtng

yacovm (Tue, 12 Mar 2019 10:56:38 GMT):
of course, if you want you can just run your own version of fabric with this code change above

yacovm (Tue, 12 Mar 2019 10:56:48 GMT):
it depends what you are trying to do, etc.

mtng (Tue, 12 Mar 2019 11:08:18 GMT):
Thank you very much @yacovm but I prefer the use of normal blocks and not to change the code of fabric, but i don't know how because there is no documentation. I have based my code in the integration test of the sdk (https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/fab/eventclient_test.go) In particular: ``` eventService, err := chContext.ChannelService().EventService() ccreg, cceventch, err := eventService.RegisterChaincodeEvent(chainCodeID, "mycc") if err != nil { log.Fatalf("Error registering for filtered block events: %s", err) } ```

yacovm (Tue, 12 Mar 2019 11:15:07 GMT):
use `RegisterBlockEvent`

yacovm (Tue, 12 Mar 2019 11:15:14 GMT):
and then parse the block?

yacovm (Tue, 12 Mar 2019 11:17:47 GMT):
I don't know if there is another way... @bstasyszyn @troyronda @Baha-sk can you register to chaincode events from blocks events in the Go SDK ?

Pradeep_Pentakota (Tue, 12 Mar 2019 12:45:24 GMT):
Has joined the channel.

mtng (Tue, 12 Mar 2019 13:36:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=eNtQqwWDZbrTv2spN) @yacovm thank you, but i want to register only the events of the chaincode. If a register all the block events everytime, a block is committed i am going to parse the event and check if is from this chaincode, I think this is not scalable. Is there any way to open an issue?

mtng (Tue, 12 Mar 2019 13:36:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=eNtQqwWDZbrTv2spN) @yacovm thank you, but i want to register only the events of the chaincode. If I register all the block events everytime, a block is committed i am going to parse the event and check if is from this chaincode, I think this is not scalable. Is there any way to open an issue?

mtng (Tue, 12 Mar 2019 13:36:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=eNtQqwWDZbrTv2spN) @yacovm thank you, but i want to register only the events of the chaincode. If I register all the block events everytime, when the block will be committed i am going to parse the event and check if is from this chaincode or other, and if is this event or other event in the same chaincode, I think this is not scalable. Is there any way to open an issue?

yacovm (Tue, 12 Mar 2019 13:53:30 GMT):
@mtng let's wait for @troyronda , @bstasyszyn or @Baha-sk to respond first

zhaolu (Tue, 12 Mar 2019 15:32:54 GMT):
Has joined the channel.

mtng (Tue, 12 Mar 2019 16:43:30 GMT):
@yacovm ok, thank you :)

donamKim (Wed, 13 Mar 2019 04:29:12 GMT):
Hi

donamKim (Wed, 13 Mar 2019 04:29:52 GMT):
I want to know how to handle MVCC error

vignesh (Wed, 13 Mar 2019 14:50:43 GMT):
Hello everyone, I am trying to build a dynamic blockchain network where organizations can join or leave the network on the fly. To achieve it, I am referring to examples at "fabric-sdk-go/test/integration/e2e/configless" directory where I think networks are dynamic and not locked to predefined set of organizations specified in config files. In such a scenario (dynamic network) I want to know the following: 1)what information should be provided in genesis block? 2)Is it enough if I have only ordering service info in genesis block as all participant organizations may not be present initially?? 2)Is it ok to not have any information of participant organizations in genesis bock?? Kindly help :) Thanks, Vignesh

vignesh (Wed, 13 Mar 2019 14:50:43 GMT):
Hello everyone, I am trying to build a dynamic blockchain network where organizations can join or leave the network on the fly. To achieve it, I am referring to examples at "fabric-sdk-go/test/integration/e2e/configless" directory where I think networks are dynamic and not locked to predefined set of organizations specified in config files. In such a scenario (dynamic network) I want to know the following: 1)what information should be provided in genesis block? 2)Is it enough if I have only ordering service info in genesis block as all participant organizations may not be present initially?? 2)Is it ok to not have any information of participant organizations in genesis bock?? Kindly help :) Thanks, Vignesh

braduf (Wed, 13 Mar 2019 17:23:02 GMT):
Has joined the channel.

cccc (Thu, 14 Mar 2019 03:45:01 GMT):
hi. When i run the method `NewChannel`, i encounter the error message `failed to get client context to create channel client`. But i have not idea about why the error arise. Any advice is helpful, thanks.

rootDistress (Thu, 14 Mar 2019 05:15:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ZNS5ST92GeJmgTdGQ) @vignesh Orderer not having org MSP means org isn't part of network, The channel config block needs the org msp. Also, maybe drop the letter format on a chat forum.

nyet (Thu, 14 Mar 2019 05:53:34 GMT):
Interestingly, I am working on the same issue. The `cryptogen`-generates-everything model might be wonderful for a demo, but for a real network, it is appallingly inappropriate. What is needed is the bare minimum necessary to start up an orderer, yet the example `configtx.yaml` is a huge maximalist mess that includes everything but the ktichen sink (much like every other hlf yaml file). What I need is a minimal, functioning, `configtx.yaml` that has the bare minimum: 1) ca root/intermediate pub certs 2) admin pub cert 3) policy 4) tls key pair. I have yet to make one that works.

nyet (Thu, 14 Mar 2019 05:53:34 GMT):
Interestingly, I am working on the same issue. The `cryptogen`-generates-everything model might be wonderful for a demo, but for a real network, it is appallingly inappropriate. What is needed is the bare minimum necessary to start up an orderer, yet the example `configtx.yaml` is a huge maximalist mess that includes everything but the ktichen sink (much like every other hlf yaml file). What I need is a minimal, functioning, `configtx.yaml` that has the bare minimum: 1) ca root/intermediate pub certs 2) admin pub cert 3) policy 4) tls key pair. I have yet to make one that works to boostrap a single org orderer.

rootDistress (Thu, 14 Mar 2019 06:04:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=TnbM3ajqLzfYoTc7W) @nyet I have made one with just a single org CA(for making client), No peers, It's fully functional.

cccc (Thu, 14 Mar 2019 08:02:51 GMT):
hi, guys. When i try fabric-sdk-go/test/integration/pkg/fab/eventclient_test.go, the txevent run normal, but the chaincodeevent don't receive event. Can you give me some advice.

cccc (Thu, 14 Mar 2019 08:20:51 GMT):
i know where is problem, the chaincode event must be set in chaincode

rootDistress (Thu, 14 Mar 2019 11:25:10 GMT):
The latest commit of go-kit is causing a problem in fabric-sdk-go, particularly in ```github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations ../hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string) ``` I have hard reset to a earlier version that works.

ycarmel (Thu, 14 Mar 2019 13:09:54 GMT):
What are the plans to incorporate the FabToken client implementation in the GO SDK?

tstonely (Thu, 14 Mar 2019 20:37:59 GMT):
I appear to have an issue when invoking PutState via a client query, everything works fine until about the fourth/fifth time this function is called my program just freezes. There is nothing helpful in the logs. Does this sound like anything anyone has encountered before, I realise its quite a vague issue but this is all that I have to go on

tstonely (Thu, 14 Mar 2019 21:08:38 GMT):
debug logs appear to show this being the line where the program is hanging:

tstonely (Thu, 14 Mar 2019 21:08:40 GMT):
sw.(*fileBasedKeyStore).loadPrivateKey -> DEBU Loading private key

RealDeanZhao (Fri, 15 Mar 2019 07:42:42 GMT):
Has left the channel.

rootDistress (Fri, 15 Mar 2019 09:07:50 GMT):
While setting up the hlf network on local machine, I couldn't get the chaincode to instantiate with `CORE_PEER_CHAINCODELISTENADDRESS = peer0.org2.example.com:7052` but had to use a wildcardIP like `0.0.0.0:7052`. However, I had used the same `peer0.org2.example.com:7052` to set the listening address on docker swarm and it had worked there. Can someone please explain why is this so ?

yacovm (Fri, 15 Mar 2019 10:07:24 GMT):
Because the local machine doesnt know what is that address

nyet (Sat, 16 Mar 2019 05:39:17 GMT):
Generally, you should not use a hostname for listen address. Use a know interface's address, localhost, or 0.0.0.0

nyet (Sat, 16 Mar 2019 05:39:17 GMT):
Generally, you should not use a hostname for listen address. Use a known interface's numeric address, localhost, or 0.0.0.0

rootDistress (Sat, 16 Mar 2019 06:51:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=4d089724-a5ff-4687-9f50-4f4842bb8927) @nyet I mean, I read that chaincode refers CHAINCODELISTENADDRESS to create the container, that's why I thought it would be necessary. However,I agree. I changed listenaddress to wildcard address(0.0.0.0) and used `CORE_PEER_CHAINCODEADDRESS` to specify the peer.

epappas (Sat, 16 Mar 2019 18:58:45 GMT):
Has joined the channel.

liaoruohuai (Sun, 17 Mar 2019 09:43:06 GMT):
Hello everyone, is there any more readable example of fabric-sdk-go, like newSDK, CA Enroll, chaincode operations............. test makes me confused.

rootDistress (Mon, 18 Mar 2019 09:20:38 GMT):
@Kyroy you were working on `instantiation policies` before right? Did you find a way to define it ?

Kyroy (Mon, 18 Mar 2019 09:45:38 GMT):
@rootDistress yes I was, no I didnt :D

rootDistress (Mon, 18 Mar 2019 09:52:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mTogWo8fo56SezAdL) @Kyroy fabric has ` -i, --instantiate-policy string instantiation policy for the chaincode` for `peer chaincode package` command. I don't see one in fabric-sdk-go. I thought this policy is very important and holds the integrity of a chaincode. What's the point of all the ACL and other restrictions if one can upgrade the cc with a newer version.

wyang 3 (Mon, 18 Mar 2019 09:59:59 GMT):
Has joined the channel.

Kyroy (Mon, 18 Mar 2019 11:43:17 GMT):
@rootDistress Yes, the CLI has it. But this is not a solution :D the SDK needs it and it is very important

rootDistress (Mon, 18 Mar 2019 12:45:25 GMT):
Is there a way to stop `2019-03-18 12:41:16.283 UTC [cauthdsl] deduplicate -> ERRO 91f1 Principal deserialization failure (MSP org2.example.com is unknown) for identity 0` from being sent after an org is removed from a channel ?

rootDistress (Mon, 18 Mar 2019 12:45:25 GMT):
Is there a way to stop `[cauthdsl] deduplicate -> ERRO 91f1 Principal deserialization failure (MSP org2.example.com is unknown) for identity 0` from being sent after an org is removed from a channel ?

tstonely (Mon, 18 Mar 2019 14:24:43 GMT):
I am trying to figure out what cleanup is required by when using client query/execute functions. I understand the the SDK can stay running as long as I require, this does not need to be closed between each query/execute. I am wondering if I need to do any other cleanup for the 'sdk.ChannelContext' or 'channel.New' I could not find anything in the documentation. Anyone know??

tstonely (Mon, 18 Mar 2019 14:24:43 GMT):
I am trying to figure out what cleanup is required by when using client query/execute functions. I understand the the fabsdk can stay running as long as I require, this does not need to be closed between each query/execute. I am wondering if I need to do any other cleanup for the 'sdk.ChannelContext' or 'channel.New' I could not find anything in the documentation. Anyone know??

tstonely (Mon, 18 Mar 2019 15:17:24 GMT):
The reason I am asking is because after about 5 Query executions, my whole program freezes

tstonely (Mon, 18 Mar 2019 15:18:29 GMT):
Gdb displays the following thread info: Id Target Id Frame * 1 Thread 0x7ffff7fca700 (LWP 29528) "heligo-fabric-s" runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:532 2 Thread 0x7ffff560c700 (LWP 29532) "heligo-fabric-s" runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:532 3 Thread 0x7ffff4e0b700 (LWP 29533) "heligo-fabric-s" runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:532 4 Thread 0x7ffff460a700 (LWP 29534) "heligo-fabric-s" 0x0000000000a178ba in main.main () at /home/heligo/Projects/heligo/fabric-samples/basic-network/chaincode/heligo-fabric-sdk/heligo-fabric-sdk.go:162 5 Thread 0x7ffff3e09700 (LWP 29535) "heligo-fabric-s" runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:532 6 Thread 0x7ffff3608700 (LWP 29536) "heligo-fabric-s" runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:532 7 Thread 0x7ffff2bf5700 (LWP 29537) "heligo-fabric-s" runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:532 8 Thread 0x7ffff23f4700 (LWP 29538) "heligo-fabric-s" runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:532

tstonely (Mon, 18 Mar 2019 15:21:00 GMT):
It appears that I have a bunch of threads stuck waiting to acquire a futex? I cannot see any cleanup functions and none of the examples I have found show anyone doing anything other than closing the sdk when they are finished (defer) but I need to keep it open as I have multiple ongoing queriesqueries Sorry to keep bothering everyone but I am getting really desperate!

tstonely (Mon, 18 Mar 2019 15:21:00 GMT):
It appears that I have a bunch of threads stuck waiting to acquire a futex? I cannot see any cleanup functions and none of the examples I have found show anyone doing anything other than closing the sdk when they are finished (defer) but I need to keep it open as I have multiple ongoing queries.

tstonely (Mon, 18 Mar 2019 15:21:17 GMT):
Sorry to keep bothering everyone but I am getting really desperate!

bstasyszyn (Mon, 18 Mar 2019 15:32:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Lef8ebabghwpiCtDd) @mtng You'll need to use an event client with block events. For example, please see https://github.com/hyperledger/fabric-sdk-go/blob/f198238ee7dac8113e84a445a49fc4daf37bc251/test/integration/pkg/client/event/events_client_test.go#L73

Baha-sk (Mon, 18 Mar 2019 15:50:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NJjSwLdkfiMHsqXEN) @tstonely are you registering for CC/block/filtered block events ? if yes, then maybe you have to unregister these events when done.. otherwise, ChannelClient allows multiple Query() calls with no issues, have a look at this unit test: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/channel/chclient_test.go#L74, or this integration test (Query() is called 10 times in testQuery() function which itself is called multiple times in each run): https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/channel/channel_client_test.go#L345

osmola (Mon, 18 Mar 2019 16:08:36 GMT):
Hello, did anyone tried to solve Wallet for users private keys for fabric?

tstonely (Mon, 18 Mar 2019 18:18:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9uYKuSdQwTTHZS7fB) @Baha-sk Thanks for getting back to me. It an unrelated data race in my code. Apologies for wasting your time!

tongli (Mon, 18 Mar 2019 18:50:35 GMT):
can someone tell me how gosdk select an orderer when sends a chaincode invocation tx?

mahoney1 (Mon, 18 Mar 2019 19:48:41 GMT):
fyi / heads-up : next Fabric Developer Community call is planned for this Thursday 21st March (5pm UTC - 5pm UK, 12pm ET, 9am PT ) contributions are welcome to the agenda ! More info on the call / latest agenda can be found here ->https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call - cheers Paul

rootDistress (Tue, 19 Mar 2019 06:04:54 GMT):
Hi, I have situation I need clarification about, If in a channel I have 2 orgs initially(org1,org2) and have a chaincode instantiated with version 0 having endorsement policy of OR b/w both orgs. Later I removed both the orgs and added new 2 org(org3,org4) and wanted to upgrade the same chaincode on them. Wouldn't i just change the endorsement policy, increase version and `upgradeCC` with admin of one of the new orgs ? I had got `instantiation policy violation: signature set did not satisfy policy`. I have verified it is the admin making this upgrade.

rootDistress (Tue, 19 Mar 2019 13:23:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GHkrk7vxmJufebF8Z) Solved it by breaking the problem into first adding the orgs and upgrading then removing.

mwall (Tue, 19 Mar 2019 15:24:18 GMT):
Has joined the channel.

zZz (Wed, 20 Mar 2019 05:54:04 GMT):
Hi everyone, I started with fabric and I have a problem, how do I get all transactions in a block? Thank you

sunlidong (Wed, 20 Mar 2019 10:13:51 GMT):
Has joined the channel.

habpygo (Wed, 20 Mar 2019 11:06:36 GMT):
Hi, has anyone tried to run the HLF1.4 docker containers as non-root? I tried, but setting `user: $USER` won't work as the peer and orderer won't fire up. According to https://gerrit.hyperledger.org/r/#/c/29551/ this issue (I think) should be solved, but I have no luck. Anyone?

sunlidong (Wed, 20 Mar 2019 11:49:19 GMT):
hi

habpygo (Wed, 20 Mar 2019 13:41:34 GMT):
FYI Just got an answer from one of the IBM software engineers. Running as non-root will only be available from HLF1.4.1 master.

asaningmaxchain123 (Thu, 21 Mar 2019 05:17:08 GMT):
Has joined the channel.

seanli (Thu, 21 Mar 2019 09:16:33 GMT):
Has joined the channel.

mahoney1 (Thu, 21 Mar 2019 13:08:11 GMT):
FYI - reminder that Fabric Developer Community call is today (in 90mins) at 5pm UTC (5pm UK, 12pm ET, 9am PT) Meeting Id: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

mahoney1 (Thu, 21 Mar 2019 13:08:11 GMT):
FYI - reminder that Fabric Developer Community call is today at 5pm UTC (5pm UK, 12pm ET, 9am PT) Meeting Id: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

asaningmaxchain123 (Thu, 21 Mar 2019 14:37:56 GMT):
@Baha-sk when i want to instantiate chaincode, it tell me `sending deploy transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [localhost:6152]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:6152] - Transaction processing for endorser [localhost:6151]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:6151] - Transaction processing for endorser [localhost:6153]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:6153]`

asaningmaxchain123 (Thu, 21 Mar 2019 14:38:02 GMT):
however

asaningmaxchain123 (Thu, 21 Mar 2019 14:38:20 GMT):

Clipboard - March 21, 2019 10:38 PM

asaningmaxchain123 (Thu, 21 Mar 2019 14:38:33 GMT):
i can telnet the port

asaningmaxchain123 (Thu, 21 Mar 2019 14:38:46 GMT):
so i don't know where the problem

Baha-sk (Thu, 21 Mar 2019 16:02:28 GMT):
@asaningmaxchain123 have you looked at one of the integration tests to see how the client is configured and the call is made?

asaningmaxchain123 (Thu, 21 Mar 2019 16:04:27 GMT):
yes,i see the one org

Baha-sk (Thu, 21 Mar 2019 16:04:29 GMT):
also, could be that you need to add a mapping for peer0 and peer1's urls in `/etc/hosts` file like this for example: ```127.0.0.1 peer1.org1.example.com peer1.org2.example.com``` this should match your docker name

asaningmaxchain123 (Thu, 21 Mar 2019 16:05:04 GMT):
i use the matcher for config it

asaningmaxchain123 (Thu, 21 Mar 2019 16:05:31 GMT):

Clipboard - March 22, 2019 12:05 AM

Baha-sk (Thu, 21 Mar 2019 16:06:34 GMT):
another possibility is the tls credentials .. when I see `Description: dialing connection timed out` this sounds like the peer is not trusting the client and is refusing the connection

asaningmaxchain123 (Thu, 21 Mar 2019 16:07:13 GMT):
i don't enable tls

asaningmaxchain123 (Thu, 21 Mar 2019 16:10:44 GMT):

Clipboard - March 22, 2019 12:10 AM

Baha-sk (Thu, 21 Mar 2019 16:13:40 GMT):
from the docker ps command you showed earlier, there is no peer configured with port 6151, or is the list not complete?

Baha-sk (Thu, 21 Mar 2019 16:13:57 GMT):
try 6051 maybe?

asaningmaxchain123 (Thu, 21 Mar 2019 16:15:23 GMT):

Clipboard - March 22, 2019 12:15 AM

asaningmaxchain123 (Thu, 21 Mar 2019 16:16:37 GMT):
@Baha-sk the line number https://github.com/hyperledger/fabric-sdk-go/blob/11dc83c48436093a7946c71d0386d61c27a0fea9/pkg/fab/comm/connector.go#L129

asaningmaxchain123 (Thu, 21 Mar 2019 16:16:54 GMT):
can't open connection

Baha-sk (Thu, 21 Mar 2019 16:18:48 GMT):
try to add print statements around this line and see the options, target, ctx, etc..... could be some config is missing or something

habpygo (Thu, 21 Mar 2019 16:27:16 GMT):
c

vignesh (Thu, 21 Mar 2019 17:47:08 GMT):
I am trying to create a resmgmnt client with admin user``` below is the code i use``` `sdk, err := fabsdk.New(nil, fabsdk.WithEndpointConfig(EndpointConfigImpls...),``` fabsdk.WithIdentityConfig(IdentityConfigImpls...))``` ``` ``` ` ``` ```

vignesh (Thu, 21 Mar 2019 17:53:19 GMT):
I am trying to create a resmgmnt client with admin user. Below is the code I use``` `clientContext := sdk.Context(fabsdk.WithUser("admin"), fabsdk.WithOrg("ordererorg"))``` resMgmtClient, err := resmgmt.New(clientContext)``` if err != nil {``` fmt.Println( err)``` }``` ```` On executing I get following error `failed to create resmgmt client due to context error: user not found` Kindly help :) ```

vignesh (Thu, 21 Mar 2019 17:54:29 GMT):
I am trying to create a resmgmnt client with admin user. Below is the code I use `clientContext := sdk.Context(fabsdk.WithUser("admin"), fabsdk.WithOrg("ordererorg")) resMgmtClient, err := resmgmt.New(clientContext) if err != nil { fmt.Println( err) }` On executing I get following error `failed to create resmgmt client due to context error: user not found` Kindly help :)

vignesh (Thu, 21 Mar 2019 17:55:28 GMT):
I am trying to create a resmgmnt client with admin user. Below is the code I use `clientContext := sdk.Context(fabsdk.WithUser("admin"), fabsdk.WithOrg("ordererorg"))` `resMgmtClient, err := resmgmt.New(clientContext)` `if err != nil {` `fmt.Println( err)` `}` On executing I get following error `failed to create resmgmt client due to context error: user not found` Kindly help :)

vignesh (Thu, 21 Mar 2019 17:55:28 GMT):
I am trying to create a resmgmnt client with admin user. Below is the code I use `clientContext := sdk.Context(fabsdk.WithUser("admin"), fabsdk.WithOrg("ordererorg"))` `resMgmtClient, err := resmgmt.New(clientContext)` `if err != nil {` `fmt.Println( err)` `}` On executing I get following error `failed to create resmgmt client due to context error: user not found` I also tried with "Admin" but still finding same error. Kindly help :)

vignesh (Thu, 21 Mar 2019 17:55:28 GMT):
I am trying to create a resmgmnt client with admin user. Below is the code I use `clientContext := sdk.Context(fabsdk.WithUser("admin"), fabsdk.WithOrg("ordererorg"))` `resMgmtClient, err := resmgmt.New(clientContext)` `if err != nil {` `fmt.Println( err)` `}` On executing I get following error `failed to create resmgmt client due to context error: user not found` I also tried with "Admin" but still getting same error. Kindly help :)

nyet (Thu, 21 Mar 2019 18:00:33 GMT):
Do you have a MSP for that user in cryptoPath

mahoney1 (Thu, 21 Mar 2019 18:29:56 GMT):
hi everyone, today's Fabric Developer Community call recording (mp4) is available here -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings (file: 2019-0321-fabricdevcommunitycall.zip)

mahoney1 (Thu, 21 Mar 2019 18:29:56 GMT):
hi everyone, today's Fabric Developer Community call recording (mp4) is available here -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings (zipfile is 2019-0321-fabricdevcommunitycall)

vignesh (Thu, 21 Mar 2019 18:46:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oadPnQTevXZRW8Wnh) @nyet yes, below is the MSP info `vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp $ pwd /home/vignesh/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp $ cd admincerts/ vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp/admincerts $ ls Admin@org1.example.com-cert.pem vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp/admincerts $ `

vignesh (Thu, 21 Mar 2019 18:48:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oadPnQTevXZRW8Wnh) @nyet yes, below is the msp details``` `vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp $ pwd```` `/home/vignesh/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp```` `vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp $ cd admincerts/```` `vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp/admincerts $ ls```` `Admin@org1.example.com-cert.pem` ```

vignesh (Thu, 21 Mar 2019 18:50:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oadPnQTevXZRW8Wnh) @nyet yes, below is the msp details``` `vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp $ pwd` `/home/vignesh/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp` `vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp $ cd admincerts/` `vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp/admincerts $ ls` `Admin@org1.example.com-cert.pem````

vignesh (Thu, 21 Mar 2019 18:51:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=oadPnQTevXZRW8Wnh) @nyet yes, below is the msp details``` vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp $ pwd /home/vignesh/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp $ cd admincerts/ vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/orderer/msp/admincerts $ ls Admin@org1.example.com-cert.pem````

nyet (Thu, 21 Mar 2019 18:52:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=HhG9mmNfAfWDpBwZd) @vignesh That `WithOrg` doesn't look right then...

nyet (Thu, 21 Mar 2019 18:52:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=HhG9mmNfAfWDpBwZd) @vignesh That `WithOrg` doesn't look right then... You dont have `Admin@orderrorg`

nyet (Thu, 21 Mar 2019 18:52:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=HhG9mmNfAfWDpBwZd) @vignesh That `WithOrg` doesn't look right then.. Do you have the orgs set up right in `config.yaml`

vignesh (Thu, 21 Mar 2019 19:03:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RXWLFf7jn5qf5oE3f) @nyet I am not using a config.yaml file, I am trying configless approach, referring to examples at `fabric-sdk-go/test/integration/e2e/configless/endpointconfig_override.go`. Below is my orderer config``` "ordererorg": { MSPID: "OrdererMSP", CryptoPath: "ordererOrganizations/orderer/msp", }, ```

Baha-sk (Thu, 21 Mar 2019 19:05:18 GMT):
What about the peers orgs @vignesh ?

vignesh (Thu, 21 Mar 2019 19:16:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=3cYd6LBpKia3xp8cm) @Baha-sk tried for org1 `clientContext := sdk.Context(fabsdk.WithUser("Admin"), fabsdk.WithOrg("org1"))`, getting same error.

Baha-sk (Thu, 21 Mar 2019 19:17:03 GMT):
I meant.. do you have peer orgs in your config as well?

vignesh (Thu, 21 Mar 2019 19:18:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=6PgLcsucpDkGHErYW) @Baha-sk yes, I am using the exact file `fabric-sdk-go/test/integration/e2e/configless/endpointconfig_override.go` without any modifications. So, having both org1 and org2

Baha-sk (Thu, 21 Mar 2019 19:21:33 GMT):
in this file, CryptoPath is set like this for the orderer: CryptoPath: "ordererOrganizations/example.com/users/`{username}`@example.com/msp",

Baha-sk (Thu, 21 Mar 2019 19:21:33 GMT):
in this file, CryptoPath is set like this for the orderer: `CryptoPath: "ordererOrganizations/example.com/users/{username}@example.com/msp",`

Baha-sk (Thu, 21 Mar 2019 19:22:06 GMT):
notice the `{username}@example.com` in the path

Baha-sk (Thu, 21 Mar 2019 19:22:22 GMT):
this gets converted to user you pass in the context

Baha-sk (Thu, 21 Mar 2019 19:22:22 GMT):
this gets converted to the user you pass in the context

Baha-sk (Thu, 21 Mar 2019 19:22:52 GMT):
in the config you pasted above, this is not right ` CryptoPath: "ordererOrganizations/orderer/msp",`

vignesh (Thu, 21 Mar 2019 19:31:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=uL8fAE9EdZDnyc2cA) @Baha-sk oh.. thanks a lot for identifying my mistake.. will try as u suggested..

Baha-sk (Thu, 21 Mar 2019 19:34:06 GMT):
hope this helps .. good luck @vignesh

vignesh (Thu, 21 Mar 2019 20:38:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Pcp47QFhDaMhng2Cq) @Baha-sk updated CryptoPath to `"ordererOrganizations/example.com/users/Admin@example.com/msp"` and copied admin credentials to `/home/vignesh/go-book/src/github.com/my_fabric/crypto_config/ordererOrganizations/example.com/users/Admin@example.com/msp` still getting same error.

vignesh (Thu, 21 Mar 2019 20:45:35 GMT):
@Baha-sk By the way, earlier I had path as `CryptoPath: "ordererOrganizations/orderer/msp"` and credentials at `"ordererOrganizations/orderer/msp"` . msp was right where it was specified in config. So, Is it mandatory to have msp for each user as {user}@example.com ?? If not , my earlier path should be fine and have no issues..

Baha-sk (Thu, 21 Mar 2019 21:06:44 GMT):
yes @vignesh each user has its own msp folder..

Baha-sk (Thu, 21 Mar 2019 21:07:30 GMT):
are you sure this path is accessible from your app? `"ordererOrganizations/example.com/users/Admin@example.com/msp"`

asaningmaxchain123 (Fri, 22 Mar 2019 02:33:26 GMT):
@Baha-sk i print the msg

asaningmaxchain123 (Fri, 22 Mar 2019 02:33:40 GMT):
`target: 172.16.10.47:6151, state:TRANSIENT_FAILURE ,error waiting for connection failed: context deadline exceeded`

asaningmaxchain123 (Fri, 22 Mar 2019 02:33:57 GMT):
the state is `TRANSIENT_FAILURE`

asaningmaxchain123 (Fri, 22 Mar 2019 02:33:57 GMT):
the state is `TRANSIENT_FAILURE` when the sdk first connect to 6151

asaningmaxchain123 (Fri, 22 Mar 2019 03:06:08 GMT):
however i can install chaincode

asaningmaxchain123 (Fri, 22 Mar 2019 03:06:08 GMT):
however i can install chaincode for every peer

baohua (Fri, 22 Mar 2019 05:34:10 GMT):
Hi, anyone know when will go sdk make a new release? Last release (v1.0.0-alpha4) is in June, 2018

baohua (Fri, 22 Mar 2019 05:34:15 GMT):
Thanks!

mfaisaltariq (Sat, 23 Mar 2019 13:35:12 GMT):
Hi everyone,

mfaisaltariq (Sat, 23 Mar 2019 13:35:33 GMT):
How can I instantiate the chaincode on go without internet connection?

mfaisaltariq (Sat, 23 Mar 2019 13:35:49 GMT):
``` Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Get https://registry-1.docker.io/v2/: Service Unavailable !!!!!!!!!!!!!!! Chaincode instantiation on peer0.org2 on channel 'mychannel' failed !!!!!!!!!!!!!!!! ========= ERROR !!! FAILED to execute End-2-End Scenario ===========```

mfaisaltariq (Sat, 23 Mar 2019 13:36:10 GMT):
I'm running the **byfn** network for testing.

mfaisaltariq (Sat, 23 Mar 2019 16:08:54 GMT):
got it working. The baseOS image was missing. Got it working

haardikkk (Sun, 24 Mar 2019 02:19:19 GMT):
Hey, are there any examples for fabric sdk go I can read? IBM website only has nodejs tutorials, I'm trying to figure out how to enroll the user, and how to read/write data to the ledger

yanli133 (Mon, 25 Mar 2019 06:59:15 GMT):
Has joined the channel.

yanli133 (Mon, 25 Mar 2019 07:02:30 GMT):
why there is not a new version of fabric-go-sdk ???

nyet (Mon, 25 Mar 2019 07:14:16 GMT):
What's wrong with the one in github?

nyet (Mon, 25 Mar 2019 07:16:49 GMT):
Is there a formal tag/release schedule for fabric projects?

rootDistress (Mon, 25 Mar 2019 08:01:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=D9SFffzGrgfwAW4eC) @nyet https://jira.hyperledger.org/secure/Dashboard.jspa?selectPageId=10104

karumbas (Mon, 25 Mar 2019 11:21:24 GMT):
Has joined the channel.

nyet (Mon, 25 Mar 2019 20:18:22 GMT):
does that include fabric-go-sdk?

dimm (Tue, 26 Mar 2019 00:18:59 GMT):
Has joined the channel.

dimm (Tue, 26 Mar 2019 00:24:53 GMT):
@vahuja4 were you able to solve your problem?

dimm (Tue, 26 Mar 2019 00:28:40 GMT):
Could somebody plz share a working config file for Go SDK? I'm getting: ``` [fabsdk/fab] 2019/03/26 00:13:51 UTC - fab.detectDeprecatedNetworkConfig -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration [fabsdk/fab] 2019/03/26 00:13:51 UTC - fab.detectDeprecatedNetworkConfig -> WARN visit https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml for samples [fabsdk/msp] 2019/03/26 00:13:51 UTC - msp.(*IdentityConfig).loadIdentityConfigEntities -> DEBU Client is: {Organization:Org1 Logging:{Level:debug} CryptoConfig:{Path:${GOPATH}/src/gitlab.com/dimm/osc-portal/hl/basic-network/crypto-config} TLSCerts:{Client:{Key:{Path: Pem: bytes:[]} Cert:{Path: Pem: bytes:[]}}} CredentialStore:{Path:/tmp/osc-kvs CryptoStore:{Path:/tmp/osc-msp}}} [fabsdk/msp] 2019/03/26 00:13:51 UTC - msp.(*IdentityConfig).loadIdentityConfigEntities -> DEBU organizations are: map[org1:{MSPID:org1.example.com CryptoPath:peerOrganizations/org1.example.com/users/{userName}@org1.example.com/msp Users:map[] Peers:[peer0.org1.example.com] CertificateAuthorities:[ca.org1.example.com]}] [fabsdk/msp] 2019/03/26 00:13:51 UTC - msp.(*IdentityConfig).loadIdentityConfigEntities -> DEBU certificateAuthorities are: map[ca.org1.example.com:{URL:https://localhost:7054 GRPCOptions:map[] TLSCACerts:{Pem:[] Path: Client:{Key:{Path: Pem: bytes:[]} Cert:{Path: Pem: bytes:[]}}} Registrar:{EnrollID:admin EnrollSecret:adminpw} CAName:ca.org1.example.com}] [fabsdk/msp] 2019/03/26 00:13:51 UTC - msp.(*IdentityConfig).compileMatchers -> DEBU Matchers are: {matchers:map[]} [fabsdk/msp] 2019/03/26 00:13:51 UTC - msp.(*IdentityConfig).loadAllCAConfigs -> DEBU Mapped Certificate Authority for [org1] to [ca.org1.example.com] Unable to initialize the Fabric SDK: failed to create sdk: failed to initialize configuration: unable to load identity config: failed to initialize identity config from config backend: failed to create identity config from backends: failed to load all CA configs : failed to load server certs: open : no such file or directory ``` Following this https://chainhero.io/2018/03/tutorial-build-blockchain-app-2/ tutorial

dimm (Tue, 26 Mar 2019 00:42:34 GMT):
Ah, nevermind.. There's a new version of the tutorial :)

MHBauer (Tue, 26 Mar 2019 01:54:55 GMT):
should we build against master or the 10 months ago v1.0.0-alpha4?

MHBauer (Tue, 26 Mar 2019 02:22:18 GMT):
why are there mocks mixed with code?

rootDistress (Tue, 26 Mar 2019 05:59:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=36AiyRqkefA4Bmmrm) @nyet No, It doesn't, only fabric. Didn't find one for fabric-go-sdk.

bainshee (Tue, 26 Mar 2019 06:18:28 GMT):
Has joined the channel.

bainshee (Tue, 26 Mar 2019 06:24:12 GMT):
hello, Is Go-Version1.12 supported in the master branch?

gen_el (Tue, 26 Mar 2019 11:30:55 GMT):
Hello! We are currently using this sdk and will go to production soon. Should we use this sdk in production? We don't want to use another language in our stack which is already split between Golang and Microsoft.NET.

mtng (Tue, 26 Mar 2019 11:52:32 GMT):
Hello!!! When I want to do a query into a chaincode that is not deployed in the network, there are in the logs the following loop: ``` fabsdk/util] 2019/03/26 11:37:56 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: . Will retry again later [fabsdk/client] 2019/03/26 11:38:06 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:07 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:08 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:10 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:16 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:32 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:48 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/util] 2019/03/26 11:38:48 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: . Will retry again later • [fabsdk/client] 2019/03/26 11:38:58 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: ``` In this case I tried to do a query into the chaincode1 and chaincode 2 and they are not instantiated. I have in the configuration a timeout of 60s in the query (by default is 180s): ``` timeout: query: 60s execute: 60s resmgmt: 60s ``` I can catch the error from the timeout but I have this loop in my server logs, how can I fix that?

mtng (Tue, 26 Mar 2019 11:52:32 GMT):
Hello!!! When I want to do a query into a chaincode that is not deployed in the network, there are in the logs the following loop: ``` fabsdk/util] 2019/03/26 11:37:56 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: . Will retry again later [fabsdk/client] 2019/03/26 11:38:06 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:07 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:08 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:10 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:16 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:32 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:48 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/util] 2019/03/26 11:38:48 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: . Will retry again later • [fabsdk/client] 2019/03/26 11:38:58 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: ``` In this case I tried to do a query into the chaincode1 and chaincode 2 and they are not instantiated. I have in the configuration a timeout of 60s in the query (by default is 180s): ``` timeout: query: 60s execute: 60s resmgmt: 60s ``` I can catch the error from the timeout but I have this loop in my server logs, how can I fix that? pd: I have the same loop in the peer logs

mtng (Tue, 26 Mar 2019 11:52:32 GMT):
Hello!!! When I want to do a query into a chaincode that is not deployed in the network, there are in the logs the following loop: ``` fabsdk/util] 2019/03/26 11:37:56 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: . Will retry again later [fabsdk/client] 2019/03/26 11:38:06 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:07 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:08 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:10 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:16 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:32 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/client] 2019/03/26 11:38:48 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: [fabsdk/util] 2019/03/26 11:38:48 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: . Will retry again later • [fabsdk/client] 2019/03/26 11:38:58 UTC - fabricselection.(*Service).query -> WARN error getting endorsers from target [peer0.org1.example.com:7051]: failed constructing descriptor for chaincodes: ``` In this case I tried to do a query into the chaincode1 and chaincode 2 and they are not instantiated. I have in the configuration a timeout of 60s in the query (by default is 180s): ``` timeout: query: 60s execute: 60s resmgmt: 60s ``` I can catch the error from the timeout but I have this loop in my server logs, how can I fix that? pd: I have the same loop in the peer logs ``` 2019-03-26 11:39:46.780 UTC [discovery.lifecycle] DeployedChaincodes -> INFO 2a3fb4 Chaincode chaincode2 isn't instantiated 2019-03-26 11:39:46.780 UTC [discovery.lifecycle] Metadata -> INFO 2a3fb5 Chaincode chaincode2 isn't defined in channel mychannel 2019-03-26 11:39:46.780 UTC [discovery] chaincodeQuery -> ERRO 2a3fb6 Failed constructing descriptor for chaincode chaincodes: ,: No metadata was found for chaincode chaincode2 in channel mychannel 2019-03-26 11:39:46.780 UTC [comm.grpc.server] 1 -> INFO 2a3fb7 unary call completed {"grpc.start_time": "2019-03-26T11:39:46.776Z", "grpc.service": "discovery.Discovery", "grpc.method": "Discover", "grpc.request_deadline": "2019-03-26T11:40:01.776Z", "grpc.peer_address": "172.19.0.1:39866", "grpc.peer_subject": "CN=Admin@org1.example.com,L=Madrid,ST=Madrid,C=ES", "grpc.code": "OK", "grpc.call_duration": "3.780977ms"} 2019-03-26 11:39:48.317 UTC [comm.grpc.server] 1 -> INFO 2a3fb8 unary call completed {"grpc.start_time": "2019-03-26T11:39:48.317Z", "grpc.service": "discovery.Discovery", "grpc.method": "Discover", "grpc.request_deadline": "2019-03-26T11:40:03.316Z", "grpc.peer_address": "172.19.0.1:39866", "grpc.peer_subject": "CN=Admin@org1.example.com,L=Madrid,ST=Madrid,C=ES", "grpc.code": "OK", "grpc.call_duration": "880.609µs"} 2019-03-26 11:39:48.318 UTC [comm.grpc.server] 1 -> INFO 2a3fb9 unary call completed {"grpc.start_time": "2019-03-26T11:39:48.317Z", "grpc.service": "discovery.Discovery", "grpc.method": "Discover", "grpc.request_deadline": "2019-03-26T11:40:03.316Z", "grpc.peer_address": "172.19.0.1:39866", "grpc.peer_subject": "CN=Admin@org1.example.com,L=Madrid,ST=Madrid,C=ES", "grpc.code": "OK", "grpc.call_ ```

Diegoescalonaro (Tue, 26 Mar 2019 11:53:50 GMT):
Has joined the channel.

yacovm (Tue, 26 Mar 2019 11:54:55 GMT):
@mtng make sure you have anchor peers

yacovm (Tue, 26 Mar 2019 11:55:03 GMT):
and that the peers have external endpoints configured

yacovm (Tue, 26 Mar 2019 11:55:17 GMT):
we should really pin these 2 messages somehow, to this channel

mtng (Tue, 26 Mar 2019 12:33:55 GMT):
Ok, thank you @yacovm I will take a look :)

MHBauer (Tue, 26 Mar 2019 18:31:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Cedcw3pzxAckMjbAL) @yacovm should be possible. who has perms to manage channels? who manages this one? doesn't seem to be a lot of response.

yacovm (Tue, 26 Mar 2019 18:46:56 GMT):
@MHBauer I was just joking... this is asked a lot and I keep repeating this all the time

MHBauer (Tue, 26 Mar 2019 18:48:23 GMT):
but, that's a thing you could do?

yacovm (Tue, 26 Mar 2019 18:53:54 GMT):
no

MHBauer (Tue, 26 Mar 2019 18:57:56 GMT):
well, not funny. but got for helping.

MHBauer (Tue, 26 Mar 2019 22:05:39 GMT):
Are there any very simple samples? Everything i see is 3,4,a zillion files. I would like a single file, smallest common thing, make sure it works type example. Anything come to mind?

dimm (Tue, 26 Mar 2019 22:14:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=QoZCNuG8iRQt3g4Aq) Yeah, that would be awesome..

nyet (Tue, 26 Mar 2019 22:14:44 GMT):
no such thing exists in fabric

nyet (Tue, 26 Mar 2019 22:14:49 GMT):
all config files are exhaustively long

MHBauer (Tue, 26 Mar 2019 22:15:00 GMT):
I'm not worried about the config file

MHBauer (Tue, 26 Mar 2019 22:15:20 GMT):
I'm hoping for like, five lines, "load config" "get client" "use client"

dimm (Tue, 26 Mar 2019 22:15:22 GMT):
I'm kinda trying to adapt https://chainhero.io/2018/06/tutorial-build-blockchain-app-v1-1-0 for me

nyet (Tue, 26 Mar 2019 22:15:32 GMT):
you can look at this maybe it helps https://github.com/Blockdaemon/hlf-service-network

dimm (Tue, 26 Mar 2019 22:15:48 GMT):
And now struggling with: ``` [fabsdk/client] 2019/03/26 22:11:50 UTC - pgresolver.(*randomLBP).Choose -> WARN No available peer groups Unable to query hello on the chaincode: failed to query: Client Status Code: (6) NO_PEERS_FOUND. Description: targets were not provided``` Any ideas? :)

nyet (Tue, 26 Mar 2019 22:16:04 GMT):
it works with this https://github.com/Blockdaemon/hlf-database-app

nyet (Tue, 26 Mar 2019 22:16:12 GMT):
which is a minimal go fabric client

MHBauer (Tue, 26 Mar 2019 22:16:15 GMT):
I'm still using a client from way before ago, and trying to update to master is totally different.

MHBauer (Tue, 26 Mar 2019 22:16:22 GMT):
so, I can't help with anything right now.

dimm (Tue, 26 Mar 2019 22:19:05 GMT):
One more question, is packager.NewCCPackage working with vendor folder? How can I add my dependencies?

dimm (Tue, 26 Mar 2019 22:22:35 GMT):
How are you guys doing it? :) nobody is using other libs in chaincode?

MHBauer (Tue, 26 Mar 2019 22:23:10 GMT):
I don't know what packager.NewCCPackage is, and my go chaincode doesn't use the sdk.

MHBauer (Tue, 26 Mar 2019 22:23:32 GMT):
we vendor plenty of libs tho

dimm (Tue, 26 Mar 2019 22:23:35 GMT):
How do you pack your chaincode?

MHBauer (Tue, 26 Mar 2019 22:23:45 GMT):
I don't know what that means.

dimm (Tue, 26 Mar 2019 22:23:52 GMT):
mm... how do you install it?

MHBauer (Tue, 26 Mar 2019 22:24:38 GMT):
I'm just using first-network and volume mounting it into the peers.

MHBauer (Tue, 26 Mar 2019 22:24:53 GMT):
they seem to know how to load it into the ccenv given a directory.

MHBauer (Tue, 26 Mar 2019 22:25:21 GMT):
If there's a standard chaincode packaging solution, I am not aware of it.

dimm (Tue, 26 Mar 2019 22:27:24 GMT):
oh, cool

dimm (Tue, 26 Mar 2019 22:28:25 GMT):
i'm doing basic-network... where should I mount it to?

dimm (Tue, 26 Mar 2019 22:28:59 GMT):
I'm now doing it the right way, and it's starting another container with chaincode...

dimm (Tue, 26 Mar 2019 22:29:16 GMT):
But I guess that's why I'm having this problem with URL

MHBauer (Tue, 26 Mar 2019 22:29:38 GMT):
I'm developing a thing, I haven't tried to deliver it.

MHBauer (Tue, 26 Mar 2019 22:29:50 GMT):
``` first-network/docker-compose-cli.yaml @@ -79,7 +79,7 @@ services: command: /bin/bash volumes: - /var/run/:/host/var/run/ - - ./../chaincode/:/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode + - ~/go/src/github.com/hyperledger/fabric-chaincode-evm:/opt/gopath/src/github.com/hyperledger/fabric-chaincode-evm ```

MHBauer (Tue, 26 Mar 2019 22:30:03 GMT):
example diff of my changes.

MHBauer (Tue, 26 Mar 2019 22:30:15 GMT):
runs well enough for me.

MHBauer (Tue, 26 Mar 2019 22:30:35 GMT):
though we do load it into integration/nwo from fabric upstream, but I have no idea how that works.

nyet (Tue, 26 Mar 2019 22:30:45 GMT):
just about all of the "first network" examples are pretty useless from a production standpoint

MHBauer (Tue, 26 Mar 2019 22:30:54 GMT):
that doesn't surprise me.

nyet (Tue, 26 Mar 2019 22:31:04 GMT):
in fact, `cryptogen` in general isn't supposed to be used in production either

MHBauer (Tue, 26 Mar 2019 22:31:13 GMT):
I have to start somewhere, and I'm not going to set up a zillion nodes as an actual network.

nyet (Tue, 26 Mar 2019 22:31:34 GMT):
you need at least two (three if you include a ca-server)

nyet (Tue, 26 Mar 2019 22:31:42 GMT):
granted you can probably put them all i nthe same vm

MHBauer (Tue, 26 Mar 2019 22:31:47 GMT):
ah yes, a server to manage all of our secrets.

nyet (Tue, 26 Mar 2019 22:32:01 GMT):
sort of - it replaces `cryptogen`

MHBauer (Tue, 26 Mar 2019 22:32:13 GMT):
another thing I know nothing about

MHBauer (Tue, 26 Mar 2019 22:32:14 GMT):
brb

dimm (Tue, 26 Mar 2019 22:42:25 GMT):
Woohoooo!!! I just invoked my chaincode... :tada: :tada: :tada: Just 2 days... Omg, it shouldn't be THAT hard

MHBauer (Tue, 26 Mar 2019 22:44:12 GMT):
cool, write it up, I'll :+1:

dimm (Tue, 26 Mar 2019 22:45:31 GMT):
)) I still can't add dependencies... hoping to get away with it

MHBauer (Wed, 27 Mar 2019 00:53:47 GMT):
alright, finally got it.

MHBauer (Wed, 27 Mar 2019 00:53:56 GMT):
had a typo, and debugging is crazytown.

MHBauer (Wed, 27 Mar 2019 00:54:14 GMT):
a closure of a closerue that returns a func that returns another func.

MHBauer (Wed, 27 Mar 2019 00:54:18 GMT):
phew.

MHBauer (Wed, 27 Mar 2019 01:50:16 GMT):
here's the simplest doodad I could possibly make. one-file, 45 lines https://github.com/MHBauer/fabric-query-examples/blob/master/query-ledger/main.go

nyet (Wed, 27 Mar 2019 02:15:49 GMT):
mine is a bit longer https://github.com/Blockdaemon/hlf-database-app/blob/master/chaincode/main.go

nyet (Wed, 27 Mar 2019 02:16:02 GMT):
but its mostly comments

MHBauer (Wed, 27 Mar 2019 02:19:57 GMT):
that's a chaincode tho, not a ffabric client.

nyet (Wed, 27 Mar 2019 03:05:19 GMT):
oh

nyet (Wed, 27 Mar 2019 03:05:31 GMT):
i thought you were talking about chaincode. The rest of the sdk client is there.

nyet (Wed, 27 Mar 2019 03:05:40 GMT):
not sure if you looked at it

MHBauer (Wed, 27 Mar 2019 03:05:56 GMT):
ya, glanced around, big, multiple files, see original complaint.

nyet (Wed, 27 Mar 2019 03:06:04 GMT):
uh ok.

MHBauer (Wed, 27 Mar 2019 03:06:06 GMT):
:+1:

xixuejia (Wed, 27 Mar 2019 07:59:00 GMT):
Hello guys, can anyone help on dynamic service discovery? Currently when I use dynamic discovery, it seems the peer will be discovered even if it is not joined into application channel

xixuejia (Wed, 27 Mar 2019 08:19:42 GMT):
I suspect by default the discovery service will only load peers from local connection profile, is there a way to dynamically discover the peer group given channel name and cc name?

Baha-sk (Wed, 27 Mar 2019 18:58:05 GMT):
@xixuejia for discovery of peers not on a channel (local peers), there is a simple test: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/common/discovery/discoveryclient_test.go#L108 for discovery of peers on a channel, you need to make sure the peers have joined a channel and chaincodes are installed/instantiated (the test has a bit of prep work to set all things up, but technically the discovery client call is similar to the test above) see: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/common/discovery/discoveryclient_test.go#L44, note the difference is the channelID being passed at this line: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/common/discovery/discoveryclient_test.go#L59

nyet (Wed, 27 Mar 2019 19:58:54 GMT):
@mastersingh24 THANK YOU for your quick response btw :)

nyet (Wed, 27 Mar 2019 19:59:00 GMT):
you rock

nyet (Wed, 27 Mar 2019 20:40:34 GMT):
so here is the date problem in a nutshell (and openssl doesn't seem to care) ``` a$ for i in `sudo find msp -name \*.pem`; do echo $i; sudo openssl x509 -noout -dates -in $i; done msp/signcerts/cert.pem notBefore=Mar 27 19:30:00 2019 GMT notAfter=Mar 26 19:35:00 2020 GMT msp/cacerts/ca-server-nyet-1-hlf-bdnodes-net-7054-ca-server.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` Note that the ca cert isn't valid until 19:34, but the other certs were created at 19:30. The peer cares: ``` 2019-03-27 20:36:24.946 UTC [main] InitCmd -> ERRO 02e Cannot run peer because error when setting up MSP of type bccsp from directory /var/hyperledger/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid``` But openssl does not: ``` $ openssl verify -CAfile msp/cacerts/ca-server-nyet-1-hlf-bdnodes-net-7054-ca-server.pem msp/signcerts/cert.pem msp/signcerts/cert.pem: OK ```

nyet (Wed, 27 Mar 2019 20:40:34 GMT):
so here is the date problem in a nutshell (and openssl doesn't seem to care) ``` for i in `sudo find msp -name \*.pem`; do ls -al $i; sudo openssl x509 -noout -dates -in $i; done -rw-r--r-- 1 enode enode 981 Mar 27 19:35 msp/signcerts/cert.pem notBefore=Mar 27 19:30:00 2019 GMT notAfter=Mar 26 19:35:00 2020 GMT -rw-r--r-- 1 enode enode 977 Mar 27 19:35 msp/cacerts/ca-server-nyet-1-hlf-bdnodes-net-7054-ca-server.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` Note that the ca cert isn't valid until 19:34, but the other certs were created at 19:30. The peer cares: ``` 2019-03-27 20:36:24.946 UTC [main] InitCmd -> ERRO 02e Cannot run peer because error when setting up MSP of type bccsp from directory /var/hyperledger/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid``` But openssl does not: ``` $ openssl verify -CAfile msp/cacerts/ca-server-nyet-1-hlf-bdnodes-net-7054-ca-server.pem msp/signcerts/cert.pem msp/signcerts/cert.pem: OK ```

nyet (Wed, 27 Mar 2019 20:40:34 GMT):
so here is the date problem in a nutshell (and openssl doesn't seem to care) ``` $ for i in `sudo find msp -name \*.pem`; do ls -al $i; sudo openssl x509 -noout -dates -in $i; done -rw-r--r-- 1 enode enode 981 Mar 27 19:35 msp/signcerts/cert.pem notBefore=Mar 27 19:30:00 2019 GMT notAfter=Mar 26 19:35:00 2020 GMT -rw-r--r-- 1 enode enode 977 Mar 27 19:35 msp/cacerts/ca-server-nyet-1-hlf-bdnodes-net-7054-ca-server.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` Note that the ca cert isn't valid until 19:34, but the other certs were created at 19:30. The peer cares: ``` 2019-03-27 20:36:24.946 UTC [main] InitCmd -> ERRO 02e Cannot run peer because error when setting up MSP of type bccsp from directory /var/hyperledger/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid``` But openssl does not: ``` $ openssl verify -CAfile msp/cacerts/ca-server-nyet-1-hlf-bdnodes-net-7054-ca-server.pem msp/signcerts/cert.pem msp/signcerts/cert.pem: OK ``` Also note that the admincerts/cert.pem's notBefore is backdated from the actual file creation time.

nyet (Wed, 27 Mar 2019 20:40:34 GMT):
so here is the date problem in a nutshell (and openssl doesn't seem to care) ``` $ for i in `sudo find msp -name \*.pem`; do ls -al $i; sudo openssl x509 -noout -dates -in $i; done -rw-r--r-- 1 enode enode 981 Mar 27 19:35 msp/signcerts/cert.pem notBefore=Mar 27 19:30:00 2019 GMT notAfter=Mar 26 19:35:00 2020 GMT -rw-r--r-- 1 enode enode 977 Mar 27 19:35 msp/cacerts/server.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` Note that the ca cert isn't valid until 19:34, but the other certs were created at 19:30. The peer cares: ``` 2019-03-27 20:36:24.946 UTC [main] InitCmd -> ERRO 02e Cannot run peer because error when setting up MSP of type bccsp from directory /var/hyperledger/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid``` But openssl does not: ``` $ openssl verify -CAfile msp/cacerts/server.pem msp/signcerts/cert.pem msp/signcerts/cert.pem: OK ``` Also note that the admincerts/cert.pem's notBefore is backdated from the actual file creation time

nyet (Wed, 27 Mar 2019 20:40:34 GMT):
so here is the date problem in a nutshell (and openssl doesn't seem to care) ``` $ for i in `sudo find msp -name \*.pem`; do ls -al $i; sudo openssl x509 -noout -dates -in $i; done -rw-r--r-- 1 enode enode 981 Mar 27 19:35 msp/signcerts/cert.pem notBefore=Mar 27 19:30:00 2019 GMT notAfter=Mar 26 19:35:00 2020 GMT -rw-r--r-- 1 enode enode 977 Mar 27 19:35 msp/cacerts/server.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` Note that the ca cert isn't valid until 19:34, but the other certs were created at 19:30. The peer cares: ``` 2019-03-27 20:36:24.946 UTC [main] InitCmd -> ERRO 02e Cannot run peer because error when setting up MSP of type bccsp from directory /var/hyperledger/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid``` But openssl does not: ``` $ openssl verify -CAfile msp/cacerts/server.pem msp/signcerts/cert.pem msp/signcerts/cert.pem: OK ``` Also note that the admincerts/cert.pem's `notBefore` of `19:30` is backdated from the actual file creation time of `19:35`

nyet (Wed, 27 Mar 2019 20:40:34 GMT):
so here is the date problem in a nutshell (and openssl doesn't seem to care) ``` $ for i in `sudo find msp -name \*.pem`; do ls -al $i; sudo openssl x509 -noout -dates -in $i; done -rw-r--r-- 1 enode enode 981 Mar 27 19:35 msp/signcerts/cert.pem notBefore=Mar 27 19:30:00 2019 GMT notAfter=Mar 26 19:35:00 2020 GMT -rw-r--r-- 1 enode enode 977 Mar 27 19:35 msp/cacerts/server.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` Note that the ca cert isn't valid until 19:34, but the other certs were created at 19:30. The peer cares: ``` 2019-03-27 20:36:24.946 UTC [main] InitCmd -> ERRO 02e Cannot run peer because error when setting up MSP of type bccsp from directory /var/hyperledger/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid``` But openssl does not: ``` $ openssl verify -CAfile msp/cacerts/server.pem msp/signcerts/cert.pem msp/signcerts/cert.pem: OK ``` Also note that the `admincerts/cert.pem`'s `notBefore` of `19:30` is backdated from the actual file creation time of `19:35` On the server itself: ``` $ openssl x509 -noout -dates -in ca-cert.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ```

nyet (Wed, 27 Mar 2019 20:40:34 GMT):
so here is the date problem in a nutshell (and openssl doesn't seem to care) ``` $ for i in `sudo find msp -name \*.pem`; do ls -al $i; sudo openssl x509 -noout -dates -in $i; done -rw-r--r-- 1 enode enode 981 Mar 27 19:35 msp/signcerts/cert.pem notBefore=Mar 27 19:30:00 2019 GMT notAfter=Mar 26 19:35:00 2020 GMT -rw-r--r-- 1 enode enode 977 Mar 27 19:35 msp/cacerts/server.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` Note that the ca cert isn't valid until 19:34, but the other certs were created at 19:30. The peer cares: ``` 2019-03-27 20:36:24.946 UTC [main] InitCmd -> ERRO 02e Cannot run peer because error when setting up MSP of type bccsp from directory /var/hyperledger/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid``` But openssl does not: ``` $ openssl verify -CAfile msp/cacerts/server.pem msp/signcerts/cert.pem msp/signcerts/cert.pem: OK ``` Also note that the `admincerts/cert.pem`'s `notBefore` of `19:30` is backdated from the actual file creation time of `19:35` On the server itself, it is not backdated (since it is generated by `openssl`, and not `ca-server`) ``` $ ls -al ca-cert.pem -rw-rw-r-- 1 enode enode 977 Mar 27 19:34 ca-cert.pem $ openssl x509 -noout -dates -in ca-cert.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` One possible solution is to backdate on ca-cert creation? haven't tried it yet.

nyet (Wed, 27 Mar 2019 20:40:34 GMT):
so here is the date problem in a nutshell (and openssl doesn't seem to care) ``` $ for i in `sudo find msp -name \*.pem`; do ls -al $i; sudo openssl x509 -noout -dates -in $i; done -rw-r--r-- 1 enode enode 981 Mar 27 19:35 msp/signcerts/cert.pem notBefore=Mar 27 19:30:00 2019 GMT notAfter=Mar 26 19:35:00 2020 GMT -rw-r--r-- 1 enode enode 977 Mar 27 19:35 msp/cacerts/server.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` Note that the ca cert isn't valid until `19:34`, but the other certs were created at `19:30`. The peer cares: ``` 2019-03-27 20:36:24.946 UTC [main] InitCmd -> ERRO 02e Cannot run peer because error when setting up MSP of type bccsp from directory /var/hyperledger/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid``` But openssl does not: ``` $ openssl verify -CAfile msp/cacerts/server.pem msp/signcerts/cert.pem msp/signcerts/cert.pem: OK ``` Also note that the `admincerts/cert.pem`'s `notBefore` of `19:30` is backdated from the actual file creation time of `19:35` On the server itself, it is not backdated (since it is generated by `openssl`, and not `ca-server`) ``` $ ls -al ca-cert.pem -rw-rw-r-- 1 enode enode 977 Mar 27 19:34 ca-cert.pem $ openssl x509 -noout -dates -in ca-cert.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` One possible solution is to backdate on ca-cert creation? haven't tried it yet. Is this cert chain actually invalid? Is there anything that says the signing cert's `notBefore` can't be later than the signed `notBefore`?

nyet (Wed, 27 Mar 2019 20:40:34 GMT):
so here is the date problem in a nutshell (and openssl doesn't seem to care) ``` $ for i in `sudo find msp -name \*.pem`; do ls -al $i; sudo openssl x509 -noout -dates -in $i; done -rw-r--r-- 1 enode enode 981 Mar 27 19:35 msp/signcerts/cert.pem notBefore=Mar 27 19:30:00 2019 GMT notAfter=Mar 26 19:35:00 2020 GMT -rw-r--r-- 1 enode enode 977 Mar 27 19:35 msp/cacerts/server.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` Note that the ca cert isn't valid until `19:34`, but the other certs were created at `19:30`. The peer cares: ``` 2019-03-27 20:36:24.946 UTC [main] InitCmd -> ERRO 02e Cannot run peer because error when setting up MSP of type bccsp from directory /var/hyperledger/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid``` But openssl does not: ``` $ openssl verify -CAfile msp/cacerts/server.pem msp/signcerts/cert.pem msp/signcerts/cert.pem: OK ``` Also note that the `admincerts/cert.pem`'s `notBefore` of `19:30` is backdated from the actual file creation time of `19:35` On the server itself, it is not backdated (since it is generated by `openssl`, and not `ca-server`) ``` $ ls -al ca-cert.pem -rw-rw-r-- 1 enode enode 977 Mar 27 19:34 ca-cert.pem $ openssl x509 -noout -dates -in ca-cert.pem notBefore=Mar 27 19:34:14 2019 GMT notAfter=Mar 24 19:34:14 2029 GMT ``` One possible solution is to backdate on ca-cert creation? haven't tried it yet. Is this cert chain actually invalid? Is there anything that says the signing cert's `notBefore` can't be later than the signed `notBefore`?

firas.qutishat (Wed, 27 Mar 2019 22:49:07 GMT):
@here fabric-sdk-go v1.0.0-alpha5 https://github.com/hyperledger/fabric-sdk-go/releases/tag/v1.0.0-alpha5

MHBauer (Wed, 27 Mar 2019 22:50:09 GMT):
super, what's in it?

MHBauer (Wed, 27 Mar 2019 22:50:13 GMT):
why now?

MHBauer (Wed, 27 Mar 2019 22:50:24 GMT):
what's the future plans?

troyronda (Wed, 27 Mar 2019 23:20:32 GMT):
The SDK changes have been more minor lately; there hasn’t been a tag for a long stretch; and it seemed sensible to tag prior to working on 2.0 and Go modules. @MHBauer

troyronda (Wed, 27 Mar 2019 23:21:15 GMT):
(Re: why now)

dimm (Wed, 27 Mar 2019 23:24:25 GMT):
:tada:

dimm (Wed, 27 Mar 2019 23:25:40 GMT):
Could you guys making working with external dependencies in chaincode more obvious? It's such a pain now.. =(

MHBauer (Wed, 27 Mar 2019 23:42:29 GMT):
this shouldn't be related to chaincode.

dimm (Wed, 27 Mar 2019 23:43:23 GMT):
this is the way it's deployed

dimm (Wed, 27 Mar 2019 23:43:47 GMT):
All tools are not aware of the fact it can have other imports...

MHBauer (Wed, 27 Mar 2019 23:55:16 GMT):
¯\_(ツ)_/¯

dimm (Wed, 27 Mar 2019 23:57:29 GMT):
(╯°□°)╯︵ ┻━┻

dimm (Wed, 27 Mar 2019 23:58:30 GMT):
That's the only problem I couldn't resolve for days now... Haven't tried your simple way yet, just copying dependencies into chaincode folder for now

swetha (Thu, 28 Mar 2019 00:00:06 GMT):
@dimm In general I would think that your chaincode code and your client code (which I assume would be using the go sdk) should be separate

dimm (Thu, 28 Mar 2019 00:00:16 GMT):
they are

swetha (Thu, 28 Mar 2019 00:01:01 GMT):
What are you referring to when you say external dependencies?

dimm (Thu, 28 Mar 2019 00:01:27 GMT):
The libraries not included in standard go package and not present in hyperledger

dimm (Thu, 28 Mar 2019 00:01:51 GMT):
The ones I pull with "go get ./..." or in vendor folder

swetha (Thu, 28 Mar 2019 00:02:09 GMT):
The vendor directory should work

dimm (Thu, 28 Mar 2019 00:02:16 GMT):
The thing which is automatically building the container for chaincode could do "go get ./..." before building... Or packer in SDK could also pack the vendor folder in the package

dimm (Thu, 28 Mar 2019 00:02:20 GMT):
No, it doesn't

swetha (Thu, 28 Mar 2019 00:02:43 GMT):
The SDK is not involved with the chaincode

swetha (Thu, 28 Mar 2019 00:03:11 GMT):
In regards to the vendor folder, you should be packaging your whole repository, not just the package with the chaincode main

dimm (Thu, 28 Mar 2019 00:03:12 GMT):
SDK has packer, which deploys chaincode. And after looking at it's code I didn't find a way to pack the vendor folder

swetha (Thu, 28 Mar 2019 00:03:50 GMT):
Oh I see what you are hitting now. I didn't catch you were using the SDK to deploy the chaincode

swetha (Thu, 28 Mar 2019 00:04:00 GMT):
Are you not able to specify the whole repository path to pack?

swetha (Thu, 28 Mar 2019 00:04:11 GMT):
This is a part of the SDK I am not familiar with

dimm (Thu, 28 Mar 2019 00:04:34 GMT):
I'm specifying the folder, but it's filtering out only the files in one top folder

dimm (Thu, 28 Mar 2019 00:04:39 GMT):
github.com/hyperledger/fabric-sdk-go/pkg/fab/ccpackager/gopackager

dimm (Thu, 28 Mar 2019 00:04:41 GMT):
This one

dimm (Thu, 28 Mar 2019 00:05:11 GMT):
And I'm not aware of a simpler way to deploy chaincode, let's say, in basic-network example

dimm (Thu, 28 Mar 2019 00:05:34 GMT):
There's some manual multi-step way to create a package..

dimm (Thu, 28 Mar 2019 00:06:42 GMT):
I'm up for any way to minimize the time between testing iterations while developing, and this seems to be the easiest

dimm (Thu, 28 Mar 2019 00:06:58 GMT):
Except no imports..

swetha (Thu, 28 Mar 2019 00:09:04 GMT):
What do you specify as the chaincode path?

dimm (Thu, 28 Mar 2019 00:09:50 GMT):
The path to the chaincode project, with sources, binary and vendor

dimm (Thu, 28 Mar 2019 00:09:50 GMT):
```ChaincodeGoPath="/Users/dimm/go" ChaincodePath= "gitlab.com/dimm/osc-chaincode/"```

dimm (Thu, 28 Mar 2019 00:10:28 GMT):
looking..

dimm (Thu, 28 Mar 2019 00:10:58 GMT):
yup

dimm (Thu, 28 Mar 2019 00:11:03 GMT):
` if ccPkg, err := packager.NewCCPackage(setup.ChaincodePath, setup.ChaincodeGoPath); err != nil {`

dimm (Thu, 28 Mar 2019 00:11:52 GMT):
Should ChaincodeGoPath be the actual project path?

swetha (Thu, 28 Mar 2019 00:12:32 GMT):
I think you have it correct

swetha (Thu, 28 Mar 2019 00:12:54 GMT):
on your system your repo is "/Users/dimm/go/src/gitlab.com/dimm/osc-chaincode/"?

dimm (Thu, 28 Mar 2019 00:13:10 GMT):
yes

swetha (Thu, 28 Mar 2019 00:13:26 GMT):
And all your external dependencies are in ""/Users/dimm/go/src/gitlab.com/dimm/osc-chaincode/vendor" ?

swetha (Thu, 28 Mar 2019 00:13:26 GMT):
And all your external dependencies are in "/Users/dimm/go/src/gitlab.com/dimm/osc-chaincode/vendor" ?

dimm (Thu, 28 Mar 2019 00:13:33 GMT):
yes

swetha (Thu, 28 Mar 2019 00:13:53 GMT):
Interesting, I have to look into that more. I thought filepath.Walk was recursive

dimm (Thu, 28 Mar 2019 00:15:00 GMT):
Thank you :) How are you deploying chaincode while developing?

swetha (Thu, 28 Mar 2019 00:15:29 GMT):
I work with @MHBauer, so the approach is the same he described above

dimm (Thu, 28 Mar 2019 00:15:42 GMT):
ah, ok

swetha (Thu, 28 Mar 2019 00:15:42 GMT):
We use the peer cli to install and instantiate

MHBauer (Thu, 28 Mar 2019 00:23:37 GMT):
I want to try the packager now.

dimm (Thu, 28 Mar 2019 00:41:55 GMT):
:))

dimm (Thu, 28 Mar 2019 00:42:08 GMT):
I'mnot responsible for all damage it might cause

dimm (Thu, 28 Mar 2019 00:42:08 GMT):
I'm not responsible for all damage it might cause

dimm (Thu, 28 Mar 2019 00:47:35 GMT):
Anyone has an example how to specify a cert when registering a user? In SDK? I already enrolled a client in CA container, got certs to my SDK, but how can I actually use them?

dimm (Thu, 28 Mar 2019 00:48:00 GMT):
It's now failing with "/register 401 30 "Certificate not found with AKI ' ..... "

tongli (Thu, 28 Mar 2019 00:48:07 GMT):
@Baha-sk How does the dynamic service discovery really work? a client get peers in a channel from orderer? a client has to start somewhere, what is the flow? Can you point me to the doc? Thanks

yacovm (Thu, 28 Mar 2019 01:00:55 GMT):
@tongli https://hyperledger-fabric.readthedocs.io/en/release-1.4/discovery-overview.html

xixuejia (Thu, 28 Mar 2019 01:03:07 GMT):
Hi @yacovm does fabric-sdk-go follow that flow?

yacovm (Thu, 28 Mar 2019 01:03:16 GMT):
they don't have much of a choice

tongli (Thu, 28 Mar 2019 01:14:50 GMT):
@yacovm thanks a lot for the link. I have read that couple of times, still not sure how a client get started. it says a client uses the discovery service, it also says the discovery service runs on a peer, if that is true, it seems to me that a client still will have to have a peer endpoint to start the whole process, is that right?

spartucus (Thu, 28 Mar 2019 02:46:56 GMT):
Has joined the channel.

MHBauer (Thu, 28 Mar 2019 03:20:57 GMT):
why do I need a fabric config to `peer chaincode package`?

xixuejia (Thu, 28 Mar 2019 08:25:37 GMT):
@Baha-sk Thanks for your information about service discovery. But the test you pointed is using internal packages which are not for end developers. Is there a doc for end developers to follow?

yacovm (Thu, 28 Mar 2019 08:44:40 GMT):
@tongli that is correct. a client is bootstrapped with a peer

rootDistress (Thu, 28 Mar 2019 12:38:43 GMT):
If a peer (peer0) is part of two channels (ch1, ch2) and both the channel wants to use chaincode(cc0), Then would there be two docker containers of peer0 with cc0? If not how does this work?

yacovm (Thu, 28 Mar 2019 12:45:02 GMT):
no, only 1 container @rootDistress

rootDistress (Thu, 28 Mar 2019 12:55:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=grHPxCQ44zAse4oP7) @yacovm So, If i were to upgrade the cc0 with new endorsement policy for each channel (ccPolicy0, ccPolicy1) would i be required to install the cc0 again with new version and instantiating it on both the channel i.e install and instantiate again for ch1,ch2 for peer0?

rootDistress (Thu, 28 Mar 2019 12:55:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=grHPxCQ44zAse4oP7) @yacovm So, If i were to upgrade the cc0 with new endorsement policy for each channel (ccPolicy0, ccPolicy1) would i be required to install the cc0 again with new version and instantiating it on both the channel i.e install and instantiate again for ch1,ch2 for peer0? Or would installing once on the peer0 with new version and instantiating for each channel with new policy suffice ?

yacovm (Thu, 28 Mar 2019 13:05:25 GMT):
hmmmm I think that you'll have 2 chaincodes at that time :(

yacovm (Thu, 28 Mar 2019 13:05:35 GMT):
since a chaincode is saved in the file system as the name and the version

rootDistress (Thu, 28 Mar 2019 13:16:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=EsGuB73FjJ2bSM4dn) @yacovm Yes, except the endorsement policy everything should be same for both the channels, So, wouldn't just instantiating the chaincode with new version be sufficient ?

rootDistress (Thu, 28 Mar 2019 13:16:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=EsGuB73FjJ2bSM4dn) @yacovm Yes, except the endorsement policy everything should be same for both the channels, So, wouldn't just instantiating the chaincode with new version be sufficient on both the channels with just one install?

george.aristy (Thu, 28 Mar 2019 13:17:28 GMT):
Has joined the channel.

xixuejia (Thu, 28 Mar 2019 13:26:15 GMT):
@Baha-sk https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/discovery/discovery.go#L61 this `Send` method requires a param of type github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client which is internal to fabric-sdk-go. In my application, I could not import the internal package because of error `use of internal package not allowed` . Would you please help on this? Thanks

Baha-sk (Thu, 28 Mar 2019 14:32:52 GMT):
good point @xixuejia, the reason the client is in internal is the fact that it's already in Fabric and it's only used internally within the SDK, you probably don't need to use the pinned version in Go SDK, you can get the Fabric version of the discovery client directly, the path is already included in the type, ie: "github.com/hyperledger/fabric/discovery/client " .. so I suggest not using the Go SDK's pinned version for discovery and use the original one in Fabric

xixuejia (Thu, 28 Mar 2019 15:04:54 GMT):
thanks @Baha-sk Then there will be a new issue that the golang will complain the type in fabric and fabric-sdk-go internal are different. it will fail at compile stage

Baha-sk (Thu, 28 Mar 2019 15:48:32 GMT):
@xixuejia if you use the Fabric version of the client, do not mix it with the Go SDK code, use it standalone

Baha-sk (Thu, 28 Mar 2019 15:49:51 GMT):
Go SDK does discovery automatically for you when you get a new configured SDK instance

troyronda (Thu, 28 Mar 2019 17:58:49 GMT):
FYI: @bstasyszyn is working on the first step towards enabling Go modules: https://gerrit.hyperledger.org/r/#/c/30504/

troyronda (Thu, 28 Mar 2019 17:58:49 GMT):
FYI: @bstasyszyn is working on the first step towards enabling Go modules in the SDK: https://gerrit.hyperledger.org/r/#/c/30504/

troyronda (Thu, 28 Mar 2019 18:00:18 GMT):
@dave.enyeart it would be better if the fabric repo made its protos a module (this is the current SDK workaround - https://gerrit.hyperledger.org/r/#/c/30504/1/third_party/github.com/hyperledger/fabric/protos/go.mod)

troyronda (Thu, 28 Mar 2019 18:00:18 GMT):
@dave.enyeart it would be better if the fabric repo, itself, made its protos a module (this is the current SDK workaround - https://gerrit.hyperledger.org/r/#/c/30504/1/third_party/github.com/hyperledger/fabric/protos/go.mod)

troyronda (Thu, 28 Mar 2019 18:00:18 GMT):
@dave.enyeart it would be better if fabric, itself, made its protos a module in a common repo (this is the current SDK workaround - https://gerrit.hyperledger.org/r/#/c/30504/1/third_party/github.com/hyperledger/fabric/protos/go.mod)

xixuejia (Fri, 29 Mar 2019 00:56:14 GMT):
Thanks @Baha-sk . Is there a sample or doc about how to configure SDK instance with service discovery? I used `sdk, err := fabsdk.New(configBackends, fabsdk.WithServicePkg(&DynamicDiscoveryProviderFactory{}))` but it seems sdk only returns peers in local connection profile

xixuejia (Fri, 29 Mar 2019 00:56:14 GMT):
Thanks @Baha-sk . Is there a sample or doc about how to configure SDK instance with service discovery? I used `sdk, err := fabsdk.New(configBackends, fabsdk.WithServicePkg(&DynamicDiscoveryProviderFactory{}))` but it seems sdk only returns peers in local connection profile. Even if a peer is not joined into a channel, the service discovery will still return that peer for the channel

xixuejia (Fri, 29 Mar 2019 01:28:30 GMT):
I was following https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/fabsdk/provider/sdk_dyndiscovery_test.go#L25

leixianting (Fri, 29 Mar 2019 01:40:32 GMT):
Has joined the channel.

dave.enyeart (Fri, 29 Mar 2019 02:39:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BeXfkiwiLkQrevJeT) @troyronda I believe this is on the roadmap of @sykesm

sykesm (Fri, 29 Mar 2019 02:39:01 GMT):
Has joined the channel.

srinivasd (Fri, 29 Mar 2019 06:01:22 GMT):
Hi All, How to get the currentHash and PreviousHash from the QueryBlock using golang

rootDistress (Fri, 29 Mar 2019 07:26:06 GMT):
Hi, I'm still a bit confused. If a peer is part of multiple channels which use the same chaincode of different versions, would I be required to reinstall the same chaincode with ealier version(say 0, that's already installed to instantiate on a different channel)? Would it not complain the chaincode already exists? OR would I have to look at the peers and install the chaincode with a different name/version than the one that already exists. Also, Please point me to a doc if this case is documented somewhere.

rootDistress (Fri, 29 Mar 2019 07:29:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7fdCn5qcNofN8RhRP) @srinivasd https://github.com/hyperledger/fabric-sdk-go/blob/8c25b4dc87beefc18dddaa1a9635dd9965a7e5e5/pkg/fab/channel/ledger.go#L72 Look at the proto of response.

lukasA (Fri, 29 Mar 2019 09:43:24 GMT):
Has joined the channel.

lukasA (Fri, 29 Mar 2019 09:44:57 GMT):
Has left the channel.

Baha-sk (Fri, 29 Mar 2019 15:31:48 GMT):
@xixuejia probably this example helps: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_minconfig_test.go#L39 ... but you have to know that peers of an org cannot discovered peers of another org if the orgs are not sharing channels.. so you need to have a channel created using a channel config that has the list of orgs and you also need to apply anchor peers configs for each org .. see the createChannel function in the same package as an example of creating a channel and configuring its anchor peers: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L307.. once the channel is created this way, DisocverService will be able to find peers of other orgs within the channel

Baha-sk (Fri, 29 Mar 2019 15:31:48 GMT):
@xixuejia probably this example helps: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_minconfig_test.go#L39 ... but you have to know that peers of an org cannot discover peers of another org if the orgs are not sharing channels.. so you need to have a channel created using a channel config that has the list of orgs and you also need to apply anchor peers configs for each org .. see the createChannel function in the same package as an example of creating a channel and configuring its anchor peers: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L307.. once the channel is created this way, DisocverService will be able to find peers of other orgs within the channel

Baha-sk (Fri, 29 Mar 2019 15:31:48 GMT):
@xixuejia probably this example helps: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_minconfig_test.go#L39 ... but you have to know that peers of an org cannot discover peers of another org if the orgs are not sharing channels.. so you need to have a channel created using a channel config that has the list of orgs and you also need to apply anchor peers configs for each org .. see the createChannel function in the same package as an example of creating a channel and configuring its anchor peers: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L307.. once the channel is created this way, DisocverService in the Go SDK will be able to find peers of other orgs within the channel (without listing them in your SDK's configs)

integrated.xtal (Sat, 30 Mar 2019 06:09:11 GMT):
Has joined the channel.

integrated.xtal (Sat, 30 Mar 2019 06:12:49 GMT):
hello, im starting using fabric-sdk-go following this tutorial, https://chainhero.io/2018/03/tutorial-build-blockchain-app-2/ .. Im really new to hyperledger and blockchain and I cant understand yet the native examples in the facbric-sdk-go examples so I followed this. However, this tutorial used an outdated commit ( git checkout 614551a752802488988921a730b172dada7def1d) in the example and I want to use the current master branch (which is updatedf and the result of your hardwork).. But the api folder is missing in git checkout 614551a752802488988921a730b172dada7def1d .. Where can I read or see the changes done ? ..

integrated.xtal (Sat, 30 Mar 2019 12:17:55 GMT):
helpppp please T_T

haardikkk (Sun, 31 Mar 2019 02:41:12 GMT):
hey guys

haardikkk (Sun, 31 Mar 2019 02:41:22 GMT):
im running a network on ibm cloud blockchain platform 2.0 beta

haardikkk (Sun, 31 Mar 2019 02:41:49 GMT):
ive downloaded the connection profile from the instantiated smart contract, and have this in my code ```configOpts := fabricConfig.FromFile("/profiles/flex.json") fabSDK, err := fabsdk.New(configOpts) if err != nil { entry.WithError(err).Fatal("Error setting up Fabric SDK") } defer fabSDK.Close()```

haardikkk (Sun, 31 Mar 2019 02:42:23 GMT):
How do I go about creating a new channel/peer client from this? So I can Invoke transactions and listen for their responses?

haardikkk (Sun, 31 Mar 2019 02:46:06 GMT):
Actually, even running that bit of code is resulting in an error for me. SOmething about `cryptosuite` -- what am I missing? `FATA[0000] Error setting up Fabric SDK env=DEV error="failed to initialize configuration: unable to initialize cryptosuite using crypto suite config: failed to initialize crypto suite: Unsupported BCCSP Provider: "`

nyet (Sun, 31 Mar 2019 05:00:53 GMT):
If that isn't `MASTER` you need a complete `config.yaml` or you have to set up a config in code.

nyet (Sun, 31 Mar 2019 05:00:53 GMT):
If that isn't `MASTER` you need a complete `config` or you have to set up a config in code.

nyet (Sun, 31 Mar 2019 05:01:40 GMT):
Which means specifying a BCCSP provicer

Henrycoffin (Sun, 31 Mar 2019 09:36:59 GMT):
Has joined the channel.

yxuco (Sun, 31 Mar 2019 15:44:15 GMT):
Has joined the channel.

yxuco (Sun, 31 Mar 2019 15:52:12 GMT):
Is there work going on the Go version of the fabric commercial-paper sample? I guess that if it is implemented in Go, it would use something similar to the abac chaincode to control the security based on attributes in the client certificate. Similar to the JavaScript version of this sample, it would need a client wallet to store the client identities. Is there already similar APIs for the client wallet in Go? Thanks.

troyronda (Sun, 31 Mar 2019 18:32:22 GMT):
@nyet fyi: https://github.com/hyperledger/fabric-sdk-go/releases/tag/v1.0.0-alpha5

haardikkk (Sun, 31 Mar 2019 20:35:28 GMT):
@nyet what do you mean by MASTER? and what other config do I need to add

haardikkk (Sun, 31 Mar 2019 20:35:36 GMT):
Can I find any documentation on this somewhere?

haardikkk (Sun, 31 Mar 2019 20:36:03 GMT):
The heroes service tutorial which implements this is for an outdated version of Fabric it seems. and all the examples on IBM website are NodeJS

haardikkk (Sun, 31 Mar 2019 21:13:02 GMT):
I think a more direct question would be, how do I retrieve cryptoconfig and channel artifacts and so on from IBM BLOCKCHAIN platform 2.0?

haardikkk (Sun, 31 Mar 2019 21:26:01 GMT):
i converted some stuff on your blockdaemon repo yaml files to json and added them to my connection profile (config) -- mainly stuff in the `client` as th econnection profile provided by IBM is very basic

haardikkk (Sun, 31 Mar 2019 21:26:13 GMT):
im now getting ```FATA[0000] Error setting up Fabric SDK env=DEV error="failed to initialize configuration: unalbe to load identity config: failed to initialize identity config from config backend: failed to create identity config from backends: failed to parse 'certificateAuthorities' config item to identityConfigEntity.CertificateAuthorities type: 1 error(s) decoding:\n\n* '[6d41ad9bfe8b49caabd757f6ce653daf-ca8ff39d.flexfintx-k8s.us-south.containers.appdomain.cloud:7054].TLSCACerts.Pem': source data must be an array or slice, got string"```

nyet (Sun, 31 Mar 2019 21:56:39 GMT):
Its expecting an array not a string. `[foo] ` vs `foo`

haardikkk (Mon, 01 Apr 2019 01:10:11 GMT):
Yes but this is what IBP gives me

haardikkk (Mon, 01 Apr 2019 01:10:17 GMT):
Am I not supposed to use the profile IBP gives me?

haardikkk (Mon, 01 Apr 2019 01:11:11 GMT):
IBP gives me this for the `certificateAuthorities` part ``` "certificateAuthorities": { "6d41ad9bfe8b49caabd757f6ce653daf-ca8ff39d.flexfintx-k8s.us-south.containers.appdomain.cloud:7054": { "url": "https://6d41ad9bfe8b49caabd757f6ce653daf-ca8ff39d.flexfintx-k8s.us-south.containers.appdomain.cloud:7054", "caName": "ca", "TLSCACerts": { "pem": "" } } } ```

haardikkk (Mon, 01 Apr 2019 01:11:11 GMT):
IBP gives me this for the `certificateAuthorities` part ``` "certificateAuthorities": { "6d41ad9bfe8b49caabd757f6ce653daf-ca8ff39d.flexfintx-k8s.us-south.containers.appdomain.cloud:7054": { "url": "https://6d41ad9bfe8b49caabd757f6ce653daf-ca8ff39d.flexfintx-k8s.us-south.containers.appdomain.cloud:7054", "caName": "ca", "tlsCACerts": { "pem": "" } } } ```

haardikkk (Mon, 01 Apr 2019 06:11:42 GMT):
I got that working

haardikkk (Mon, 01 Apr 2019 06:12:13 GMT):
Now, I'm getting the error ```"failed to create identity manager provider: failed to initialize identity manager for organization: fftxmsp: Either a cryptopath or an embedded list of users is required"```

haardikkk (Mon, 01 Apr 2019 06:12:13 GMT):
Now, I'm getting the error ```"failed to create identity manager provider: failed to initialize identity manager for organization: bankymsp: Either a cryptopath or an embedded list of users is required"```

haardikkk (Mon, 01 Apr 2019 06:13:55 GMT):
Two questions there 1) Since it's on IBP, how can I download the required cryptopath files? Just by downloading individual identities from the console? 2) Should I also keep other organizations (not related to the application) MSP as well? Or should I remove the other organizations from `organizations` field overall?

haardikkk (Mon, 01 Apr 2019 06:14:12 GMT):
currently it looks like ``` "organizations": { "bankxmsp": { "mspid": "bankxmsp", "peers": [ "6d41ad9bfe8b49caabd757f6ce653daf-peerf3a3b6.flexfintx-k8s.us-south.containers.appdomain.cloud:7051" ] }, "bankymsp": { "mspid": "bankymsp", "peers": [ "6d41ad9bfe8b49caabd757f6ce653daf-peer09cd32.flexfintx-k8s.us-south.containers.appdomain.cloud:7051" ] }, "fftxmsp": { "mspid": "fftxmsp", "peers": [ "6d41ad9bfe8b49caabd757f6ce653daf-peer97cbbf.flexfintx-k8s.us-south.containers.appdomain.cloud:7051" ], "certificateAuthorities": [ "6d41ad9bfe8b49caabd757f6ce653daf-ca8ff39d.flexfintx-k8s.us-south.containers.appdomain.cloud:7054" ] } },```

Baha-sk (Mon, 01 Apr 2019 15:23:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=h5CvwJHN4sTz8Pw6q) @haardikkk you're missing the cryptoPath field (or if you don't/can't have access to the org's MSP directory), you can embed certs directly in the config file. option 1: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L261 option 2: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/config_test_embedded_pems.yaml#L297

Baha-sk (Mon, 01 Apr 2019 15:23:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=h5CvwJHN4sTz8Pw6q) @haardikkk you're missing the cryptoPath field (or if you don't/can't have access to the org's MSP directory), you can embed identities' certs/kies directly in the config file. option 1: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L261 option 2: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/config_test_embedded_pems.yaml#L297

Baha-sk (Mon, 01 Apr 2019 15:23:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=h5CvwJHN4sTz8Pw6q) @haardikkk you're missing the cryptoPath field (or if you don't/can't have access to the org's MSP directory), you can embed identities' certs/keys directly in the config file. option 1: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml#L261 option 2: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/config_test_embedded_pems.yaml#L297

integrated.xtal (Mon, 01 Apr 2019 15:28:48 GMT):
very hard to follow fabric-samples with golang-sdk .. Not even a single tutorial online (chainhero heroservice tutorial is outdated) .. Im starting to love golang but with such low community huhuhu

Baha-sk (Mon, 01 Apr 2019 15:38:10 GMT):
@integrated.xtal there are different clients in the Go SDK, depends on what you want to do.. look at the code for those different clients: https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/client the integration tests in the Go SDK also provide examples to test these clients: https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/pkg/client if you want a full end to end scenario, you'd have to follow the code in this folder, it could look a bit heavy (due to prep needed to start/configure a Fabric network including channels, etc) , but the tests themselves are somewhat straightforward, look at code in: https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/e2e

lehors (Mon, 01 Apr 2019 15:38:12 GMT):
Has joined the channel.

lehors (Mon, 01 Apr 2019 15:38:52 GMT):
is there any reason for limiting Go to 1.11.6?

lehors (Mon, 01 Apr 2019 15:39:07 GMT):
I'm using go 1.12 because 1.11 was broken on mac

Baha-sk (Mon, 01 Apr 2019 15:39:14 GMT):
Go SDK runs on 1.12

lehors (Mon, 01 Apr 2019 15:39:43 GMT):
the ci.properties limit to 1.11.6 though

lehors (Mon, 01 Apr 2019 15:40:02 GMT):
so make doesn't pass the version check

Baha-sk (Mon, 01 Apr 2019 15:40:20 GMT):
hold on a sec.. there should be an error somewhere..

Baha-sk (Mon, 01 Apr 2019 15:42:07 GMT):
I'm doing a fix, if it works, I'll push a patch @lehors

lehors (Mon, 01 Apr 2019 15:42:19 GMT):
sounds good

integrated.xtal (Mon, 01 Apr 2019 15:42:47 GMT):
@Baha-sk yes, but for very beginner in hlf (like me), its very confusing what and where to start.. Also the fabric-samples examples with sdk all uses fabric-node which is very disappointing since it is nice to go full stack with golang chaincode with no javascript .. Sir can you make a simple guide even the balance-transfer example sir.. I really dont want to use fabric-sdk-node

integrated.xtal (Mon, 01 Apr 2019 15:43:49 GMT):
@Baha-sk I want to do is create a chaincode in golang, and access or expose it in web rest api.. I read that I need an sdk to do that thats why I decided to go with go-sdk

nyet (Mon, 01 Apr 2019 15:47:04 GMT):
@integrated.xtal You can look at my repos too, but i'm in the process of transitioning to not using `cryptogen` * https://github.com/Blockdaemon/hlf-service-network * https://github.com/Blockdaemon/hlf-database-app

nyet (Mon, 01 Apr 2019 15:47:29 GMT):
i'm doing that in an entirely seprate project so i'm not sure if i will backport to those (yet)

Baha-sk (Mon, 01 Apr 2019 15:47:42 GMT):
@integrated.xtal how many orgs/peers are you planning to have in your network? you will need to create a channel, then instantiate and install a CC .. you need to have Fabric basic knowledge first.. the tests have example for all of this

Baha-sk (Mon, 01 Apr 2019 15:50:45 GMT):
resmgmt client is the one that does the administrative actions in the network, like creating your CCs

Baha-sk (Mon, 01 Apr 2019 15:51:19 GMT):
see this function as an example: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L163

integrated.xtal (Mon, 01 Apr 2019 15:52:47 GMT):
yes @Baha-sk , will decide the actual orgs/peers later.. All I need for now is to have a working prototype to convince my team to go with golang-sdk

integrated.xtal (Mon, 01 Apr 2019 15:53:24 GMT):
@nyet sir, why theres some python code you used sir?

nyet (Mon, 01 Apr 2019 15:56:12 GMT):
jinja

nyet (Mon, 01 Apr 2019 15:56:21 GMT):
for templating outside of ansible/docker/etc

nyet (Mon, 01 Apr 2019 15:56:50 GMT):
because fabric has gigantic confusing configuration files with zero sane defaults

nyet (Mon, 01 Apr 2019 15:56:56 GMT):
that all have to be exhaustively generated

nyet (Mon, 01 Apr 2019 15:57:23 GMT):
and the bizarre behavior of actually writring out their own config files, which is something i have never seen outside of windows apps lol

integrated.xtal (Mon, 01 Apr 2019 15:59:51 GMT):
@nyet I see you forked a project from chainhero, that was really to be a good tutorial, only that it is outdated with the fabric-sdk-go version..

integrated.xtal (Mon, 01 Apr 2019 16:00:21 GMT):
and the api folders are not anymore compatible with the current go-sdk (master branch)

nyet (Mon, 01 Apr 2019 16:01:43 GMT):
I gave up on that tutorial

integrated.xtal (Mon, 01 Apr 2019 16:02:21 GMT):
me too haha,

integrated.xtal (Mon, 01 Apr 2019 16:03:05 GMT):
can you revive it brother? I mean I see you are very good with hlf .. I'll help you maintain it hehe

nyet (Mon, 01 Apr 2019 16:03:25 GMT):
"very good" is not the words i would use.. i'm slowly learning :)

nyet (Mon, 01 Apr 2019 16:04:12 GMT):
if i get to it i will, its a huge enough job to transistion away from `cryptogen`

integrated.xtal (Mon, 01 Apr 2019 16:05:41 GMT):
why you transition away to cryptogen? most of the fabri network in fabric-samples use it

nyet (Mon, 01 Apr 2019 16:09:08 GMT):
It's only supposed to be for testing/CI/PoC, not for production

nyet (Mon, 01 Apr 2019 16:10:42 GMT):
There's an open gerrit PR in fabric that adds proper "operations" docs that use ca-server to get creds rather than pregenerating thm all up front

integrated.xtal (Mon, 01 Apr 2019 16:10:42 GMT):
ahh, what should be used then for production sir?

nyet (Mon, 01 Apr 2019 16:11:00 GMT):
great question; docs are thin on the ground hang on lemme find the PR

integrated.xtal (Mon, 01 Apr 2019 16:11:25 GMT):
yess that makes sense. It makes the hlf vulnerable

nyet (Mon, 01 Apr 2019 16:11:48 GMT):
https://gerrit.hyperledger.org/r/#/c/29430/8/docs/source/operations_guide.rst

nyet (Mon, 01 Apr 2019 16:12:23 GMT):
i have a fork of this PR somwhere so you can actualy browse it here https://github.com/Blockdaemon/fabric-ca/tree/gerrit-pr-29430

nyet (Mon, 01 Apr 2019 16:12:23 GMT):
i have a fork of this PR so you can actualy browse it here https://github.com/Blockdaemon/fabric-ca/tree/gerrit-pr-29430

nyet (Mon, 01 Apr 2019 16:12:55 GMT):
https://github.com/Blockdaemon/fabric-ca/blob/gerrit-pr-29430/docs/source/operations_guide.rst

integrated.xtal (Mon, 01 Apr 2019 16:13:51 GMT):
thats nice sir.. I see this especially when we try to go production.

integrated.xtal (Mon, 01 Apr 2019 16:14:12 GMT):
so when you are creating blockchain with web api rest, what is your setup bro?

nyet (Mon, 01 Apr 2019 16:15:16 GMT):
heh thats company stuff, not HLF tech :) i can't really answer

nyet (Mon, 01 Apr 2019 16:15:43 GMT):
short answer, spin up load, run a bunch of ansible playbooks

nyet (Mon, 01 Apr 2019 16:15:43 GMT):
short answer, spin up cloud vm, run a bunch of ansible playbooks

nyet (Mon, 01 Apr 2019 16:15:49 GMT):
at some point, maybe k8s instead

nyet (Mon, 01 Apr 2019 16:15:58 GMT):
can' be more specific just now

integrated.xtal (Mon, 01 Apr 2019 16:17:02 GMT):
I understand with the infra, im with the chaincode, and go-sdk side, hehe

nyet (Mon, 01 Apr 2019 16:17:10 GMT):
oh not our job

nyet (Mon, 01 Apr 2019 16:17:17 GMT):
we're just aaS infra providers

nyet (Mon, 01 Apr 2019 16:17:32 GMT):
we don't actually do any smartcontract/chaincode dev (yet?)

integrated.xtal (Mon, 01 Apr 2019 16:17:38 GMT):
you go similar to your repo https://github.com/Blockdaemon/hlf-webapp ?

nyet (Mon, 01 Apr 2019 16:17:38 GMT):
outside of just for testing

nyet (Mon, 01 Apr 2019 16:17:48 GMT):
no thats just a test app

nyet (Mon, 01 Apr 2019 16:17:59 GMT):
will be doing something like it for CI

integrated.xtal (Mon, 01 Apr 2019 16:18:38 GMT):
ahh.. Im really confuse what strategy shoudl I use.. that chainhero is the only tutorial available thats using go-sdk

nyet (Mon, 01 Apr 2019 16:18:43 GMT):
ya i hear you

integrated.xtal (Mon, 01 Apr 2019 16:19:05 GMT):
and the fabric-samples, they are all implemented with node-sdk

integrated.xtal (Mon, 01 Apr 2019 16:19:14 GMT):
why no go-sdk hahaha

nyet (Mon, 01 Apr 2019 16:19:18 GMT):
omg ya that is SUPER frustrating to me

nyet (Mon, 01 Apr 2019 16:19:21 GMT):
big time

nyet (Mon, 01 Apr 2019 16:19:23 GMT):
:/

integrated.xtal (Mon, 01 Apr 2019 16:19:46 GMT):
as in SUPERR .. maybe if its just in the docs, they it will be easier to adopt

Baha-sk (Mon, 01 Apr 2019 16:20:14 GMT):
fyi, node sdk has a different team than go sdk

Baha-sk (Mon, 01 Apr 2019 16:20:52 GMT):
and it's all community related... you're more than welcome to contribute to Go SDK

integrated.xtal (Mon, 01 Apr 2019 16:21:07 GMT):
yes sir I know, were disappointed why the hyperledger team just considered only node-sdk

integrated.xtal (Mon, 01 Apr 2019 16:21:30 GMT):
but how can we contribute to go sdk if the fundamentals (like in the fabric-samples) are not given :/

nyet (Mon, 01 Apr 2019 16:21:32 GMT):
well there is a lot of inertia there

integrated.xtal (Mon, 01 Apr 2019 16:21:54 GMT):
honestly I will be doing a lot of medium tutorials once I understand this stuff HAHAH

nyet (Mon, 01 Apr 2019 16:22:17 GMT):
front end people are all node/js, backend guys just moved to go first

nyet (Mon, 01 Apr 2019 16:22:36 GMT):
so honestly its not a bash on the fabric devs

integrated.xtal (Mon, 01 Apr 2019 16:22:50 GMT):
I really like golang although I just learned it last week. Its minimalist

Baha-sk (Mon, 01 Apr 2019 16:53:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fFmND68smKr6x8Mkd) @lehors unfortunately Fabric does not support 1.12 right now, we will upgrade Go SDK once Fabric moves to go 1.12.. it is not a simple config change unfortunately in Go SDK (I would have pushed a patch otherwise), it will be done in the near future though

haardikkk (Mon, 01 Apr 2019 18:13:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=cqHY84cpgCMdGDwXp) @Baha-sk Thanks for the reply. A related question, is it 'safe' to store other users certs/keys which are not your organization? Example, this application im building its for the organization `fftxmsp` and will be communicating to it's peers, I am confused why I need MSP/pem certs/keys for the other 2 `bankxmsp` and `bankymsp` organizations

lehors (Mon, 01 Apr 2019 18:57:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=euyKpZ9KzBjLo4s4X) @Baha-sk I must admit not to understand that statement because I compile fabric with go 1.12 without any problems.

lehors (Mon, 01 Apr 2019 18:58:18 GMT):
at some point we had a version check that was very strict but it was relaxed to set a minimum rather than a specific version range

lehors (Mon, 01 Apr 2019 18:59:04 GMT):
relying on Go not to break backwards compatibility until they move to 2.*

lehors (Mon, 01 Apr 2019 18:59:28 GMT):
I think the same should be done for the SDK

lehors (Mon, 01 Apr 2019 19:01:22 GMT):
see https://gerrit.hyperledger.org/r/#/c/29986/

lehors (Mon, 01 Apr 2019 19:03:51 GMT):
but I now see @troyronda is already on it :-) https://gerrit.hyperledger.org/r/#/c/30602/ Thanks!

haardikkk (Mon, 01 Apr 2019 19:12:12 GMT):
how can I retrieve `crypto-config` fixtures from IBM BLockchaion Platform??

haardikkk (Mon, 01 Apr 2019 19:12:30 GMT):
Is there any other way to get around the GO SDK error `fftxmsp: Either a cryptopath or an embedded list of users is required"`

mbanerjee (Mon, 01 Apr 2019 21:09:08 GMT):
Is there going to be any updates to the fabric-sdk-go w.r.t Hyperledger Fabric v1.4.1-rc1?

troyronda (Mon, 01 Apr 2019 21:38:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Cvbvg7pXWd6eR6kw9) @lehors Fixed

troyronda (Mon, 01 Apr 2019 21:40:18 GMT):
@mbanerjee I’m not aware of any changes that are needed for 1.4.1 support.

mbanerjee (Mon, 01 Apr 2019 22:03:33 GMT):
We have been using Fabric SDK GO for our prototype, but have been running into issues. Is there someone whom we can talk to?

srinivasd (Tue, 02 Apr 2019 02:41:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nnur3tuvYJTdevhTG) @rootDistress Hi, After trying the given link, i am unable to get the currentHash of the block

rootDistress (Tue, 02 Apr 2019 05:11:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=daf3LiwicmyWDwnng) @srinivasd please be more clear, what are you trying to do, where is the problem, what error is being thrown if any.

srinivasd (Tue, 02 Apr 2019 09:18:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=99sD8HvP7XfyTK9Rw) @rootDistress I have to get the CurrentHash and PreviousHash by using blocknumber and I am unable to get the Payload that is required in https://github.com/hyperledger/fabric-sdk-go/blob/8c25b4dc87beefc18dddaa1a9635dd9965a7e5e5/pkg/fab/channel/ledger.go#L72 . Thanks

lehors (Tue, 02 Apr 2019 15:13:23 GMT):
guys, running make fails on master: `Running golangci-lint... pkg/fab/mocks/mockbroadcastserver.go:96:8: nilness: impossible condition: non-nil == nil (govet) if pl == nil || pl.Header == nil { ^ pkg/fab/events/mocks/mockdelserver.go:122:32: nilness: impossible condition: non-nil == nil (govet) if err == io.EOF || envelope == nil { ^ pkg/fab/events/mocks/mockdelserver.go:165:32: nilness: impossible condition: non-nil == nil (govet) if err == io.EOF || envelope == nil { ^ make: *** [unit-test] Error 1 `

lehors (Tue, 02 Apr 2019 15:13:23 GMT):
guys, running make fails on master: Running golangci-lint... pkg/fab/mocks/mockbroadcastserver.go:96:8: nilness: impossible condition: non-nil == nil (govet) if pl == nil || pl.Header == nil { ^ pkg/fab/events/mocks/mockdelserver.go:122:32: nilness: impossible condition: non-nil == nil (govet) if err == io.EOF || envelope == nil { ^ pkg/fab/events/mocks/mockdelserver.go:165:32: nilness: impossible condition: non-nil == nil (govet) if err == io.EOF || envelope == nil { ^ make: *** [unit-test] Error 1

lehors (Tue, 02 Apr 2019 15:14:16 GMT):
on my machine...

lehors (Tue, 02 Apr 2019 16:19:38 GMT):
lf

Baha-sk (Tue, 02 Apr 2019 17:10:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=vKHwBdeK3JHGR9Qkg) @lehors just did make all locally with most recent updates... lint is passing for me

Baha-sk (Tue, 02 Apr 2019 17:10:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=vKHwBdeK3JHGR9Qkg) @lehors just did make all locally with most recent updates... lint is passing for me: ```$ make all Checking Go version go version go1.12 darwin/amd64 Running check_license.sh Examining last commit changes All files have SPDX-License-Identifier headers rm -Rf /tmp/enroll_user /tmp/msp /tmp/keyvaluestore /tmp/hfc-kvs /tmp/state /tmp/state-store rm -f integration-report.xml report.xml go clean FIXTURE_PROJECT_NAME=fabsdkgo DOCKER_REMOVE_FORCE=false test/scripts/clean_integration.sh Removing docker-compose network created from fixtures ... ```

Baha-sk (Tue, 02 Apr 2019 17:14:28 GMT):
this is make line output @lehors : ```$ make lint Checking Go version go version go1.12 darwin/amd64 Last populated vendor on 04-01-2019 using revision b60a9ff1 with go.mod revision e7f22b3d No need to populate vendor Crypto v1 last populated on 04-02-2019 using revision b60a9ff1 No need to populate crypto fixtures Channel v1.4 last populated on 04-02-2019 using revision b60a9ff1 No need to populate channel fixtures Running check_lint.sh Examining last commit changes Calculating package dependencies using parallel batches of 8 xargs: /bin/echo: Argument list too long%) xargs: /bin/echo: Argument list too long Calculating package dependencies ... (100%) Directories to lint: pkg/client/channel pkg/client/channel/invoke pkg/client/common/discovery pkg/client/common/discovery/dynamicdiscovery pkg/client/common/discovery/greylist pkg/client/common/discovery/staticdiscovery pkg/client/common/filter pkg/client/common/mocks pkg/client/common/random pkg/client/common/selection/balancer pkg/client/common/selection/dynamicselection pkg/client/common/selection/dynamicselection/pgresolver pkg/client/common/selection/fabricselection pkg/client/common/selection/options pkg/client/common/selection/sorter/balancedsorter pkg/client/common/selection/sorter/blockheightsorter pkg/client/common/selection/staticselection pkg/client/common/verifier pkg/client/event pkg/client/ledger pkg/client/msp pkg/client/resmgmt pkg/common/errors/retry pkg/common/logging pkg/common/providers/context pkg/common/providers/fab pkg/common/providers/test/mockcontext pkg/common/providers/test/mockfab pkg/context pkg/core/config pkg/core/config/comm pkg/core/config/comm/tls pkg/core/config/cryptoutil pkg/core/config/lookup pkg/core/cryptosuite pkg/core/cryptosuite/bccsp/multisuite pkg/core/cryptosuite/bccsp/pkcs11 pkg/core/cryptosuite/bccsp/sw pkg/core/cryptosuite/bccsp/wrapper pkg/core/cryptosuite/common/pkcs11 pkg/core/logging/modlog pkg/fab pkg/fab/ccpackager/gopackager pkg/fab/channel pkg/fab/channel/membership pkg/fab/chconfig pkg/fab/comm pkg/fab/discovery pkg/fab/events/api pkg/fab/events/client pkg/fab/events/client/dispatcher pkg/fab/events/client/lbp pkg/fab/events/client/mocks pkg/fab/events/client/peerresolver pkg/fab/events/client/peerresolver/balanced pkg/fab/events/client/peerresolver/minblockheight pkg/fab/events/client/peerresolver/preferorg pkg/fab/events/client/peerresolver/preferpeer pkg/fab/events/deliverclient pkg/fab/events/deliverclient/connection pkg/fab/events/deliverclient/dispatcher pkg/fab/events/deliverclient/mocks pkg/fab/events/endpoint pkg/fab/events/mocks pkg/fab/events/service pkg/fab/events/service/blockfilter pkg/fab/events/service/blockfilter/headertypefilter pkg/fab/events/service/dispatcher pkg/fab/events/service/mocks pkg/fab/mocks pkg/fab/orderer pkg/fab/peer pkg/fab/resource pkg/fab/signingmgr pkg/fab/txn pkg/fabsdk pkg/fabsdk/api pkg/fabsdk/factory/defcore pkg/fabsdk/factory/defmsp pkg/fabsdk/factory/defsvc pkg/fabsdk/provider/chpvdr pkg/fabsdk/provider/fabpvdr pkg/fabsdk/provider/msppvdr pkg/fabsdk/test/mocksdkapi pkg/msp pkg/msp/test/mockmsp pkg/util/concurrent/lazycache pkg/util/concurrent/lazyref pkg/util/concurrent/rollingcounter test/integration test/integration/e2e test/integration/e2e/configless test/integration/e2e/orgs test/integration/e2e/pkcs11 test/integration/negative/expiredorderer test/integration/negative/expiredpeer test/integration/negative/revoked test/integration/pkg/client/channel test/integration/pkg/client/common/discovery test/integration/pkg/client/common/selection test/integration/pkg/client/event test/integration/pkg/client/ledger test/integration/pkg/client/msp test/integration/pkg/client/resmgmt test/integration/pkg/context test/integration/pkg/fab test/integration/util/runner test/performance/pkg/client/channel Running golangci-lint... golangci-lint finished successfully ```

Baha-sk (Tue, 02 Apr 2019 17:14:28 GMT):
this is make lint output @lehors : ```$ make lint Checking Go version go version go1.12 darwin/amd64 Last populated vendor on 04-01-2019 using revision b60a9ff1 with go.mod revision e7f22b3d No need to populate vendor Crypto v1 last populated on 04-02-2019 using revision b60a9ff1 No need to populate crypto fixtures Channel v1.4 last populated on 04-02-2019 using revision b60a9ff1 No need to populate channel fixtures Running check_lint.sh Examining last commit changes Calculating package dependencies using parallel batches of 8 xargs: /bin/echo: Argument list too long%) xargs: /bin/echo: Argument list too long Calculating package dependencies ... (100%) Directories to lint: pkg/client/channel pkg/client/channel/invoke pkg/client/common/discovery pkg/client/common/discovery/dynamicdiscovery pkg/client/common/discovery/greylist pkg/client/common/discovery/staticdiscovery pkg/client/common/filter pkg/client/common/mocks pkg/client/common/random pkg/client/common/selection/balancer pkg/client/common/selection/dynamicselection pkg/client/common/selection/dynamicselection/pgresolver pkg/client/common/selection/fabricselection pkg/client/common/selection/options pkg/client/common/selection/sorter/balancedsorter pkg/client/common/selection/sorter/blockheightsorter pkg/client/common/selection/staticselection pkg/client/common/verifier pkg/client/event pkg/client/ledger pkg/client/msp pkg/client/resmgmt pkg/common/errors/retry pkg/common/logging pkg/common/providers/context pkg/common/providers/fab pkg/common/providers/test/mockcontext pkg/common/providers/test/mockfab pkg/context pkg/core/config pkg/core/config/comm pkg/core/config/comm/tls pkg/core/config/cryptoutil pkg/core/config/lookup pkg/core/cryptosuite pkg/core/cryptosuite/bccsp/multisuite pkg/core/cryptosuite/bccsp/pkcs11 pkg/core/cryptosuite/bccsp/sw pkg/core/cryptosuite/bccsp/wrapper pkg/core/cryptosuite/common/pkcs11 pkg/core/logging/modlog pkg/fab pkg/fab/ccpackager/gopackager pkg/fab/channel pkg/fab/channel/membership pkg/fab/chconfig pkg/fab/comm pkg/fab/discovery pkg/fab/events/api pkg/fab/events/client pkg/fab/events/client/dispatcher pkg/fab/events/client/lbp pkg/fab/events/client/mocks pkg/fab/events/client/peerresolver pkg/fab/events/client/peerresolver/balanced pkg/fab/events/client/peerresolver/minblockheight pkg/fab/events/client/peerresolver/preferorg pkg/fab/events/client/peerresolver/preferpeer pkg/fab/events/deliverclient pkg/fab/events/deliverclient/connection pkg/fab/events/deliverclient/dispatcher pkg/fab/events/deliverclient/mocks pkg/fab/events/endpoint pkg/fab/events/mocks pkg/fab/events/service pkg/fab/events/service/blockfilter pkg/fab/events/service/blockfilter/headertypefilter pkg/fab/events/service/dispatcher pkg/fab/events/service/mocks pkg/fab/mocks pkg/fab/orderer pkg/fab/peer pkg/fab/resource pkg/fab/signingmgr pkg/fab/txn pkg/fabsdk pkg/fabsdk/api pkg/fabsdk/factory/defcore pkg/fabsdk/factory/defmsp pkg/fabsdk/factory/defsvc pkg/fabsdk/provider/chpvdr pkg/fabsdk/provider/fabpvdr pkg/fabsdk/provider/msppvdr pkg/fabsdk/test/mocksdkapi pkg/msp pkg/msp/test/mockmsp pkg/util/concurrent/lazycache pkg/util/concurrent/lazyref pkg/util/concurrent/rollingcounter test/integration test/integration/e2e test/integration/e2e/configless test/integration/e2e/orgs test/integration/e2e/pkcs11 test/integration/negative/expiredorderer test/integration/negative/expiredpeer test/integration/negative/revoked test/integration/pkg/client/channel test/integration/pkg/client/common/discovery test/integration/pkg/client/common/selection test/integration/pkg/client/event test/integration/pkg/client/ledger test/integration/pkg/client/msp test/integration/pkg/client/resmgmt test/integration/pkg/context test/integration/pkg/fab test/integration/util/runner test/performance/pkg/client/channel Running golangci-lint... golangci-lint finished successfully ```

Baha-sk (Tue, 02 Apr 2019 17:15:11 GMT):
are you using a different version of golangci-lint?

vignesh (Tue, 02 Apr 2019 18:38:22 GMT):
I am using fabric Go sdk in configless approach. I am referring to files at `fabric-sdk-go/test/integration/e2e/configless` directory. I have changed file `fabric-sdk-go/test/integration/e2e/configless/endpointconfig_override.go` as per my dirtectory structure.

vignesh (Tue, 02 Apr 2019 18:39:30 GMT):
You can find my endpointconfig_override.go at `https://github.com/vigneshkm/my_fabric_1/blob/master/endpointconfig_override.go`

vignesh (Tue, 02 Apr 2019 18:39:54 GMT):
When I run my code i get following error:

vignesh (Tue, 02 Apr 2019 18:40:47 GMT):
`loading user from store failed: cryptoSuite GetKey failed: Failed getting key for SKI [[195 194 125 107 218 3 20 229 184 185 111 122 62 175 115 118 205 225 201 164 98 32 195 2 72 228 202 244 202 254 195 6]]: Key with SKI c3c27d6bda0314e5b8b96f7a3eaf7376cde1c9a46220c30248e4caf4cafec306 not found in keystore`

vignesh (Tue, 02 Apr 2019 18:41:56 GMT):
``` loading user from store failed: cryptoSuite GetKey failed: Failed getting key for SKI [[195 194 125 107 218 3 20 229 184 185 111 122 62 175 115 118 205 225 201 164 98 32 195 2 72 228 202 244 202 254 195 6]]: Key with SKI c3c27d6bda0314e5b8b96f7a3eaf7376cde1c9a46220c30248e4caf4cafec306 not found in keystore ```

vignesh (Tue, 02 Apr 2019 18:42:44 GMT):
But, In my endpointconfig_override.go, line 86 I have set `CredentialStore` as `${MY_FABRIC}/KeyStore/` where I have placed both my certificate and key.

troyronda (Tue, 02 Apr 2019 18:44:06 GMT):
@Baha-sk

vignesh (Tue, 02 Apr 2019 18:50:05 GMT):
``` vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/KeyStore $ ls -l total 12 -rw-rw-r-- 1 vignesh vignesh 769 Apr 2 20:49 Admin@orderer.com-cert.pem -rwxr--r-- 1 vignesh vignesh 241 Apr 2 20:53 c3c27d6bda0314e5b8b96f7a3eaf7376cde1c9a46220c30248e4caf4cafec306 -rwxr--r-- 1 vignesh vignesh 241 Apr 2 20:51 c3c27d6bda0314e5b8b96f7a3eaf7376cde1c9a46220c30248e4caf4cafec306_sk ```

Baha-sk (Tue, 02 Apr 2019 19:02:35 GMT):
@vignesh can you add fmt.println statements in your code to display the full path of your store/keys/certs?

Baha-sk (Tue, 02 Apr 2019 19:03:40 GMT):
also, adding Admin@orderer.com-cert.pem and the SKI all in one folder might not work, you need an MSP directory structure

Baha-sk (Tue, 02 Apr 2019 19:03:40 GMT):
also, adding Admin@orderer.com-cert.pem and the SKIs all in one folder might not work, you need an MSP directory structure

vignesh (Tue, 02 Apr 2019 19:04:40 GMT):
Sure @Baha-sk , I will give that info. debugging with delve, i saw that error is from fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/fileks.go line 264

Baha-sk (Tue, 02 Apr 2019 19:06:56 GMT):
make sure to use a directory structure similar to "fabric-sdk-go/test/fixtures/fabric/v1/crypto-config" (run `make integration-tests` for this folder to be generated)

vignesh (Tue, 02 Apr 2019 19:22:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dqNWzyy2P2tftBk92) @Baha-sk how can i access my store/keys/certs path ??

lehors (Tue, 02 Apr 2019 19:28:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=rsif2vtK2ExHwQzf4) @Baha-sk $ golangci-lint --version golangci-lint has version 1.16.0 built from 97ea1cb on 2019-03-31T19:48:46Z

lehors (Tue, 02 Apr 2019 19:28:52 GMT):
but it was failing before with an older version, I upgraded and got the same result

vignesh (Tue, 02 Apr 2019 19:32:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jPkJTmLw43efAtA5z) @Baha-sk I could see that with my code/configs sdk always tried to access certificates from `clientconfig.CredentialStore` rather than msp of the entity. So, I copied the certificates from crypto-config directory to my `clientconfig.CredentialStore`. You could see my `clientconfig.CredentialStore` at `https://github.com/vigneshkm/my_fabric_1/blob/master/endpointconfig_override.go` line 86.

troyronda (Tue, 02 Apr 2019 19:37:55 GMT):
@lehors @Baha-sk The CI scripts are running v1.15.0. I'm looking at using gobin to run a consistent version (like fabric-cli project has).

dimm (Tue, 02 Apr 2019 19:38:05 GMT):
Are you guys solving the problem accessing CA from SDK? I'm stuck with `/register 401 30 "Certificate not found with AKI 'b35d5a93d78f95b632af24e543ede06b04e8e410f721553adac0ffefaa51a42f' and serial 'b002aaca45f238beb6a980a39e0cfd8d'"` when trying to register a user...

dimm (Tue, 02 Apr 2019 19:38:05 GMT):
Are you guys solving the problem accessing CA from SDK? I'm stuck with `/register 401 30 "Certificate not found with AKI 'b35d5a93d78f95b632af24e543ede06b04e8e410f721553adac0ffefaa51a42f' and serial 'b002aaca45f238beb6a980a39e0cfd8d'"` when trying to register a user...

Baha-sk (Tue, 02 Apr 2019 19:46:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=g87cyvFEJGXy2RXDm) @vignesh `clientconfig.CredentialStore` is not the problem as this is a temporary location where the SDK will create a cred store to use for the SDK... you need to make sure to pass in the right credentials for your orgs/peers, etc. as per the configless tes, see the following lines as an example:

Baha-sk (Tue, 02 Apr 2019 19:46:55 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/configless/endpointconfig_override_test.go#L145

Baha-sk (Tue, 02 Apr 2019 19:47:07 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/configless/endpointconfig_override_test.go#L172

Baha-sk (Tue, 02 Apr 2019 19:50:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dtZQWWsyihXuex9Xq) @dimm no, it's a different issue using configless (config interfaces implemented outside the SDK)

dimm (Tue, 02 Apr 2019 19:50:55 GMT):
ah, ok..

lehors (Tue, 02 Apr 2019 19:54:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=HsMY6M6uXrX3qQQxj) @troyronda Indeed, I downgraded to 1.15.0 and make lint passed!

MHBauer (Tue, 02 Apr 2019 19:55:41 GMT):
if you get the makefile set to checkout a specific version, we'll steal that bit, eventually.

troyronda (Tue, 02 Apr 2019 19:58:01 GMT):
make depend currently does that

troyronda (Tue, 02 Apr 2019 19:58:33 GMT):
but I'm looking at changing to use the gobin mechanism instead.

MHBauer (Tue, 02 Apr 2019 19:59:05 GMT):
what is "the gobin mechanism" keep referring to that

troyronda (Tue, 02 Apr 2019 19:59:06 GMT):
(current mechanism is here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/scripts/dependencies.sh#L39)

troyronda (Tue, 02 Apr 2019 19:59:28 GMT):
robin: https://github.com/myitcv/gobin

troyronda (Tue, 02 Apr 2019 19:59:28 GMT):
gobin: https://github.com/myitcv/gobin

MHBauer (Tue, 02 Apr 2019 19:59:38 GMT):
so then my question is why wasn't @lehors hitting that bit?

troyronda (Tue, 02 Apr 2019 20:00:07 GMT):
make depend isn't being enforced on every non-CI run of make test.

troyronda (Tue, 02 Apr 2019 20:00:07 GMT):
make depend isn't being enforced on every non-CI run of make [unit/integration]-test.

troyronda (Tue, 02 Apr 2019 20:00:28 GMT):
(it also overwrites ~/go/bin versions of the binaries which isn't ideal outside of the CI).

MHBauer (Tue, 02 Apr 2019 20:00:50 GMT):
eh, I'm used to most projects doing that.

MHBauer (Tue, 02 Apr 2019 20:00:54 GMT):
mostly they just pull master.

troyronda (Tue, 02 Apr 2019 20:01:27 GMT):
(with gobin, it should become checked every run)

MHBauer (Tue, 02 Apr 2019 20:01:39 GMT):
oh, that's an entire tool.

troyronda (Tue, 02 Apr 2019 20:01:46 GMT):
yup

dimm (Tue, 02 Apr 2019 20:02:32 GMT):
Could somebody help with the CA plz? I enrolled an admin user, how can I put it's key to the SDK now?

Baha-sk (Tue, 02 Apr 2019 20:38:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dDwjwqfyYkmncu2k8) @dimm adding a user to an org must follow the same msp directory structure... similarly to https://chat.hyperledger.org/channel/fabric-sdk-go?msg=tPE3y3LJooSveCE9E.. look at how users are set

dimm (Tue, 02 Apr 2019 20:41:01 GMT):
When I enrolled a user, it outputted: ```2019/04/02 19:58:51 [INFO] Stored client certificate at /etc/hyperledger/fabric-ca-server/msp/signcerts/cert.pem 2019/04/02 19:58:51 [INFO] Stored root CA certificate at /etc/hyperledger/fabric-ca-server/msp/cacerts/localhost-7054.pem 2019/04/02 19:58:51 [INFO] Stored Issuer public key at /etc/hyperledger/fabric-ca-server/msp/IssuerPublicKey 2019/04/02 19:58:51 [INFO] Stored Issuer revocation public key at /etc/hyperledger/fabric-ca-server/msp/IssuerRevocationPublicKey``` Do I need some of those keys or something else?

nyet (Tue, 02 Apr 2019 20:42:09 GMT):
You need the private half of signcerts in keystore

dimm (Tue, 02 Apr 2019 20:46:44 GMT):
No example how to do it? ```# ls -lah ./fabric-ca-server/msp/keystore total 24K drwxr-xr-x 2 root root 4.0K Apr 2 20:43 . drwxr-xr-x 6 root root 4.0K Apr 2 20:03 .. -rw------- 1 root root 241 Apr 2 19:58 52024bc7a17a2fb365e1c7f6f68dea61755e86cb2f1db7dfb4fbd75ece4ee34e_sk -rw-r--r-- 1 root root 282 Apr 2 19:22 IssuerRevocationPrivateKey -rw-r--r-- 1 root root 32 Apr 2 19:22 IssuerSecretKey -rw------- 1 root root 241 Apr 2 19:22 b35d5a93d78f95b632af24e543ede06b04e8e410f721553adac0ffefaa51a42f_sk``` One of those?

nyet (Tue, 02 Apr 2019 20:47:36 GMT):
the sdk already looks in msp/keystore if you configured an MSP directory for an identity

nyet (Tue, 02 Apr 2019 20:48:09 GMT):
that is the keystore for THAT MSP (no relation to the local keystore that the sdk uses for itself)

nyet (Tue, 02 Apr 2019 20:48:19 GMT):
(I know it is confusing, trust me)

nyet (Tue, 02 Apr 2019 20:48:57 GMT):
those look like the server private keys

nyet (Tue, 02 Apr 2019 20:49:12 GMT):
you want the keys written out to your own keystore when you run the ca-client

dimm (Tue, 02 Apr 2019 20:49:18 GMT):
Mmm... It is :) So do I understand correctly that instead of using ADmin user, like for all other operations, I need to enroll a new user in CA, copy it's cert to SDK, and use that one for registering users?

nyet (Tue, 02 Apr 2019 20:49:26 GMT):
you dont HAVE to

nyet (Tue, 02 Apr 2019 20:49:31 GMT):
you can use the admin to enroll everyone

dimm (Tue, 02 Apr 2019 20:49:37 GMT):
Can I simply use the REST service somehow?

nyet (Tue, 02 Apr 2019 20:49:39 GMT):
you use `register` to delegate

dimm (Tue, 02 Apr 2019 20:49:46 GMT):
Ah!! How can use Admin?

dimm (Tue, 02 Apr 2019 20:50:24 GMT):
I thought it's not letting me to use the admin.. That's where this `Certificate not found with AKI` coming from

nyet (Tue, 02 Apr 2019 20:50:36 GMT):
fabric-ca-enroll -u (admin:pass@url) -H (mspdir) etc

nyet (Tue, 02 Apr 2019 20:51:24 GMT):
that will write out a pubkey in `certfiles` and a private key in `keystore` in the mspdir specified

nyet (Tue, 02 Apr 2019 20:51:38 GMT):
if -H is an empty dir you can see exactly what it does

dimm (Tue, 02 Apr 2019 20:52:03 GMT):
```root@ee4725a8e8a8:/# fabric-ca-client enroll -u http://admin:adminpw@localhost:7054 2019/04/02 19:58:51 [INFO] Created a default configuration file at /etc/hyperledger/fabric-ca-server/fabric-ca-client-config.yaml 2019/04/02 19:58:51 [INFO] generating key: &{A:ecdsa S:256} 2019/04/02 19:58:51 [INFO] encoded CSR 2019/04/02 19:58:51 [INFO] Stored client certificate at /etc/hyperledger/fabric-ca-server/msp/signcerts/cert.pem 2019/04/02 19:58:51 [INFO] Stored root CA certificate at /etc/hyperledger/fabric-ca-server/msp/cacerts/localhost-7054.pem 2019/04/02 19:58:51 [INFO] Stored Issuer public key at /etc/hyperledger/fabric-ca-server/msp/IssuerPublicKey 2019/04/02 19:58:51 [INFO] Stored Issuer revocation public key at /etc/hyperledger/fabric-ca-server/msp/IssuerRevocationPublicKey```

dimm (Tue, 02 Apr 2019 20:52:07 GMT):
I've done this already

nyet (Tue, 02 Apr 2019 20:52:22 GMT):
err why is your target directory fabric-ca-server

nyet (Tue, 02 Apr 2019 20:52:27 GMT):
thats a misnomer :)

nyet (Tue, 02 Apr 2019 20:52:53 GMT):
ok then yes, if you empty it out before running it, the only key in keystore sholuld be the privat key that goes with the one in signcerts

nyet (Tue, 02 Apr 2019 20:53:18 GMT):
unfortunately i have been not been able to figure out a deterministic way to derive the _sk filename from the public pem

nyet (Tue, 02 Apr 2019 20:54:30 GMT):
(yes that is super annoying, but the sdk should search all of keystore for the one it needs)

dimm (Tue, 02 Apr 2019 20:54:42 GMT):
```root@ee4725a8e8a8:/etc/hyperledger# fabric-ca-client enroll -u http://admin:adminpw@localhost:7054 -H /opt/newuser 2019/04/02 20:53:55 [INFO] Created a default configuration file at /opt/newuser/fabric-ca-client-config.yaml 2019/04/02 20:53:55 [INFO] generating key: &{A:ecdsa S:256} 2019/04/02 20:53:55 [INFO] encoded CSR 2019/04/02 20:53:55 [INFO] Stored client certificate at /opt/newuser/msp/signcerts/cert.pem 2019/04/02 20:53:55 [INFO] Stored root CA certificate at /opt/newuser/msp/cacerts/localhost-7054.pem 2019/04/02 20:53:55 [INFO] Stored Issuer public key at /opt/newuser/msp/IssuerPublicKey 2019/04/02 20:53:55 [INFO] Stored Issuer revocation public key at /opt/newuser/msp/IssuerRevocationPublicKey root@ee4725a8e8a8:/etc/hyperledger# ls /opt/newuser/ fabric-ca-client-config.yaml msp root@ee4725a8e8a8:/etc/hyperledger# ls /opt/newuser/msp/ IssuerPublicKey cacerts/ signcerts/ IssuerRevocationPublicKey keystore/ user/ root@ee4725a8e8a8:/etc/hyperledger# ls /opt/newuser/msp/user/```

nyet (Tue, 02 Apr 2019 20:55:16 GMT):
do `find /opt/newuser -type f`

nyet (Tue, 02 Apr 2019 20:55:25 GMT):
and things will be come more clear

dimm (Tue, 02 Apr 2019 20:55:30 GMT):
```root@ee4725a8e8a8:/etc/hyperledger# find /opt/newuser -type f /opt/newuser/fabric-ca-client-config.yaml /opt/newuser/msp/IssuerRevocationPublicKey /opt/newuser/msp/keystore/b0b7cc3eb53fccf650068b76f483478968daa525279df59e88d4cd5ecb83bd42_sk /opt/newuser/msp/IssuerPublicKey /opt/newuser/msp/signcerts/cert.pem /opt/newuser/msp/cacerts/localhost-7054.pem ```

nyet (Tue, 02 Apr 2019 20:56:01 GMT):
there you go. the file in `keystore` is for `signcerts/cert.pem`

nyet (Tue, 02 Apr 2019 20:56:28 GMT):
you should be able to point the sdk at /opt/newuser/msp and it should work.

dimm (Tue, 02 Apr 2019 20:57:34 GMT):
with certificateAuthorities: section?

dimm (Tue, 02 Apr 2019 20:57:55 GMT):
```certificateAuthorities: ca.example.com: url: http://osc-beta.sdsc.edu:7054 httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw caName: ca.example.com tlsCACerts: # path: ${GOPATH}/src/gitlab.com/dimm/osc-portal/hl/basic-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem # path: ${GOPATH}/src/gitlab.com/dimm/osc-portal/hl/basic-network/ca/msp/cacerts/localhost-7054.pem path: ${GOPATH}/src/gitlab.com/dimm/osc-portal/hl/ca/client.pem # client: # key: # path: ${GOPATH}/src/gitlab.com/dimm/osc-portal/hl/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.key # cert: # path: ${GOPATH}/src/gitlab.com/dimm/osc-portal/hl/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.crt ```

dimm (Tue, 02 Apr 2019 20:57:55 GMT):
```certificateAuthorities: ca.example.com: url: http://osc-beta.sdsc.edu:7054 httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw caName: ca.example.com tlsCACerts: path: ${GOPATH}/src/gitlab.com/dimm/osc-portal/hl/ca/client.pem ```

dimm (Tue, 02 Apr 2019 20:57:55 GMT):
```certificateAuthorities: ca.example.com: url: http:// httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw caName: ca.example.com tlsCACerts: path: ${GOPATH}/src/gitlab.com/dimm/osc-portal/hl/ca/client.pem ```

dimm (Tue, 02 Apr 2019 20:57:57 GMT):
?

nyet (Tue, 02 Apr 2019 20:59:02 GMT):
no, `organizations..cryptoPath`

dimm (Tue, 02 Apr 2019 20:59:21 GMT):
Ah!!!!

dimm (Tue, 02 Apr 2019 20:59:44 GMT):
That's the missing part :) Thanks, trying

nyet (Tue, 02 Apr 2019 20:59:45 GMT):
(yea i know its crazy confusing)

nyet (Tue, 02 Apr 2019 20:59:48 GMT):
np i hope that helps

nyet (Tue, 02 Apr 2019 21:00:16 GMT):
more than happy to help, this stuff is hard for me too, and explaining it helps me

nyet (Tue, 02 Apr 2019 21:01:06 GMT):
so the `certificateAuthorties` section is for the fabric-ca-client BUILT IN to the SDK, you can use that instead of `fabric-ca-client` stand alone tool

nyet (Tue, 02 Apr 2019 21:01:25 GMT):
you can do enroll by doing an sdk call, and it will use that section to auth with the ca-server for you.

nyet (Tue, 02 Apr 2019 21:01:25 GMT):
you can do enroll by doing an sdk call, and it will use that section to auth with the ca-server for you, and write out an MSP for the org you try to enroll with

nyet (Tue, 02 Apr 2019 21:01:29 GMT):
does that make sense?

dimm (Tue, 02 Apr 2019 21:04:16 GMT):
WOOHOO!!!! IT WORKED!!

dimm (Tue, 02 Apr 2019 21:04:47 GMT):
Reading and trying to understand

nyet (Tue, 02 Apr 2019 21:04:58 GMT):
grats! glad you got it nailed down.

dimm (Tue, 02 Apr 2019 21:05:04 GMT):
(THANKS A LOT! That was my 2nd day banging my head on it)

dimm (Tue, 02 Apr 2019 21:05:43 GMT):
I'm doing mspClient.Register in SDK. What's the other way and which one is this?

nyet (Tue, 02 Apr 2019 21:06:10 GMT):
i'd have to look it up, i haven't used the sdk to do an enroll yet personally

nyet (Tue, 02 Apr 2019 21:06:22 GMT):
its on my list of things to do

dimm (Tue, 02 Apr 2019 21:06:30 GMT):
:) Ok, thanks a lot for your help!

nyet (Tue, 02 Apr 2019 21:06:33 GMT):
np dimm

hongquan.zhang (Wed, 03 Apr 2019 02:08:59 GMT):
Has joined the channel.

hongquan.zhang (Wed, 03 Apr 2019 02:09:54 GMT):
Hello, could any one please help to figure out which commit hash of fabric-sdk-go can I used against fabric-1.4.

nyet (Wed, 03 Apr 2019 06:28:14 GMT):
HEAD :)

hongquan.zhang (Wed, 03 Apr 2019 06:40:48 GMT):
Thanks @nyet

MHBauer (Wed, 03 Apr 2019 07:03:48 GMT):
it should be compatible going way way back.

gen_el (Wed, 03 Apr 2019 12:02:11 GMT):
I am have an issue with Raft ordering while using the SDK. So i noticed the raft ordering and broadcast time isn't consistent. Sometimes it takes 2s (batch timeout time) other times it takes *60seconds*. See the logs --> Why does this happen?

gen_el (Wed, 03 Apr 2019 12:02:40 GMT):

Screenshot 2019-04-03 at 12.34.03 PM.png

gen_el (Wed, 03 Apr 2019 12:03:17 GMT):
When i send transaction using the `peer chaincode invoke` command, it behaves as expected.

gen_el (Wed, 03 Apr 2019 12:03:17 GMT):
When i send transactions using the `peer chaincode invoke` command, it behaves as expected.

gen_el (Wed, 03 Apr 2019 13:52:31 GMT):
I am getting this error after updating my fabric-sdk-go to the current HEAD. ```Chaincode invocation returned with the error - failed to invoke function transferFn on chaincode ftcc. Error - error registering for TxStatus event: error calling discover service send: Multiple errors occurred: - From target....```

gen_el (Wed, 03 Apr 2019 13:52:31 GMT):
I am getting this error after updating my fabric-sdk-go to the current HEAD. ```Chaincode invocation returned with the error - failed to invoke function transferFn on chaincode ftcc. Error - error registering for TxStatus event: error calling discover service send: Multiple errors occurred: - From target: localhost:7051: failed constructing peer membership out of response: failed validating stateInfo message: message isn't a stateInfo message - From target: localhost:8051: failed constructing peer membership out of response: failed validating stateInfo message: message isn't a stateInfo message```

troyronda (Wed, 03 Apr 2019 14:35:47 GMT):
Could be some incompatibility with the protos (https://github.com/hyperledger/fabric-sdk-go/blob/e7f22b3d24cfa36d718299d65d1971ff88e22fa2/internal/github.com/hyperledger/fabric/discovery/client/client.go#L593 / https://github.com/hyperledger/fabric-sdk-go/blob/e7f22b3d24cfa36d718299d65d1971ff88e22fa2/internal/github.com/hyperledger/fabric/protos/gossip/message.pb.go#L604)

troyronda (Wed, 03 Apr 2019 14:36:34 GMT):
(I haven't tried raft ordering yet).

troyronda (Wed, 03 Apr 2019 14:57:09 GMT):
Now that we have Go modules, I am looking at using the canonical import path for Go fabric protos (we can still substitute back to the curated version by having a submodule at third_party/github.com/hyperledger/fabric).

troyronda (Wed, 03 Apr 2019 14:57:09 GMT):
Now that we have Go modules, we are looking at using the canonical import path for Go fabric protos (we can still substitute back to the curated version by having a submodule at third_party/github.com/hyperledger/fabric).

troyronda (Wed, 03 Apr 2019 14:57:45 GMT):
This would need downstream projects to edit the import paths for protos, if they are using them.

troyronda (Wed, 03 Apr 2019 14:57:45 GMT):
This would need downstream projects to edit the import paths for protos to the canonical path, if they are using them.

troyronda (Wed, 03 Apr 2019 15:02:10 GMT):
@dave.enyeart @sykesm - it would be useful to know if the Fabric project will be moving the protos directory (to enable a common Go import path).

troyronda (Wed, 03 Apr 2019 15:02:10 GMT):
@dave.enyeart @sykesm - it would be useful to know if the Fabric project will be moving the protos directory (to enable a common/canonical Go import path).

nyet (Wed, 03 Apr 2019 15:02:12 GMT):
That is a bit distressing

troyronda (Wed, 03 Apr 2019 15:08:06 GMT):
The problem we have is that the current structure is a bit odd. We didn't want projects to need to depend on Fabric code that might change (or wasn't designed to be used as a library -- e.g., extra dependencies / imports that a client wouldn't need)... so we created a curated version in internal / third_party.

troyronda (Wed, 03 Apr 2019 15:08:45 GMT):
This caused some issues (e.g., some people wanted to use some code from the Fabric project but the proto types were now incompatible).

troyronda (Wed, 03 Apr 2019 15:09:30 GMT):
So additional Fabric code was copied, patched and exposed here: https://github.com/hyperledger/fabric-sdk-go/tree/master/third_party/github.com/hyperledger/fabric

nyet (Wed, 03 Apr 2019 15:09:46 GMT):
That part doens't really distress me as much as the fabric proto changing that makes a version independent sdk impossible..

troyronda (Wed, 03 Apr 2019 15:09:56 GMT):
Since then, the Fabric protos directory has been cleaned up to only have protos in it :).

troyronda (Wed, 03 Apr 2019 15:09:56 GMT):
Since then, the Fabric protos directory has been cleaned up to only have protos in it and Go modules now allow substitution during builds.

troyronda (Wed, 03 Apr 2019 15:10:56 GMT):
@nyet ah - we would be pinning to a specific proto version in go.mod

troyronda (Wed, 03 Apr 2019 15:11:47 GMT):
(I actually think, at the beginning, we could still be using the code from fabric-sdk-go/third_party for projects using go mod)

troyronda (Wed, 03 Apr 2019 15:12:12 GMT):
@nyet take a look here: https://github.com/hyperledger/fabric-sdk-go/blob/master/go.mod#L18

troyronda (Wed, 03 Apr 2019 15:13:36 GMT):
We are defining the protos as its own module. This means we can substitute import paths to our module version (e.g., github.com/hyperledger/fabric actually refers to our curated "fabric" module that is in the SDK repo itself).

troyronda (Wed, 03 Apr 2019 15:13:52 GMT):
but the import paths are now "canonical"

troyronda (Wed, 03 Apr 2019 15:15:14 GMT):
So I think, with Go module-based builds, we still have the flexibility that we have now... but, we don't need to fiddle with the import paths.

troyronda (Wed, 03 Apr 2019 15:15:22 GMT):
@nyet what do you think?

nyet (Wed, 03 Apr 2019 15:17:03 GMT):
I think modules are definitley the way to go, but I don't pretend to know enough about either fabric or the way they define (and develop) the protocol to know what the best fit is.

nyet (Wed, 03 Apr 2019 15:17:15 GMT):
I am completely ignorant of the workflow :/

nyet (Wed, 03 Apr 2019 15:18:03 GMT):
But in general, go module support should supplant dep anyway, long term. If it helps solve this problem it is a no brainer.

yxuco (Wed, 03 Apr 2019 16:27:39 GMT):
Did you see this error when using `GO111MODULE=on go get -u -d github.com/hyperledger/fabric-sdk-go@master`

yxuco (Wed, 03 Apr 2019 16:27:42 GMT):
go: github.com/golang/lint@v0.0.0-20190313153728-d0100b6bd8b3: parsing go.mod: unexpected module path "golang.org/x/lint" go get: error loading module requirements

yxuco (Wed, 03 Apr 2019 16:44:25 GMT):
This work-around worked: `go mod edit -replace github.com/golang/lint@latest=golang.org/x/lint@latest`

gen_el (Wed, 03 Apr 2019 17:28:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=prx34CFwKgMdcgaBK) @troyronda I see. I would really like to contribute code to the sdk to get it to production status. Any pointers on where to start?

troyronda (Wed, 03 Apr 2019 17:50:47 GMT):
@yxuco I will take a look.

mahoney1 (Wed, 03 Apr 2019 17:51:06 GMT):
FYI - reminder that Fabric Developer Community call tomorrow (Thurs) is at 4pm UTC (5pm UK, 12pm ET, 9am PT) Meeting Id: https://zoom.us/my/hyperledger.community - latest agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

troyronda (Wed, 03 Apr 2019 17:52:42 GMT):
@gen_el contributions are welcome. Suggest creating hyperledger Jira tickets improvements you are thinking about and posting to the channel for feedback. And push the code to hyperledger gerrit.

troyronda (Wed, 03 Apr 2019 17:52:42 GMT):
@gen_el contributions are welcome. Suggest creating hyperledger Jira tickets for improvements you are thinking about and posting to the channel for feedback. And push the code to hyperledger gerrit.

troyronda (Wed, 03 Apr 2019 18:06:00 GMT):
Jira: https://jira.hyperledger.org/projects/FABG/issues/FABG-794?filter=allopenissues

troyronda (Wed, 03 Apr 2019 18:06:00 GMT):
Jira: https://jira.hyperledger.org/projects/FABG

troyronda (Wed, 03 Apr 2019 18:06:54 GMT):
Gerrit: https://gerrit.hyperledger.org

troyronda (Wed, 03 Apr 2019 18:06:54 GMT):
Gerrit: https://gerrit.hyperledger.org (project is fabric-sdk-go).

troyronda (Wed, 03 Apr 2019 18:06:54 GMT):
Gerrit: https://gerrit.hyperledger.org (project is fabric-sdk-go). E.g., git clone ssh://@gerrit.hyperledger.org:29418/fabric-sdk-go

troyronda (Wed, 03 Apr 2019 18:06:54 GMT):
Gerrit: https://gerrit.hyperledger.org (project is fabric-sdk-go). E.g., git clone ssh://@gerrit.hyperledger.org:29418/fabric-sdk-go && scp -p -P 29418 @gerrit.hyperledger.org:hooks/commit-msg fabric-sdk-go/.git/hooks/

gen_el (Wed, 03 Apr 2019 18:13:58 GMT):
Ok

troyronda (Wed, 03 Apr 2019 18:25:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=vtD5ysRci3SdphzCJ) @yxuco the -u flag is what is causing your issue.

troyronda (Wed, 03 Apr 2019 18:26:21 GMT):
go help module-get The -u flag instructs get to update dependencies to use newer minor or patch releases when available. Continuing the previous example, 'go get -u A' will use the latest A with B v1.3.1 (not B v1.2.3).

troyronda (Wed, 03 Apr 2019 18:27:11 GMT):
(I'm guessing some dependency has an issue when updated).

wirsiing (Wed, 03 Apr 2019 20:12:30 GMT):
Has joined the channel.

wirsiing (Wed, 03 Apr 2019 20:13:44 GMT):
Does anyone know how to instantiate chaincode with a collectionsconfig ?

troyronda (Wed, 03 Apr 2019 20:42:34 GMT):
@lehors I have updated the SDK with the gobin change. https://github.com/hyperledger/fabric-sdk-go/commit/37a26c64c533d3a269ba5c40cb12af3b20bd80dc

troyronda (Wed, 03 Apr 2019 20:42:49 GMT):
make lint now uses the version specified in the Makefile.

troyronda (Wed, 03 Apr 2019 20:42:49 GMT):
make lint now uses the linter version specified in the Makefile.

troyronda (Wed, 03 Apr 2019 20:43:15 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/Makefile#L53

troyronda (Wed, 03 Apr 2019 20:55:24 GMT):
@lehors I also created a patch to update to 1.16.0: https://gerrit.hyperledger.org/r/c/30700/

Roper 2 (Thu, 04 Apr 2019 08:08:21 GMT):
Has joined the channel.

Roper 2 (Thu, 04 Apr 2019 08:12:19 GMT):
Hey guys, I'm facing an issue when creating my first client using the SDK. I manually created a connection profile YAML to connect to the 'first-network' example of the official fabric samples. Everything seems good but I cannot create the channel client: `client := sdk.ChannelContext("integrity-channel", fabsdk.WithUser("Admin@org1.example.com"), fabsdk.WithOrg("Org1"))` peer0 of organisation org1 tells me in its log that the TLS handshake failed because the `first record does not look like a TLS handshake`. So it seems like my Go client is not attempting a proper SSL handshake, how would I activate that?

HaydenGriffin (Thu, 04 Apr 2019 14:01:14 GMT):
Has joined the channel.

HaydenGriffin (Thu, 04 Apr 2019 14:04:18 GMT):
Hey all, I am looking for help regarding BCCSP implementation. I have created an MemoryKeyStore, enrolled users and I am able to retrieve the keys for each user registered. I now want to encrypt / decrypt and sign / verify using these keys. Can anyone please help me?

mahoney1 (Thu, 04 Apr 2019 15:31:17 GMT):
FYI - reminder that the Fabric Developer Community call is in 30mins - 4pm UTC (5pm UK, 12pm ET, 9am PT) Meeting Id: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

Baha-sk (Thu, 04 Apr 2019 15:45:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GR5sZT5MdvmaXxbF9) @HaydenGriffin do you mean signing like this: https://github.com/hyperledger/fabric-sdk-go/blob/ca2a7a337ab89e5a62d4206aac36aa12cd4ba16f/test/integration/e2e/orgs/multi_orgs_ch_update_signatures_test.go#L186 ?

HaydenGriffin (Thu, 04 Apr 2019 16:07:31 GMT):
@Baha-sk sort of yes - although truthfully I am more interested in encryption and decryption

vignesh (Thu, 04 Apr 2019 17:29:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CntYtRKyzK82oHjRT) @Baha-sk @Baha-sk I created crypto-materials with `cryptogen` tool, updated credential store at endpointconfig_override.go as suggested but still getting `user not found` error. below are the contents of thee msp for admin``` ```

mahoney1 (Thu, 04 Apr 2019 17:47:10 GMT):
@Roper 2 this Stack Overflow (using TLS) may be a useful pointer (YAML config file and code) https://stackoverflow.com/questions/53431595/not-able-to-query-the-byfn-via-fabric-sdk-go-due-to-the-error-no-endorsement-c or [here](https://www.edureka.co/community/30021/fabric-connection_failed-description-dialing-connection) HTH

vignesh (Thu, 04 Apr 2019 17:52:10 GMT):
https://github.com/vigneshkm/my_fabric_1/blob/master/endpointconfig_override.go#L86

vignesh (Thu, 04 Apr 2019 17:54:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=CntYtRKyzK82oHjRT) @Baha-sk @Baha-sk I created crypto materials using `cryptogen` tool, and also updated the credential store in `endpointconfig_override.go` as suggested (https://github.com/vigneshkm/my_fabric_1/blob/master/endpointconfig_override.go#L86). But I still get the same error `user not found`.

vignesh (Thu, 04 Apr 2019 17:55:11 GMT):
Following is the contents at credential store path, which I found to be similar to one at `fabric-sdk-go/test/fixtures/fabric/v1/crypto-config`

vignesh (Thu, 04 Apr 2019 17:55:26 GMT):
``` vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/my_fabric/crypto-config/ordererOrganizations/orderer.com/users/Admin@orderer.com $ ls msp tls vignesh@vignesh-ThinkPad-E470 ~/go-book/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/v1/crypto-config/ordererOrganizations/example.com/users/Admin@example.com $ ls msp tls ```

vignesh (Thu, 04 Apr 2019 17:55:52 GMT):
The exact error I get is `Failed to create channel management client err: failed to create resmgmt client due to context error: user not found` at https://github.com/vigneshkm/my_fabric_1/blob/master/ex.go#L150

vignesh (Thu, 04 Apr 2019 18:02:48 GMT):
@Baha-sk As I was very busy with my regular work , I could not reply to you in past two days..

Baha-sk (Thu, 04 Apr 2019 20:00:19 GMT):
@vignesh what about the other non orderer orgs, have you done the same? you need peerOrganizations as well..

rolsonquadras (Thu, 04 Apr 2019 20:32:25 GMT):
Has joined the channel.

yxuco (Thu, 04 Apr 2019 21:52:54 GMT):
Does the sdk-go client API supports transient arguments? In the chaincode private collection sample, you can send transient data via a map in stub. Does the sdk-go client API already support such calls with transient parameters? If so, where can I find a sample of such client app? Thanks.

vignesh (Fri, 05 Apr 2019 04:20:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dvDsYimizpPEKTRHb) @Baha-sk https://github.com/vigneshkm/my_fabric_1/blob/master/crypto-config.yaml is the yaml file I input to cryptogen.. I create 1 orderer organization and two peer organizations.

Rajatsharma (Fri, 05 Apr 2019 07:40:02 GMT):
I'm building a chaincode and for my use case I want to know if that's invoked from the SDK directly by a user of from a chaincode using `stub.invokeChaincode()`. Is there anyone to find this out ? Then I'll implement my logic accordingly.

Roper 2 (Fri, 05 Apr 2019 12:52:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=g3GseQDFsdkfyBqja) @mahoney1 Thx, that helped. Also: Is there a way to avoid having to specify the key file for each user like this ``` Admin@org1.example.com: key: path: ../integrity-network/crypto-config/peerOrganizations/org2.net.in.tum.de/users/Admin@org1.example.com/msp/keystore/2c2c0a7a59b3243c08d88055b057c020b2d869db54b3d8b38d208304adb55c98_sk cert: path: ../integrity-network/crypto-config/peerOrganizations/org2.net.in.tum.de/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem ``` because the file name changes when recreating the crypto material and its obviously kinda ugly

Baha-sk (Fri, 05 Apr 2019 16:20:10 GMT):
@vignesh make sure CryptoConfig path points to `~/go-book/src/github.com/my_fabric/crypto-config` at this line: https://github.com/vigneshkm/my_fabric_1/blob/df82f7dff05bb031a6bb81c540d91551cc35e18f/endpointconfig_override.go#L85 (or try and print `pathvar.Subst("${MY_FABRIC}/crypto-config")` to make sure it matches the above path) as for CredentialStore just use `/tmp/store/`, do not set it the Admin user's MSP path for this field

Roper 2 (Fri, 05 Apr 2019 16:47:22 GMT):
Can someone tell me where I am getting valid crypto material for the client? I'm using the 'first-network' example including the crypto material that is created with it. Should these keys be correct for a client using the go sdk to talk to peers? ``` tlsCerts: systemCertPool: false client: key: path: ../integrity-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.key cert: path: ../integrity-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.crt ``` Admin is also the user used for connecting with the client

Roper 2 (Fri, 05 Apr 2019 16:47:22 GMT):
Can someone tell me where I am getting valid crypto material for the client? I'm using the 'first-network' example including the crypto material that is created with it. Should these keys be correct for a client using the go sdk to talk to peers? ``` tlsCerts: systemCertPool: false client: key: path: ../integrity-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.key cert: path: ../integrity-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.crt ``` Admin is also the user used for connecting with the client. I am asking because I am getting a 'Bad certificate'; It might be noteworthy that I have to use localhost instead of rewriting the peer names because I am running locally; however the certs are for peerx.orgy.example.com.

Roper 2 (Fri, 05 Apr 2019 16:47:22 GMT):
Can someone tell me where I am getting valid crypto material for the client? I'm using the 'first-network' example including the crypto material that is created with it. Should these keys be correct for a client using the go sdk to talk to peers? ``` tlsCerts: systemCertPool: false client: key: path: ../integrity-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.key cert: path: ../integrity-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.crt ``` Admin is also the user used for connecting with the client. I am asking because I am getting a 'Bad certificate'; It might be noteworthy that I have to use localhost instead of rewriting the peer names because I am running the client outside of docker locally; however the certs are for peerx.orgy.example.com.

vignesh (Fri, 05 Apr 2019 19:31:18 GMT):
abc``` abc ```

vignesh (Fri, 05 Apr 2019 19:31:56 GMT):
abc abc

vignesh (Fri, 05 Apr 2019 19:32:27 GMT):
abc``` ```

vignesh (Fri, 05 Apr 2019 19:46:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RKCnJ2wtJmX8PxLZk) @Baha-sk made changes as suggested, but still getting same error. I printed `pathvar.Subst("${MY_FABRIC}/crypto-config")` and it is proper i.e `"/home/vignesh/go-book/src/github.com/my_fabric/crypto-config"`. Debugging with delve I see that at `https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/keyvaluestore/filekeyvaluestore.go#L117` sdk tries to load the certificate from `CredentialStore` and fails to find certificate. Below are the values of keyvalue store and lookup file when we get the error.``` (dlv) p file "/tmp/store/Admin@orderer.com-cert.pem" (dlv) p *fkvs github.com/hyperledger/fabric-sdk-go/pkg/fab/keyvaluestore.FileKeyValueStore { path: "/tmp/store/", keySerializer: github.com/hyperledger/fabric-sdk-go/pkg/fab/keyvaluestore.New.func1, marshaller: github.com/hyperledger/fabric-sdk-go/pkg/fab/keyvaluestore.defaultMarshaller, unmarshaller: github.com/hyperledger/fabric-sdk-go/pkg/fab/keyvaluestore.defaultUnmarshaller,} ``` The return value is `core.ErrKeyValueNotFound` and the caller returns `msp.ErrUserNotFound` at `https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/certfileuserstore.go#L53`

vignesh (Fri, 05 Apr 2019 19:46:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RKCnJ2wtJmX8PxLZk) @Baha-sk made changes as suggested, but still getting same error. I printed `pathvar.Subst("${MY_FABRIC}/crypto-config")` and it is proper i.e `"/home/vignesh/go-book/src/github.com/my_fabric/crypto-config"`. Debugging with delve I see that at https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/keyvaluestore/filekeyvaluestore.go#L117 sdk tries to load the certificate from `CredentialStore` and fails to find certificate. Below are the values of keyvalue store and lookup file when we get the error.``` (dlv) p file "/tmp/store/Admin@orderer.com-cert.pem" (dlv) p *fkvs github.com/hyperledger/fabric-sdk-go/pkg/fab/keyvaluestore.FileKeyValueStore { path: "/tmp/store/", keySerializer: github.com/hyperledger/fabric-sdk-go/pkg/fab/keyvaluestore.New.func1, marshaller: github.com/hyperledger/fabric-sdk-go/pkg/fab/keyvaluestore.defaultMarshaller, unmarshaller: github.com/hyperledger/fabric-sdk-go/pkg/fab/keyvaluestore.defaultUnmarshaller,} ``` The return value is `core.ErrKeyValueNotFound` and the caller returns `msp.ErrUserNotFound` at https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/certfileuserstore.go#L53

HaydenGriffin (Sat, 06 Apr 2019 15:31:16 GMT):
Hi all, I'm trying to use BCCSP encryption methods within fabric-sdk-go, this doesn't look like it is supported?

HaydenGriffin (Sat, 06 Apr 2019 15:35:50 GMT):
Instead I am trying to type assert my key retrieved from https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/memory_key_store.go#L35 , which returns https://github.com/hyperledger/fabric-sdk-go/blob/master/internal/github.com/hyperledger/fabric/bccsp/bccsp.go , into a key of type https://github.com/hyperledger/fabric/blob/master/bccsp/bccsp.go#L25 so that I can use the methods Encrypt and Decrypt within the BCCSP type interface. Can anyone please provide assistance?

nyet (Sat, 06 Apr 2019 16:59:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=nKyRWicAWng3w7Krr) @Roper 2 You can (and should) use the matcher section in the go client config file if you aren't using a hostname listed in the TLS cert. This is another problem with using `cryptogen` instead of `fabric-ca-client`

HaydenGriffin (Sat, 06 Apr 2019 19:23:28 GMT):
Does anyone have experience implementing a BCCSP within fabric-sdk-go? https://github.com/hyperledger/fabric-sdk-go/blob/master/internal/github.com/hyperledger/fabric/bccsp/bccsp.go#L104 I want to be able to encrypt and decrypt key objects but cannot figure out how to initialise a bccsp.BCCSP object.

Roper 2 (Sun, 07 Apr 2019 08:09:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=a057fb0c-d4ca-445f-8ffc-9904b140a42e) @nyet thanks for the advice, any example on the said _matcher section in the go client config _ ?

wirsiing (Sun, 07 Apr 2019 11:59:14 GMT):
Can anyone point me to a tutorial on instantiating chaincode with private data collections?

HaydenGriffin (Sun, 07 Apr 2019 16:17:27 GMT):
Where can I retrieve the EncrypterOpts that I need to use? https://github.com/hyperledger/fabric-sdk-go/blob/master/internal/github.com/hyperledger/fabric/bccsp/bccsp.go#L143 I do not know what values I should use as the EncrypterOpts

asaningmaxchain123 (Sun, 07 Apr 2019 23:19:53 GMT):
@Baha-sk how can i put the `CredentialStore` set to the database

Baha-sk (Mon, 08 Apr 2019 14:03:33 GMT):
@vignesh can you check the value of path in debug mode? https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/keyvaluestore/filekeyvaluestore.go#L37

Baha-sk (Mon, 08 Apr 2019 14:04:18 GMT):
@asaningmaxchain123 what do you mean by ```put the `CredentialStore` set to the database```

Baha-sk (Mon, 08 Apr 2019 14:04:56 GMT):
`CredentialStore` is a local path in the file system

Baha-sk (Mon, 08 Apr 2019 16:04:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=34AknDEianBLn9Tep) I believe your path is `/tmp/store` as showed in your output.. can you uncomment `/tmp/store` line and comment out the added line at : https://github.com/vigneshkm/my_fabric_1/blob/master/identityconfig_override.go#L179? and same thing for state-store: https://github.com/vigneshkm/my_fabric_1/blob/master/identityconfig_override.go#L186... identityConfig must use the same store as endpointConfig

MHBauer (Mon, 08 Apr 2019 23:25:16 GMT):
how do I get the blockhash to query by blockhash?

asaningmaxchain123 (Mon, 08 Apr 2019 23:26:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yaep6KmFYebJK3L9H) @Baha-sk but in the prod environment, the `CredentialStore` should set the database,not just put temp folder

Baha-sk (Tue, 09 Apr 2019 13:55:28 GMT):
@asaningmaxchain123 this is a temporary folder used by the SDK's identities internally

vieiramanoel (Thu, 11 Apr 2019 13:17:05 GMT):
@Baha-sk @smithbk what would cause "can't decode CSR" on request to /api/v1/enroll? I'm generating csr like this ```func (c *CAComponent) createCSR(commonName string) ([]byte, error) { keyBytes, err := rsa.GenerateKey(rand.Reader, 4096) if err != nil { logger.Info("Could not generate private key, error: ", err) return nil, err } subject := pkix.Name{ CommonName: commonName, } template := x509.CertificateRequest{ Subject: subject, SignatureAlgorithm: x509.SHA256WithRSA, } csrBytes, err := x509.CreateCertificateRequest(rand.Reader, &template, keyBytes) if err != nil { logger.Info("Could not create certificate request, error: ", err) return nil, err } c.privKey = keyBytes csr := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE REQUEST", Bytes: csrBytes}) return csr, nil } ```

vieiramanoel (Thu, 11 Apr 2019 13:17:05 GMT):
@Baha-sk @smithbk what would cause "can't decode CSR" on request to /api/v1/enroll? I'm generating csr like this ```func (c *CAComponent) createCSR(commonName string) ([]byte, error) { keyBytes, err := rsa.GenerateKey(rand.Reader, 4096) if err != nil { logger.Info("Could not generate private key, error: ", err) return nil, err } subject := pkix.Name{ CommonName: commonName, } template := x509.CertificateRequest{ Subject: subject, SignatureAlgorithm: x509.SHA256WithRSA, } csrBytes, err := x509.CreateCertificateRequest(rand.Reader, &template, keyBytes) if err != nil { logger.Info("Could not create certificate request, error: ", err) return nil, err } c.privKey = keyBytes csr := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE REQUEST", Bytes: csrBytes}) return csr, nil } //get csr admincsr, err := c.createCSR(c.userdata.Username) // create body req fabricEnroll := gtypes.FabricEnroll{ Request: string(admincsr), Profile: "msp", CaName: c.containerName, } bodyreq, err := json.Marshal(fabricEnroll) req, err := http.NewRequest("POST", url, bytes.NewReader(bodyreq)) req.Header.Set("Content-Type", "application/json") req.SetBasicAuth(c.userdata.Username, c.userdata.Password) res, err := client.Do(req) ```

vieiramanoel (Thu, 11 Apr 2019 13:17:05 GMT):
@Baha-sk @smithbk what would cause "can't decode CSR" on request to /api/v1/enroll? I'm generating csr like this ```func (c *CAComponent) createCSR(commonName string) ([]byte, error) { keyBytes, err := rsa.GenerateKey(rand.Reader, 4096) if err != nil { logger.Info("Could not generate private key, error: ", err) return nil, err } subject := pkix.Name{ CommonName: commonName, } template := x509.CertificateRequest{ Subject: subject, SignatureAlgorithm: x509.SHA256WithRSA, } csrBytes, err := x509.CreateCertificateRequest(rand.Reader, &template, keyBytes) if err != nil { logger.Info("Could not create certificate request, error: ", err) return nil, err } c.privKey = keyBytes csr := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE REQUEST", Bytes: csrBytes}) return csr, nil } //get csr admincsr, err := c.createCSR(c.userdata.Username) // create body req fabricEnroll := gtypes.FabricEnroll{ Request: string(admincsr), Profile: "msp", CaName: c.containerName, } // do request bodyreq, err := json.Marshal(fabricEnroll) req, err := http.NewRequest("POST", url, bytes.NewReader(bodyreq)) req.Header.Set("Content-Type", "application/json") req.SetBasicAuth(c.userdata.Username, c.userdata.Password) res, err := client.Do(req) ```

vieiramanoel (Thu, 11 Apr 2019 13:17:05 GMT):
I've sent to wrong channel, srry. Rewriting

vieiramanoel (Thu, 11 Apr 2019 13:19:02 GMT):
Can someone helpme to find out what's wrong in this process?

troyronda (Thu, 11 Apr 2019 14:24:57 GMT):
FYI: support for go modules has been completed in latest master. You can now also develop and test the SDK outside the gopath.

troyronda (Thu, 11 Apr 2019 14:25:27 GMT):
dep support is also now deprecated.

troyronda (Thu, 11 Apr 2019 14:25:27 GMT):
dep support is also now deprecated (in master).

troyronda (Thu, 11 Apr 2019 14:30:30 GMT):
An outstanding issue is the import path for protos.

troyronda (Thu, 11 Apr 2019 14:30:30 GMT):
(Having a canonical import path)

MHBauer (Thu, 11 Apr 2019 15:44:05 GMT):
what's the end goal for that?

MHBauer (Thu, 11 Apr 2019 15:44:22 GMT):
cause it's a pain to have the sdk and upstream at the same time.

nyet (Thu, 11 Apr 2019 15:47:48 GMT):
@troyronda should `vendor/` still be .gitignored?

nyet (Thu, 11 Apr 2019 15:48:05 GMT):
i dont know what make sense for modules, I'm new to them

troyronda (Thu, 11 Apr 2019 15:48:53 GMT):
@nyet you no longer need the vendor folder when using modules.

nyet (Thu, 11 Apr 2019 15:49:27 GMT):
yea so i'm thinking it should show up in `git status` so you're aware its unused ...

nyet (Thu, 11 Apr 2019 15:49:44 GMT):
but i dont know modules best practicies

troyronda (Thu, 11 Apr 2019 15:50:32 GMT):
Maybe ... something to think about :).

troyronda (Thu, 11 Apr 2019 15:51:53 GMT):
@MHBauer Historically, the fabric-sdk-go project has contained the protos under its own namespace (github.com/hyperledger/fabric-sdk-go/...). There are some SDK functions that return the protobuf types (using the SDK’s copy of the protos, and therefore, the SDK’s types). Going forward, it would be nice if we could return compatible/canonical types so that code across projects can pass those types around.

nyet (Thu, 11 Apr 2019 15:52:18 GMT):
@troyronda also maybe `internal`: ``` # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations ../../hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string) ```

troyronda (Thu, 11 Apr 2019 15:52:35 GMT):
@MHBauer With modules, you can replace the canonical path with the SDK's copy of the protos.

troyronda (Thu, 11 Apr 2019 15:52:55 GMT):
So you don't technically need to bring in the upstream project.

nyet (Thu, 11 Apr 2019 15:53:20 GMT):
not sure what when wrong there :/

troyronda (Thu, 11 Apr 2019 15:53:51 GMT):
(i.e., the SDK would retain the copy of protos in third_party).

troyronda (Thu, 11 Apr 2019 15:53:51 GMT):
(i.e., the SDK would retain the copy of protos in third_party if the canonical path turns out to be the upstream).

troyronda (Thu, 11 Apr 2019 15:55:36 GMT):
@nyet where are you seeing ghat error?

troyronda (Thu, 11 Apr 2019 15:55:36 GMT):
@nyet where are you seeing that error?

nyet (Thu, 11 Apr 2019 15:56:01 GMT):
building my app against the sdk

nyet (Thu, 11 Apr 2019 15:56:10 GMT):
not using dep or modules, just straight gopath import

troyronda (Thu, 11 Apr 2019 15:57:04 GMT):
Ah. I'm guessing that dependency needs to have the pinned version (from the module file)

nyet (Thu, 11 Apr 2019 15:57:10 GMT):
yea i think so to

troyronda (Thu, 11 Apr 2019 15:57:33 GMT):
In practice, our scripts may not be filtering out enough from the upstream but it's a balance.

nyet (Thu, 11 Apr 2019 15:57:36 GMT):
statsd seems to have changed that api :/

nyet (Thu, 11 Apr 2019 15:57:52 GMT):
err go-kit

nyet (Thu, 11 Apr 2019 15:58:33 GMT):
` github.com/go-kit/kit v0.8.0`

nyet (Thu, 11 Apr 2019 15:58:34 GMT):
hmm

MHBauer (Thu, 11 Apr 2019 15:59:16 GMT):
No, I need upstream for other resaons.

MHBauer (Thu, 11 Apr 2019 15:59:31 GMT):
And we have not looked at modules.

troyronda (Thu, 11 Apr 2019 16:04:41 GMT):
@MHBauer So in a project that also brings in the upstream, you would end using the protos from the upstream. Did that bring a concern for you?

nyet (Thu, 11 Apr 2019 16:04:55 GMT):
@troryronda `make populate-vendor` fixed it

nyet (Thu, 11 Apr 2019 16:04:55 GMT):
@troyronda `make populate-vendor` fixed it

nyet (Thu, 11 Apr 2019 16:05:23 GMT):
guess we still need vendor

nyet (Thu, 11 Apr 2019 16:05:38 GMT):
just a heads up :)

troyronda (Thu, 11 Apr 2019 16:05:56 GMT):
You don't need vendor when using modules.

nyet (Thu, 11 Apr 2019 16:06:24 GMT):
i'm not using modules or dep in my app.. do I have to?

troyronda (Thu, 11 Apr 2019 16:06:24 GMT):
If you are in the gopath prior to 1.13 you need to explicility enable modules via environment variable. GO111MODULE

troyronda (Thu, 11 Apr 2019 16:06:24 GMT):
If you are in the gopath prior to 1.13 you need to explici enable modules via environment variable. GO111MODULE=on.

troyronda (Thu, 11 Apr 2019 16:06:24 GMT):
If you are in the gopath prior to 1.13 you need to explicitly enable modules via environment variable. GO111MODULE=on.

nyet (Thu, 11 Apr 2019 16:06:33 GMT):
ah ok

troyronda (Thu, 11 Apr 2019 16:07:14 GMT):
If you checked your project outside of the gopath, then modules are enabled by default.

nyet (Thu, 11 Apr 2019 16:07:32 GMT):
got it

troyronda (Thu, 11 Apr 2019 16:08:08 GMT):
If you don't use modules (or dep) then you have to manually populate vendor (or gopath) with the correct versions

troyronda (Thu, 11 Apr 2019 16:08:28 GMT):
modules are much nicer as dependencies are downloaded by the go build process itself.

troyronda (Thu, 11 Apr 2019 16:09:07 GMT):
(automatically).

nyet (Thu, 11 Apr 2019 16:09:23 GMT):
now i'm getting lots of these ```../../../../pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-alpha5/pkg/common/errors/status/codes.go:13:2: unknown import path "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer": ambiguous import: found github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer in multiple modules: github.com/hyperledger/fabric-sdk-go v1.0.0-alpha5 (/home/nyet/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-alpha5/third_party/github.com/hyperledger/fabric/protos/peer) github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric v0.0.0-20190411014527-3e09cdf4270b (/home/nyet/go/pkg/mod/github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric@v0.0.0-20190411014527-3e09cdf4270b/protos/peer) ```

troyronda (Thu, 11 Apr 2019 16:09:25 GMT):
(and they don't pollute your workspace with vendor folders).

nyet (Thu, 11 Apr 2019 16:09:28 GMT):
yea

troyronda (Thu, 11 Apr 2019 16:10:39 GMT):
@nyet you need to use master rather than alpha5 to use modules.

nyet (Thu, 11 Apr 2019 16:10:51 GMT):
ah didn't see that

troyronda (Thu, 11 Apr 2019 16:11:11 GMT):
yeh - we tagged right before the module work. once modules are settled down, we should tag again.

nyet (Thu, 11 Apr 2019 16:14:06 GMT):
hrm i am using `master` where is that tag coming from

nyet (Thu, 11 Apr 2019 16:14:09 GMT):
thats odd

troyronda (Thu, 11 Apr 2019 16:14:36 GMT):
the go get behavior (with modules) is now to get the latest tag rather than master

troyronda (Thu, 11 Apr 2019 16:14:48 GMT):
you need to explicitly put "@master"

nyet (Thu, 11 Apr 2019 16:15:16 GMT):
ah ok

nyet (Thu, 11 Apr 2019 16:45:11 GMT):
ok that worked, thanks @troyronda

MHBauer (Thu, 11 Apr 2019 20:09:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wPyPKF5wJ2BAz48Jw) @troyronda yea, our project uses upstream. it's got useful stuff that we use. I don't understand at all the whole "thirdparty" and "internal" directories.

MHBauer (Thu, 11 Apr 2019 20:10:26 GMT):
upstream needs to take stuff out into some common place. especially the protos.

troyronda (Thu, 11 Apr 2019 22:15:12 GMT):
Yup

sah (Fri, 12 Apr 2019 03:49:06 GMT):
Has joined the channel.

nyet (Fri, 12 Apr 2019 07:18:32 GMT):
I'm getting really confused between the name of an org and the mspid of the org

nyet (Fri, 12 Apr 2019 07:18:47 GMT):
is there some doc-for-idiots that explains it?

bilalahmed (Fri, 12 Apr 2019 11:05:11 GMT):
Has joined the channel.

vieiramanoel (Fri, 12 Apr 2019 14:00:38 GMT):
pls review https://gerrit.hyperledger.org/r/#/c/30920/

vieiramanoel (Fri, 12 Apr 2019 15:14:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=M3mQzFsrj3Cb2wsz6) https://gerrit.hyperledger.org/r/#/c/30922/ update

nyet (Fri, 12 Apr 2019 15:31:25 GMT):
So when using go modules, how do i edit upstream code to debug it (add debug printing, fix bugs, etc)

vieiramanoel (Fri, 12 Apr 2019 15:33:43 GMT):
@Baha-sk fixed commit msg

nyet (Fri, 12 Apr 2019 15:49:34 GMT):
ugh modules workflow sucks :/

Baha-sk (Fri, 12 Apr 2019 16:00:07 GMT):
@vieiramanoel I've added one additional tiny comment for clarity

nyet (Fri, 12 Apr 2019 16:06:49 GMT):
So fabric-ca-client doesn't like the sdk `getCertBytesFromStore`

nyet (Fri, 12 Apr 2019 16:07:35 GMT):
`fabric-ca-client enroll` puts the sign cert in `cert.pem` but `getCertBytesFromStore` expects it in `@-cert.pem`

Baha-sk (Fri, 12 Apr 2019 16:08:47 GMT):
that's because `etCertBytesFromStore` (as the name states) gets the cert from the store which is following the msp directory structure inside the store

Baha-sk (Fri, 12 Apr 2019 16:08:47 GMT):
that's because `getCertBytesFromStore` (as the name states) gets the cert from the store which is following the msp directory structure inside the store

Baha-sk (Fri, 12 Apr 2019 16:08:47 GMT):
that's because `getCertBytesFromStore` (as the name states) gets the cert from the store which is following the msp directory structure inside the store @nyet

nyet (Fri, 12 Apr 2019 16:10:45 GMT):
well everything is fine except for the final filename

nyet (Fri, 12 Apr 2019 16:11:14 GMT):
`crypto-config/peerOrganizations/nyet-2-hlf-peerOrg/users/Admin@nyet-2-hlf-peerOrg/msp/signcerts/Admin@nyet-2-hlf-peerOrg-cert.pem` vs `crypto-config/peerOrganizations/nyet-2-hlf-peerOrg/users/Admin@nyet-2-hlf-peerOrg/msp/signcerts/cert.pem`

nyet (Fri, 12 Apr 2019 16:11:23 GMT):
i don't know if which is "wrong"

nyet (Fri, 12 Apr 2019 16:11:23 GMT):
i don't know which is "wrong"\

nyet (Fri, 12 Apr 2019 16:11:23 GMT):
i don't know which is "wrong"

nyet (Fri, 12 Apr 2019 16:12:59 GMT):
i can hack my scripts to rename cert.pem but that seems silly... maybe my enroll profile is wrong?

nyet (Fri, 12 Apr 2019 16:44:03 GMT):
or i guess should'nt use `fabric-ca-client`, but using native ca-server sdk calls.

nyet (Fri, 12 Apr 2019 16:44:03 GMT):
or i guess should'nt use `fabric-ca-client`, but use native ca-server sdk calls.

Baha-sk (Fri, 12 Apr 2019 16:57:35 GMT):
@nyet if you noticed the generated crypto-gen artefacts in the Go SDK integration tests, a user cert is stored under: `fabric-sdk-go/test/fixtures/fabric/v1/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem` (`crypto-config` folder is generated)

nyet (Fri, 12 Apr 2019 16:59:23 GMT):
yea i think `fabric-ca-client` is just broken

nyet (Fri, 12 Apr 2019 16:59:27 GMT):
i will likely open a bug

nyet (Fri, 12 Apr 2019 16:59:42 GMT):
there is as lot of stuff in there that is like that

nyet (Fri, 12 Apr 2019 16:59:49 GMT):
e.g. when you enroll tls certs

nyet (Fri, 12 Apr 2019 17:00:09 GMT):
btw do you know how enroll derives the `_sk` filenames

nyet (Fri, 12 Apr 2019 17:00:17 GMT):
i still haven't figure out how to calclulate it

nyet (Fri, 12 Apr 2019 17:00:41 GMT):
i have to do stupid wildcard stuff ot remove private keys to normal names (e.g. tls)

nyet (Fri, 12 Apr 2019 17:00:41 GMT):
i have to do stupid wildcard stuff to rename private keys to normal names (e.g. tls)

Baha-sk (Fri, 12 Apr 2019 17:00:55 GMT):
tls is generated under `crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls`

nyet (Fri, 12 Apr 2019 17:01:15 GMT):
no i mean using `fabric-ca-client`

Baha-sk (Fri, 12 Apr 2019 17:01:31 GMT):
the value precediging `_sk` is the SKI for that private key

Baha-sk (Fri, 12 Apr 2019 17:01:31 GMT):
the value preceding `_sk` is the SKI for that private key

nyet (Fri, 12 Apr 2019 17:01:34 GMT):
if you enroll using the tls profile, the private key gets stored as an `_sk` in signcerts

nyet (Fri, 12 Apr 2019 17:01:41 GMT):
yea i can't seem to calculate it so that it matches

nyet (Fri, 12 Apr 2019 17:01:58 GMT):
e.g. from the pub key, figure out the `_sk` filename

Baha-sk (Fri, 12 Apr 2019 17:02:25 GMT):
there should be code in Fabric that creates it.. have you looked at it?

nyet (Fri, 12 Apr 2019 17:02:50 GMT):
i did but coldn't figure out how to do it with openssl

nyet (Fri, 12 Apr 2019 17:03:07 GMT):
https://jira.hyperledger.org/browse/FABC-60?focusedCommentId=57992&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-57992

Baha-sk (Fri, 12 Apr 2019 17:04:15 GMT):
have you seen this openssl question from stack exchange? https://security.stackexchange.com/questions/128944/generate-subject-key-identifier-by-hand-using-openssl-command-sequence

nyet (Fri, 12 Apr 2019 17:12:18 GMT):
yea it didn't work either :/

nyet (Fri, 12 Apr 2019 17:14:04 GMT):
i think i posted a mesasge on the mailing list

nyet (Fri, 12 Apr 2019 17:14:10 GMT):
or may have discussed it here

nyet (Fri, 12 Apr 2019 17:20:40 GMT):
the problem is partially that they are ecdsa keys and not rsa

nyet (Fri, 12 Apr 2019 17:24:50 GMT):
```$ openssl x509 -noout -in tlsca.nyet-2-hlf.dev.bdnodes.net.pem -pubkey | openssl asn1parse 0:d=0 hl=2 l= 89 cons: SEQUENCE 2:d=1 hl=2 l= 19 cons: SEQUENCE 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 23:d=1 hl=2 l= 66 prim: BIT STRING ```

nyet (Fri, 12 Apr 2019 17:25:03 GMT):
```$ openssl x509 -noout -in tlsca.nyet-2-hlf.dev.bdnodes.net.pem -pubkey | openssl asn1parse -strparse 23 Error in encoding 140274169709632:error:0D07209B:asn1 encoding routines:ASN1_get_object:too long:../crypto/asn1/asn1_lib.c:91: ```

nyet (Fri, 12 Apr 2019 17:25:16 GMT):
i can back down to 18 though

nyet (Fri, 12 Apr 2019 17:25:32 GMT):
```$ openssl x509 -noout -in tlsca.nyet-2-hlf.dev.bdnodes.net.pem -pubkey | openssl asn1parse -strparse 18 0:d=0 hl=2 l= 61 prim: priv [ 14 ] ``` But that seems to have the wrong length

nyet (Fri, 12 Apr 2019 17:25:41 GMT):
(and the wrong type)

nyet (Fri, 12 Apr 2019 17:31:24 GMT):
and if you just look at `-text` oputput, ``` X509v3 Subject Key Identifier: 75:90:C3:22:6D:DE:A9:3B:AA:E1:F5:D2:AE:6E:FE:3D:80:15:C0:8E ``` isn't even close to the file name either

nyet (Fri, 12 Apr 2019 17:31:54 GMT):
which i dont have incidentally because i already renamed it :/

nyet (Fri, 12 Apr 2019 17:32:30 GMT):
here we go ill do on i just enrolled

nyet (Fri, 12 Apr 2019 17:33:37 GMT):
``` X509v3 Subject Key Identifier: 8C:03:4E:5F:2A:50:0E:19:8E:F3:32:DE:8B:47:37:69:B5:28:2F:01 ```

nyet (Fri, 12 Apr 2019 17:33:44 GMT):
```$ ls keystore/ 5dae05ed804b89c6b1331ca80a4b5b6ada56638717d32ba5aff6a20b830d54c8_sk ```

nyet (Fri, 12 Apr 2019 17:35:11 GMT):
```$ openssl x509 -noout -in signcerts/Admin\@nyet-2-hlf-ordererOrg-cert.pem -pubkey | openssl asn1parse -strparse 18 -out pub.der 0:d=0 hl=2 l= 61 prim: priv [ 14 ] ```

nyet (Fri, 12 Apr 2019 17:35:18 GMT):
```$ openssl dgst -c -sha1 pub.der SHA1(pub.der)= 09:ed:99:7a:b8:41:f0:f2:d3:7b:0a:1d:69:e0:65:e7:98:90:80:60 ```

nyet (Fri, 12 Apr 2019 17:39:18 GMT):
If i use offset it looks better: ```$ openssl x509 -noout -in signcerts/Admin\@nyet-2-hlf-ordererOrg-cert.pem -pubkey | openssl asn1parse -inform PEM -offset 23 -out pub.der 0:d=0 hl=2 l= 66 prim: BIT STRING ``` but still wrong ```$ openssl dgst -c -sha1 pub.der SHA1(pub.der)= 86:c8:38:21:6f:64:8b:dd:d6:bf:2b:b8:d6:b4:be:cc:19:ef:c9:af ```

Baha-sk (Fri, 12 Apr 2019 18:57:40 GMT):
yeah.. that's weird.. have you checked on the fabric-ca channel? if someone can help there?

MHBauer (Fri, 12 Apr 2019 19:00:34 GMT):
@troyronda directly related to a question I asked the other day "how do I calculate the block hash to query by block hash" there isn't anything in sdk-go, it's in upstream fabric. so the sdk has provided a function that's impossible to use unless you already know the right answer.

MHBauer (Fri, 12 Apr 2019 19:12:46 GMT):
overall, I'm not sure who it should be, but one of the goals should be to provide some interface that dosen't require me to think about protos.

MHBauer (Fri, 12 Apr 2019 19:12:49 GMT):
they're not for people.

Baha-sk (Fri, 12 Apr 2019 19:29:20 GMT):
@MHBauer which go SDK function are you talking about exactly?

Baha-sk (Fri, 12 Apr 2019 20:08:07 GMT):
@nyet try this library: https://github.com/gbolo/go-util/tree/master/getSKI .. @gbolo is the developer of the tool ;)

MHBauer (Fri, 12 Apr 2019 20:53:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=YqSHgtbHEXy7mdit8) @Baha-sk https://github.com/hyperledger/fabric-sdk-go/blob/81694dd6232d5b0c9721c1da1e5bdf331f77d15b/pkg/client/ledger/ledger.go#L163-L170

Baha-sk (Fri, 12 Apr 2019 21:03:00 GMT):
there are three test calls for this function in our integration tests @MHBauer (not sure why you're not linking to master) here's an example (from master): https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L430

Baha-sk (Fri, 12 Apr 2019 21:03:00 GMT):
there are three test calls for this function in Go SDK tests @MHBauer (not sure why you're not linking to master) here's an example (from master): https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/orgs/multiple_orgs_test.go#L430

MHBauer (Fri, 12 Apr 2019 21:03:59 GMT):
because master changes over time

MHBauer (Fri, 12 Apr 2019 21:04:38 GMT):
How do I get a blockchaininfo for a specific block?

Baha-sk (Fri, 12 Apr 2019 21:12:16 GMT):
have you tried `ledgerClient.QueryBlock()` call?

Baha-sk (Fri, 12 Apr 2019 21:12:16 GMT):
have you tried `ledgerClient.QueryBlock()` call? @MHBauer

Baha-sk (Fri, 12 Apr 2019 21:13:00 GMT):
```// QueryBlock queries the ledger for Block by block number. // Parameters: // blockNumber is required block number(ID) // options hold optional request options // // Returns: // block information func (c *Client) QueryBlock(blockNumber uint64, options ...RequestOption) (*common.Block, error) {```

MHBauer (Fri, 12 Apr 2019 21:13:12 GMT):
I don't have the blocknumber.

Baha-sk (Fri, 12 Apr 2019 21:13:15 GMT):
I guess you can pass in the blockNumber

MHBauer (Fri, 12 Apr 2019 21:13:19 GMT):
I have a blockhash.

MHBauer (Fri, 12 Apr 2019 21:13:27 GMT):
or what I thought was the blockhash.

MHBauer (Fri, 12 Apr 2019 21:13:32 GMT):
before I learned it wasn't.

MHBauer (Fri, 12 Apr 2019 21:14:10 GMT):
there's a function in upstream fabric that calculates it, which we've copied over, because we'd start having dependency collisions if we imported it to use.

MHBauer (Fri, 12 Apr 2019 21:15:04 GMT):
https://github.com/hyperledger/fabric/blob/v1.4.1/protos/common/block.go#L44-L75 something like this should be in the sdk

MHBauer (Fri, 12 Apr 2019 21:15:28 GMT):
or the hash should just be stored in the block metadata or something

yacovm (Fri, 12 Apr 2019 21:16:15 GMT):
if you have the block.... why would you want to retrieve it from the API call?

Baha-sk (Fri, 12 Apr 2019 21:16:18 GMT):
it is... ledgerInfoBefore, err := ledgerClient.QueryInfo(ledger.WithTargets(orgTestPeer0, orgTestPeer1), ledger.WithMinTargets(2), ledger.WithMaxTargets(3)) .. `ledgerInfoBefore` has a BCI...

Baha-sk (Fri, 12 Apr 2019 21:16:18 GMT):
it is... `ledgerInfoBefore, err := ledgerClient.QueryInfo(ledger.WithTargets(orgTestPeer0, orgTestPeer1), ledger.WithMinTargets(2), ledger.WithMaxTargets(3))` .. `ledgerInfoBefore` has a BCI...

Baha-sk (Fri, 12 Apr 2019 21:16:47 GMT):
just like the test, you get the block hash this way : `ledgerInfoBefore.BCI.CurrentBlockHash`

MHBauer (Fri, 12 Apr 2019 22:32:23 GMT):
that's only whatever the currentblockhash is.

nyet (Fri, 12 Apr 2019 22:35:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wGbr3feYM4cNW9bxu) @Baha-sk Fantastic! it works!

nyet (Fri, 12 Apr 2019 23:02:24 GMT):
well this one works but it has a weird error ``` $ ls -1 keystore 5dae05ed804b89c6b1331ca80a4b5b6ada56638717d32ba5aff6a20b830d54c8_sk $ openssl x509 -noout -in cert.pem -pubkey | openssl asn1parse 0:d=0 hl=2 l= 89 cons: SEQUENCE 2:d=1 hl=2 l= 19 cons: SEQUENCE 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 23:d=1 hl=2 l= 66 prim: BIT STRING $ openssl x509 -noout -in cert.pem -pubkey | openssl asn1parse -strparse 23 -out pub.der ; openssl dgst pub.der 0:d=0 hl=2 l= 12 prim: OCTET STRING [HEX DUMP]:620A8A6BA03AD06D2C78387D 14:d=0 hl=4 l= 32 prim: appl [ 9218 ] Error in encoding 139836917720128:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:../crypto/asn1/asn1_lib.c:101: SHA256(pub.der)= 5dae05ed804b89c6b1331ca80a4b5b6ada56638717d32ba5aff6a20b830d54c8 ```

yacovm (Fri, 12 Apr 2019 23:04:16 GMT):
isn't _sk a secret key?

nyet (Fri, 12 Apr 2019 23:04:23 GMT):
yes

nyet (Fri, 12 Apr 2019 23:04:30 GMT):
just trying to derive the filename

yacovm (Fri, 12 Apr 2019 23:04:33 GMT):
ah

nyet (Fri, 12 Apr 2019 23:04:51 GMT):
no clue why asn1parse throws an error

yacovm (Fri, 12 Apr 2019 23:05:05 GMT):
i wonder why we gave these weird filenames in the first place

yacovm (Fri, 12 Apr 2019 23:05:40 GMT):
we could've given "key.pem" or something

yacovm (Fri, 12 Apr 2019 23:06:07 GMT):
my guess is to support several key-cert pairs

nyet (Fri, 12 Apr 2019 23:06:12 GMT):
yea

yacovm (Fri, 12 Apr 2019 23:06:15 GMT):
but there are other ways of doing that :/

nyet (Fri, 12 Apr 2019 23:06:27 GMT):
well its so you can find which key goes with which pub key in a determisttic way

nyet (Fri, 12 Apr 2019 23:06:38 GMT):
i know why they do it, I just couldn't figure out what the `openssl` equivalent was

yacovm (Fri, 12 Apr 2019 23:06:58 GMT):
i.e if it's a elliptic curve you can just know that the public key is the curve generator multiplied by the secret key no?

nyet (Fri, 12 Apr 2019 23:07:10 GMT):
well the problem is to find the FILENAME of the _sk

yacovm (Fri, 12 Apr 2019 23:07:22 GMT):
like - said

nyet (Fri, 12 Apr 2019 23:07:23 GMT):
so you can figoure out which item in the keystore/ belongs to the pub

nyet (Fri, 12 Apr 2019 23:07:26 GMT):
without scanning all of them

yacovm (Fri, 12 Apr 2019 23:07:32 GMT):
you take the secret key, and scan all public keys

nyet (Fri, 12 Apr 2019 23:07:42 GMT):
this way you dont have to scan all of them

nyet (Fri, 12 Apr 2019 23:07:48 GMT):
well to find priv from pub

nyet (Fri, 12 Apr 2019 23:07:59 GMT):
to find pub from priv ya you have to scan the pubs

yacovm (Fri, 12 Apr 2019 23:08:05 GMT):
yes, but is it worth so much users complaining?

nyet (Fri, 12 Apr 2019 23:08:06 GMT):
but you don't usually need that

nyet (Fri, 12 Apr 2019 23:08:14 GMT):
its just me no?

nyet (Fri, 12 Apr 2019 23:08:21 GMT):
I don't htink anybody has bitched but me :)

nyet (Fri, 12 Apr 2019 23:08:26 GMT):
literally

nyet (Fri, 12 Apr 2019 23:08:28 GMT):
(afaik)

yacovm (Fri, 12 Apr 2019 23:08:58 GMT):
it's not only that.... it's also when you generate certs in tests, etc.

yacovm (Fri, 12 Apr 2019 23:09:07 GMT):
it's "hard" to find the key file

yacovm (Fri, 12 Apr 2019 23:09:12 GMT):
even though... there is only 1

yacovm (Fri, 12 Apr 2019 23:09:17 GMT):
since only 1 pair was generated

nyet (Fri, 12 Apr 2019 23:09:57 GMT):
unless you have old stuff floating around, which sometimes i do :/

nyet (Fri, 12 Apr 2019 23:10:04 GMT):
and i hate doing ls -1 | head

nyet (Fri, 12 Apr 2019 23:10:08 GMT):
just seems... silly

nyet (Fri, 12 Apr 2019 23:10:27 GMT):
or even worse a readdir() in code

nyet (Fri, 12 Apr 2019 23:10:44 GMT):
BUT i'm glad i figured it out!

nyet (Fri, 12 Apr 2019 23:10:50 GMT):
its been bugging the shit out of me

yacovm (Fri, 12 Apr 2019 23:14:47 GMT):
i meant tests in go code

yacovm (Fri, 12 Apr 2019 23:14:52 GMT):
integration tests, etc.

nyet (Fri, 12 Apr 2019 23:14:57 GMT):
ah ya

vieiramanoel (Sat, 13 Apr 2019 00:00:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mKwoxZzm96quCwLc3) @Baha-sk done! thank

vieiramanoel (Sat, 13 Apr 2019 00:00:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=mKwoxZzm96quCwLc3) @Baha-sk done! thanks

vieiramanoel (Sat, 13 Apr 2019 16:08:57 GMT):
Hey guys, there's a way to using `msp.Enroll` from fabric-sdk-go generate msp folder structure without being need to copy files all over my code?

vieiramanoel (Sat, 13 Apr 2019 16:08:57 GMT):
Hey guys, there's a way to using `msp.Enroll` from fabric-sdk-go generate msp folder structure without being needed to copy files all over my code?

vieiramanoel (Sat, 13 Apr 2019 16:08:57 GMT):
Hey guys, there's a way to using `msp.Enroll` from fabric-sdk-go generate msp folder structure without being needed to copy files all over my code?

vieiramanoel (Sat, 13 Apr 2019 16:10:26 GMT):
When I enroll it puts keystore in /cryptostore/ORGNAME/keystore, but cacerts, signcerts and user are empty

Baha-sk (Sat, 13 Apr 2019 17:54:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=otSMjLPQqdM8XuNb9) @nyet Apparently openssl uses SHA1 digest by default and Fabric keys use SHA256 digest... If you can add SHA256 to the dgst command I think it will work

Baha-sk (Sat, 13 Apr 2019 17:56:45 GMT):
If it doesn't work, then simply use @gbolo's getSKI tool

nyet (Sat, 13 Apr 2019 20:28:16 GMT):
well it does work asn1parse just spits that error no clue why

Baha-sk (Mon, 15 Apr 2019 03:17:59 GMT):
because asn1parse expects SHA1.. while the public key is SHA256

nyet (Mon, 15 Apr 2019 03:19:38 GMT):
not sure it matters, at the asn1 level the data at 23 is just a bit string

Baha-sk (Mon, 15 Apr 2019 04:08:30 GMT):
I tried with -sha256 for `openssl dgst` and it worked with no error... to be honest, the output after the error in your original output matches the SKI in the `_sk` file, so you should be fine @nyet

nyet (Mon, 15 Apr 2019 04:08:56 GMT):
the error is in the asn1parse command, not the dgst command

nyet (Mon, 15 Apr 2019 04:10:06 GMT):
i see a bunch of bugs in the github

nyet (Mon, 15 Apr 2019 04:10:15 GMT):
probably fixed in a new openssl?

Baha-sk (Mon, 15 Apr 2019 04:10:33 GMT):
weird, this command passed for me: ```$ openssl x509 -noout -in User1\@org1.example.com-cert.pem -pubkey | openssl asn1parse -out pub.der ; openssl dgst -sha256 pub.der 0:d=0 hl=2 l= 89 cons: SEQUENCE 2:d=1 hl=2 l= 19 cons: SEQUENCE 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 23:d=1 hl=2 l= 66 prim: BIT STRING SHA256(pub.der)= a5578f67a0041a0624b453a6abdd8ae8c1a12099631279bdb423e2a0a0bd35a2```

nyet (Mon, 15 Apr 2019 04:10:41 GMT):
whoa

nyet (Mon, 15 Apr 2019 04:10:47 GMT):
what version of openssl

nyet (Mon, 15 Apr 2019 04:11:07 GMT):
lemme find a pubkey that fails for me and ill post it

Baha-sk (Mon, 15 Apr 2019 04:11:09 GMT):
this is for User1 in test/fixtures/fabric/v1/crypto-gen...

nyet (Mon, 15 Apr 2019 04:11:42 GMT):
$ openssl version OpenSSL 1.1.1b 26 Feb 2019

Baha-sk (Mon, 15 Apr 2019 04:11:43 GMT):
`fabric-sdk-go/test/fixtures/fabric/v1/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts` to be exact

nyet (Mon, 15 Apr 2019 04:13:36 GMT):
oh you aren't using strparse

Baha-sk (Mon, 15 Apr 2019 04:14:11 GMT):
oh.. yeah..

nyet (Mon, 15 Apr 2019 04:15:03 GMT):
i think you need strparse to pull out the ski

Baha-sk (Mon, 15 Apr 2019 04:16:11 GMT):
you're right.. and as1nparse fails ```$ openssl x509 -noout -in User1\@org1.example.com-cert.pem -pubkey | openssl asn1parse -strparse 23 -out pub.der ; openssl dgst -sha256 pub.der 0:d=0 hl=2 l= 33 prim: OCTET STRING [HEX DUMP]:75F8ACA7EDA2979B0DF9BEA93CEA0A2E4BD32FF20C325DDE65E29550AB0CC70BDE 35:d=0 hl=2 l= 22 prim: Error in encoding 4446119532:error:0DFFF07B:asn1 encoding routines:CRYPTO_internal:header too long:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.250.1/libressl-2.6/crypto/asn1/asn1_lib.c:152: SHA256(pub.der)= b3aa408ad0fe10f6b54560b6b110c8095b7fea165d79eedcffdc46155fcc4c89```

Baha-sk (Mon, 15 Apr 2019 04:17:01 GMT):
but the dgst output matches the _sk file: ```$ ls ../keystore/ b3aa408ad0fe10f6b54560b6b110c8095b7fea165d79eedcffdc46155fcc4c89_sk```

Baha-sk (Mon, 15 Apr 2019 04:17:09 GMT):
so you should be fine

nyet (Mon, 15 Apr 2019 04:19:13 GMT):
yep

nyet (Mon, 15 Apr 2019 04:19:59 GMT):
that matches exactly what I'm seeing. on github somebody claimed `-strictpem` fixes it, but for me it just causes a double free.

Baha-sk (Mon, 15 Apr 2019 04:20:49 GMT):
I've seen that post too.. but this argument is not accepted in my asn1parse binary

nyet (Mon, 15 Apr 2019 05:20:26 GMT):
whoa ```$ openssl x509 -noout -in cert.pem -pubkey | openssl asn1parse -strparse 23 -length 34 0:d=0 hl=2 l= 32 prim: OCTET STRING [HEX DUMP]:B27A49AB677BE31FC77BD64826DC0A1977740B7EFCC95F3255FCE49FAB25D254```

karthikmohan91 (Mon, 15 Apr 2019 07:38:58 GMT):
Has joined the channel.

bilalahmed (Mon, 15 Apr 2019 08:10:06 GMT):
Hello Everyone, As Fabric SDK for Go and Python has not been released officially but available for testing and development so should we use these SDKs for production applications? Like Composer is not recommended for production use.

ranjan008 (Mon, 15 Apr 2019 10:19:11 GMT):
@troyronda why go sdk only have alpha releases while other sdk's have stable releases as per the fabric release? Does this mean go sdk is not production ready?

Baha-sk (Mon, 15 Apr 2019 12:54:38 GMT):
@nyet I tried with `-length` argument (in my case length is 35, not 34) but it doesn't output the same SKI, see the difference with and without -length and compare that with the `_sk` file: ```$ openssl x509 -noout -in User1\@org1.example.com-cert.pem -pubkey | openssl asn1parse -strparse 23 -out pub.der -length 35 ; openssl dgst -sha256 pub.der 0:d=0 hl=2 l= 33 prim: OCTET STRING [HEX DUMP]:75F8ACA7EDA2979B0DF9BEA93CEA0A2E4BD32FF20C325DDE65E29550AB0CC70BDE SHA256(pub.der)= ecffb3c3bcaf892524e1a3c27272aa0ccb6580c3b6e5cb7f8abe5bf3884222db $ openssl x509 -noout -in User1\@org1.example.com-cert.pem -pubkey | openssl asn1parse -strparse 23 -out pub.der ; openssl dgst -sha256 pub.der 0:d=0 hl=2 l= 33 prim: OCTET STRING [HEX DUMP]:75F8ACA7EDA2979B0DF9BEA93CEA0A2E4BD32FF20C325DDE65E29550AB0CC70BDE 35:d=0 hl=2 l= 22 prim: Error in encoding 4579124844:error:0DFFF07B:asn1 encoding routines:CRYPTO_internal:header too long:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.250.1/libressl-2.6/crypto/asn1/asn1_lib.c:152: SHA256(pub.der)= b3aa408ad0fe10f6b54560b6b110c8095b7fea165d79eedcffdc46155fcc4c89 $ ls ../keystore/ b3aa408ad0fe10f6b54560b6b110c8095b7fea165d79eedcffdc46155fcc4c89_sk```

Baha-sk (Mon, 15 Apr 2019 12:54:38 GMT):
@nyet I tried with `-length` argument (in my case length is 35, not 34) but it doesn't output the same SKI, see the difference with and without -length and compare that with the `_sk` file: ```$ openssl x509 -noout -in User1\@org1.example.com-cert.pem -pubkey | openssl asn1parse -strparse 23 -out pub.der -length 35 ; openssl dgst -sha256 pub.der 0:d=0 hl=2 l= 33 prim: OCTET STRING [HEX DUMP]:75F8ACA7EDA2979B0DF9BEA93CEA0A2E4BD32FF20C325DDE65E29550AB0CC70BDE SHA256(pub.der)= ecffb3c3bcaf892524e1a3c27272aa0ccb6580c3b6e5cb7f8abe5bf3884222db $ openssl x509 -noout -in User1\@org1.example.com-cert.pem -pubkey | openssl asn1parse -strparse 23 -out pub.der ; openssl dgst -sha256 pub.der 0:d=0 hl=2 l= 33 prim: OCTET STRING [HEX DUMP]:75F8ACA7EDA2979B0DF9BEA93CEA0A2E4BD32FF20C325DDE65E29550AB0CC70BDE 35:d=0 hl=2 l= 22 prim: Error in encoding 4579124844:error:0DFFF07B:asn1 encoding routines:CRYPTO_internal:header too long:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.250.1/libressl-2.6/crypto/asn1/asn1_lib.c:152: SHA256(pub.der)= b3aa408ad0fe10f6b54560b6b110c8095b7fea165d79eedcffdc46155fcc4c89 $ ls ../keystore/ b3aa408ad0fe10f6b54560b6b110c8095b7fea165d79eedcffdc46155fcc4c89_sk``` although both commands output the same HEXDUMP, not sure why `dgst` outputs different SKI values

Baha-sk (Mon, 15 Apr 2019 12:54:38 GMT):
@nyet I tried with `-length` argument (in my case length is 35, not 34) but it doesn't output the same SKI, see the difference with and without -length and compare that with the `_sk` file: ```$ openssl x509 -noout -in User1\@org1.example.com-cert.pem -pubkey | openssl asn1parse -strparse 23 -out pub.der -length 35 ; openssl dgst -sha256 pub.der 0:d=0 hl=2 l= 33 prim: OCTET STRING [HEX DUMP]:75F8ACA7EDA2979B0DF9BEA93CEA0A2E4BD32FF20C325DDE65E29550AB0CC70BDE SHA256(pub.der)= ecffb3c3bcaf892524e1a3c27272aa0ccb6580c3b6e5cb7f8abe5bf3884222db $ openssl x509 -noout -in User1\@org1.example.com-cert.pem -pubkey | openssl asn1parse -strparse 23 -out pub.der ; openssl dgst -sha256 pub.der 0:d=0 hl=2 l= 33 prim: OCTET STRING [HEX DUMP]:75F8ACA7EDA2979B0DF9BEA93CEA0A2E4BD32FF20C325DDE65E29550AB0CC70BDE 35:d=0 hl=2 l= 22 prim: Error in encoding 4579124844:error:0DFFF07B:asn1 encoding routines:CRYPTO_internal:header too long:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.250.1/libressl-2.6/crypto/asn1/asn1_lib.c:152: SHA256(pub.der)= b3aa408ad0fe10f6b54560b6b110c8095b7fea165d79eedcffdc46155fcc4c89 $ ls ../keystore/ b3aa408ad0fe10f6b54560b6b110c8095b7fea165d79eedcffdc46155fcc4c89_sk``` although both commands output the same HEXDUMP, the created pub.der file following asn1parse is limiting the content to 35 character with -length 35, it does not include the asn1 trail.. this is why we get different output

Baha-sk (Mon, 15 Apr 2019 12:54:38 GMT):
@nyet I tried with `-length` argument (in my case length is 35, not 34) but it doesn't output the same SKI, see the difference with and without -length and compare that with the `_sk` file: ```$ openssl x509 -noout -in User1\@org1.example.com-cert.pem -pubkey | openssl asn1parse -strparse 23 -out pub.der -length 35 ; openssl dgst -sha256 pub.der 0:d=0 hl=2 l= 33 prim: OCTET STRING [HEX DUMP]:75F8ACA7EDA2979B0DF9BEA93CEA0A2E4BD32FF20C325DDE65E29550AB0CC70BDE SHA256(pub.der)= ecffb3c3bcaf892524e1a3c27272aa0ccb6580c3b6e5cb7f8abe5bf3884222db $ openssl x509 -noout -in User1\@org1.example.com-cert.pem -pubkey | openssl asn1parse -strparse 23 -out pub.der ; openssl dgst -sha256 pub.der 0:d=0 hl=2 l= 33 prim: OCTET STRING [HEX DUMP]:75F8ACA7EDA2979B0DF9BEA93CEA0A2E4BD32FF20C325DDE65E29550AB0CC70BDE 35:d=0 hl=2 l= 22 prim: Error in encoding 4579124844:error:0DFFF07B:asn1 encoding routines:CRYPTO_internal:header too long:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.250.1/libressl-2.6/crypto/asn1/asn1_lib.c:152: SHA256(pub.der)= b3aa408ad0fe10f6b54560b6b110c8095b7fea165d79eedcffdc46155fcc4c89 $ ls ../keystore/ b3aa408ad0fe10f6b54560b6b110c8095b7fea165d79eedcffdc46155fcc4c89_sk``` although both commands output the same HEXDUMP, the created pub.der file following asn1parse is limiting the content to 35 characters with -length 35, it does not include the asn1 trail.. this is why we get different output

nyet (Mon, 15 Apr 2019 14:30:42 GMT):
@Baha-sk It looks like the ski has to be extracted in two passes. Looking it to it now.

vieiramanoel (Mon, 15 Apr 2019 16:26:28 GMT):
Is there a way to enroll an identity with profile tls from go sdk?

vieiramanoel (Mon, 15 Apr 2019 16:26:28 GMT):
Is there a way to enroll an identity with tls profile from go sdk?

vieiramanoel (Mon, 15 Apr 2019 18:21:20 GMT):
@troyronda maybe you can help me on this. go mod for fabric-sdk-go at version alpha5 hasn't gomock version used by fabric-sdk-go which causes go get to get a different gomock version on my machine and when I run any code containing sdk-go I got

vieiramanoel (Mon, 15 Apr 2019 18:21:20 GMT):
@troyronda maybe you can help me on this. go mod for fabric-sdk-go at version alpha5 hasn't gomock version used by fabric-sdk-go which causes go get to get a different gomock version on my machine (not the one used at sdk code) and I run any code containing sdk-go it causes this error

vieiramanoel (Mon, 15 Apr 2019 18:21:31 GMT):
# github.com/hyperledger/fabric-sdk-go/pkg/common/providers/test/mockfab ../../go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-alpha5/pkg/common/providers/test/mockfab/mockfab.gen.go:43:8: m.ctrl.T undefined (type *gomock.Controller has no field or method T)

vieiramanoel (Mon, 15 Apr 2019 18:21:31 GMT):
```# github.com/hyperledger/fabric-sdk-go/pkg/common/providers/test/mockfab ../../go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-alpha5/pkg/common/providers/test/mockfab/mockfab.gen.go:43:8: m.ctrl.T undefined (type *gomock.Controller has no field or method T)```

vieiramanoel (Mon, 15 Apr 2019 18:22:21 GMT):
it will be really useful if a hotfix was released for this, I would commit the change, but Idk which gomock version do you guys use inside sdk

vieiramanoel (Mon, 15 Apr 2019 18:22:21 GMT):
it would be really useful if a hotfix was released for this, I would commit the change, but Idk which gomock version do you guys use inside sdk

vieiramanoel (Mon, 15 Apr 2019 18:22:21 GMT):
it would be really helpful if a hotfix was released for this, I would commit the change, but Idk which gomock version do you guys use inside sdk

vieiramanoel (Mon, 15 Apr 2019 18:23:45 GMT):
I simply can't enroll user withProfile tls, because it doesn't exists at alpha4 version and this is very blocking for what I'm doing now :/

vieiramanoel (Mon, 15 Apr 2019 18:24:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=S4WX4rEXkwkBWPxeX) this question was due the fact I was at alpha4 and it does not exists at this version, so it was a really dumb one haha

vieiramanoel (Mon, 15 Apr 2019 18:30:37 GMT):
Ok found it, v1.2.0. I'll submit a commit latter tonight to fix this

vieiramanoel (Mon, 15 Apr 2019 18:31:20 GMT):
If anyone got here because of this problem: workaround is `go get github.com/golang/mock@c20582278a829e4b3259747a3ce0eceb1763ee13`

troyronda (Mon, 15 Apr 2019 19:29:36 GMT):
Master uses 1.2.0 and it is already in the go.mod (https://github.com/hyperledger/fabric-sdk-go/blob/master/go.mod). Alpha5 rag did not include module definitions. @vieiramanoel

troyronda (Mon, 15 Apr 2019 19:29:36 GMT):
Master uses 1.2.0 and it is already in the go.mod (https://github.com/hyperledger/fabric-sdk-go/blob/master/go.mod). Alpha5 tag did not include module definitions. @vieiramanoel

troyronda (Mon, 15 Apr 2019 19:30:20 GMT):
(Alpha5 only included dep)

vieiramanoel (Mon, 15 Apr 2019 19:49:05 GMT):
the default for `go get github.com/hyperledger/fabric-sdk-go` is alpha5 and in this version the error above occurs. This change could be merged into alpha5 to avoid this kind of problem, couldn't?

vieiramanoel (Mon, 15 Apr 2019 20:56:12 GMT):
Oh, I see what you're saying now. Sorry for the misunderstanding. Couldn't semantic server point to master instead of alpha5? Cuz if you use go modules and get fabric-sdk things will certainly break

vieiramanoel (Mon, 15 Apr 2019 21:53:30 GMT):
still about enrollment how do set ``` ```

vieiramanoel (Mon, 15 Apr 2019 21:53:30 GMT):
still about enrollment how do set ``` X509v3 Subject Alternative Name: DNS:vieirinho-pc ```

vieiramanoel (Mon, 15 Apr 2019 21:54:30 GMT):
how do I set valid dns when enrolling through sdk?

vieiramanoel (Mon, 15 Apr 2019 21:54:47 GMT):
it's setting my hostname in certificate :sweat_smile:

ranjan008 (Tue, 16 Apr 2019 06:25:21 GMT):
By when can we expect a stable release of go sdk and also is there any plan to incorporate idemix in near future?

ranjan008 (Tue, 16 Apr 2019 06:25:28 GMT):
@yacovm

yacovm (Tue, 16 Apr 2019 07:16:28 GMT):
i don't know, i don't have any ties with go SDK. ask @troyronda

troyronda (Tue, 16 Apr 2019 10:45:35 GMT):
I have not heard of anyone working on idemix for Go SDK @ranjan008

pasknelribeiro (Tue, 16 Apr 2019 17:17:20 GMT):
Has joined the channel.

pasknelribeiro (Tue, 16 Apr 2019 17:23:13 GMT):
I am using Ubuntu 16.04 with Golang 1.11.4 I am having the following error: ` # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations ../../go/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string) ` Can anyone help me ?

nyet (Tue, 16 Apr 2019 19:12:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sMkTMDhkQKKJk8EMG) @vieiramanoel SAN is part of the CSR generation

nyet (Tue, 16 Apr 2019 19:12:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sMkTMDhkQKKJk8EMG) @vieiramanoel SANs are part of the CSR generation

nyet (Tue, 16 Apr 2019 19:12:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sMkTMDhkQKKJk8EMG) @vieiramanoel SANs are part of the CSR generation. It doesn't look like the fabric sdk supports TLS CSR customization, unless I'm missing something?

nyet (Tue, 16 Apr 2019 19:12:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sMkTMDhkQKKJk8EMG) @vieiramanoel SANs are part of the CSR generation. It doesn't look like the fabric sdk supports TLS CSR customization, unless I'm missing something? You may be stuck with `fabric-ca-client` for that.

vieiramanoel (Tue, 16 Apr 2019 19:32:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=r4dRbFoDyn72y6ymB) @nyet I really can't/don't want to generate csr on my on or call a binary

vieiramanoel (Tue, 16 Apr 2019 19:32:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=r4dRbFoDyn72y6ymB) @nyet I really can't/don't want to generate csr on my own or call a binary

nyet (Tue, 16 Apr 2019 19:34:50 GMT):
Yea it looks like TLS support is limited in the SDK unless I'm missing something.

vieiramanoel (Tue, 16 Apr 2019 19:47:05 GMT):
Maybe api call creating my own csr

nyet (Tue, 16 Apr 2019 19:50:00 GMT):
I can't find such a thing in the sdk :/

vieiramanoel (Wed, 17 Apr 2019 03:00:13 GMT):
https://jira.hyperledger.org/browse/FABG-856

vieiramanoel (Wed, 17 Apr 2019 03:00:18 GMT):
I can work on this

vieiramanoel (Wed, 17 Apr 2019 03:51:26 GMT):
https://gerrit.hyperledger.org/r/#/c/30976/

vieiramanoel (Wed, 17 Apr 2019 03:51:30 GMT):
take a look at this

vieiramanoel (Wed, 17 Apr 2019 03:51:50 GMT):
@troyronda @Baha-sk

vieiramanoel (Wed, 17 Apr 2019 03:51:58 GMT):
What do you guys think?

vieiramanoel (Wed, 17 Apr 2019 03:52:33 GMT):
test are missing, of course, but I want to know your opinion on this first

vieiramanoel (Wed, 17 Apr 2019 03:53:23 GMT):
we could set ip sans using same logic as well

tommyjay (Wed, 17 Apr 2019 13:37:51 GMT):
Has joined the channel.

tommyjay (Wed, 17 Apr 2019 13:38:36 GMT):
hi i'm looking for tutorials on how to use the sdk. all i've come across is how to connect using the nodesdk. i want to enroll users, join channels, instantiate chaincodes and interact with them

AnthonyRoux (Wed, 17 Apr 2019 13:43:19 GMT):
Has joined the channel.

AnthonyRoux (Wed, 17 Apr 2019 14:13:19 GMT):
Hi to all ! Does anyone encounter issue about the discovery service ? My fabric is currently deployed on different machine without docker and seems to run well. However, my application cannot send transaction proposal to the peers. The weird thing is when I launch the app the sdk client is created without errors (the peers logs request coming from the IP of the app host) but I can't register chaincode event and the error returned is "no peers to connect to". The issue came from the dispatcher.go located at fabric-sdk-go/pkg/fab/events/client/dispatcher/dispatcher.go. It seems I get an empty array from the GetPeers() function. I don't understand why the connection is possible for the creation of the SDK client but is impossible when registering chaincode event. The version of the binairies I use is v1.2.0. All the ip addresses and hostname are reference in the hosts file, the ports are open (I used netcat and netstat to verify it). Any ideas ?

haniavis (Wed, 17 Apr 2019 21:22:08 GMT):
Has joined the channel.

haniavis (Wed, 17 Apr 2019 21:44:29 GMT):
Hi! is there a tutorial on how to get started with the sdk?

davidkel (Thu, 18 Apr 2019 09:58:38 GMT):
Has joined the channel.

Rajatsharma (Fri, 19 Apr 2019 07:26:32 GMT):
Is there anyway I could generate documentation for my go system chaincode ? Any tools or any go packages that could help me out in this ? godoc is not working for me.

habpygo (Fri, 19 Apr 2019 13:40:38 GMT):
Hi, a question regarding graph behavior in the Docker containers. When running the containers I get the message below every 3 seconds or so. Is this what it should be, or is this the result of a configuration error? ``` peer0.org1.example.com | 2019-04-19 13:36:14.493 UTC [comm.grpc.server] 1 -> INFO 0c7 unary call completed {"grpc.start_time": "2019-04-19T13:36:14.492Z", "grpc.service": "discovery.Discovery", "grpc.method": "Discover", "grpc.request_deadline": "2019-04-19T13:36:29.492Z", "grpc.peer_address": "172.27.0.1:60896", "grpc.peer_subject": "CN=User1@tls.example.com,L=San Francisco,ST=California,C=US", "grpc.code": "OK", "grpc.call_duration": "803.267µs"} peer0.org2.example.com | 2019-04-19 13:36:14.493 UTC [comm.grpc.server] 1 -> INFO 08e unary call completed {"grpc.start_time": "2019-04-19T13:36:14.492Z", "grpc.service": "discovery.Discovery", "grpc.method": "Discover", "grpc.request_deadline": "2019-04-19T13:36:29.492Z", "grpc.peer_address": "172.27.0.1:57506", "grpc.peer_subject": "CN=User1@tls.example.com,L=San Francisco,ST=California,C=US", "grpc.code": "OK", "grpc.call_duration": "793.681µs"} ```

habpygo (Fri, 19 Apr 2019 13:40:38 GMT):
Hi, a question regarding grpc behavior in the Docker containers. When running the containers I get the message below every 3 seconds or so. Is this what it should be, or is this the result of a configuration error? ``` peer0.org1.example.com | 2019-04-19 13:36:14.493 UTC [comm.grpc.server] 1 -> INFO 0c7 unary call completed {"grpc.start_time": "2019-04-19T13:36:14.492Z", "grpc.service": "discovery.Discovery", "grpc.method": "Discover", "grpc.request_deadline": "2019-04-19T13:36:29.492Z", "grpc.peer_address": "172.27.0.1:60896", "grpc.peer_subject": "CN=User1@tls.example.com,L=San Francisco,ST=California,C=US", "grpc.code": "OK", "grpc.call_duration": "803.267µs"} peer0.org2.example.com | 2019-04-19 13:36:14.493 UTC [comm.grpc.server] 1 -> INFO 08e unary call completed {"grpc.start_time": "2019-04-19T13:36:14.492Z", "grpc.service": "discovery.Discovery", "grpc.method": "Discover", "grpc.request_deadline": "2019-04-19T13:36:29.492Z", "grpc.peer_address": "172.27.0.1:57506", "grpc.peer_subject": "CN=User1@tls.example.com,L=San Francisco,ST=California,C=US", "grpc.code": "OK", "grpc.call_duration": "793.681µs"} ```

yacovm (Fri, 19 Apr 2019 14:29:54 GMT):
@habpygo it's probably just the SDK performing discovery queries

kopaygorodsky (Fri, 19 Apr 2019 14:51:06 GMT):
Has joined the channel.

kopaygorodsky (Fri, 19 Apr 2019 14:53:15 GMT):
Hey guys! Is it possible to initialize go-fabric-sdk without specifying organization crypto material and user ? Everything I have is CA link and CA admin credentials and I want to obtain all crypto using CA. Seems it's not possible.

kopaygorodsky (Fri, 19 Apr 2019 14:53:15 GMT):
Hey guys! Is it possible to initialize go-fabric-sdk without specifying organization crypto material and user ? Everything I have is CA link and CA admin credentials and I want to generate/sign all crypto using sdk and CA. Seems it's not possible.

habpygo (Fri, 19 Apr 2019 14:54:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=sevpM3b2H7YEZfZZX) @yacovm Ah, that's what I wanted to know. Thanks!

kopaygorodsky (Fri, 19 Apr 2019 14:54:37 GMT):
Also it's not possible to disable TLS for CA in sdk. I want to use http since app and CA are inside private network.

kopaygorodsky (Fri, 19 Apr 2019 14:54:37 GMT):
Also it's not possible to disable TLS for CA in sdk. I want to use http since app and CA are inside a private network.

Stacker (Sat, 20 Apr 2019 19:31:57 GMT):
Has joined the channel.

Stacker (Sat, 20 Apr 2019 19:40:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=r8asr52iCf8mQwBhf) Hi, does anyone know how to solve this issue? Thanks

nikola_tesla (Sun, 21 Apr 2019 06:14:47 GMT):
Has joined the channel.

nikola_tesla (Sun, 21 Apr 2019 06:18:23 GMT):
poc

haardikkk (Sun, 21 Apr 2019 10:53:51 GMT):
whats the difference between `Execute` and `Query`?

shivraj (Mon, 22 Apr 2019 09:57:32 GMT):
Has joined the channel.

shivraj (Mon, 22 Apr 2019 10:13:48 GMT):
In key-level endorsement policies , how does dynamic selection of peers happens to satisfy the endorsement policy on a key level ,does it happens or not ? @yacovm

medikent (Mon, 22 Apr 2019 23:26:05 GMT):
Has joined the channel.

medikent (Mon, 22 Apr 2019 23:29:18 GMT):
Is there documentation for the Fabric Go SDK like there is for the Fabric Node SDK?

dexhunter (Tue, 23 Apr 2019 00:58:08 GMT):
Has joined the channel.

weijinxy (Tue, 23 Apr 2019 10:51:26 GMT):
Has joined the channel.

weijinxy (Tue, 23 Apr 2019 10:54:00 GMT):
I find some bug as below:

weijinxy (Tue, 23 Apr 2019 10:54:03 GMT):
../../github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string)

weijinxy (Tue, 23 Apr 2019 10:54:20 GMT):
is that a issue?

weijinxy (Tue, 23 Apr 2019 10:54:41 GMT):
i pull latest code from github

weijinxy (Tue, 23 Apr 2019 10:55:22 GMT):
has anyone happened to it

weijinxy (Tue, 23 Apr 2019 10:56:07 GMT):
or just change the code add s.statsd.SendLoop(context.Background(), s.sendTicker.C, network, address)

weijinxy (Tue, 23 Apr 2019 10:56:07 GMT):
or just change the code add "s.statsd.SendLoop(context.Background(), s.sendTicker.C, network, address)"

weijinxy (Tue, 23 Apr 2019 10:58:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=piiTMjkd7FMHAhZbh) @medikent Nǐ kěyǐ cānkǎo guānfāng yuánmǎ 9/5000 You can refer to the official source code, there are many test cases

weijinxy (Tue, 23 Apr 2019 11:00:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=69MmaFJ5qgFnuDgKD) @Stacker add "context.Background()" to the first arguments, it woks for me

hendry19901990 (Tue, 23 Apr 2019 13:34:49 GMT):
Has joined the channel.

Psingh (Tue, 23 Apr 2019 14:23:16 GMT):
Has joined the channel.

Psingh (Tue, 23 Apr 2019 14:25:58 GMT):
Hi all, I'm facing below issue when running "go build" command ```alpha@GHOST-RIDER:~/GoWorkspace/src/github.com/hyperledger/firstproject$ go build # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations ../fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string)``` facing this with ``` ubuntu 18.04 and go version 1,12,4 ubuntu 16.04 and go version 1.11.2 `` ```

Psingh (Tue, 23 Apr 2019 14:25:58 GMT):
Hi all, I'm facing below issue when running "go build" command ```alpha@GHOST-RIDER:~/GoWorkspace/src/github.com/hyperledger/firstproject$ go build # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations ../fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string)``` facing this with ``` ubuntu 18.04 and go version 1,12,4 ubuntu 16.04 and go version 1.11.2 ``

Psingh (Tue, 23 Apr 2019 14:39:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5LeiyAGLAE9HDKCLD) @weijinxy Thanks @medikent context.Background() works

Psingh (Tue, 23 Apr 2019 14:39:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=5LeiyAGLAE9HDKCLD) @weijinxy Thanks context.Background() works

troyronda (Tue, 23 Apr 2019 15:01:16 GMT):
@weijinxy @Stacker (or use 0.8.0 of go-kit). E.g., https://github.com/hyperledger/fabric-sdk-go/blob/master/go.mod#L13

Psingh (Tue, 23 Apr 2019 15:21:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=njsjcBGdCrKvdpHZn) In my case go.mod already had a 0.8.0 go-kit but I was still facing the issue. I guess context.Background(0 is the only solution for now.

pasknelribeiro (Tue, 23 Apr 2019 15:29:10 GMT):
Does anyone has the network YAML file for the 'chaincode-docker-devmode' ? I want to create a SDK Go client for devmode.

Psingh (Tue, 23 Apr 2019 17:46:12 GMT):
Hey all getting ``` Unable to initialize the Fabric SDK: failed to save channel: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [localhost:7050] ```

Psingh (Tue, 23 Apr 2019 17:48:27 GMT):
Is it possible to upload config.yaml file ?

Psingh (Tue, 23 Apr 2019 17:48:27 GMT):
Is it possible to upload config.yaml file to this chat ?

kakali (Wed, 24 Apr 2019 03:37:27 GMT):
Has joined the channel.

kakali (Wed, 24 Apr 2019 03:38:12 GMT):
Transaction processing for endorser [peer1.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer1.org1.example.com:7051]

kakali (Wed, 24 Apr 2019 03:38:43 GMT):
when I use fabric-sdk-go invoke a chaincode

weijinxy (Wed, 24 Apr 2019 03:39:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=K9Dm3SfzkYy5x54jZ) @Psingh have a try! by the way, do you fabric network expose port to external?

kakali (Wed, 24 Apr 2019 03:39:28 GMT):
unary call completed {"grpc.start_time": "2019-04-24T11:03:43.321+08:00", "grpc.service": "discovery.Discovery", "grpc.method": "Discover", "grpc.request_deadline": "2019-04-24T11:03:58.321+08:00", "grpc.peer_address": "172.19.0.1:41074", "grpc.code": "OK", "grpc.call_duration": "1.646119ms"}

weijinxy (Wed, 24 Apr 2019 03:39:58 GMT):
it seems that it can't to access localhost:7050 @kakali

weijinxy (Wed, 24 Apr 2019 03:40:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=dvfEQf9DPqGRoJkCz) @kakali so do I,

weijinxy (Wed, 24 Apr 2019 03:41:59 GMT):
it's ok to create channel, join channel , install chaincode , instantiate chaincode, but have save issue when invoke chaincode

kakali (Wed, 24 Apr 2019 03:42:30 GMT):
@weijinxy [fabsdk/client] 2019/04/24 03:40:56 UTC - greylist.(*Filter).Accept -> INFO Rejecting peer peer1.org1.example.com:7051

weijinxy (Wed, 24 Apr 2019 03:42:42 GMT):
and I found invoke response chaincodestatus is ok , 200

kakali (Wed, 24 Apr 2019 03:43:29 GMT):
can you show me a config_test.yaml for fabric-sdk-go?@weijinxy

weijinxy (Wed, 24 Apr 2019 03:44:03 GMT):
ok, i don't know it can upload to this chat?

weijinxy (Wed, 24 Apr 2019 03:44:56 GMT):
sorry , it can't upload , too large

kakali (Wed, 24 Apr 2019 03:45:22 GMT):
can you send it to my email, this is my email [zj.liu@kuaicuocuo.com], thanks

weijinxy (Wed, 24 Apr 2019 03:45:53 GMT):
ok

weijinxy (Wed, 24 Apr 2019 03:46:05 GMT):
are you china?

weijinxy (Wed, 24 Apr 2019 03:46:11 GMT):
chinese?

kakali (Wed, 24 Apr 2019 03:46:20 GMT):
yes

weijinxy (Wed, 24 Apr 2019 03:51:10 GMT):
OK , QQ, 微信传

kakali (Wed, 24 Apr 2019 03:54:04 GMT):
QQ 462546997

kakali (Wed, 24 Apr 2019 03:54:54 GMT):
xiexie

shivraj (Wed, 24 Apr 2019 04:31:56 GMT):
In key-level endorsement policies , how does dynamic selection of peers happens to satisfy the endorsement policy on a key level ,does it happens or not ? @yacovm @weijinxy @troyronda

Psingh (Wed, 24 Apr 2019 06:37:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Z9RaKhcJiPv8d5gdT) @weijinxy config.yaml link : https://file.io/fNx8hw docker-compose.yaml link: https://file.io/psGFMx setup.go for communicating with network: https://file.io/2AmFMj

yacovm (Wed, 24 Apr 2019 07:43:52 GMT):
@shivraj service discovery doesn't support key level EPs but you can just query the organizations in the chaincode itself

yacovm (Wed, 24 Apr 2019 07:44:13 GMT):
and then in the application, sort the peers by their organization

yacovm (Wed, 24 Apr 2019 07:44:27 GMT):
(the peers from the service discovery membership query)

yacovm (Wed, 24 Apr 2019 07:44:49 GMT):
and this is how you can achieve it

Psingh (Wed, 24 Apr 2019 09:05:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Z9RaKhcJiPv8d5gdT) @weijinxy below is the file's link setup.go for communication with network link: https://ideone.com/kBTZIO config.yaml link: https://ideone.com/flh0h4 docker-compose.yaml link: https://ideone.com/M5XbLz

shivraj (Wed, 24 Apr 2019 09:30:13 GMT):
thanks @yacovm

weijinxy (Wed, 24 Apr 2019 09:58:20 GMT):
@Psingh orderers: orderer.firstproject.com: url: orderer.firstproject.com:7050

weijinxy (Wed, 24 Apr 2019 09:58:53 GMT):
orderer.firstproject.com ,do you add to /etc/hosts ?

Psingh (Wed, 24 Apr 2019 10:28:19 GMT):
no

Psingh (Wed, 24 Apr 2019 10:28:45 GMT):
ok i will add it to /etc/hosts

Psingh (Wed, 24 Apr 2019 10:42:11 GMT):
like this localhost orderer.firstproject.com

Psingh (Wed, 24 Apr 2019 10:42:11 GMT):
like this localhost orderer.firstproject.com not working at all

kakali (Wed, 24 Apr 2019 10:54:35 GMT):
@Psingh hello

Psingh (Wed, 24 Apr 2019 10:55:34 GMT):
@kakali hey

kakali (Wed, 24 Apr 2019 10:56:27 GMT):
you see https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml, set your config.yaml entityMatchers for fabric-sdk-go

Psingh (Wed, 24 Apr 2019 10:56:54 GMT):
matchers are already there let me paste it here

kakali (Wed, 24 Apr 2019 10:57:04 GMT):
ok

Psingh (Wed, 24 Apr 2019 10:58:23 GMT):
orderers: orderer.firstproject.com: url: localhost:7050 grpcOptions: ssl-target-name-override: orderer.firstproject.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: true tlsCACerts: # Certificate location absolute path path: ${GOPATH}/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config/ordererOrganizations/firstproject.com/tlsca/tlsca.firstproject.com-cert.pem orderer: - pattern: (\w+).firstproject.(\w+):(\d+) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com mappedHost: orderer.firstproject.com

Psingh (Wed, 24 Apr 2019 10:58:23 GMT):
orderers: orderer.firstproject.com: url: localhost:7050 grpcOptions: ssl-target-name-override: orderer.firstproject.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: true tlsCACerts: # Certificate location absolute path path: ${GOPATH}/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config/ordererOrganizations/firstproject.com/tlsca/tlsca.firstproject.com-cert.pem entityMatchers: orderer: - pattern: (\w+).firstproject.(\w+):(\d+) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com mappedHost: orderer.firstproject.com

kakali (Wed, 24 Apr 2019 10:59:02 GMT):
Do you set entityMatchers field?

Psingh (Wed, 24 Apr 2019 10:59:37 GMT):
yes..

kakali (Wed, 24 Apr 2019 10:59:57 GMT):
send it here

Psingh (Wed, 24 Apr 2019 11:01:29 GMT):
this is you are taking about. Do i have to set it different file entityMatchers: orderer: - pattern: (\w+).firstproject.(\w+):(\d+) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com mappedHost: orderer.firstproject.com

kakali (Wed, 24 Apr 2019 11:03:02 GMT):
ok, I suggest you read this link [https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml]

kakali (Wed, 24 Apr 2019 11:03:32 GMT):
replace your contect

Psingh (Wed, 24 Apr 2019 11:04:50 GMT):
ok.. will take a look

Psingh (Wed, 24 Apr 2019 11:56:32 GMT):
@kakali In config.yaml if I set `allow-insecure: true` then I'm still facing this issue if I set `allow-insecure: false` then I'm getting channel ID mismatch error

Psingh (Wed, 24 Apr 2019 11:57:50 GMT):
changed the entityMatchers as per local_entity_matchers.yaml file

pasknelribeiro (Wed, 24 Apr 2019 14:52:53 GMT):
I having troubles with my chaincode. The GetState function returns data but PutState is not saving data in the blockchain. For example: I do a GetState (returns correct data) and a try to update the values with PutState, but once i do a second GetState the returned value is still the old one. Can anyone help me ?

spmcnamara (Wed, 24 Apr 2019 19:21:20 GMT):
Has joined the channel.

spmcnamara (Wed, 24 Apr 2019 19:24:51 GMT):
Can anyone point me to an example/tutorial that shows new client/context setup and channel creation via the golang SDK that works for HLF v1.4? The stuff I'm finding online is all terribly old, and it appears the SDK has changed significantly since those walkthroughs were written. I'm trying to follow the basic workflow provided here: https://godoc.org/github.com/hyperledger/fabric-sdk-go, but am fumbling with the context creation details. :-(

kakali (Thu, 25 Apr 2019 02:01:30 GMT):
@Psingh ok, my allow-insecure is true

kakali (Thu, 25 Apr 2019 02:13:43 GMT):
I need a example/tutorials that invoke, query chaincode by fabric-sdk-go, can anyone help me?

kakali (Thu, 25 Apr 2019 02:27:47 GMT):
I found an example https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/end_to_end.go, @spmcnamara

Psingh (Thu, 25 Apr 2019 05:13:50 GMT):
@spmcnamara you can refer to chainHero example

Psingh (Thu, 25 Apr 2019 05:47:21 GMT):
Is anyone developing a fabric project on Windows Subsystem for Linux(WSL) and having issues with docker-compose? I'm facing some weird issues when trying to run `docker-compose up` command and unable to create the containers for orderer, ca and peers because it couldn't find signcerts directory but the same thing working on proper Ubuntu machine.

Psingh (Thu, 25 Apr 2019 06:54:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=MTFZtZ8v6heZnKWeY) @weijinxy @troyronda Could you please help me with this issue? setup.go for communication with network link: https://ideone.com/kBTZIO config.yaml link: https://ideone.com/flh0h4 docker-compose.yaml link: https://ideone.com/M5XbLz

weijinxy (Thu, 25 Apr 2019 08:00:46 GMT):
@Psingh , `orderers: orderer.firstproject.com: url: orderer.firstproject.com:7050`

weijinxy (Thu, 25 Apr 2019 08:01:07 GMT):
url should not match 'localhost:7050'

weijinxy (Thu, 25 Apr 2019 08:01:07 GMT):
url not match 'localhost:7050'

weijinxy (Thu, 25 Apr 2019 08:01:42 GMT):
in config.yaml

Psingh (Thu, 25 Apr 2019 09:44:25 GMT):
@weijinxy Is this fine? orderers: orderer.firstproject.com: url: orderer.firstproject.com:7050 grpcOptions: ssl-target-name-override: orderer.firstproject.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: true tlsCACerts: # Certificate location absolute path path: ${GOPATH}/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config/ordererOrganizations/firstproject.com/tlsca/tlsca.firstproject.com-cert.pem entityMatchers: orderer: - pattern: (\w+).firstproject.(\w+):(\d+) urlSubstitutionExp: orderer.firstproject.com:7050 sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com mappedHost: orderer.firstproject.com - pattern: (\w+).firstproject.(\w+) urlSubstitutionExp: orderer.firstproject.com:7050 sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com mappedHost: orderer.firstproject.com OR This one orderers: orderer.firstproject.com: url: localhost:7050 grpcOptions: ssl-target-name-override: orderer.firstproject.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: true tlsCACerts: # Certificate location absolute path path: /c/Projects/Go/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config/ordererOrganizations/firstproject.com/tlsca/tlsca.firstproject.com-cert.pem entityMatchers: orderer: - pattern: (\w+).firstproject.(\w+):(\d+) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com mappedHost: orderer.firstproject.com - pattern: (\w+).firstproject.(\w+) urlSubstitutionExp: localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com mappedHost: orderer.firstproject.com

Psingh (Thu, 25 Apr 2019 09:44:25 GMT):
@weijinxy Is this fine? orderers: orderer.firstproject.com: url: orderer.firstproject.com:7050 grpcOptions: ssl-target-name-override: orderer.firstproject.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: true tlsCACerts: # Certificate location absolute path path: ${GOPATH}/src/github.com/hyperledger/firstproject/firstproject-network/crypto-config/ordererOrganizations/firstproject.com/tlsca/tlsca.firstproject.com-cert.pem entityMatchers: orderer: - pattern: (\w+).firstproject.(\w+):(\d+) urlSubstitutionExp: orderer.firstproject.com:7050 sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com mappedHost: orderer.firstproject.com - pattern: (\w+).firstproject.(\w+) urlSubstitutionExp: orderer.firstproject.com:7050 sslTargetOverrideUrlSubstitutionExp: orderer.firstproject.com mappedHost: orderer.firstproject.com

weijinxy (Thu, 25 Apr 2019 09:56:41 GMT):
yes

Psingh (Thu, 25 Apr 2019 09:57:47 GMT):
but still facing same issue

Psingh (Thu, 25 Apr 2019 10:10:08 GMT):
docker container is listening at `0.0.0.0:7050`

Psingh (Thu, 25 Apr 2019 11:10:38 GMT):
@ below are logs of orderer using command `docker logs --follow container_d` ``` 2019-04-25 11:00:02.314 UTC [orderer.common.server] Start -> INFO 2a1 Beginning to serve requests 2019-04-25 11:08:43.553 UTC [core.comm] ServerHandshake -> ERRO 2a2 TLS handshake failed with error tls: first record does not look like a TLS handshake server=Orderer remoteaddress=192.168.96.1:38760 2019-04-25 11:08:43.553 UTC [grpc] handleRawConn -> DEBU 2a3 grpc: Server.Serve failed to complete security handshake from "192.168.96.1:38760": tls: first record does not look like a TLS handshake ```

Psingh (Thu, 25 Apr 2019 11:10:38 GMT):
@ below are logs of orderer using command `docker logs --follow container_id` ``` 2019-04-25 11:00:02.314 UTC [orderer.common.server] Start -> INFO 2a1 Beginning to serve requests 2019-04-25 11:08:43.553 UTC [core.comm] ServerHandshake -> ERRO 2a2 TLS handshake failed with error tls: first record does not look like a TLS handshake server=Orderer remoteaddress=192.168.96.1:38760 2019-04-25 11:08:43.553 UTC [grpc] handleRawConn -> DEBU 2a3 grpc: Server.Serve failed to complete security handshake from "192.168.96.1:38760": tls: first record does not look like a TLS handshake ```

Psingh (Thu, 25 Apr 2019 11:44:18 GMT):
When changed the `localhost` to `grcps://localhost` then I'm not getting Handshake error anymore but Now getting ChannelID mismatch error ``` 2019-04-25 11:39:47.839 UTC [orderer.common.server] Broadcast -> DEBU 2ac Starting new Broadcast handler 2019-04-25 11:39:47.840 UTC [orderer.common.broadcast] Handle -> DEBU 2ad Starting new broadcast loop for 192.168.96.1:38774 2019-04-25 11:39:47.840 UTC [orderer.common.broadcast] ProcessMessage -> DEBU 2ae [channel: testchannelid] Broadcast is processing config update message from 192.168.96.1:38774 2019-04-25 11:39:47.840 UTC [orderer.common.msgprocessor] ProcessConfigUpdateMsg -> DEBU 2af Processing config update tx with system channel message processor for channel ID testchannelid 2019-04-25 11:39:47.840 UTC [orderer.common.msgprocessor] ProcessConfigUpdateMsg -> DEBU 2b0 Processing channel create tx for channel testchannelid on system channel testchainid 2019-04-25 11:39:47.841 UTC [orderer.common.broadcast] ProcessMessage -> WARN 2b1 [channel: testchannelid] Rejecting broadcast of config message from 192.168.96.1:38774 because of error: Failing initial channel config creation: mismatched channel IDs: 'testchainid' != 'testchannelid' 2019-04-25 11:39:47.841 UTC [orderer.common.server] func1 -> DEBU 2b2 Closing Broadcast stream 2019-04-25 11:39:47.841 UTC [comm.grpc.server] 1 -> INFO 2b3 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.request_deadline=2019-04-25T11:40:02.818Z grpc.peer_address=192.168.96.1:38774 grpc.code=OK grpc.call_duration=1.6111ms ```

karthikmohan91 (Thu, 25 Apr 2019 13:47:19 GMT):
Hi , Is there an official release for Go-SDK so that it can be used in production ready systems. In official docs i can find releases only for Node and JAVA

spmcnamara (Thu, 25 Apr 2019 13:49:57 GMT):
@Psingh Isn't the chainhero example built on HLF v1.1 rather than v1.2?

HaydenGriffin (Thu, 25 Apr 2019 14:33:41 GMT):
Hi all, I am looking to write unit tests for my chaincode that I have created. I am using a MockStub to then call my chaincode. I am able to call my various implemented functions just fine. My functions contain the following: ``` actorID, err := cid.GetID(stub) if err != nil { return shim.Error(fmt.Sprintf("unable to identify the ID of the request owner: %v", err)) } ``` to be able to help restrict users that invoke chaincode. My problem is that I want to be able to write a method which can imitate this. Can anyone help please?

HaydenGriffin (Thu, 25 Apr 2019 15:15:59 GMT):
From my research so far, it does not look possible to test this. If anyone has experience with this please let me know :)

HaydenGriffin (Thu, 25 Apr 2019 15:19:35 GMT):
I have also stumbled upon this StackOverflow link which has no replies: https://stackoverflow.com/questions/55238550/hyperledger-fabric-application-acl-testing

Psingh (Thu, 25 Apr 2019 15:35:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SLo6A5RPCrDJs8xFw) @spmcnamara It is built on HLF1.05

Psingh (Thu, 25 Apr 2019 16:02:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=xWYGe7BGKKbFXwQbD) @spmcnamara @yacovm @troyronda How can I fix this issue?

nyet (Thu, 25 Apr 2019 16:06:09 GMT):
are you confusing system channel with regular channel in your channel configs?

HaydenGriffin (Thu, 25 Apr 2019 16:14:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=PTWba9q7xfWfpyCLi) Has anyone had experience with this?

spmcnamara (Thu, 25 Apr 2019 17:50:06 GMT):
@Psingh run a grep on your configs. You have mismatched channel names. "testchainid" vs "testchannelid" somewhere.

aambati (Thu, 25 Apr 2019 17:58:04 GMT):
Has joined the channel.

aambati (Thu, 25 Apr 2019 17:58:36 GMT):
any body seen this error when sending transactions to a 2.0 network (master branch) using 1.3 sdk: ``` ``` 2019/04/25 17:43:29 Portfolio chaincode returned error: Failed to get endorsing peers: error getting channel response for channel [channel-1]: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: failed constructing descriptor for chaincodes:

aambati (Thu, 25 Apr 2019 17:58:36 GMT):
has anybody seen this error when sending transactions to a 2.0 network (master branch) using 1.3 sdk: ``` 2019/04/25 17:43:29 Portfolio chaincode returned error: Failed to get endorsing peers: error getting channel response for channel [channel-1]: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: failed constructing descriptor for chaincodes: ```

Psingh (Fri, 26 Apr 2019 05:16:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=kyCvig2nCmHrpCgdh) @spmcnamara Thanks

Psingh (Fri, 26 Apr 2019 07:13:22 GMT):
@spmcnamara @kakali facing this issue ``` 2019-04-26 06:59:13.437 UTC [orderer.common.server] Broadcast -> DEBU 2c0 Starting new Broadcast handler 2019-04-26 06:59:13.437 UTC [orderer.common.broadcast] Handle -> DEBU 2c1 Starting new broadcast loop for 192.168.160.1:38170 2019-04-26 06:59:13.437 UTC [orderer.common.broadcast] ProcessMessage -> DEBU 2c2 [channel: testchainid] Broadcast is processing config update message from 192.168.160.1:38170 2019-04-26 06:59:13.438 UTC [orderer.common.msgprocessor] ProcessConfigUpdateMsg -> DEBU 2c3 Processing config update tx with system channel message processor for channel ID testchainid 2019-04-26 06:59:13.438 UTC [orderer.common.msgprocessor] ProcessConfigUpdateMsg -> DEBU 2c4 Processing config update message for channel testchainid 2019-04-26 06:59:13.438 UTC [policies] Evaluate -> DEBU 2c5 == Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers == 2019-04-26 06:59:13.438 UTC [policies] Evaluate -> DEBU 2c6 This is an implicit meta policy, it will trigger other policy evaluations, whose failures may be benign 2019-04-26 06:59:13.438 UTC [policies] Evaluate -> DEBU 2c7 == Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Writers == 2019-04-26 06:59:13.439 UTC [policies] Evaluate -> DEBU 2c8 This is an implicit meta policy, it will trigger other policy evaluations, whose failures may be benign 2019-04-26 06:59:13.439 UTC [policies] Evaluate -> DEBU 2c9 == Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererFirstProject/Writers == 2019-04-26 06:59:13.439 UTC [cauthdsl] func1 -> DEBU 2ca 0xc0004b85a0 gate 1556261953439524700 evaluation starts 2019-04-26 06:59:13.439 UTC [cauthdsl] func2 -> DEBU 2cb 0xc0004b85a0 signed by 0 principal evaluation starts (used [false]) 2019-04-26 06:59:13.439 UTC [cauthdsl] func2 -> DEBU 2cc 0xc0004b85a0 processing identity 0 with bytes of a1be80 2019-04-26 06:59:13.439 UTC [cauthdsl] func2 -> DEBU 2cd 0xc0004b85a0 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected OrdererMSP, got Org1MSP) 2019-04-26 06:59:13.439 UTC [cauthdsl] func2 -> DEBU 2ce 0xc0004b85a0 principal evaluation fails 2019-04-26 06:59:13.439 UTC [cauthdsl] func1 -> DEBU 2cf 0xc0004b85a0 gate 1556261953439524700 evaluation fails 2019-04-26 06:59:13.439 UTC [policies] Evaluate -> DEBU 2d0 Signature set did not satisfy policy /Channel/Orderer/OrdererFirstProject/Writers 2019-04-26 06:59:13.439 UTC [policies] Evaluate -> DEBU 2d1 == Done Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererFirstProject/Writers 2019-04-26 06:59:13.439 UTC [policies] func1 -> DEBU 2d2 Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ OrdererFirstProject/Writers ] 2019-04-26 06:59:13.440 UTC [policies] Evaluate -> DEBU 2d3 Signature set did not satisfy policy /Channel/Orderer/Writers 2019-04-26 06:59:13.440 UTC [policies] Evaluate -> DEBU 2d4 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Writers 2019-04-26 06:59:13.440 UTC [policies] func1 -> DEBU 2d5 Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Consortiums/Writers Orderer/Writers ] 2019-04-26 06:59:13.440 UTC [policies] Evaluate -> DEBU 2d6 Signature set did not satisfy policy /Channel/Writers 2019-04-26 06:59:13.440 UTC [policies] Evaluate -> DEBU 2d7 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers 2019-04-26 06:59:13.440 UTC [orderer.common.broadcast] ProcessMessage -> WARN 2d8 [channel: testchainid] Rejecting broadcast of config message from 192.168.160.1:38170 because of error: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied 2019-04-26 06:59:13.440 UTC [orderer.common.server] func1 -> DEBU 2d9 Closing Broadcast stream 2019-04-26 06:59:13.440 UTC [comm.grpc.server] 1 -> INFO 2da streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.request_deadline=2019-04-26T06:59:28.424Z grpc.peer_address=192.168.160.1:38170 grpc.code=OK grpc.call_duration=2.8451ms 2019-04-26 06:59:13.444 UTC [grpc] infof -> DEBU 2db transport: loopyWriter.run returning. connection error: desc = "transport is closing" ``` after checking this logs it looks like there is some issue with policies but what ? sharing the link of configtx.yaml : https://ideone.com/yZdoF6 docker-compose.yaml : https://ideone.com/EHeQzu peer-base.yaml: https://ideone.com/P3jeVD

Psingh (Fri, 26 Apr 2019 07:13:22 GMT):
@spmcnamara @kakali facing this issue ``` 2019-04-26 06:59:13.437 UTC [orderer.common.server] Broadcast -> DEBU 2c0 Starting new Broadcast handler 2019-04-26 06:59:13.437 UTC [orderer.common.broadcast] Handle -> DEBU 2c1 Starting new broadcast loop for 192.168.160.1:38170 2019-04-26 06:59:13.437 UTC [orderer.common.broadcast] ProcessMessage -> DEBU 2c2 [channel: testchainid] Broadcast is processing config update message from 192.168.160.1:38170 2019-04-26 06:59:13.438 UTC [orderer.common.msgprocessor] ProcessConfigUpdateMsg -> DEBU 2c3 Processing config update tx with system channel message processor for channel ID testchainid 2019-04-26 06:59:13.438 UTC [orderer.common.msgprocessor] ProcessConfigUpdateMsg -> DEBU 2c4 Processing config update message for channel testchainid 2019-04-26 06:59:13.438 UTC [policies] Evaluate -> DEBU 2c5 == Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers == 2019-04-26 06:59:13.438 UTC [policies] Evaluate -> DEBU 2c6 This is an implicit meta policy, it will trigger other policy evaluations, whose failures may be benign 2019-04-26 06:59:13.438 UTC [policies] Evaluate -> DEBU 2c7 == Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Writers == 2019-04-26 06:59:13.439 UTC [policies] Evaluate -> DEBU 2c8 This is an implicit meta policy, it will trigger other policy evaluations, whose failures may be benign 2019-04-26 06:59:13.439 UTC [policies] Evaluate -> DEBU 2c9 == Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererFirstProject/Writers == 2019-04-26 06:59:13.439 UTC [cauthdsl] func1 -> DEBU 2ca 0xc0004b85a0 gate 1556261953439524700 evaluation starts 2019-04-26 06:59:13.439 UTC [cauthdsl] func2 -> DEBU 2cb 0xc0004b85a0 signed by 0 principal evaluation starts (used [false]) 2019-04-26 06:59:13.439 UTC [cauthdsl] func2 -> DEBU 2cc 0xc0004b85a0 processing identity 0 with bytes of a1be80 2019-04-26 06:59:13.439 UTC [cauthdsl] func2 -> DEBU 2cd 0xc0004b85a0 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected OrdererMSP, got Org1MSP) 2019-04-26 06:59:13.439 UTC [cauthdsl] func2 -> DEBU 2ce 0xc0004b85a0 principal evaluation fails 2019-04-26 06:59:13.439 UTC [cauthdsl] func1 -> DEBU 2cf 0xc0004b85a0 gate 1556261953439524700 evaluation fails 2019-04-26 06:59:13.439 UTC [policies] Evaluate -> DEBU 2d0 Signature set did not satisfy policy /Channel/Orderer/OrdererFirstProject/Writers 2019-04-26 06:59:13.439 UTC [policies] Evaluate -> DEBU 2d1 == Done Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererFirstProject/Writers 2019-04-26 06:59:13.439 UTC [policies] func1 -> DEBU 2d2 Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ OrdererFirstProject/Writers ] 2019-04-26 06:59:13.440 UTC [policies] Evaluate -> DEBU 2d3 Signature set did not satisfy policy /Channel/Orderer/Writers 2019-04-26 06:59:13.440 UTC [policies] Evaluate -> DEBU 2d4 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Writers 2019-04-26 06:59:13.440 UTC [policies] func1 -> DEBU 2d5 Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Consortiums/Writers Orderer/Writers ] 2019-04-26 06:59:13.440 UTC [policies] Evaluate -> DEBU 2d6 Signature set did not satisfy policy /Channel/Writers 2019-04-26 06:59:13.440 UTC [policies] Evaluate -> DEBU 2d7 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers 2019-04-26 06:59:13.440 UTC [orderer.common.broadcast] ProcessMessage -> WARN 2d8 [channel: testchainid] Rejecting broadcast of config message from 192.168.160.1:38170 because of error: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied 2019-04-26 06:59:13.440 UTC [orderer.common.server] func1 -> DEBU 2d9 Closing Broadcast stream 2019-04-26 06:59:13.440 UTC [comm.grpc.server] 1 -> INFO 2da streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.request_deadline=2019-04-26T06:59:28.424Z grpc.peer_address=192.168.160.1:38170 grpc.code=OK grpc.call_duration=2.8451ms 2019-04-26 06:59:13.444 UTC [grpc] infof -> DEBU 2db transport: loopyWriter.run returning. connection error: desc = "transport is closing" ``` after checking this log it looks like there is some issue with policies but what ? sharing the link of configtx.yaml : https://ideone.com/yZdoF6 docker-compose.yaml : https://ideone.com/EHeQzu peer-base.yaml: https://ideone.com/P3jeVD

kakali (Fri, 26 Apr 2019 07:21:10 GMT):
I've seen this problem, [implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied]

kakali (Fri, 26 Apr 2019 07:21:53 GMT):
are you get crypto-config by cryptogen cml tool ?

kakali (Fri, 26 Apr 2019 07:21:57 GMT):
@Psingh

kakali (Fri, 26 Apr 2019 07:22:56 GMT):
cli tool

Psingh (Fri, 26 Apr 2019 07:30:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7sMQWXHPZGMwmJaf7) yes I have generated crypto-config using cryptogen tool

kakali (Fri, 26 Apr 2019 07:31:42 GMT):
crypto-config.yaml EnableNodeOUs: true ?

Psingh (Fri, 26 Apr 2019 07:32:57 GMT):
In PeerOrgs yes ``` PeerOrgs: # --------------------------------------------------------------------------- # Org1 # --------------------------------------------------------------------------- - Name: Org1 Domain: org1.firstproject.com EnableNodeOUs: true ```

kakali (Fri, 26 Apr 2019 07:34:40 GMT):
oh, my EnableNodeOUs is true , and I solved problem

kakali (Fri, 26 Apr 2019 07:34:56 GMT):
your logs [the identity is a member of a different MSP (expected OrdererMSP, got Org1MSP)]

kakali (Fri, 26 Apr 2019 07:35:22 GMT):
it look like msp config error

Psingh (Fri, 26 Apr 2019 07:36:17 GMT):
these are files that I'm using configtx.yaml : https://ideone.com/yZdoF6 docker-compose.yaml : https://ideone.com/EHeQzu peer-base.yaml: https://ideone.com/P3jeVD

kakali (Fri, 26 Apr 2019 08:11:30 GMT):
@Psingh hey

kakali (Fri, 26 Apr 2019 08:13:05 GMT):
you use sdk-go ?

Psingh (Fri, 26 Apr 2019 08:18:29 GMT):
yes

kakali (Fri, 26 Apr 2019 08:20:23 GMT):
do you solve that problem?

kakali (Fri, 26 Apr 2019 08:41:18 GMT):
has anybody seen this error ?

kakali (Fri, 26 Apr 2019 08:41:36 GMT):
use of internal package github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib not allowed

kakali (Fri, 26 Apr 2019 08:41:51 GMT):
when I import fabric-ca package

Psingh (Fri, 26 Apr 2019 08:52:57 GMT):
@kakali check this link https://stackoverflow.com/questions/41571946/internal-packages-in-go

kakali (Fri, 26 Apr 2019 08:55:23 GMT):
thanks

Psingh (Fri, 26 Apr 2019 09:02:47 GMT):
@kakali this is the best link to explain how to use internal packages https://stackoverflow.com/questions/33351387/how-to-use-internal-packages

kakali (Fri, 26 Apr 2019 09:15:56 GMT):
ok

Psingh (Fri, 26 Apr 2019 12:14:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=XLYc49GwaoGE4B65c) Is anyone following chainHero example and facing this issue?

Psingh (Sat, 27 Apr 2019 06:11:11 GMT):
found a solution for above issue. CHANNEL ID for genesis.block should not match the CHANNEL ID of channel.tx after recreating genesis.block and channel.tx with different CHANNEL ID solved this issue. If anyone following chainHero example and implementing it on HLF v1.4 gonna face this issue.

Psingh (Sat, 27 Apr 2019 06:11:11 GMT):
found a solution for above issue. CHANNEL ID of genesis.block should not match the CHANNEL ID of channel.tx after recreating genesis.block and channel.tx with different CHANNEL ID solved this issue. If anyone following chainHero example and implementing it on HLF v1.4 gonna face this issue.

RahulHundet (Mon, 29 Apr 2019 06:03:47 GMT):
Has joined the channel.

hendry19901990 (Mon, 29 Apr 2019 16:33:01 GMT):
Somebody helps me please

hendry19901990 (Mon, 29 Apr 2019 16:33:04 GMT):
[fabric_sdk_go] 2019/04/29 16:30:34 UTC - config.initConfig -> INFO config fabric_sdk_go logging level is set to: INFO Unable to initialize the Fabric SDK: failed to create channel: create channel failed: failed broadcast to orderer: NewAtomicBroadcastClient failed: gRPC Transport Status Code: (14) Unavailable. Description: all SubConns are in TransientFailure panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xa13376]

hendry19901990 (Mon, 29 Apr 2019 16:33:04 GMT):
`[fabric_sdk_go] 2019/04/29 16:30:34 UTC - config.initConfig -> INFO config fabric_sdk_go logging level is set to: INFO Unable to initialize the Fabric SDK: failed to create channel: create channel failed: failed broadcast to orderer: NewAtomicBroadcastClient failed: gRPC Transport Status Code: (14) Unavailable. Description: all SubConns are in TransientFailure panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xa13376]`

shivraj (Tue, 30 Apr 2019 07:22:49 GMT):
Is there any plan to add feature for dynamic selection of peer to satisfy the endorsement policy on key-level endorsement policies in fabric go-sdk?@yacovm @weijinxy @troyronda

guolidong (Tue, 30 Apr 2019 08:49:48 GMT):
How is the support for FabToken client functionality going

guolidong (Tue, 30 Apr 2019 08:49:48 GMT):
How is the support for FabToken client functionality going?

guolidong (Tue, 30 Apr 2019 08:50:59 GMT):
@troyronda @weijinxy

medikent (Tue, 30 Apr 2019 16:34:47 GMT):
When trying to use the Go SDK I get the following error: `Either a cryptopath or an embedded list of users is required` What should I add to my config? Is there an example of a list of users?

haardikkk (Wed, 01 May 2019 05:11:46 GMT):
I faced the same error for a long, long time @medikent

haardikkk (Wed, 01 May 2019 05:12:38 GMT):
```"organizations": { "fftxmsp": { "mspid": "fftxmsp", "cryptopath": "./crypto/msp", "users": { "fftxapi": { "key": { "path": "./crypto/fftxapi/key.pem" }, "cert": { "path": "./crypto/fftxapi/cert.crt" } }, "fftxorgadmin": { "key": { "path": "./crypto/fftxorgadmin/key.pem" }, "cert": { "path": "./crypto/fftxorgadmin/cert.crt" } } }, "peers": [ "redacted" ], "certificateAuthorities": [ "redacted" ] } },```

haardikkk (Wed, 01 May 2019 05:13:03 GMT):
-------------

haardikkk (Wed, 01 May 2019 05:13:49 GMT):
Question: is there a better way to update a model's field in Fabric other than fetching it first, parsing it, replacing the field, and setting that as the value for the key?

haardikkk (Wed, 01 May 2019 05:14:03 GMT):
Can I somehow just update a single field as we can do in RDBMS systems?

Psingh (Wed, 01 May 2019 11:38:20 GMT):
Hey All, I'm facing below issue ``` Value of setup.Orderer is: orderer.firstproject.com Channel created Channel joined Initialization Successful ccPkg created Chaincode installed Unable to install and instantiate the chaincode: failed to instantiate the chaincode: failed to get discovery service: could not get chConfig cache reference: read configuration for channel peers failed ```

Psingh (Wed, 01 May 2019 11:38:20 GMT):
Hey All, I'm facing below issue ``` Value of setup.Orderer is: orderer.firstproject.com Channel created Channel joined Initialization Successful ccPkg created Chaincode installed Unable to install and instantiate the chaincode: failed to instantiate the chaincode: failed to get discovery service: could not get chConfig cache reference: read configuration for channel peers failed ```

Psingh (Wed, 01 May 2019 11:38:20 GMT):
Hey All, I'm facing below issue ``` Value of setup.Orderer is: orderer.firstproject.com Channel created Channel joined Initialization Successful ccPkg created Chaincode installed Unable to install and instantiate the chaincode: failed to instantiate the chaincode: failed to get discovery service: could not get chConfig cache reference: read configuration for channel peers failed [fabsdk/util] 2019/05/01 11:49:30 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: read configuration for channel peers failed. Will retry again later ```

Psingh (Wed, 01 May 2019 11:38:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Ws3k93Sd2zr6iKvGG) @kakali can you please help?

Psingh (Wed, 01 May 2019 11:40:08 GMT):
link config.yaml: https://ideone.com/UY5Dbe

medikent (Wed, 01 May 2019 20:47:41 GMT):
Anyone had issues with installing the following: *github.com/hyperledger/fabric-sdk-go/pkg/fabsdk* *github.com/hyperledger/fabric-sdk-go/test/integration* *github.com/hyperledger/fabric-sdk-go/pkg/client/channel* I am getting `mr.mock.ctrl.T undefined (type *gomock.Controller has no field or method T)` and then `too many errors` on *mockfab.gen.go*

mahoney1 (Thu, 02 May 2019 11:35:02 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android:https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call - be great to hear from you later ! 🙂 regards Paul

Psingh (Thu, 02 May 2019 12:48:57 GMT):
@troyronda @weijinxy Can you please help me with this question? https://stackoverflow.com/questions/55936208/failed-to-get-discovery-service-could-not-get-chconfig-cache-reference-read-co

kakali (Fri, 03 May 2019 12:31:26 GMT):
@medikent hey, It is not need to use .../test/... package, you should find all package in github.com/hyperledger/fabric-sdk-go/pkg/fabsdk, but I don't know above question

kakali (Fri, 03 May 2019 12:34:05 GMT):
@Psingh I have this question when I connect network fabsdk.New(configOpt, sdkOpts...) by fabric-sdk-go, you?

kakali (Fri, 03 May 2019 12:36:31 GMT):
ls

kakali (Fri, 03 May 2019 12:53:17 GMT):
2019-05-03 20:46:44.460 CST [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2019-06-02 02:56:59 +0000 UTC 2019-05-03 20:46:44.461 CST [msp] Validate -> DEBU 036 MSP KCCMSP validating identity 2019-05-03 20:46:44.461 CST [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity 2019-05-03 20:46:44.462 CST [grpc] DialContext -> DEBU 038 parsed scheme: "" 2019-05-03 20:46:44.462 CST [grpc] DialContext -> DEBU 039 scheme "" not registered, fallback to default scheme 2019-05-03 20:46:44.462 CST [grpc] watcher -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{peer0.kcc.kuaicuocuo.com:7051 0 }] 2019-05-03 20:46:44.462 CST [grpc] switchBalancer -> DEBU 03b ClientConn switching balancer to "pick_first" 2019-05-03 20:46:44.462 CST [grpc] HandleSubConnStateChange -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc0002abbb0, CONNECTING 2019-05-03 20:46:44.463 CST [grpc] createTransport -> DEBU 03d grpc: addrConn.createTransport failed to connect to {peer0.kcc.kuaicuocuo.com:7051 0 }. Err :connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake". Reconnecting... 2019-05-03 20:46:44.463 CST [grpc] HandleSubConnStateChange -> DEBU 03e pickfirstBalancer: HandleSubConnStateChange: 0xc0002abbb0, TRANSIENT_FAILURE 2019-05-03 20:46:45.462 CST [grpc] HandleSubConnStateChange -> DEBU 03f pickfirstBalancer: HandleSubConnStateChange: 0xc0002abbb0, CONNECTING 2019-05-03 20:46:45.465 CST [grpc] createTransport -> DEBU 040 grpc: addrConn.createTransport failed to connect to {peer0.kcc.kuaicuocuo.com:7051 0 }. Err :connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake". Reconnecting... 2019-05-03 20:46:45.465 CST [grpc] HandleSubConnStateChange -> DEBU 041 pickfirstBalancer: HandleSubConnStateChange: 0xc0002abbb0, TRANSIENT_FAILURE 2019-05-03 20:46:47.378 CST [grpc] HandleSubConnStateChange -> DEBU 042 pickfirstBalancer: HandleSubConnStateChange: 0xc0002abbb0, CONNECTING 2019-05-03 20:46:47.381 CST [grpc] createTransport -> DEBU 043 grpc: addrConn.createTransport failed to connect to {peer0.kcc.kuaicuocuo.com:7051 0 }. Err :connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake". Reconnecting... 2019-05-03 20:46:47.381 CST [grpc] HandleSubConnStateChange -> DEBU 044 pickfirstBalancer: HandleSubConnStateChange: 0xc0002abbb0, TRANSIENT_FAILURE Error: error getting endorser client for channel: endorser client failed to connect to peer0.kcc.kuaicuocuo.com:7051: failed to create new connection: context deadline exceeded

kakali (Fri, 03 May 2019 12:54:26 GMT):
anyone can help me? I have this problem when I join peer0.kcc.kuaicuocuo.com to channel

spmcnamara (Fri, 03 May 2019 16:12:25 GMT):
Can anyone give me some pointers on how to test a transaction using MockShim that makes use of calls to cid.GetID()? I'm on HLF v1.4 and have pulled in MockShim changes from the master described here (https://jira.hyperledger.org/browse/FAB-5644), but clearly don't have things setup correctly. Testing the ID checks is pretty critical, but I'd really like to avoid having to actually install/instantiate on a real instance during development in order to test. [Note: cross-posted from #fabric-questions. apologies if that's bad form.]

guolidong (Fri, 03 May 2019 16:35:53 GMT):
How is the support for FabToken client functionality going? @troyronda @weijinxy

guolidong (Fri, 03 May 2019 16:35:53 GMT):
How is the support for FabToken client functionality going? @troyronda @weijinxy

guolidong (Fri, 03 May 2019 16:35:53 GMT):
How is the support for FabToken client functionality going? @weijinxy @troyronda

troyronda (Fri, 03 May 2019 16:51:14 GMT):
@guolidong I’m not aware of any work, so far, on a FabToken client in the go SDK.

kakali (Sun, 05 May 2019 09:36:04 GMT):
@medikent Is your issue fixed ? I have this issue when I use go mod, too

dirist (Tue, 07 May 2019 07:14:22 GMT):
Has joined the channel.

medikent (Tue, 07 May 2019 18:28:29 GMT):
I was able to build my app and connect using the Go SDK. I am not currently using the *.../test/...* package.

medikent (Tue, 07 May 2019 18:29:00 GMT):
Has anyone found a good way to mock CouchDB during chaincode tests with the Go API?

medikent (Tue, 07 May 2019 18:29:00 GMT):
Has anyone found a good way to mock CouchDB during chaincode tests with the Go SDK?

suchith.arodi (Tue, 07 May 2019 19:16:30 GMT):
Is there are way in which I can mock the entire Fabric network using Fabric-sdk-go ? I see the mocks for individual components here : https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/fab/mocks I want to test my application with mock fabric-sdk-go. Is there any way we can bring up a mock fabric for that ?

suchith.arodi (Tue, 07 May 2019 19:16:30 GMT):
Is there are way in which I can mock the entire Fabric network using Fabric-sdk-go ? I see the mocks for individual components here : https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/fab/mocks I want to test my application with mock fabric-sdk-go. Is there any way we can bring up a mock fabric for that ? I also see end to end integration tests https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/e2e but this uses the real Fabric network for testing

suchith.arodi (Tue, 07 May 2019 19:16:30 GMT):
Is there a way in which I can mock the entire Fabric network using Fabric-sdk-go ? I see the mocks for individual components here : https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/fab/mocks I want to test my application with mock fabric-sdk-go. Is there any way we can bring up a mock fabric for that ? I also see end to end integration tests https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/e2e but this uses the real Fabric network for testing

suchith.arodi (Tue, 07 May 2019 19:19:03 GMT):
I also see end to end integration tests https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration/e2e but this uses the real Fabric network for testing

hendry19901990 (Wed, 08 May 2019 16:01:20 GMT):
which example works fine ?

hendry19901990 (Wed, 08 May 2019 16:02:08 GMT):
All examples don't work very well

shivraj (Thu, 09 May 2019 05:20:06 GMT):
Is there any plan to add feature for dynamic selection of peer to satisfy the endorsement policy on key-level endorsement policies in fabric go-sdk? @yacovm @weijinxy @troyronda

yacovm (Thu, 09 May 2019 09:44:33 GMT):
@shivraj no, i tried to push for it but i got resistance. You can implement it in the application layer by having the chaincode query the organizations for a key and returning this to the client and then the client can use service discovery to see the mappinh between peers and orgs

yacovm (Thu, 09 May 2019 09:44:39 GMT):
*mapping

troyronda (Thu, 09 May 2019 16:47:46 GMT):
@bstasyszyn

troyronda (Thu, 09 May 2019 16:50:03 GMT):
I assume it's more about having a contributor for it...

medikent (Thu, 09 May 2019 17:12:10 GMT):
Is there a section of documentation describing how to use the Fabric SDK to manage chaincode? The following quote from the docs indicates chaincode management by the SDK is possible: ``` The Hyperledger Fabric language-specific SDKs abstract the specifics of the Hyperledger Fabric API to facilitate application development, though it can be used to manage a chaincode’s lifecycle. ``` So, I'd like to write a Go program rather than a Bash script to do my chaincode installation.

nyet (Thu, 09 May 2019 17:14:40 GMT):
Here's my simple stuff https://github.com/Blockdaemon/hlf-database-app (based on chainhero)

medikent (Thu, 09 May 2019 17:18:49 GMT):
Awesome! Thank you so much, I'll try it out.

Psingh (Fri, 10 May 2019 07:29:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=yqFL5YYzDsRXDSw4w) Which HLF version did you use?

Psingh (Fri, 10 May 2019 07:31:01 GMT):
I tried chainHero with HLF v1.4 and there are so many issues.

nyet (Fri, 10 May 2019 15:48:51 GMT):
1.4 and 1.4.1

spmcnamara (Fri, 10 May 2019 20:11:45 GMT):
Can anyone point me to (or show me) how to move between a ca-client-config.yaml file and a msp.ClientContext? The example code uses a call to a mockClientProvider() for the context. I've found example code in the ChainHero writeup, but that uses what I'm guessing is an older version of the fabric-golang-sdk (because the import paths are not correct), and the calls they make are not correct (at least for the latest fabric-sdk-go.) I'm guessing that there is a filereader somewhere, and then a utility class to turn that reader in a a ClientConfig which I then can use to create a ClientContext, but but currently I'm not spotting it. Note: This is to call some of the functions that interact with the MSP.

spmcnamara (Fri, 10 May 2019 20:12:21 GMT):
@Psingh I agree with you 100%. ChainHero example needs to be updated to be helpful.

spmcnamara (Fri, 10 May 2019 20:16:29 GMT):
Regarding my question: I see how to load the YAML with config.FromFile, which gives me a ConfigProvider, but I'm actually trying to get a ClientProvider.

Psingh (Sun, 12 May 2019 11:15:00 GMT):
Can someone please help me with this issue? https://stackoverflow.com/questions/55936208/failed-to-get-discovery-service-could-not-get-chconfig-cache-reference-read-co

Psingh (Sun, 12 May 2019 11:16:40 GMT):
@nyet Can you please help?

kevinyap (Sun, 12 May 2019 12:21:30 GMT):
Has joined the channel.

GthmR (Sun, 12 May 2019 19:49:39 GMT):
Has joined the channel.

pvrbharg (Tue, 14 May 2019 19:18:07 GMT):
Hi, I am looking for help on how to configure the latest tagged code - v1.0.0-alpha5 to target and run v1.0.0-alpha3 [basically run current SDK in backward compatible Fabric V1.1.0 release mode]. I am not able to correctly achieve this outcome - even after adjusting the .env and makefiles. Is there a document that I can use to achieve this outcome? Can you please point me to something anything? I am getting errors ranging from one of the org peers exiting abnormally, some docker images (baseos) not being found in docker hub and some of PKI folders not being found in the locations that crypto-config should be staged... Thank you in advance

Psingh (Wed, 15 May 2019 08:57:08 GMT):
Hey everyone. Did anyone face similar issue? ``` Unable to install and instantiate the chaincode: failed to instantiate the chaincode: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Chaincode status Code: (500) UNKNOWN. Description: error starting container: error starting container: Post http://unix.sock/containers/create?name=firstproject-peer0.org1.firstproject.com-firstproject-0: dial unix /host/var/run/docker.sock: connect: no such file or directory ```

Psingh (Wed, 15 May 2019 16:51:14 GMT):
Can someone please help me with below issue? ``` Channel created Channel joined Initialization Successful ccPkg created Chaincode installed Value of ccPolicy is: rule: > > identities: [fabsdk/fab] 2019/05/15 16:38:23 UTC - dispatcher.(*Dispatcher).HandleConnectEvent -> WARN error creating connection: could not connect to grpcs://localhost:8053: dialing connection timed out [localhost:8053] Unable to install and instantiate the chaincode: failed to instantiate the chaincode: error registering for TxStatus event: could not create client conn: could not connect to grpcs://localhost:8053: dialing connection timed out [localhost:8053] ``` config.yaml file: https://ideone.com/rkyWfs

spmcnamara (Wed, 15 May 2019 18:12:36 GMT):
@Psingh Have you confirmed that peer1 is up and running properly? If you connect to that container, can you see the process listening on port 8053?

spmcnamara (Wed, 15 May 2019 18:17:08 GMT):
Also, do you really want to change the port configuration for that particular container, or do you want to change the port-mapping that docker uses to expose that container? You are doing the former, but I think you might really want to do the latter (but not sure.)

Psingh (Thu, 16 May 2019 04:24:32 GMT):
@spmcnamara `docker ps` status ``` ghostrider@ghostriger:~/GoWorkspace/src/github.com/hyperledger/firstproject$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 77fad5209589 firstproject-peer0.org1.firstproject.com-firstproject-0-401490ddec0eeb87b750628fc894ca953fabcce974bb6cb33944051554f02c20 "chaincode -peer.add…" 12 hours ago Up 12 hours firstproject-peer0.org1.firstproject.com-firstproject-0 5e9134b544d5 firstproject-peer1.org1.firstproject.com-firstproject-0-86b74d4e90dda3416d5384521c4a5220cc15d3fbf66bc9365d6f848375089d31 "chaincode -peer.add…" 12 hours ago Up 12 hours firstproject-peer1.org1.firstproject.com-firstproject-0 f7a544e4cca6 hyperledger/fabric-peer:1.4.1 "peer node start" 12 hours ago Up 12 hours 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.firstproject.com a04da06a7a81 hyperledger/fabric-peer:1.4.1 "peer node start" 12 hours ago Up 12 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.firstproject.com 1ec15eeb74f0 hyperledger/fabric-ca:1.4.1 "sh -c 'fabric-ca-se…" 12 hours ago Up 12 hours 0.0.0.0:7054->7054/tcp ca.org1.firstproject.com 99a4db3fac47 hyperledger/fabric-orderer:1.4.1 "orderer" 12 hours ago Up 12 hours 0.0.0.0:7050->7050/tcp orderer.firstproject.com ```

Psingh (Thu, 16 May 2019 04:24:32 GMT):
@spmcnamara `docker ps` status ``` ghostrider@ghostriger:~/GoWorkspace/src/github.com/hyperledger/firstproject$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 77fad5209589 firstproject-peer0.org1.firstproject.com-firstproject-0-401490ddec0eeb87b750628fc894ca953fabcce974bb6cb33944051554f02c20 "chaincode -peer.add…" 12 hours ago Up 12 hours firstproject-peer0.org1.firstproject.com-firstproject-0 5e9134b544d5 firstproject-peer1.org1.firstproject.com-firstproject-0-86b74d4e90dda3416d5384521c4a5220cc15d3fbf66bc9365d6f848375089d31 "chaincode -peer.add…" 12 hours ago Up 12 hours firstproject-peer1.org1.firstproject.com-firstproject-0 f7a544e4cca6 hyperledger/fabric-peer:1.4.1 "peer node start" 12 hours ago Up 12 hours 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.firstproject.com a04da06a7a81 hyperledger/fabric-peer:1.4.1 "peer node start" 12 hours ago Up 12 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.firstproject.com 1ec15eeb74f0 hyperledger/fabric-ca:1.4.1 "sh -c 'fabric-ca-se…" 12 hours ago Up 12 hours 0.0.0.0:7054->7054/tcp ca.org1.firstproject.com 99a4db3fac47 hyperledger/fabric-orderer:1.4.1 "orderer" 12 hours ago Up 12 hours 0.0.0.0:7050->7050/tcp orderer.firstproject.com ``` docker-compose.yaml for peer1 ``` peer1.org1.firstproject.com: container_name: peer1.org1.firstproject.com extends: file: peer-base.yaml service: peer-base environment: - CORE_PEER_NETWORKID=firstproject - CORE_PEER_ID=peer1.org1.firstproject.com - CORE_PEER_ADDRESSAUTODETECT=true - CORE_PEER_ADDRESS=peer1.org1.firstproject.com:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.firstproject.com:7051 - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - CORE_PEER_TLS_SERVERHOSTOVERRIDE=peer1.org1.firstproject.com #- CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.firstproject.com:7052 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.firstproject.com:7051 volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/org1.firstproject.com/peers/peer1.org1.firstproject.com/msp:/var/hyperledger/msp - ./crypto-config/peerOrganizations/org1.firstproject.com/peers/peer1.org1.firstproject.com/tls:/var/hyperledger/tls ports: - 8051:7051 #- 8052:7052 - 8053:7053 depends_on: - orderer.firstproject.com ```

Psingh (Thu, 16 May 2019 04:24:32 GMT):
@spmcnamara `docker ps` status ``` ghostrider@ghostriger:~/GoWorkspace/src/github.com/hyperledger/firstproject$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 77fad5209589 firstproject-peer0.org1.firstproject.com-firstproject-0-401490ddec0eeb87b750628fc894ca953fabcce974bb6cb33944051554f02c20 "chaincode -peer.add…" 12 hours ago Up 12 hours firstproject-peer0.org1.firstproject.com-firstproject-0 5e9134b544d5 firstproject-peer1.org1.firstproject.com-firstproject-0-86b74d4e90dda3416d5384521c4a5220cc15d3fbf66bc9365d6f848375089d31 "chaincode -peer.add…" 12 hours ago Up 12 hours firstproject-peer1.org1.firstproject.com-firstproject-0 f7a544e4cca6 hyperledger/fabric-peer:1.4.1 "peer node start" 12 hours ago Up 12 hours 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.firstproject.com a04da06a7a81 hyperledger/fabric-peer:1.4.1 "peer node start" 12 hours ago Up 12 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.firstproject.com 1ec15eeb74f0 hyperledger/fabric-ca:1.4.1 "sh -c 'fabric-ca-se…" 12 hours ago Up 12 hours 0.0.0.0:7054->7054/tcp ca.org1.firstproject.com 99a4db3fac47 hyperledger/fabric-orderer:1.4.1 "orderer" 12 hours ago Up 12 hours 0.0.0.0:7050->7050/tcp orderer.firstproject.com ``` docker-compose.yaml for peer1 ``` peer1.org1.firstproject.com: container_name: peer1.org1.firstproject.com extends: file: peer-base.yaml service: peer-base environment: - CORE_PEER_NETWORKID=firstproject - CORE_PEER_ID=peer1.org1.firstproject.com - CORE_PEER_ADDRESSAUTODETECT=true - CORE_PEER_ADDRESS=peer1.org1.firstproject.com:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.firstproject.com:7051 - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - CORE_PEER_TLS_SERVERHOSTOVERRIDE=peer1.org1.firstproject.com #- CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.firstproject.com:7052 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.firstproject.com:7051 volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/org1.firstproject.com/peers/peer1.org1.firstproject.com/msp:/var/hyperledger/msp - ./crypto-config/peerOrganizations/org1.firstproject.com/peers/peer1.org1.firstproject.com/tls:/var/hyperledger/tls ports: - 8051:7051 #- 8052:7052 - 8053:7053 depends_on: - orderer.firstproject.com ``` this is when I ran the command second time. I mean sometimes 7053 stops working too. ``` Value of ccPolicy is: rule: > > identities: [fabsdk/fab] 2019/05/16 08:56:16 UTC - dispatcher.(*Dispatcher).HandleConnectEvent -> WARN error creating connection: could not connect to grpcs://localhost:7053: dialing connection timed out [localhost:7053] Unable to install and instantiate the chaincode: failed to instantiate the chaincode: error registering for TxStatus event: could not create client conn: could not connect to grpcs://localhost:7053: dialing connection timed out [localhost:7053] ```

vikas.kundz (Thu, 16 May 2019 04:31:06 GMT):
Has joined the channel.

mahoney1 (Thu, 16 May 2019 10:27:55 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call - be great to hear from you later ! 🙂 regards Paul

spmcnamara (Thu, 16 May 2019 16:42:57 GMT):
@Psingh Can you run "netstat -a|grep 7053"

spmcnamara (Thu, 16 May 2019 17:45:42 GMT):
Better yet, just grep LISTEN and look at all those ports.

spmcnamara (Thu, 16 May 2019 17:48:41 GMT):
Based on your config, the event service for peer1 should be listening on port 8053 on your machine. That means your other instances/services should be attempting to talk to port 8053 when sending events.

Psingh (Fri, 17 May 2019 04:52:32 GMT):
@spmcnamara All the ports are listening but using ipv6 address. ``` tcp6 0 0 :::7050 :::* LISTEN - tcp6 0 0 :::7051 :::* LISTEN - tcp6 0 0 :::7053 :::* LISTEN - tcp6 0 0 :::7054 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - tcp6 0 0 :::8051 :::* LISTEN - tcp6 0 0 :::8053 :::* LISTEN - ```

Psingh (Fri, 17 May 2019 04:52:32 GMT):
@spmcnamara All the ports are listening but using ipv6 address. don't know why ``` tcp6 0 0 :::7050 :::* LISTEN - tcp6 0 0 :::7051 :::* LISTEN - tcp6 0 0 :::7053 :::* LISTEN - tcp6 0 0 :::7054 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - tcp6 0 0 :::8051 :::* LISTEN - tcp6 0 0 :::8053 :::* LISTEN - ```

Psingh (Fri, 17 May 2019 08:34:44 GMT):
@spmcnamara got it

spmcnamara (Fri, 17 May 2019 13:56:37 GMT):
@Psingh :thumbsup:

spmcnamara (Fri, 17 May 2019 19:04:48 GMT):
Can anyone tell me what the trick is in SDK client code to bump up the logging level (or find the logging output) from the SDK logger - guessing it's going to stderr, but is set too high to have any output. I've tried logger.SetLevel("", logging.DEBUG) at the start of my client code, but it doesn't appear to have any effect.

spmcnamara (Fri, 17 May 2019 19:08:44 GMT):
^^ nevermind. I just found the config file parameter..

kopaygorodsky (Sat, 18 May 2019 15:45:08 GMT):
Is there any chance to implement own KeyStore for fabric sdk? There is possibility to get own crypto suite with keystore, but it's not possible to implement the interface because it is internal pkg. Does anyone have a clue? https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/cryptosuite/bccsp/sw/cryptosuiteimpl.go#L59

habpygo (Tue, 21 May 2019 11:32:22 GMT):
Hi, For your info + solution for those running into the same (weird) problem. I get/got this error when building my application ``` ../github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string) ``` in the method `func (s *System) startMetricsTickers() error {…}` Solution: I had to change in the file `system.go` line 227 from `go s.statsd.SendLoop(s.sendTicker.C, network, address)` to `go s.statsd.SendLoop(nil, s.sendTicker.C, network, address)`, i.e. insert nil as first param. to get it to work again. Seems I’m working with a different version of `kitstatsd "github.com/go-kit/kit/metrics/statsd”` because I had to install `github.com/go-kit/…` manually after having a battle with Go Modules (long story).

Psingh (Tue, 21 May 2019 15:30:23 GMT):
There is an alternative to this @habpygo . I think its not a nice idea to edit fabric source code. you can try solution 1 : https://stackoverflow.com/questions/55811937/getting-error-not-enough-arguments-in-call-to-s-statsd-sendloop-when-running

nyet (Tue, 21 May 2019 15:39:03 GMT):
I managed to get both dep and modules working fine so avoided having to edit anything.

rootDistress (Wed, 22 May 2019 05:48:34 GMT):
The go-kit changed the function parameters, You could git reset go-kit repo to an earlier version that was comparable with fabric.

habpygo (Wed, 22 May 2019 07:43:10 GMT):
Thanks @Psingh - @rootDistress, that did the trick. I downgraded to v0.8.0 and changed the params back to 3.

Psingh (Wed, 22 May 2019 07:53:38 GMT):
:thumbsup:

lorenzofang (Thu, 23 May 2019 03:47:23 GMT):
Has joined the channel.

cryptog (Thu, 23 May 2019 14:32:02 GMT):
Has joined the channel.

DiogoPalermo (Fri, 24 May 2019 11:51:23 GMT):
Has joined the channel.

DiogoPalermo (Fri, 24 May 2019 11:51:33 GMT):
hello All, i am building a smartcontract and i am creating a query to find my data.. until now everything is ok, but now i want to sort this field and i am receiving an error that i don't have an index to do so ... anyone knows how i create this index using GoLang ? this is my current query: { "selector":{"price":{ "$lte": 0.35}}, "sort": ["price"] } this is the response: { "error": { "message": "GET_QUERY_RESULT failed: transaction ID: 6d921f7b84664df2739eea607e58855d5a1c81f5d93fbc0005eb30b0c9ce3852: error handling CouchDB request. Error:no_usable_index, Status Code:400, Reason:No index exists for this sort, try indexing by the sort fields.", "code": "CustomError", "status": 500 } }

dave.enyeart (Fri, 24 May 2019 12:42:21 GMT):
You can include a CouchDB index with your chaincode, see https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html#create-an-index

dave.enyeart (Fri, 24 May 2019 12:42:21 GMT):
@DiogoPalermo You can include a CouchDB index with your chaincode, see https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html#create-an-index

Psingh (Mon, 27 May 2019 06:07:33 GMT):
How to expose chaincode api as REST with fabric-go-sdk?

phantom.assasin (Mon, 27 May 2019 10:53:14 GMT):
Has left the channel.

periodic (Mon, 27 May 2019 11:19:55 GMT):
Hi, I'm developing app using fabric-sdk-go, seems it works normal with one peer (any of 3 deployed pees in my network) in config file (with almost default options), but when I add several peers into config file from time to time I've got error on response "Discovery status Code: (11) UNKNOWN. Description: error getting endorsers: no endorsement combination can be satisfied". What does it mean?

nyet (Mon, 27 May 2019 19:52:33 GMT):
Write a REST interpreter that converts them to chaincode calls.

RodrigoMedeiros (Wed, 29 May 2019 17:16:37 GMT):
Has joined the channel.

medikent (Wed, 29 May 2019 20:16:07 GMT):
There is some very non-obvious behavior when reading in the certificates necessary to start up an app that uses the Fabric Go SDK client. I am curious as to whether the behavior is intentional or not. I'd love to submit a pull request if we think there is room for improvement here. The user "...cert.pem" file has to be very specifically named, including the '@' symbol in the name like "User1@example.org-cert.pem", otherwise the SDK client fails to start. What is the rationale for this behavior?

nyet (Wed, 29 May 2019 20:20:50 GMT):
I'm not sure if MSPs are supposed to be allowed to have more than one cert in `signcerts/`... if not, it would make sense to just glob for a file. A lot of the MSP filename handling is kinda crazy; see also what happens when you enroll as a tls user :/

benjaminverhaegen (Thu, 30 May 2019 13:21:26 GMT):
Has joined the channel.

benjaminverhaegen (Thu, 30 May 2019 13:21:28 GMT):
Can somebody tell me how to use optional fields in a struct in Go?

mahoney1 (Thu, 30 May 2019 15:52:30 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

robertbrown (Thu, 30 May 2019 16:59:03 GMT):
Has joined the channel.

vb2605 (Sat, 01 Jun 2019 07:17:32 GMT):
Has joined the channel.

hanubc7743 (Sat, 01 Jun 2019 11:58:41 GMT):
Has joined the channel.

Nishanth92 (Mon, 03 Jun 2019 06:48:57 GMT):
Has joined the channel.

root10 (Thu, 06 Jun 2019 14:07:31 GMT):
Has joined the channel.

root10 (Thu, 06 Jun 2019 14:07:33 GMT):
Hi guys. I have a problem invoking chaincode. I'm running a lot of insert using goroutine. I've tried with 10.000 without problem, but if I try 25.000, some requests are lost giving me back this error: [fabsdk/fab] 2019/06/06 13:29:47 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = DeadlineExceeded desc = context deadline exceeded] [fabsdk/util] 2019/06/06 13:29:47 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded. Will retry again later

root10 (Thu, 06 Jun 2019 14:07:33 GMT):
Hi guys. I have a problem invoking chaincode. I'm running a lot of insert using goroutine. I've tried with 10.000 without problem, but if I try 25.000, some requests are lost giving me back this error: [fabsdk/fab] 2019/06/06 13:29:47 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = DeadlineExceeded desc = context deadline exceeded] [fabsdk/util] 2019/06/06 13:29:47 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded. Will retry again later This is block configuration: ```yaml BatchTimeout: 2s BatchSize: MaxMessageCount: 100 AbsoluteMaxBytes: 99 MB PreferredMaxBytes: 512 KB ```

root10 (Thu, 06 Jun 2019 14:07:33 GMT):
Hi guys. I have a problem invoking chaincode. I'm running a lot of insert using goroutine. I've tried with 10.000 without problem, but if I try 25.000, some requests are lost giving me back this error: [fabsdk/fab] 2019/06/06 13:29:47 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = DeadlineExceeded desc = context deadline exceeded] [fabsdk/util] 2019/06/06 13:29:47 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (4) DeadlineExceeded. Description: context deadline exceeded. Will retry again later This is block configuration: ```yaml Orderer: &OrdererDefaults OrdererType: solo BatchTimeout: 2s BatchSize: MaxMessageCount: 100 AbsoluteMaxBytes: 99 MB PreferredMaxBytes: 512 KB ```

root10 (Thu, 06 Jun 2019 14:09:07 GMT):
Have I to configure the network in a different way? Thanks

narendranathreddy (Sun, 09 Jun 2019 08:36:35 GMT):
Has joined the channel.

narendranathreddy (Sun, 09 Jun 2019 08:36:36 GMT):
Hello @root10 its clear that those error messages are from grpc client which means peer taking long time to complete a particular task i grpc we define if a server take too much time it will wait for a particular time and through deadline exceed error

inceptchain (Sun, 09 Jun 2019 18:32:06 GMT):
Has joined the channel.

inceptchain (Sun, 09 Jun 2019 18:32:07 GMT):
hi all, I keep getting these errors when I run the 'make' command

inceptchain (Sun, 09 Jun 2019 18:32:09 GMT):
I got these errors: pkg/fab/resource/configtxmsp.go:61:3: shadow: declaration of "err" shadows declaration at line 43 (govet) err := generateCertDir(filepath.Join(mspDir, d.dir), d.certs) ^ pkg/fab/resource/configtx.go:51:1: comment on exported function CreateGenesisBlockForOrderer should be of the form CreateGenesisBlockForOrderer ... (golint) // CreateGenesisBlock creates a genesis block for a channel ^ pkg/fab/resource/configtxmsp.go:25:2: keystore is unused (varcheck) keystore = "keystore" ^ pkg/fab/resource/configtxmsp.go:28:2: configfilename is unused (varcheck) configfilename = "config.yaml" ^ pkg/fab/resource/configtxmsp.go:24:2: signcerts is unused (varcheck) signcerts = "signcerts" ^ pkg/fab/resource/configtxmsp.go:71: G301: Expect directory permissions to be 0750 or less (gosec) err := os.MkdirAll(certDir, 0755) Makefile:292: recipe for target 'unit-test' failed make: *** [unit-test] Error 1 go version 1.12.3 latest clone of the go-sdk the integration test works fine its the unit-test thats giving me problems

inceptchain (Sun, 09 Jun 2019 19:37:39 GMT):
also getting this error when I run my own network etc.. I have been trying to figure this out for a week, with not success :(

inceptchain (Sun, 09 Jun 2019 19:37:42 GMT):
[fabsdk/fab] 2019/06/09 19:35:54 UTC - txn.sendBroadcast -> DEBU Receive Error Response from orderer: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer0.vitalnotes.com:7100]

bhemeswararaoankireddy (Mon, 10 Jun 2019 06:36:44 GMT):
Has joined the channel.

bhemeswararaoankireddy (Mon, 10 Jun 2019 06:46:20 GMT):

Clipboard - June 10, 2019 12:16 PM

mtng (Mon, 10 Jun 2019 09:11:13 GMT):
Hi, everytime I instantiate a chaincode I have the following format in the name of the docker container: dev-peer0.org1.example.com-mycc-0-7d45bb258665f9d477eb6ada737ace604f82820d22fce4b90b3e7e3c9f8a65dc , is it possible to change this format? For example I would like to have as a container and image name "peer0.org1.example.com-mycc:0"

bbonetee (Mon, 10 Jun 2019 14:08:57 GMT):
Has joined the channel.

tommyjay (Mon, 10 Jun 2019 20:55:07 GMT):
@inceptchain are you pointing to https://github.com/hyperledger/fabric-sdk-go

ghatdev (Tue, 11 Jun 2019 13:24:59 GMT):
Has joined the channel.

ghatdev (Tue, 11 Jun 2019 13:29:24 GMT):
Hello! I have a question about fabric Event. After fabric 1.1.*, payload sent with SetEvent(eventName, Payload) is always empty. How can I receive the payload?

smithbk (Tue, 11 Jun 2019 18:58:37 GMT):
Has left the channel.

luckforzhang (Thu, 13 Jun 2019 09:58:10 GMT):
Has joined the channel.

luckforzhang (Thu, 13 Jun 2019 09:58:11 GMT):
Emm, I am trying to understand the structure of this fabric-sdk-go project. So umm, why is there a `internal folder` and a `third_party folder`? It's very confuse, and get all mess up with the dependencies in the code. I am trying to get it to adjust some other crypto algorithm, but these two "amazing" folder just stay on my way and stare with me like : "You know nothing about dependencies." XD

luckforzhang (Thu, 13 Jun 2019 09:58:11 GMT):
Emm, I am trying to understand the structure of this fabric-sdk-go project. So umm, why is there a `internal folder` and a `third_party folder`? It's very confused, also has got all mess up with the dependencies in the code. I was just trying to get it to adjust some other crypto algorithm, but these two "amazing" folders just stay in my way and stare with me like : "You know nothing about dependencies." XD

Charles99 (Thu, 13 Jun 2019 16:05:11 GMT):
Has joined the channel.

KaseyAlusi (Thu, 13 Jun 2019 23:37:38 GMT):
Hi all, we are seeing an issue with the SDK where we get errors for a specific node endpoint when connecting to the orderer node, but the config we pass in does not even have the hostname in the error message. For example (fake endpoints): ``` CreateAndSendTransaction failed: SendTransaction failed: calling orderer 'nd-foo.m-bar.n-baz.com:30001' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [nd-foo.m-bar.n-baz.com:30001] ``` But the orderer endpooint that we specify points to a load balancer: orderer.n-baz.com From the perspective of the client, there is no way we can even get the `nd-foo` or `m-bar` values, so it seems like the SDK is resolving the nodes behind the loadbalancer. Does anyone know how this might be happening or if there is a way to prevent the resolution?

KaseyAlusi (Thu, 13 Jun 2019 23:37:38 GMT):
Hi all, we are seeing an issue with the SDK where we get errors for a specific node endpoint when connecting to the orderer node, but the config we pass in does not even have the hostname in the error message. For example (fake endpoints): ``` CreateAndSendTransaction failed: SendTransaction failed: calling orderer 'nd-foo.m-bar.n-baz.com:30001' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [nd-foo.m-bar.n-baz.com:30001] ``` But the orderer endpooint that we specify points to a load balancer: orderer.n-baz.com:3001 From the perspective of the client, there is no way we can even get the `nd-foo` or `m-bar` values, so it seems like the SDK is resolving the nodes behind the loadbalancer. Does anyone know how this might be happening or if there is a way to prevent the resolution?

nyet (Thu, 13 Jun 2019 23:44:07 GMT):
That seems unlikely. I dont think the endpoints are encoded anywhere in the communications itself. What sort of loadbalancer is there? It isn't as if you can run mroe than one orderer behind a conventional load balancer.

nyet (Thu, 13 Jun 2019 23:44:38 GMT):
the only place endpoints are encoded is in the anchor peer section of a channel config block

nyet (Thu, 13 Jun 2019 23:44:53 GMT):
and those are peers, not orderers

nyet (Thu, 13 Jun 2019 23:45:38 GMT):
oops. no, that isn't true. the order hostname is in the system channel config block

KaseyAlusi (Fri, 14 Jun 2019 00:02:25 GMT):
Unfortunately I don't know much about the orderer loadbalancer. For what its worth, this is using the AWS Managed Blockchain with Fabric.

nyet (Fri, 14 Jun 2019 00:02:47 GMT):
thats definitely going to be an AWS question then.

nyet (Fri, 14 Jun 2019 00:03:12 GMT):
you'll have to bring it up with them. The orderer shouldn't be behind a loadbalacer in the first place.

KaseyAlusi (Fri, 14 Jun 2019 00:38:07 GMT):
@nyet Thank you for the help! I appreciate it!

pvrbharg (Fri, 14 Jun 2019 14:55:50 GMT):
hi everyone, hope you can help me! thank you in advance. I have instrumented example_cc in fabric-cli's chaincode sample with Prometheus metrics using Prometheus Go Client side library and verified it to be working correctly - natively. When I try to run this chaincode in a container form however - I am getting instantiate step fail due to Prometheus client side library packages being not found. I tried doing vendoring but still the library calls are not being resolved [Fabric CLI is a sample command-line interface built using Fabric SDK GO]. I am hoping someone can point me to correct path. I am getting the following errors, coming from deploy step of one of peer containers: +++ hlbcadmin@ubuntu:~/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli$ go run fabric-cli.go chaincode instantiate --cid orgchannel --ccp=github.com/securekey/example_cc --ccid ExampleCC --v v0 --args '{"Args":["A","1","B","2"]}' --policy "AND('Org1MSP.member','Org2MSP.member')" --config ../../test/fixtures/config/config_test_local.yaml [fabriccli] 2019/06/12 13:06:05 UTC - chaincode.glob..func4 -> ERRO Error while running instantiateAction: error instantiating chaincode: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Chaincode status Code: (500) UNKNOWN. Description: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/securekey/example_cc/example_cc.go:27:5: cannot find package "github.com/prometheus/client_golang/prometheus" in any of: /opt/go/src/github.com/prometheus/client_golang/prometheus (from $GOROOT) /chaincode/input/src/github.com/prometheus/client_golang/prometheus (from $GOPATH) /opt/gopath/src/github.com/prometheus/client_golang/prometheus chaincode/input/src/github.com/securekey/example_cc/example_cc.go:29:2: cannot find package "github.com/prometheus/client_golang/prometheus/promauto" in any of: /opt/go/src/github.com/prometheus/client_golang/prometheus/promauto (from $GOROOT) /chaincode/input/src/github.com/prometheus/client_golang/prometheus/promauto (from $GOPATH) /opt/gopath/src/github.com/prometheus/client_golang/prometheus/promauto chaincode/input/src/github.com/securekey/example_cc/example_cc.go:28:5: cannot find package "github.com/prometheus/client_golang/prometheus/promhttp" in any of: /opt/go/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOROOT) /chaincode/input/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOPATH) /opt/gopath/src/github.com/prometheus/client_golang/prometheus/promhttp " +++ Thanks

KaseyAlusi (Fri, 14 Jun 2019 16:05:59 GMT):
Have you tried running `go get -u github.com/prometheus/client_golang/prometheus`?

pvrbharg (Fri, 14 Jun 2019 17:44:25 GMT):
Yes - I did and the three following per Prometheus guide go get github.com/prometheus/client_golang/prometheus go get github.com/prometheus/client_golang/prometheus/promauto go get github.com/prometheus/client_golang/prometheus/promhttp

pvrbharg (Fri, 14 Jun 2019 17:44:53 GMT):
This is the URL I am using and the reference sample - https://prometheus.io/docs/guides/go-application/

hanubc7743 (Fri, 14 Jun 2019 18:03:32 GMT):
Hi Anyone please suggest me which SDK is best for development?

troyronda (Fri, 14 Jun 2019 20:59:33 GMT):
@pvrbharg @bstasyszyn That project defines Go Modules. I would use GO111MODULE=on if you are working in the GoPath with this project.

nyet (Fri, 14 Jun 2019 21:21:33 GMT):
incidentally, @troyronda im still having issues building chaincoide my fabric-sdk-go based progject outside go path using modules.

nyet (Fri, 14 Jun 2019 21:21:33 GMT):
incidentally, @troyronda im still having issues building chaincode in my fabric-sdk-go based progect outside go path using modules.

nyet (Fri, 14 Jun 2019 21:22:24 GMT):
i can build my app in and outside but launching chaincode has issues unless i fall back to doing it all w/o modules

nyet (Fri, 14 Jun 2019 21:23:06 GMT):
i've been meaning to track down the problem but have been inundated with other stuff; are there known issues with the tags?

pvrbharg (Fri, 14 Jun 2019 23:20:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Zkz9nTvX6Puh5C8vn)
2019-06-14_19-16-58-ChaincodeContainerNotFindingGoLangPrometheusLibraryPackages.png

pvrbharg (Fri, 14 Jun 2019 23:28:10 GMT):
I must be missing something here. The project compiles fine and runs fine natively. I can scrape the metrics and wire the details on to Grafana dashboard panes/widgets. When I run the tested chaincode inside container - spun by peers - things go incorrectly. I am using the Go Module package resolution with semver management scheme. It is working correctly as I expect - based on my limited but just-in-time learnt concepts [Ryan Cox's/Tylor Bui et al https://blog.golang.org/using-go-modules and related wiki - https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away] content. Please share your wisdom and I am happy to share my project.

nyet (Sat, 15 Jun 2019 01:44:20 GMT):
I am having similar issues with modules inside of chaincode, fwiw

nyet (Sat, 15 Jun 2019 01:44:45 GMT):
and i also tried modules with vendoring

nyet (Sat, 15 Jun 2019 01:46:07 GMT):
I suspect part of the probllem might be "Note that only the main module's top-level vendor directory is used; vendor directories in other locations are still ignored."

pvrbharg (Sat, 15 Jun 2019 12:25:40 GMT):
@nyet Yes, I agree with your read and I am reading the same at this URL - https://tip.golang.org/cmd/go/#hdr-Modules_and_vendoring. Perhaps keeping the vendor directory at the top level and using go build -mod=vendor may be the key - however this could potentially require code change inside fabricsdkgo to passin the above build option - given peer spins up a build container to build the image that contains fabric shim + chaincode and stands up this image as a chaincode container that can work with its parent peer. As of now - I need to investigate what build command is being used by the docker daemon to build the image of chaincode container - programmatically - when the deploy operation takes place as part of lscc flow [at the time of instantiate invocation]. We need to use the build command to be as indicated above go build -mod=vendor with vendor dependent packages being staged at the root. Details here under modules and vendoring heading - https://tip.golang.org/cmd/go/#hdr-Modules_and_vendoring. Thanks.

pvrbharg (Sat, 15 Jun 2019 17:25:02 GMT):
@nyet @troyronda Expanding on my previous comment - "fabric/core/chaincode/platforms/util/utils.go -> DockerBuild function uses the go build command and this may need to be configurable [such as go build -mod=vendor]" - from fabric-sdk-go when we try to use vendoring? Perhaps you can share your thoughts and wisdom. I can also check with our fabric repo developers to see if this cmd is configurable or if so how... Thanks.

nyet (Sat, 15 Jun 2019 18:28:54 GMT):
Unfortunately that may not help if dependencies of dependencies are not vendored. I suspect module support in a sandbox may be more difficult than it looks. The module system was not really meant for this. Incidentally this problem affects some CI workflows as well. I think the whole module architecture may have many unintended consequences.

pvrbharg (Sat, 15 Jun 2019 22:36:02 GMT):
hi everyone, hope you can help me! thank you in advance. I have instrumented example_cc in fabric-cli's chaincode sample with Prometheus metrics using Prometheus Go Client side library and verified it to be working correctly - natively. When I try to run this chaincode in a container form however - I am getting instantiate step fail due to Prometheus client side library packages being not found. I tried doing vendoring but still the library calls are not being resolved [Fabric CLI is a sample command-line interface built using Fabric SDK GO]. I am hoping someone can point me to correct path. I am getting the following errors, coming from deploy step of one of peer containers: +++ hlbcadmin@ubuntu:~/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli$ go run fabric-cli.go chaincode instantiate --cid orgchannel --ccp=github.com/securekey/example_cc --ccid ExampleCC --v v0 --args '{"Args":["A","1","B","2"]}' --policy "AND('Org1MSP.member','Org2MSP.member')" --config ../../test/fixtures/config/config_test_local.yaml [fabriccli] 2019/06/12 13:06:05 UTC - chaincode.glob..func4 -> ERRO Error while running instantiateAction: error instantiating chaincode: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Chaincode status Code: (500) UNKNOWN. Description: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/securekey/example_cc/example_cc.go:27:5: cannot find package "github.com/prometheus/client_golang/prometheus" in any of: /opt/go/src/github.com/prometheus/client_golang/prometheus (from $GOROOT) /chaincode/input/src/github.com/prometheus/client_golang/prometheus (from $GOPATH) /opt/gopath/src/github.com/prometheus/client_golang/prometheus chaincode/input/src/github.com/securekey/example_cc/example_cc.go:29:2: cannot find package "github.com/prometheus/client_golang/prometheus/promauto" in any of: /opt/go/src/github.com/prometheus/client_golang/prometheus/promauto (from $GOROOT) /chaincode/input/src/github.com/prometheus/client_golang/prometheus/promauto (from $GOPATH) /opt/gopath/src/github.com/prometheus/client_golang/prometheus/promauto chaincode/input/src/github.com/securekey/example_cc/example_cc.go:28:5: cannot find package "github.com/prometheus/client_golang/prometheus/promhttp" in any of: /opt/go/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOROOT) /chaincode/input/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOPATH) /opt/gopath/src/github.com/prometheus/client_golang/prometheus/promhttp " +++ Thanks

pvrbharg (Sun, 16 Jun 2019 15:12:58 GMT):
@nyet Dear nyet - you are proven correct and I tried with go build -mod=vendor - where all vendoring is needed per my understanding and re-tried - still getting the same result as you suspected. In my current attempt - I recursively looked for where ever I have go.sum and go.mod files in the project tree, installed the prometheus, promauto, and promhttp libraries v1.0.0 by running go get commands, verified that go.mod and go.sum files are correctly updated, used these libraries in example_cc with instrumentation and attempted to re-ram. Prior to these changes - I made sure - my baseline program worked and I also ran successfully example_cc_test.go - to make sure I am good. So your suspicion is proved good and I am underestimating potentially the effort involved here. THANK YOU in any case - for your sharing your skills and wisdom!

pvrbharg (Sun, 16 Jun 2019 15:13:35 GMT):

fabricsdkgo-vendoring-issue-June162019.txt

nyet (Sun, 16 Jun 2019 16:57:12 GMT):
Thank YOU for doing the work. Hopefully somebody can address this. You will probably want to open a JIRA ticket..

hanubc7743 (Sun, 16 Jun 2019 17:41:57 GMT):
Hi I am getting below error ./bin/configtxgen -profile OrdererGenesis -outputBlock ./channel-artifacts/genesis.block 2019-06-16 23:07:20.775 IST [common.tools.configtxgen] main -> WARN 001 Omitting the channel ID for configtxgen for output operations is deprecated. Explicitly passing the channel ID will be required in the future, defaulting to 'testchainid'. 2019-06-16 23:07:20.775 IST [common.tools.configtxgen] main -> INFO 002 Loading configuration 2019-06-16 23:07:20.788 IST [common.tools.configtxgen.localconfig] Load -> PANI 003 Error unmarshaling config into struct: 1 error(s) decoding: * '' has invalid keys: v1_1 2019-06-16 23:07:20.788 IST [common.tools.configtxgen] func1 -> PANI 004 Error unmarshaling config into struct: 1 error(s) decoding: * '' has invalid keys: v1_1 panic: Error unmarshaling config into struct: 1 error(s) decoding: * '' has invalid keys: v1_1 [recovered] panic: Error unmarshaling config into struct: 1 error(s) decoding: * '' has invalid keys: v1_1 goroutine 1 [running]: github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000121970, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x515 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc0000b2240, 0xc0002f9804, 0xc00009b1a0, 0x59, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc0000b2240, 0xc00009b1a0, 0x59, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79 github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc0000b2248, 0xc0002f9938, 0x1, 0x1) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x75 main.main.func1() /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:250 +0x1a9 panic(0xd4fc40, 0xc0003018e0) /opt/go/go1.11.1.linux.amd64/src/runtime/panic.go:513 +0x1b9 github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000121970, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x515 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc0000b2220, 0xc0002f9c04, 0xc00009b080, 0x59, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc0000b2220, 0xc00009b080, 0x59, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79 github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc0000b2228, 0xc0002f9d98, 0x2, 0x2) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x75 github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.Load(0x7ffeb116516d, 0xe, 0x0, 0x0, 0x0, 0x1) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:282 +0x580 main.main() /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:261 +0xb2f Anyone know any solution please?

pvrbharg (Sun, 16 Jun 2019 20:50:39 GMT):
@nyet Of course, we are engineers/problem solvers and we solve existing problems and create new ones, as we progress forward! You helped me too, hugely! Will do as you suggest and guide me. Cheers!

troyronda (Mon, 17 Jun 2019 13:12:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=88iFbfn4LxtnxwKR9) @firas.qutishat ^^

troyronda (Mon, 17 Jun 2019 13:14:13 GMT):
@nyet @pvrbharg Could you please summarize the issue? It sounds like you have a fabric-sdk-go based project using modules that has a chaincode in a subdirectory?

pvrbharg (Mon, 17 Jun 2019 13:22:18 GMT):
@troyronda I have a customer project that requires to deploy a chaincode that uses Prometheus instrumentation embedded in the chaincode using Prometheus Go language client side chaincode libraries. To prepare for this deployment - I tried using fabric-cli example project with Prometheus metrics instrumented. This is one of reference samples from fabric-sdk-go repo at https://github.com/securekey/fabric-examples/tree/master/fabric-cli/. I can get the example_cc.go to correctly work natively when I compile and run. However I can not get the dependencies resolved when I try to containerize this instrumented and modified example_cc.go program. This may be due to semver dependencies scheme introduced by Go release of v1.11 or later - perhaps. Here is where I need help. Hope this helps or please ask for more clarity and I would explain or webex or share my project. Thanks.

kakali (Tue, 18 Jun 2019 06:09:04 GMT):
cckit

root10 (Tue, 18 Jun 2019 11:18:53 GMT):
Hi guys. I need to enroll a user using tls. How I do it? Thanks

lesleyannj (Tue, 18 Jun 2019 15:40:23 GMT):
Has joined the channel.

nyet (Tue, 18 Jun 2019 18:24:06 GMT):
As in you want the ca to sign a tls key or you want to enable tls while talking to the ca server

hanubc7743 (Tue, 18 Jun 2019 19:53:34 GMT):
Hi Anybody know how to work with hyperledger fabric java sdk and ipfs?

BrajeshKumar (Wed, 19 Jun 2019 08:56:56 GMT):
Has joined the channel.

root10 (Wed, 19 Jun 2019 08:58:14 GMT):
@nyet the second one. I'm using ldap with CA. Without TLS, everything is working, but now I'm using it in all network. When I try to enroll the user, I get this error: ```bash enroll failed: enroll failed: POST failure of request: POST https://ca.example.com:7054/enroll\n{\"hosts\":null,\"certificate_request\":\ "-----BEGIN CERTIFICATE REQUEST----- ... -----END CERTIFICATE REQUEST----- Post https://ca.example.com:7054/enroll: x509: certificate signed by unknown authority" ```

erikleffler (Wed, 19 Jun 2019 11:44:23 GMT):
Has joined the channel.

erikleffler (Wed, 19 Jun 2019 11:44:25 GMT):
Hey guys, I'm trying to writing code using the go sdk to interact with a fabric ledger. Does anyone know of any good documentation/tutorial? I've had a look around but can't seem to find any resource that explains how to use the sdk, only examples. Thanks!

ASAPBLOCKY (Wed, 19 Jun 2019 13:26:18 GMT):
Has joined the channel.

hanubc7743 (Wed, 19 Jun 2019 17:46:36 GMT):
Hi Can we integrate oracle db instead of couch db in hyperledger fabric?

haardikkk (Wed, 19 Jun 2019 18:55:55 GMT):
Hey guys, I have a design question maybe you can help me with it. There are `Instituition` objects stored on the ledger, which represent peers/noderunners on the network. There are also `Agent`s and `Client`s with an `Agent` working for a specific `Instituition` and `Client` being the end user

haardikkk (Wed, 19 Jun 2019 18:56:01 GMT):
All these objects are on chain

haardikkk (Wed, 19 Jun 2019 18:56:18 GMT):
The Agents and Clients have two separate websites to do things on which both talk to the ledger

haardikkk (Wed, 19 Jun 2019 18:56:54 GMT):
Now, what is the best way I can manage identity? So far, I've been issuing certs to the Insituitions and have a database mapping (NOT blockchain) from Agent ID's (on chain IDs) to email/password combos

haardikkk (Wed, 19 Jun 2019 18:57:09 GMT):
a login system exists on the Agent website side which logs them in using their own internal DB and maps their profile to an ID on chain

haardikkk (Wed, 19 Jun 2019 18:57:24 GMT):
I havent yet figured out how to solve identity for Client

haardikkk (Wed, 19 Jun 2019 18:57:47 GMT):
Clients are not tied to a specific Instituition and may be involved with more than 1

haardikkk (Wed, 19 Jun 2019 18:58:25 GMT):
any ideas? tagging you @nyet sincce youve been helpful in the past

haardikkk (Wed, 19 Jun 2019 19:01:00 GMT):
What do you think about instead of using the DB to map Agent email/passwords to onchain IDs, I just store their email/passwords on chain as well

haardikkk (Wed, 19 Jun 2019 19:01:09 GMT):
I hash their email, and bcrypt their password

haardikkk (Wed, 19 Jun 2019 19:01:26 GMT):
so during a Login request, I can search for the hashed email and then use bcrypt to verify the password

erikleffler (Thu, 20 Jun 2019 10:02:15 GMT):
Hey, I'm trying to enroll users and write the private key and enrollment cert to a file for later use. The PrivateKey() method on the*msp.User struct returned from GetSigningIdentity returns an implementation of core.Key that does not allow the Bytes() method. I.e I am not able to retrieve the bytes of the private key. How would one get around this? Is there another best practice for enrolling new users and saving their cert + key?

PabloLalloni (Fri, 21 Jun 2019 13:21:46 GMT):
Has joined the channel.

PabloLalloni (Fri, 21 Jun 2019 13:23:33 GMT):
Hello! I'm new here, and recent newcomer to the Hyperledger universe. Is this the right place to ask questions as a developer?

PabloLalloni (Fri, 21 Jun 2019 13:34:35 GMT):
Ok, here I comes my first big question: when chaincode responds with an error we want to use Response.Payload to inform the client details about the problem (business stuff) so we're doing things like `return &peer.Response{Status:404, Payload:foo, Message:msg}` (foo being a rich problem report), ¿is this something allowed by design?

PabloLalloni (Fri, 21 Jun 2019 13:36:30 GMT):
We ceased to use the "factory method" `return shim.Error(msg)` because it only allows to set Response.Message as a string, and it was really awful to put something (say a JSON document) as a "message".

branh0913 (Fri, 21 Jun 2019 15:39:51 GMT):
Has joined the channel.

branh0913 (Fri, 21 Jun 2019 15:39:52 GMT):
Does anyone have a full working example of using the Go SDK for fabric-ca. I see that it uses the msp package, but the example is a little lacking

balazsprehoda (Mon, 24 Jun 2019 12:29:47 GMT):
Has joined the channel.

hendry19901990 (Mon, 24 Jun 2019 21:51:32 GMT):
Does anyone know about ```client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: rpc error``` ? I receive this error when I call invoke function, the transaction is created but it sends this error

spmcnamara (Tue, 25 Jun 2019 01:32:34 GMT):
Hi Guys. Stepping back to some code that I had working previously, but am getting the following error when I try to call Execute() on my channel client: `Chaincode status Code: (500) UNKNOWN. Description: Unknown function invoke` Using the peer command I can see that the chaincode is installed and instantiated. I'm really perplexed. Any suggestions/pointers?

hendry19901990 (Tue, 25 Jun 2019 14:05:28 GMT):
I think `Execute()` function has some issues

hendry19901990 (Tue, 25 Jun 2019 14:05:28 GMT):
I think `Invoke()` function has some issues

hendry19901990 (Tue, 25 Jun 2019 14:06:55 GMT):
@spmcnamara make sure after that error check if the state changed

hendry19901990 (Tue, 25 Jun 2019 14:07:56 GMT):
I've got the same error but after I call Query function and the state changed in the chaincode

spmcnamara (Tue, 25 Jun 2019 15:28:52 GMT):
I found my problem. Really dumb issue caused by a typo and some incorrectly formatted error messaging on my part. :-(

hendry19901990 (Tue, 25 Jun 2019 15:29:18 GMT):
:thumbsup:

tonyyang132 (Wed, 26 Jun 2019 06:49:51 GMT):
Has joined the channel.

mahoney1 (Thu, 27 Jun 2019 10:40:54 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

mrudav.shukla (Thu, 27 Jun 2019 16:27:41 GMT):
Has left the channel.

KaseyAlusi (Sun, 30 Jun 2019 17:08:35 GMT):
Does anyone know of a best-practices guide for go SDK lifecycle management? For example, is it better to create a new SDK per request and close it after? Is it better to maintain a pool of SDKs for each instance of the app and re-use them?

ewangplay (Tue, 02 Jul 2019 06:38:12 GMT):
Has joined the channel.

wunderbarb (Tue, 02 Jul 2019 17:30:46 GMT):
Has joined the channel.

wunderbarb (Tue, 02 Jul 2019 17:30:50 GMT):
Hi Everybody. I just joined. I have a blockchain working properly but using the "hand generated" crypto fixture. The peers, endoresers and couchdb run as docker in the cloud.

wunderbarb (Tue, 02 Jul 2019 17:30:50 GMT):
Hi Everybody. I just joined. I have a blockchain working properly but using the "hand generated" crypto fixture. The peers, endorser and couchdb run as docker in the cloud. My wallets are go-apps running on my computers using fabric-sdk-go. In the correspondinf config.yaml, I pointed the cryptoconfig.path of client to the loacl copy of the fixtures and organization.``` I have now implemented the same peers, couchdb but using fabric-ca. I was able to instantiate my chaincode queries by scripting via a docker cli. (I heavily adapted the fabric-ca example of fabric-samples v1.3) I want to use now fabric-sdk-go. What parameters should I provide to client.cryptoconfig.path and organizations.org1.cryptopath to benefit from fabric-ca? Is there a tutorial somewhere? ```

wunderbarb (Tue, 02 Jul 2019 18:42:45 GMT):
Which example are you citing?

wunderbarb (Tue, 02 Jul 2019 21:42:45 GMT):
THis is one if using Fabric 1.1.0 and is a little bit old. Nevertheless, it bootstrapped my development https://chainhero.io/2018/06/tutorial-build-blockchain-app-v1-1-0/

nyet (Tue, 02 Jul 2019 21:58:54 GMT):
this one is mine, maybe it will help https://github.com/Blockdaemon/hlf-database-app

wunderbarb (Tue, 09 Jul 2019 00:49:22 GMT):
Thanks Nyet. It uses more recent templates than the chainhero's posts. Thus useful. It was easy to instantiate my own chaincode on it. Great. Did you test it with the Enroll functions of fabric-sdk-go? I am experiencing some issues with TLS with the CA server. For instance, I had to add a url line in config.yaml. Still having some issue with certificate.

Psingh (Tue, 09 Jul 2019 05:27:47 GMT):
Hey everyone. Can someone please help me with below issue? ``` Unable to create channel: failed to save channel: create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: error validating channel creation transaction for new channel 'tradechannel', could not succesfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied [fabsdk/fab] 2019/07/09 05:20:43 UTC - orderer.(*Orderer).SendDeliver -> ERRO deliver failed [rpc error: code = DeadlineExceeded desc = context deadline exceeded] Unable to join channel: failed to make admin join channel: genesis block retrieval failed: deliver failed: rpc error: code = DeadlineExceeded desc = context deadline exceeded ```

nyet (Tue, 09 Jul 2019 05:46:03 GMT):
No, i have not tried the sdk enroll functions, i just use the fabric-ca-client for enroll

nyet (Tue, 09 Jul 2019 05:47:10 GMT):
Your signcert must be in the orderer system channel genesis block MSP admincerts/

Psingh (Wed, 10 Jul 2019 06:33:16 GMT):
hey Nye

Psingh (Wed, 10 Jul 2019 06:35:27 GMT):
@nyet I'm running below command to create a channel ``` root@23d33303256e:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer.trade.com:7050 -c tradechannel -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.co m/hyperledger/fabric/peer/crypto/ordererOrganizations/trade.com/orderers/orderer.trade.com/msp/tlscacerts/tlsca.trade.com-cert.pem ``` Is there anything wrong with it?

nyet (Wed, 10 Jul 2019 06:36:25 GMT):
No, but the error indicates the identity that is requesting channel creation is not an admin on the system channel of that orderer.

Psingh (Wed, 10 Jul 2019 06:41:32 GMT):
this is the snippet of my configtx.yaml file(one of the organizations) ``` - &ExporterOrg Name: ExporterOrg ID: ExporterMSP MSPDir: crypto-config/peerOrganizations/exporterorg.trade.com/msp Policies: Readers: Type: Signature Rule: "OR('ExporterMSP.admin', 'ExporterMSP.peer', 'ExporterMSP.client')" Writers: Type: Signature Rule: "OR('ExporterMSP.admin', 'ExporterMSP.client')" Admins: Type: Signature Rule: "OR('ExporterMSP.admin')" AnchorPeers: - Host: peer0.exporterorg.trade.com Port: 7051 ```

Psingh (Wed, 10 Jul 2019 06:42:53 GMT):
I think I'm missing `AdminPrincipal: Role.ADMIN` here?

Psingh (Wed, 10 Jul 2019 08:46:43 GMT):
how to inspect the content of genesis.block? i'm trying this command `../../bin/configtxgen -profile TwoOrgChannel -inspectBlock ./genesis.block` but it's showing below error ``` 2019-07-10 14:14:24.414 IST [common.tools.configtxgen] main -> INFO 001 Loading configuration 2019-07-10 14:14:24.415 IST [common.tools.configtxgen.localconfig] LoadTopLevel -> PANI 002 Error reading configuration: Unsupported Config Type "" 2019-07-10 14:14:24.416 IST [common.tools.configtxgen] func1 -> PANI 003 Error reading configuration: Unsupported Config Type "" panic: Error reading configuration: Unsupported Config Type "" [recovered] panic: Error reading configuration: Unsupported Config Type "" ```

mmulji (Wed, 10 Jul 2019 14:04:41 GMT):
Has joined the channel.

nyet (Wed, 10 Jul 2019 15:57:45 GMT):
@Psingh I think you should omit `-profile` or it will look for a config file.

nyet (Wed, 10 Jul 2019 15:58:23 GMT):
(yes the error reporting is atrocious)

Psingh (Wed, 10 Jul 2019 15:59:36 GMT):
actually there's a different command to inspect ti

Psingh (Wed, 10 Jul 2019 15:59:36 GMT):
actually there's a different command to inspect it something like configtxlator proto_decode --type common.Block --input genesis.block

nyet (Wed, 10 Jul 2019 16:00:26 GMT):
ya i could be wrong that was off the top of my head

nyet (Wed, 10 Jul 2019 16:00:34 GMT):
ah yes

nyet (Wed, 10 Jul 2019 16:01:17 GMT):
thats probably an old recommendation, since configtxgen always requires a config file and isn't good about telling you if you didn't supply one

Psingh (Wed, 10 Jul 2019 16:01:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RdCwa6uoEiPyZS6X3) I'm facing this issue with byfn mutli orgs setup too.

Psingh (Wed, 10 Jul 2019 16:02:28 GMT):
using hlf v1.4.1

mtng (Thu, 11 Jul 2019 10:01:02 GMT):
Hi, I have a hyperledger fabric testnet with 2 orgs and 2 peers per org. The peer0 of each organization is the anchor peer. I want to instantiate a chaincode with an endorsment policy with one organization Org1, so I specify the policy: "AND('org1MSP.member"). I have installed the chaincode in the peers of the org1 only, because org2 is not endorser. However, the chaincode doesn't instantiate because it sending the proposal to the peers that are in the other organization (org2). The logs are the following: { "error": "Error creating Chaincode: sending deploy transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [peer0.org2.example.com:8051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2) - Transaction processing for endorser [peer1.org2.example.com:6051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2)" } The problem is because these peers doesn't have the chaincode installed, but...why the SDK is sending the endorsement request to the peers that not belongs to the endorsement policy?

mtng (Thu, 11 Jul 2019 10:01:02 GMT):
Hi, I have a hyperledger fabric testnet with 2 orgs and 2 peers per org. The peer0 of each organization is the anchor peer. I want to instantiate a chaincode with an endorsment policy with one organization Org1, so I specify the policy: "AND('org1MSP.member"). I have installed the chaincode in the peers of the org1 only, because org2 is not endorser. However, the chaincode doesn't instantiate because it sending the proposal to the peers that are in the other organization (org2). The logs are the following: { "error": "Error creating Chaincode: sending deploy transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [peer0.org2.example.com:8051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2) - Transaction processing for endorser [peer1.org2.example.com:6051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2)" } The problem is because these peers in the org2 doesn't have the chaincode installed, but...why the SDK is sending the endorsement request to the peers that not belongs to the endorsement policy?

mtng (Thu, 11 Jul 2019 10:01:02 GMT):
Hi, I have a hyperledger fabric testnet with 2 orgs and 2 peers per org. The peer0 of each organization is the anchor peer. I want to instantiate a chaincode with an endorsment policy with one organization Org1, so I specify the policy: "AND('org1MSP.member"). I have installed the chaincode in the peers of the org1 only, because org2 is not endorser. However, the chaincode doesn't instantiate because it sending the proposal to the peers that are in the other organization (org2). The logs are the following: { "error": "Error creating Chaincode: sending deploy transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [peer0.org2.example.com:8051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2) - Transaction processing for endorser [peer1.org2.example.com:6051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2)" } The problem is because these peers in the org2 don't have the chaincode installed, but...why the SDK is sending the endorsement request to the peers that not belongs to the endorsement policy?

mtng (Thu, 11 Jul 2019 10:01:02 GMT):
Hi, I have a hyperledger fabric testnet with 2 orgs and 2 peers per org. The peer0 of each organization is the anchor peer. I want to instantiate a chaincode with an endorsment policy with one organization Org1, so I specify the policy: "AND('org1MSP.member"). I have installed the chaincode in the peers of the org1 only, because org2 is not endorser. However, the chaincode doesn't instantiate because it sending the proposal to the peers that are in the other organization (org2). The logs are the following: ` { "error": "Error creating Chaincode: sending deploy transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [peer0.org2.example.com:8051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2) - Transaction processing for endorser [peer1.org2.example.com:6051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2)" } ` The problem is because these peers in the org2 don't have the chaincode installed, but...why the SDK is sending the endorsement request to the peers that not belongs to the endorsement policy?

mtng (Thu, 11 Jul 2019 10:01:02 GMT):
Hi, I have a hyperledger fabric testnet with 2 orgs and 2 peers per org. The peer0 of each organization is the anchor peer. I want to instantiate a chaincode with an endorsment policy with one organization Org1, so I specify the policy: "AND('org1MSP.member"). I have installed the chaincode in the peers of the org1 only, because org2 is not endorser. However, the chaincode doesn't instantiate because it sending the proposal to the peers that are in the other organization (org2). The logs are the following: ` { "error": "Error creating Chaincode: sending deploy transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [peer0.org2.example.com:8051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2) - Transaction processing for endorser [peer1.org2.example.com:6051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2)" } ` The problem is because these peers in the org2 don't have the chaincode installed, but...why the SDK is sending the endorsement request to the peers that not belongs to the endorsement policy?

mtng (Thu, 11 Jul 2019 10:01:02 GMT):
Hi, I have a hyperledger fabric testnet with 2 orgs and 2 peers per org. The peer0 of each organization is the anchor peer. I want to instantiate a chaincode with an endorsment policy with one organization Org1, so I specify the policy: "AND('org1MSP.member"). I have installed the chaincode in the peers of the org1 only, because org2 is not endorser. However, the chaincode doesn't instantiate because it sending the proposal to the peers that are in the other organization (org2). The logs are the following: `{ "error": "Error creating Chaincode: sending deploy transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [peer0.org2.example.com:8051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2) - Transaction processing for endorser [peer1.org2.example.com:6051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2)" }` The problem is because these peers in the org2 don't have the chaincode installed, but...why the SDK is sending the endorsement request to the peers that not belongs to the endorsement policy?

mtng (Thu, 11 Jul 2019 10:01:02 GMT):
Hi, I have a hyperledger fabric testnet with 2 orgs and 2 peers per org. The peer0 of each organization is the anchor peer. I want to instantiate a chaincode with an endorsment policy with one organization Org1, so I specify the policy: "AND('org1MSP.member"). I have installed the chaincode in the peers of the org1 only, because org2 is not endorser. However, the chaincode doesn't instantiate because it sending the proposal to the peers that are in the other organization (org2). The logs are the following: `"error": "Error creating Chaincode: sending deploy transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [peer0.org2.example.com:8051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2) - Transaction processing for endorser [peer1.org2.example.com:6051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2)" ` The problem is because these peers in the org2 don't have the chaincode installed, but...why the SDK is sending the endorsement request to the peers that not belongs to the endorsement policy?

mtng (Thu, 11 Jul 2019 10:01:02 GMT):
Hi, I have a hyperledger fabric testnet with 2 orgs and 2 peers per org. The peer0 of each organization is the anchor peer. I want to instantiate a chaincode with an endorsment policy with one organization Org1, so I specify the policy: "AND('org1MSP.member')". I have installed the chaincode in the peers of the org1 only, because org2 is not endorser. However, the chaincode doesn't instantiate because it sending the proposal to the peers that are in the other organization (org2). The logs are the following: `"error": "Error creating Chaincode: sending deploy transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [peer0.org2.example.com:8051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2) - Transaction processing for endorser [peer1.org2.example.com:6051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (examplecc:2)" ` The problem is because these peers in the org2 don't have the chaincode installed, but...why the SDK is sending the endorsement request to the peers that not belongs to the endorsement policy?

mahoney1 (Thu, 11 Jul 2019 10:57:29 GMT):
@mtng based on the policy supplied above - the syntax looks wrong, should be `"AND('Org1.member')"` - if not specified [correctly?] at instantiation time, the endorsement policy defaults to “any member of the organizations in the channel”, so this is possibly why you see what you see? Easy to re-check anyway.

mahoney1 (Thu, 11 Jul 2019 10:57:29 GMT):
@mtng based on the policy supplied above - the syntax looks wrong, should be `"AND('org1MSP.member')"` - if not specified [correctly?] at instantiation time, the endorsement policy defaults to “any member of the organizations in the channel”, so this is possibly why you see what you see? Easy to re-check anyway.

mahoney1 (Thu, 11 Jul 2019 10:57:29 GMT):
@mtng based on the policy supplied above - the syntax looks wrong, should be `"AND('org1MSP.member')"` - if not specified [correctly?] at instantiation time, [one possibility is ] the endorsement policy defaults to “any member of the organizations in the channel”, so this is possibly why you see what you see? Easy to re-check anyway.

mtng (Thu, 11 Jul 2019 11:26:38 GMT):
Hi, thanks for you response! Sorry, I wrote it bad copy-pasting :sweat_smile: in the code I'm using the function cauthdsl.FromString and the policy "AND('org1MSP.member')", if the endorsment policy is wrong it throws and error. For example, if i write org1MSP.membsrs the error is: Unable to access unexported field 'membsrs' in token 'org1MSP.membsrs'"

medikent (Fri, 12 Jul 2019 21:10:53 GMT):
I am trying to do the same thing. Have you had any progress since the 20th?

medikent (Fri, 12 Jul 2019 21:11:18 GMT):
That's a good idea. I'm going to change my chaincode to do the same thing.

nyet (Fri, 12 Jul 2019 21:22:29 GMT):
I like this solution, I may do it as well

owenlilly (Mon, 15 Jul 2019 15:43:57 GMT):
Has joined the channel.

medikent (Mon, 15 Jul 2019 16:06:33 GMT):
I'd like to understand the user model and key provisioning workflow for Fabric users provisioned from Fabric CA. What good examples exist showing this key provisioning workflow using the Go SDK?

aleksandar.likic (Tue, 16 Jul 2019 01:21:18 GMT):
@medikent From the Fabric CA point of view, a Fabric CA client (an application which manages Fabric user registration/enrollment/etc) first registers a new user by calling the Fabric CA registration API. The resulting user name and enrollment secret are passed out of band to the new user. The user then needs to enroll with the CA by creating a key pair, then creating a CSR, and finally enrolling with the CA by calling the CA enrollment API. The result of the enrollment is a certificate signed by the CA which the new user provides as its identity when talking to Fabric nodes (peers and orderers). The Go SDK can help by providing partial or full support for this process. The MSP client of the SDK can do both the new user registration, as well as the enrollment. During enrollment, the SDK accepts the username and the enrollment secret (from registration), and first creates a key pair. The private key is stored in the Key Store, and the public key is used to create a CSR. The SDK than calls the Fabric CA to enroll the user. The resulting certificate is returned to the caller. It is also stored in the User Store, for future lookup by the username. The default User Store is a simple file store. SDK client can provide its own implementation of the User Store interface at the time of the SDK instantiation. For crypto operations, the SDK by default delegates to fabric BCCSP library. The SDK can be configured with either "SW" (software) or "pkcs11" implementation of the BCCSP crypto interfaces. The "SW" uses a simple file store implementation of the Key Store interface for storing private keys, while "pkcs11" uses HSM. When making calls to fabric nodes, an SDK client need to provide its identity. It can be done either by providing only a username (in which case the SDK looks up the certificate and the private key from its stores), or by providing the certificate and the private key. The latter allows the SDK client to have its own key management independent from the SDK. You can take a look at https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp , also https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/msp/enrollment_test.go, https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/msp/identity_test.go, https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/pkg/client/msp/user_data_mgmt_test.go. Hope this helps.

mtng (Tue, 16 Jul 2019 06:12:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=aDqSJLfGHSPrmGpqZ) any more ideas, please?

nyet (Tue, 16 Jul 2019 15:58:55 GMT):
The SDK should only send proposals to the peers it is told to.

medikent (Tue, 16 Jul 2019 19:21:05 GMT):
Yes, this helps tremendously. I am diagramming this process to make it more clear to myself and my team. Are there existing diagrams I could use for inspiration?

medikent (Tue, 16 Jul 2019 19:31:31 GMT):
The out of band passing of enrollment secret is something I need to think through. Does Fabric CA server pass the enrollment secret back to the client? If so then I am thinking I could encrypt the secret and send it back to a mobile device or some custodial key server.

aleksandar.likic (Tue, 16 Jul 2019 19:54:33 GMT):
Yes, it does, see the test cases.

aleksandar.likic (Tue, 16 Jul 2019 20:08:12 GMT):
Sorry no diagrams, most of it would be (except the SDK specifics) Fabric CA documentation.

mtng (Wed, 17 Jul 2019 08:44:18 GMT):
hi @nyet ... so, that's my question, why is it doing this? In my config I only have one peer. This happens when the peer is updated to be anchor. In other words, If I don't execute the command (peer channel update -o orderer0.example.com:7050 -c $CHANNEL_NAME --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA -f ./channel-artifacts/org2MSPanchors.tx >&log.txt) when I init the network, the error is not happening. But If I execute the command, then when I send the proposal only to the peer which is connected the SDK, I have the error. I just want to understand it, i know the theory.

mtng (Wed, 17 Jul 2019 08:44:18 GMT):
hi @nyet ... so, that's my question, why is it doing this? In my config I only have one peer. This happens when the peer is updated to be anchor. In other words, If I don't execute the command (peer channel update -o orderer0.example.com:7050 -c $CHANNEL_NAME --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA -f ./channel-artifacts/org2MSPanchors.tx >&log.txt) when I init the network, the error is not happening. But If I execute the command, then when I send the proposal only to the peer which is connected TO the SDK, I have the error. I just want to understand it, i know the theory.

mtng (Wed, 17 Jul 2019 08:51:58 GMT):
Here is my config file https://gist.github.com/mtnieto/02dd17097de64a73bd627594056598ed

bestbeforetoday (Wed, 17 Jul 2019 15:56:56 GMT):
Has joined the channel.

tongli (Wed, 17 Jul 2019 19:22:17 GMT):
can someone confirm if gosdk can be used to install node.js chaincode?

nyet (Wed, 17 Jul 2019 20:09:42 GMT):
I actually can't answer that. All peers joined to a channel will try to endorse every transaction sent to that channel actually. If one of the peers is missing chaincode for the transaction, it will not be able to endorse it. What I don't know is if that prevents the transaction from getting committed even if w/o that endorsement it gets enough other endorsements to satisfy the policy.

nyet (Wed, 17 Jul 2019 20:10:05 GMT):
You will likely need to ask somebody who knows more. I am not an expert by any means.

mtng (Thu, 18 Jul 2019 06:50:30 GMT):
Hi @nyet, thanks very much. Do you know anybody?

qiyun (Fri, 19 Jul 2019 07:04:43 GMT):
Has joined the channel.

Psingh (Fri, 19 Jul 2019 16:36:07 GMT):
the role of Anchor peer is too provide cross Organisation communication and I think this is the main reason of this error. LEADER Peer is the one who distributes the txn from orderer to other peers of same organisation.

Psingh (Fri, 19 Jul 2019 16:39:59 GMT):
@nyet, actually we define in the config.yaml file which peer is endorser and which is commiter. ```channels: mychannel: peers: peer0.seller.mytrade.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true ```

nyet (Fri, 19 Jul 2019 16:40:48 GMT):
ok thats on the sdk side

Psingh (Fri, 19 Jul 2019 16:40:54 GMT):
yes

nyet (Fri, 19 Jul 2019 16:41:27 GMT):
Got it. So the client needs to know what peer can do what, and if it doesn't line up with reality, you might get the error he's seeing?

Psingh (Fri, 19 Jul 2019 16:46:03 GMT):
this the answer to you query: https://www.edureka.co/community/8011/client-approves-supports-transaction-hyperledger-fabric

Psingh (Fri, 19 Jul 2019 16:46:03 GMT):
this is the answer to you query @nyet : https://www.edureka.co/community/8011/client-approves-supports-transaction-hyperledger-fabric

Psingh (Fri, 19 Jul 2019 16:46:03 GMT):
this is the answer to your query @nyet https://www.edureka.co/community/8011/client-approves-supports-transaction-hyperledger-fabric

nyet (Fri, 19 Jul 2019 16:47:02 GMT):
Understood, thank you @Psingh

Psingh (Fri, 19 Jul 2019 17:02:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=BWAAuLM2Sd8H2GQ6C) @mtng try to play with this config and please do let us know about the results. try to change the endorsingPeer flag to false

nyet (Fri, 19 Jul 2019 17:21:33 GMT):
i guess chaincode query too if that peer doesn't have the chaincode in question? for the sake of completness?

mtng (Mon, 22 Jul 2019 07:31:02 GMT):
Hi, @Psingh. First of all thanks very much for your response. I have modified the config adding the rest of the peers. Here is the file https://gist.github.com/mtnieto/02dd17097de64a73bd627594056598ed I still have the same error:

mtng (Mon, 22 Jul 2019 07:31:02 GMT):
Hi, @Psingh. First of all thanks very much for your response. I have modified the config adding the rest of the peers. Here is the file https://gist.github.com/mtnieto/02dd17097de64a73bd627594056598ed I still have the same error: `Multiple errors occurred: - Transaction processing for endorser [peer1.org2.example:6051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (mycc:3) - Transaction processing for endorser [peer0.org2.example:8051]: Endorser Client Status Code: (23) CHAINCODE_NAME_NOT_FOUND. Description: cannot get package for chaincode (mycc:3)" `

mtng (Mon, 22 Jul 2019 07:32:30 GMT):
I have also tried setting all the values to false, but same result

Psingh (Mon, 22 Jul 2019 07:39:55 GMT):
first issue with the config.yaml file is: 1. it is missing pattern matching for org2 peers and ca

Psingh (Mon, 22 Jul 2019 07:40:31 GMT):
under `entityMatchers`

Randyshu2018 (Mon, 22 Jul 2019 08:39:08 GMT):
hi, I want to design the permission control to be responsive. The scenario is as follows: The user initiates a request to add a new organization. After receiving the request, the federation organization signs it with the Admin user. After collecting enough signatures, it initiates the updated transaction. any suggestion for it?

mtng (Mon, 22 Jul 2019 09:20:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bKxDvSTbRp52sGpRK) I have posted in stack overflow all the info https://stackoverflow.com/questions/57090538/problem-with-endorsment-policy-with-fabric-go-sdk

StephanieYi (Mon, 22 Jul 2019 17:02:56 GMT):
Has joined the channel.

kopaygorodsky (Tue, 23 Jul 2019 21:47:55 GMT):
Hello, I have a question regarding TLS usage in fabric protocols. Not sure that it's a right channel to ask it, but haven't find more suitable one. So I'm running organization(ca, peers, orderers) under some proxy which does TLS termination and then traffic goes unsecured inside private network. All configs for nodes have disabled TLS. In system channel config I define an external address to my orderer (since foreign peers should be able to connect as well) - orderer.domain.com:443. Peers are not able to connect to this endpoint through gossip protocol because certificates are required, but there is no possibility to use system cert pool. In go sdk there is special config for that, but I found nothing for gossip configuration. I can create PR for this feature. Could you help me with this question? @aleksandar.likic

kopaygorodsky (Tue, 23 Jul 2019 21:47:55 GMT):
Hello, I have a question regarding TLS usage in fabric protocols. Not sure that it's a right channel to ask it, but haven't find more suitable one. So I'm running organization(ca, peers, orderers) under some proxy which does TLS termination and then traffic goes unsecured inside private network. All configs for nodes have disabled TLS. In system channel config I define an external address to my orderer (since foreign peers should be able to connect as well) - orderer.domain.com:443. Peers are not able to connect to this endpoint through gossip protocol because mutual TLS required, but there is no possibility to use system cert pool. In go sdk there is special config for that, but I found nothing for gossip configuration. I can create PR for this feature. Could you help me with this question? @aleksandar.likic

kopaygorodsky (Tue, 23 Jul 2019 21:47:55 GMT):
Hello, I have a question regarding TLS usage in fabric protocols. Not sure that it's a right channel to ask it, but haven't find more suitable one. So I'm running organization(ca, peers, orderers) under some proxy which does TLS termination and then traffic goes unsecured inside private network. All configs for nodes have disabled TLS. In system channel config I define an external address to my orderer (since foreign peers should be able to connect as well) - orderer.domain.com:443. Peers are not able to connect to this endpoint through gossip protocol because mutual TLS is required for secured endpoints, but there is no possibility to use system cert pool. In go sdk there is special config for that, but I found nothing for gossip configuration. I can create PR for this feature. Could you help me with this question? @aleksandar.likic

kopaygorodsky (Tue, 23 Jul 2019 21:47:55 GMT):
Hello, I have a question regarding TLS usage in fabric protocols. Not sure that it's the right channel to ask it, but haven't found a more suitable one. So I'm running my organization(ca, peers, orderers) under some proxy which does TLS termination and then traffic goes unsecured inside a private network. All configs for nodes have disabled TLS. In system channel config I define an external address to my orderer (since foreign peers should be able to connect as well) - orderer.domain.com:443. Peers are not able to connect to this endpoint through gossip protocol because mutual TLS is required for secured endpoints, but there is no possibility to use system cert pool. In go sdk there is a special config for that, but I found nothing for gossip configuration. if I set `clientAuthRequired` to true in core.yml it requires automatically pair key/cert which can be taken from system cert pool. I can create PR for this feature. Could you help me with this question? @aleksandar.likic

kopaygorodsky (Tue, 23 Jul 2019 21:47:55 GMT):
Hello, I have a question regarding TLS usage in fabric protocols. Not sure that it's the right channel to ask it, but haven't found a more suitable one. So I'm running my organization(ca, peers, orderers) under some proxy which does TLS termination and then traffic goes unsecured inside a private network. All configs for nodes have disabled TLS. In system channel config I define an external address to my orderer (since foreign peers should be able to connect as well)- Addresses: [ orderer.domain.com:443] Peers are not able to connect to this endpoint through gossip protocol because mutual TLS is required for secured endpoints, but there is no possibility to use system cert pool. In go sdk there is a special config for that, but I found nothing for gossip configuration. if I set `clientAuthRequired` to true in core.yml it requires automatically pair key/cert which can be taken from system cert pool. I can create PR for this feature. Could you help me with this question? @aleksandar.likic

kopaygorodsky (Tue, 23 Jul 2019 21:47:55 GMT):
Hello, I have a question regarding TLS usage in fabric protocols. Not sure that it's the right channel to ask it, but haven't found a more suitable one. So I'm running my organization(ca, peers, orderers) under some proxy which does TLS termination and then traffic goes unsecured inside a private network. All configs for nodes have disabled TLS. In system channel config I define an external address to my orderer (since foreign peers should be able to connect as well)- Addresses: [ orderer.domain.com:443] Peers are not able to connect to this endpoint through gossip protocol because mutual TLS is required for secured endpoints, but there is no possibility to use system cert pool. In go sdk there is a special config for that, but I found nothing for gossip configuration. I can create PR for this feature. Could you help me with this question? @aleksandar.likic

kopaygorodsky (Tue, 23 Jul 2019 21:47:55 GMT):
Hello, I have a question regarding TLS usage in fabric protocols. Not sure that it's the right channel to ask it, but haven't found a more suitable one. So I'm running my organization(ca, peers, orderers) under some proxy which does TLS termination and then traffic goes unsecured inside a private network. All configs for nodes have disabled TLS. In system channel config I define an external address to my orderer (since foreign peers should be able to connect as well)- Addresses: [ orderer.domain.com:443] Peers are not able to connect to this endpoint through gossip protocol because mutual TLS is required for secured endpoints, but there is no possibility to use system cert pool. In go sdk there is a special config for that, but I found nothing for gossip configuration. I'm getting error `2019-07-24 22:13:46.686 UTC [deliveryClient] connect -> ERRO 292 Connection to orderer.mydomain.com:443 established but was unable to create gRPC stream: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: ` `Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt` I can create PR for this feature. Could you help me with this question? @aleksandar.likic

kopaygorodsky (Tue, 23 Jul 2019 21:47:55 GMT):
Hello, I have a question regarding TLS usage in fabric protocols. Not sure that it's the right channel to ask it, but haven't found a more suitable one. So I'm running my organization(ca, peers, orderers) under some proxy which does TLS termination and then traffic goes unsecured inside a private network. All configs for nodes have disabled TLS. In system channel config I define an external address to my orderer (since foreign peers should be able to connect as well)- Addresses: [ orderer.domain.com:443] Peers are not able to connect to this endpoint through gossip protocol because mutual TLS is required for secured endpoints, but I just want to pass proxy TLS, not mutual TLS of orderer node. I'm getting error `2019-07-24 22:13:46.686 UTC [deliveryClient] connect -> ERRO 292 Connection to orderer.mydomain.com:443 established but was unable to create gRPC stream: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: ` `Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt` I can create PR to fix this, but don't know where to start. I checked source code and see no way to bypass it without enabling node TLS config. Could you help me with this question? @aleksandar.likic

kpd 2 (Wed, 24 Jul 2019 00:49:17 GMT):
Has joined the channel.

Randyshu2018 (Wed, 24 Jul 2019 05:56:10 GMT):

Clipboard - July 24, 2019 1:54 PM

Randyshu2018 (Wed, 24 Jul 2019 05:57:15 GMT):
The problem happened when add org3 to mychannel.

troyronda (Wed, 24 Jul 2019 14:50:35 GMT):
@mtng @bstasyszyn has commented on the jira ticket: https://jira.hyperledger.org/browse/FABG-882

troyronda (Wed, 24 Jul 2019 14:50:35 GMT):
@mtng: @bstasyszyn has commented on the jira ticket: https://jira.hyperledger.org/browse/FABG-882 (endorsement policy on instantiate)

mahoney1 (Thu, 25 Jul 2019 14:32:21 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

qin (Sun, 28 Jul 2019 02:44:18 GMT):
hi, I meet some problem when use go sdk. I have a hyperledger fabric testnet with 1 orgs and 2 peers per org.I try to install and instantiate chaincode with sdk. the per port is my custom port,such as 8031:7051. In sdk config, I config as peers: 9peer0.aaa.develop.com: url: 192.168.0.106:8031 # url: 9peer0.aaa.develop.com:8031 grpcOptions: ssl-target-name-override: 9peer0.aaa.develop.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs allow-insecure: false tlsCACerts: but when i instantiate chaincode, it try to connect with port 7051,then throw out exception, how to solve it ,please!!! [fabsdk/fab] 2019/07/28 02:16:16 UTC - txn.SendProposal.func1 -> DEBU Received error response from txn proposal processing: Transaction processing for endorser [9peer1.aaa.develop.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [9peer1.aaa.develop.com:7051] ERROR: logging before flag.Parse: I0728 10:16:16.853437 93380 chaincode.go:67] sending deploy transaction proposal failed: Transaction processing for endorser [9peer1.aaa.develop.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [9peer1.aaa.develop.com:7051] ERROR: logging before flag.Parse: I0728 10:16:16.853487 93380 main.go:43] instantiate errsending deploy transaction proposal failed: Transaction processing for endorser [9peer1.aaa.develop.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [9peer1.aaa.develop.com:7051] Process finished with exit code 0

kopaygorodsky (Sun, 28 Jul 2019 08:02:38 GMT):
Hey, I have a question about sdk. How to use discovery service? I found client https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/discovery/discovery.go#L61, but can't use it because Request is an internal struct, so I can't call Send(). I saw Service discovery service in Channel Service, but there is only one method `getPeers()` while SD has endorsers, config, etc.

kopaygorodsky (Sun, 28 Jul 2019 08:02:38 GMT):
Hey, I have a question about sdk. How to use discovery service? I found client https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/discovery/discovery.go#L61, but can't use it because Request is an internal struct, so I can't call Send(). I saw discovery service in Channel Service, but there is only one method `getPeers()` while SD has endorsers, config, etc.

kopaygorodsky (Sun, 28 Jul 2019 08:02:38 GMT):
Hey, I have a question about sdk. How to use discovery service? I found client https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/discovery/discovery.go#L61, but can't use it because Request is an internal struct, so I can't call Send(). I saw discovery service in Channel Service, but there is only one method `getPeers()` while SD CLI has endorsers, config, etc.

kopaygorodsky (Sun, 28 Jul 2019 14:33:16 GMT):
Result from SD is matched with Endpoints config of SDK, what is the purpose of SD then? peer is ignored if not present in endpoints list.

kopaygorodsky (Sun, 28 Jul 2019 14:34:29 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/common/discovery/dynamicdiscovery/service.go#L156

Randyshu2018 (Mon, 29 Jul 2019 07:14:03 GMT):
hi,dose fabric-sdk-go now supports decentralized governance for chaincode?

kopaygorodsky (Mon, 29 Jul 2019 07:20:39 GMT):
what do you mean with decentralized governance?

kopaygorodsky (Mon, 29 Jul 2019 07:20:55 GMT):
all that stuff with collection signs ?

Psingh (Mon, 29 Jul 2019 07:34:54 GMT):
Hey everyone I'm trying to instantiate the chaincode using go-sdk . below is the command that i'm sending ``` resp, err := setup.admin.InstantiateCC(setup.ChannelID, resmgmt.InstantiateCCRequest{ Name: setup.ChainCodeID, Path: setup.ChaincodeGoPath, Version: "1.0", Args: [][]byte{[]byte("init"), []byte("Seller"), []byte("100"), []byte("Buyer"), []byte("200")}, //Args: [][]byte{[]byte("init")}, Policy: ccPolicy, }) ``` but when I checked the peer, chaincode was instantiated but with `Input = nil` value. ```root@c6f8cf4dd928:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode list --instantiated -C mychannel Get instantiated chaincodes on channel mychannel: Name: myproject, Version: 1.0, Path: github.com/hyperledger/myproject/chaincode/, Input: , Escc: escc, Vscc: vscc ```

Psingh (Mon, 29 Jul 2019 07:34:54 GMT):
Hey everyone I'm trying to instantiate the chaincode using go-sdk . below is the command that i'm sending ``` resp, err := setup.admin.InstantiateCC(setup.ChannelID, resmgmt.InstantiateCCRequest{ Name: setup.ChainCodeID, Path: setup.ChaincodeGoPath, Version: "1.0", Args: [][]byte{[]byte("init"), []byte("Seller"), []byte("100"), []byte("Buyer"), []byte("200")}, Policy: ccPolicy, }) ``` but when I checked the peer, chaincode was instantiated but with `Input = nil` value. ```root@c6f8cf4dd928:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode list --instantiated -C mychannel Get instantiated chaincodes on channel mychannel: Name: myproject, Version: 1.0, Path: github.com/hyperledger/myproject/chaincode/, Input: , Escc: escc, Vscc: vscc ```

Psingh (Mon, 29 Jul 2019 07:35:40 GMT):
I'm using `chaincode_example02.go` chaincode

Psingh (Mon, 29 Jul 2019 07:37:15 GMT):
I think there's some issue the way I'm sending the args. Please help

Randyshu2018 (Mon, 29 Jul 2019 07:42:42 GMT):
yes

Randyshu2018 (Mon, 29 Jul 2019 07:44:37 GMT):

Clipboard - July 29, 2019 3:44 PM

kopaygorodsky (Mon, 29 Jul 2019 08:14:07 GMT):
I'll check it on my side in a few hours. Please post here if you succeed

kopaygorodsky (Mon, 29 Jul 2019 13:44:46 GMT):
is there anybody who can review my PR to sdk? I fixed a bug in channel config query https://jira.hyperledger.org/browse/FABG-884

nyet (Mon, 29 Jul 2019 14:50:35 GMT):
Got a gerrit PR for it?

kopaygorodsky (Mon, 29 Jul 2019 14:54:17 GMT):
https://gerrit.hyperledger.org/r/c/fabric-sdk-go/+/32556

kopaygorodsky (Mon, 29 Jul 2019 14:54:28 GMT):
https://gerrit.hyperledger.org/r/c/fabric-sdk-go/+/32556

nyet (Mon, 29 Jul 2019 14:55:02 GMT):
thx looking now

kopaygorodsky (Mon, 29 Jul 2019 14:55:03 GMT):
previously it always returned Version 0 even if you updated channel cfg many times

kopaygorodsky (Mon, 29 Jul 2019 14:55:10 GMT):
it's very simple fix

kopaygorodsky (Mon, 29 Jul 2019 15:06:11 GMT):
seems I can rebase it, right?

kopaygorodsky (Mon, 29 Jul 2019 15:09:12 GMT):
@nyet

nyet (Mon, 29 Jul 2019 15:09:28 GMT):
yea gerrit lets you force push all you want

nyet (Mon, 29 Jul 2019 15:09:32 GMT):
it will do the right thing

kopaygorodsky (Mon, 29 Jul 2019 15:09:33 GMT):
gerrit is a nightmare for a github user :)

nyet (Mon, 29 Jul 2019 15:09:39 GMT):
naw its easy :)

nyet (Mon, 29 Jul 2019 15:09:49 GMT):
i've used both you get used to it

kopaygorodsky (Mon, 29 Jul 2019 15:10:02 GMT):
thx for help, I'll tag you for next PRs, ok?

nyet (Mon, 29 Jul 2019 15:10:12 GMT):
yep but I can't do much just fyi

nyet (Mon, 29 Jul 2019 15:10:19 GMT):
i can say "LGTM" but thats about it

nyet (Mon, 29 Jul 2019 15:10:38 GMT):
dont have approval perms

kopaygorodsky (Mon, 29 Jul 2019 15:13:48 GMT):
you mean I need to wait for some approve from repo devs?

kopaygorodsky (Mon, 29 Jul 2019 15:15:56 GMT):
but who is able to merge this?

kopaygorodsky (Mon, 29 Jul 2019 15:15:56 GMT):
who is able to merge this?

nyet (Mon, 29 Jul 2019 15:19:02 GMT):
yea the PR has to get approval from certain people i forget offhand who here can do it

kopaygorodsky (Mon, 29 Jul 2019 15:25:07 GMT):
Oh, thank you, I’ll wait :)

troyronda (Mon, 29 Jul 2019 16:58:21 GMT):
@kopaygorodsky @nyet merged.

nyet (Mon, 29 Jul 2019 16:58:39 GMT):
Asual, you're a gentleman and a scholar, @troyronda

kopaygorodsky (Mon, 29 Jul 2019 20:29:03 GMT):
Can I assign you guys in the future to review my PRs in gerrit to make process faster?

nyet (Mon, 29 Jul 2019 20:29:34 GMT):
@kopaygorodsky They see PRs as they come in regardless :)

nyet (Mon, 29 Jul 2019 20:29:56 GMT):
the sdk guys are much more responsive than the main fabric devs

nyet (Mon, 29 Jul 2019 20:30:11 GMT):
(im my experience)

kopaygorodsky (Mon, 29 Jul 2019 20:57:03 GMT):
Good to know, thanks Btw do you have any example of service discovery usage ? It’s not possible to use client itself since it requires Request which is an internal strict

kopaygorodsky (Mon, 29 Jul 2019 20:57:03 GMT):
Good to know, thanks Btw do you have any example of service discovery usage ? It’s not possible to use client itself since it requires Request which is an internal struct

kopaygorodsky (Mon, 29 Jul 2019 20:57:03 GMT):
Good to know, thanks. Btw do you have any example of service discovery usage ? It’s not possible to use client itself since it requires Request which is an internal struct

kopaygorodsky (Mon, 29 Jul 2019 20:57:41 GMT):
It’s made public, but not usable, what’s the purpose?

Randyshu2018 (Tue, 30 Jul 2019 08:15:56 GMT):
hi,When does fabric-sdk-go provide chaincode lifecycle example

kopaygorodsky (Tue, 30 Jul 2019 09:13:53 GMT):
yes, resMgtClient.InstallCC and instantiateCC

kopaygorodsky (Tue, 30 Jul 2019 09:14:05 GMT):
but it's info available in godoc, could you check?

kopaygorodsky (Tue, 30 Jul 2019 09:14:05 GMT):
but this info available in godoc, could you check?

Randyshu2018 (Tue, 30 Jul 2019 09:33:08 GMT):
sorry,I means chaincode lifecycle with fabric-2.0 alpha,like this article describes https://fabric-sdk-node.github.io/master/tutorial-chaincode-lifecycle.html

Randyshu2018 (Tue, 30 Jul 2019 09:36:08 GMT):
another question: could I convert a packaged chaincode to json use confixtxlator tool \

Randyshu2018 (Tue, 30 Jul 2019 09:37:31 GMT):
I try it but got an error : configtxlator proto_decode --input ccpack.file --type common.Envelope --output ccpack.json configtxlator: error: Error decoding: error encoding output: *common.Envelope: error in PopulateTo for field payload for message *common.Envelope: *common.Payload: error in PopulateTo for field data for message *common.Payload: decoding type 6 is unimplemented

Randyshu2018 (Tue, 30 Jul 2019 09:38:20 GMT):
If i selected a wrong type of proto?

troyronda (Tue, 30 Jul 2019 14:08:30 GMT):
Which public (exported) method are you referring to? The SDK uses Service Discovery client internally. The exported methods for the Service Discovery client is actually in the main Fabric project: https://github.com/hyperledger/fabric/tree/release-1.4/discovery/client

troyronda (Tue, 30 Jul 2019 14:08:30 GMT):
Which public (exported) method are you referring to? The SDK uses Service Discovery client internally (and creates a wrapper on top of the Discovery client imported from the main Fabric project). You can find Fabric's Service Discovery client here: https://github.com/hyperledger/fabric/tree/release-1.4/discovery/client

troyronda (Tue, 30 Jul 2019 14:12:04 GMT):
I'm guessing you are trying to use this method directly: https://github.com/hyperledger/fabric-sdk-go/blob/f1fd02ac671acaf7135ced77d080b9450a519ba6/pkg/fab/discovery/discovery.go#L61 ? (cc: @bstasyszyn )

troyronda (Tue, 30 Jul 2019 14:16:49 GMT):
There could potentially be a wrapper Request struct in that package to avoid the internal reference ... Never noticed since we let the SDK automatically handle Service Discovery.

kopaygorodsky (Tue, 30 Jul 2019 14:39:24 GMT):
yes, exactly. I'm trying to use Service Discovery to obtain some info about channel, peers. For example I need channel details, so I need to know which peer to query. So you suggest use the SD client from fabric directly?

kopaygorodsky (Tue, 30 Jul 2019 14:39:24 GMT):
yes, exactly. I'm trying to use Service Discovery to obtain some info about my channels. For example I need channel details, so I need to know which peer to query. So you suggest using the SD client from fabric directly?

kopaygorodsky (Tue, 30 Jul 2019 14:43:06 GMT):
Does it make sense to contribute this Wrapper? I would do this

troyronda (Tue, 30 Jul 2019 14:50:18 GMT):
Adding an exposed Request struct to pkg/fab/discovery makes sense to me.

troyronda (Tue, 30 Jul 2019 14:51:36 GMT):
The SDK wrappers allow you to re-use SDK context / connection structures, so it is helpful to use the SDK wrappers when are already doing other functions with the SDK.

kopaygorodsky (Tue, 30 Jul 2019 15:00:07 GMT):
good, I'll try to do PR soon

kopaygorodsky (Tue, 30 Jul 2019 15:00:07 GMT):
good, I'll try to do a PR soon

kopaygorodsky (Tue, 30 Jul 2019 15:00:31 GMT):
thank you!

kopaygorodsky (Tue, 30 Jul 2019 19:10:52 GMT):
I've just started wrapping internal Request of discovery service and it's a nightmare. Copying things from fabric intro internal causes so much additional work.

kopaygorodsky (Tue, 30 Jul 2019 19:10:52 GMT):
I've just started wrapping internal Request of discovery service and it's a nightmare. Copying things from fabric repo into internal pkg causes so much additional work.

kopaygorodsky (Tue, 30 Jul 2019 19:10:52 GMT):
I've just started wrapping internal Request of discovery service and it's a nightmare. Copying things from Fabric into internal pkg causes so much additional work.

metadata (Wed, 31 Jul 2019 08:22:25 GMT):
Has joined the channel.

metadata (Wed, 31 Jul 2019 08:46:52 GMT):
Hello everyone, I'm facing some issue with 2 organizations setup. There are few questions related to config.yaml. my setup consists of 2 orgs and 2 peers/org and ca for each orgs. let's say I'm using Org1 under client section ``` client: organization: Org1 logging: level: debug peer: timeout: connection: 10s response: 180s discovery: greylistExpiry: 10s eventService: type: deliver timeout: registrationResponse: 15s orderer: timeout: connection: 15s response: 15s global: timeout: query: 180s execute: 180s resmgmt: 180s cache: connectionIdle: 30s eventServiceIdle: 2m channelConfig: 30m channelMembership: 30s discovery: 10s selection: 10m # Root of the MSP directories with keys and certs. cryptoconfig: path: ${GOPATH}/src/github.com/hyperledger/test/network/crypto-config ``` So below are the questions 1. Under channels section, should I declare all the peers of both the organisation like below ``` channels: mychannel: peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer1.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer0.org2.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer1.org2.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true ``` 2. should I declare all the orgs with their peers in organizations section too. ``` # list of participating organizations in this network # organizations: org1: mspid: Org1MSP cryptoPath: peerOrganizations/org1.example.com/users/{username}@org1.example.com/msp peers: - peer0.org1.example.com - peer1.org1.example.com org2: mspid: Org2MSP cryptoPath: peerOrganizations/org2.example.com/users/{username}@org2.example.com/msp peers: - peer0.org2.example.com - peer1.org2.example.com ```

metadata (Wed, 31 Jul 2019 08:52:54 GMT):
If someone already implemented it then could u please share the gist link of config.yaml file.

metadata (Wed, 31 Jul 2019 09:58:38 GMT):
Is this the right group to ask these type of questions?

kopaygorodsky (Wed, 31 Jul 2019 10:01:48 GMT):
I think yes

kopaygorodsky (Wed, 31 Jul 2019 10:02:13 GMT):
#1 you should declare peers that are joined to a specified channel

kopaygorodsky (Wed, 31 Jul 2019 10:02:25 GMT):
#2 yes

kopaygorodsky (Wed, 31 Jul 2019 10:02:47 GMT):
but read about Service Discovery first :)

metadata (Wed, 31 Jul 2019 10:05:51 GMT):
thanks @kopaygorodsky i thought that I asked it in the wrong group

metadata (Wed, 31 Jul 2019 10:08:26 GMT):
one more query "Is sdk-go officially released by HLF community?" i'm asking this because I couldn't found documents related(tutorials) for go-sdk.

metadata (Wed, 31 Jul 2019 10:08:55 GMT):
chainhero example is there but it is built on hlf 1.1

kopaygorodsky (Wed, 31 Jul 2019 10:09:14 GMT):
yes, it's official sdk for go, but luck of documentation means that opensource support is low

kopaygorodsky (Wed, 31 Jul 2019 10:10:53 GMT):
you can look into integration tests

kopaygorodsky (Wed, 31 Jul 2019 10:10:59 GMT):
there are plenty of examples

metadata (Wed, 31 Jul 2019 10:11:25 GMT):
ok

yacovm (Wed, 31 Jul 2019 10:22:42 GMT):
@kopaygorodsky may i ask you what are you going to do in the application with the ability to send custom queries to discovery ?

Psingh (Wed, 31 Jul 2019 10:23:56 GMT):
I'm getting below error when trying to instantiate the chaincode . Please help ``` Value of ccPolicy is: rule: rules: > > identities: identities: [fabsdk/fab] 2019/07/31 10:20:52 UTC - chconfig.(*params).SetChConfigRefreshInterval -> DEBU RefreshInterval: 30m0s [fabsdk/util] 2019/07/31 10:20:52 UTC - lazyref.WithRefreshInterval.func1 -> DEBU Checking refreshIntervalSetter [fabsdk/fab] 2019/07/31 10:20:52 UTC - peer.(*peerEndorser).ProcessTransactionProposal -> DEBU Processing proposal using endorser: localhost:7051 [fabsdk/fab] 2019/07/31 10:20:52 UTC - comm.(*CachingConnector).DialContext -> DEBU DialContext: localhost:7051 [fabsdk/fab] 2019/07/31 10:20:52 UTC - comm.(*CachingConnector).loadConn -> DEBU using cached connection [localhost:7051: 0xc000076200] [fabsdk/fab] 2019/07/31 10:20:52 UTC - comm.(*CachingConnector).openConn -> DEBU connection was opened [localhost:7051] [fabsdk/fab] 2019/07/31 10:20:52 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [mychannel] creator org [SellerMSP]] [fabsdk/fab] 2019/07/31 10:20:52 UTC - comm.(*CachingConnector).ReleaseConn -> DEBU ReleaseConn [localhost:7051] [fabsdk/fab] 2019/07/31 10:20:52 UTC - txn.SendProposal.func1 -> DEBU Received error response from txn proposal processing: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (2) Unknown. Description: access denied: channel [mychannel] creator org [SellerMSP] [fabsdk/common] 2019/07/31 10:20:52 UTC - retry.(*RetryableInvoker).Invoke -> DEBU Failed with err [queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (2) Unknown. Description: access denied: channel [mychannel] creator org [SellerMSP]] on attempt #1. Checking if retry is warranted... [fabsdk/common] 2019/07/31 10:20:52 UTC - retry.(*RetryableInvoker).Invoke -> DEBU ... retry for err [queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (2) Unknown. Description: access denied: channel [mychannel] creator org [SellerMSP]] is NOT warranted after 1 attempt(s). Unable to install and instantiate the chaincode: failed to instantiate the chaincode: failed to get discovery service: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: gRPC Transport Status Code: (2) Unknown. Description: access denied: channel [mychannel] creator org [SellerMSP] ```

Psingh (Wed, 31 Jul 2019 10:24:52 GMT):
instantiation working fine if I use CLi

kopaygorodsky (Wed, 31 Jul 2019 10:25:43 GMT):
hey, I would like to have information about a channel: peer membership, orderers list

yacovm (Wed, 31 Jul 2019 10:26:02 GMT):
is there no API call in the app for it?

kopaygorodsky (Wed, 31 Jul 2019 10:27:32 GMT):
which app? It's possible to fetch config block from orderer, bu nothing more.

kopaygorodsky (Wed, 31 Jul 2019 10:27:32 GMT):
which app? It's possible to fetch config block from orderer, but nothing more.

kopaygorodsky (Wed, 31 Jul 2019 10:28:00 GMT):
to find all peers that joined a channel I need to query them all and merge result

kopaygorodsky (Wed, 31 Jul 2019 10:28:00 GMT):
to find all peers that joined a channel I need to query them all and merge results

yacovm (Wed, 31 Jul 2019 10:29:20 GMT):
you don't need to write it yourself

yacovm (Wed, 31 Jul 2019 10:29:38 GMT):
https://github.com/hyperledger/fabric/tree/master/discovery/cmd

yacovm (Wed, 31 Jul 2019 10:29:40 GMT):
look here

kopaygorodsky (Wed, 31 Jul 2019 10:30:53 GMT):
yes, I saw it, but it's cli. What if I build my own fabric management app and want to provide ability for users to see channel details. Two ways 1) execute discovery CLI, parse result etc 2) use client

yacovm (Wed, 31 Jul 2019 10:32:45 GMT):
but you can re-use the code

kopaygorodsky (Wed, 31 Jul 2019 10:34:30 GMT):
you mean import fabric/pkg/discovery/cmd/*.go inside my app?

kopaygorodsky (Wed, 31 Jul 2019 10:34:30 GMT):
you mean import fabric/pkg/discovery/cmd inside my app?

yacovm (Wed, 31 Jul 2019 10:34:44 GMT):
yeah

kopaygorodsky (Wed, 31 Jul 2019 10:35:59 GMT):
hah, actually this is what I'm doing for managing channels (configtx encoder), I planned to do the same for discovery, but then I saw it in SDK. I thought it would be useful to expose SD client outside.

kopaygorodsky (Wed, 31 Jul 2019 10:36:07 GMT):
yes, this is one possible way :)

kopaygorodsky (Wed, 31 Jul 2019 10:37:47 GMT):
but usage of client is pretty easy. Build request and parse response, nothing nore

kopaygorodsky (Wed, 31 Jul 2019 10:37:47 GMT):
but usage of client is pretty easy. Build request and parse response, nothing more, so why not allow sdk users do it ?

kopaygorodsky (Wed, 31 Jul 2019 10:37:47 GMT):
but usage of client is pretty easy. Build request and parse response, nothing more, so why not allow sdk users do it? It's already there, just need to provide a way to create internal Request struct.

kopaygorodsky (Wed, 31 Jul 2019 10:40:39 GMT):
btw I have a weird issue with Service Discovery when I query config. `2019-07-30 22:00:39.145 UTC [discovery] configQuery -> ERRO 04b Failed fetching config for channel kekos: config envelope is invalid: key Config.ChannelGroup.Groups[Orderer].Groups is nil`

Psingh (Wed, 31 Jul 2019 10:40:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=azLESjfZ66uZHnoiJ) config.yaml gist link: https://gist.github.com/prayagsingh/8a6280a9833b28c0cef4ea43385a5352

kopaygorodsky (Wed, 31 Jul 2019 10:41:41 GMT):
it's an application channel and it does not have Orderer section inside. Channel was create using Profile and configtx encoder.

kopaygorodsky (Wed, 31 Jul 2019 10:41:41 GMT):
it's an application channel and it does not have Orderer section inside. Channel was created using Profile and configtx encoder.

Psingh (Wed, 31 Jul 2019 10:44:05 GMT):
@kopaygorodsky could u please help?

kopaygorodsky (Wed, 31 Jul 2019 10:44:44 GMT):
idk, I haven't used sdk for installing/instantiating chaincode yet.

Psingh (Wed, 31 Jul 2019 10:45:00 GMT):
ok

kopaygorodsky (Wed, 31 Jul 2019 10:45:42 GMT):
it's weird

kopaygorodsky (Wed, 31 Jul 2019 10:45:42 GMT):
could not get chConfig cache reference: QueryBlockConfig failed

kopaygorodsky (Wed, 31 Jul 2019 10:45:42 GMT):
`could not get chConfig cache reference: QueryBlockConfig failed`

kopaygorodsky (Wed, 31 Jul 2019 10:46:53 GMT):
sure that you have correct context with SellerMSP?

kopaygorodsky (Wed, 31 Jul 2019 10:48:03 GMT):
@yacovm so you think that it's not a good idea to expose Service Discovery client to sdk users?

yacovm (Wed, 31 Jul 2019 11:07:35 GMT):
hmmm

yacovm (Wed, 31 Jul 2019 11:08:13 GMT):
you mean it's an application org i guess?

yacovm (Wed, 31 Jul 2019 11:08:34 GMT):
@kopaygorodsky can you perhaps send me your latest config block ?

yacovm (Wed, 31 Jul 2019 11:08:44 GMT):
in direct message or email

yacovm (Wed, 31 Jul 2019 11:08:49 GMT):
i will look at it tomorrow

yacovm (Wed, 31 Jul 2019 11:08:56 GMT):
seems like a bug....

kopaygorodsky (Wed, 31 Jul 2019 11:09:13 GMT):
I can create Jira ticket, would be better? and assign you

yacovm (Wed, 31 Jul 2019 11:09:18 GMT):
of course

yacovm (Wed, 31 Jul 2019 11:09:20 GMT):
thanks much

yacovm (Wed, 31 Jul 2019 11:09:26 GMT):
I'll look tomorrow

kopaygorodsky (Wed, 31 Jul 2019 11:09:31 GMT):
and regarding exposing SD client... ?

kopaygorodsky (Wed, 31 Jul 2019 11:09:37 GMT):
what do you think?

yacovm (Wed, 31 Jul 2019 11:09:53 GMT):
i'm not a go SDK developer, I'm a fabric core developer

yacovm (Wed, 31 Jul 2019 11:10:09 GMT):
so i cannot help you with the PR

kopaygorodsky (Wed, 31 Jul 2019 11:10:22 GMT):
I already create a PR

kopaygorodsky (Wed, 31 Jul 2019 11:10:22 GMT):
I already created a PR

yacovm (Wed, 31 Jul 2019 11:10:27 GMT):
i know i saw it

yacovm (Wed, 31 Jul 2019 11:10:29 GMT):
i can't merge it

kopaygorodsky (Wed, 31 Jul 2019 11:11:21 GMT):
oh, got it. anyway I think it's better to have SD client than importing cmd structs from fabric directly. dependency inversion at least :)

yacovm (Wed, 31 Jul 2019 11:11:43 GMT):
well you can also import the client directly no?

yacovm (Wed, 31 Jul 2019 11:12:03 GMT):
https://github.com/hyperledger/fabric/blob/master/discovery/client/client.go

yacovm (Wed, 31 Jul 2019 11:12:11 GMT):
if you vendor this... won't this solve it?

kopaygorodsky (Wed, 31 Jul 2019 11:12:21 GMT):
yes, but as @troyronda said above in sdk there is additional context, so you don't need to handle auth

yacovm (Wed, 31 Jul 2019 11:12:38 GMT):
i see

kopaygorodsky (Wed, 31 Jul 2019 11:13:16 GMT):
in sdk context you already have Signing identity, so don't need to handle auth.

yacovm (Wed, 31 Jul 2019 11:13:35 GMT):
got it

metadata (Wed, 31 Jul 2019 11:14:02 GMT):
If I create a channel using sdk-go then how can I verify it? i'm trying to verify it by logging into the peer cli but it is showing below output ``` root@9df955329d92:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel list 2019-07-31 11:12:20.860 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized Channels peers has joined: ``` at the same time I'm getting success message in sdk logs. Is it expexted behaviour?

kopaygorodsky (Wed, 31 Jul 2019 11:14:05 GMT):
it's not hard, but feels more native.

kopaygorodsky (Wed, 31 Jul 2019 11:15:25 GMT):
@yacovm can I ask one more question about SD?

kopaygorodsky (Wed, 31 Jul 2019 11:16:25 GMT):
what could be a reason that SD returns only one peer in membership while I have multiple? It returns same peer which I'm targeting with query.

kopaygorodsky (Wed, 31 Jul 2019 11:16:25 GMT):
what could be a reason that SD returns only one membership peer while I have multiple? It returns same peer which I'm targeting with query.

kopaygorodsky (Wed, 31 Jul 2019 11:17:24 GMT):
broken gossip on my side and peers don't communicate between each other?

kopaygorodsky (Wed, 31 Jul 2019 11:17:33 GMT):
maybe I don't understand how it works... found design docs of SD and your video on youtube, will check it

yacovm (Wed, 31 Jul 2019 11:19:22 GMT):
are you issuing a channel query?

kopaygorodsky (Wed, 31 Jul 2019 11:19:51 GMT):
` request := discovery.NewRequest() request.OfChannel(channelId) request.AddPeersQuery()`

yacovm (Wed, 31 Jul 2019 11:20:16 GMT):
maybe the other peer hasn't joined the channel

kopaygorodsky (Wed, 31 Jul 2019 11:20:19 GMT):
the same I see inside SDK when it tries to call getPeers() internally

kopaygorodsky (Wed, 31 Jul 2019 11:20:29 GMT):
I'm sure it's joined

yacovm (Wed, 31 Jul 2019 11:20:44 GMT):
does the peer have external endpoint?

kopaygorodsky (Wed, 31 Jul 2019 11:20:52 GMT):
I see in peer's logs 'new chain started', and yes, it has

yacovm (Wed, 31 Jul 2019 11:21:23 GMT):
do you have anchor peers?

kopaygorodsky (Wed, 31 Jul 2019 11:21:28 GMT):
nope

yacovm (Wed, 31 Jul 2019 11:21:34 GMT):
that's why

yacovm (Wed, 31 Jul 2019 11:22:21 GMT):
https://drive.google.com/file/d/19A9-iNe48MB4IZPCt0ygSY9FcOVubyZO/view?usp=sharing

yacovm (Wed, 31 Jul 2019 11:22:23 GMT):
look here

kopaygorodsky (Wed, 31 Jul 2019 11:23:01 GMT):
it's another issue, anchor peers are not persisted when I create a chennel, but I thought it would not make a difference because peers receive updates from ordering service via delivery client

kopaygorodsky (Wed, 31 Jul 2019 11:23:01 GMT):
it's another issue, anchor peers are not persisted when I create a chennel, but I thought it would not make a difference because peers receive updates from the ordering service via delivery client

yacovm (Wed, 31 Jul 2019 11:23:42 GMT):
yeah you need to do an additional config update after channel creation

yacovm (Wed, 31 Jul 2019 11:23:46 GMT):
to have anchor peers

yacovm (Wed, 31 Jul 2019 11:23:52 GMT):
it's a known issue, but it's by design

kopaygorodsky (Wed, 31 Jul 2019 11:24:15 GMT):
really? You just helped a lot, haven't seen it in documentation

yacovm (Wed, 31 Jul 2019 11:24:38 GMT):
it's in JIRA somewhere

yacovm (Wed, 31 Jul 2019 11:24:43 GMT):
maybe i'ts in documentatin, I don't know

yacovm (Wed, 31 Jul 2019 11:24:48 GMT):
there is too many documentation IMO

kopaygorodsky (Wed, 31 Jul 2019 11:25:47 GMT):
I mean not about adding anchor peers. I'll add them and check if SD works. Thank you a lot.

metadata (Wed, 31 Jul 2019 11:26:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Wrj9De93u8XwoPqwE) @kopaygorodsky please help

kopaygorodsky (Wed, 31 Jul 2019 11:26:56 GMT):
sdk returns you an id

kopaygorodsky (Wed, 31 Jul 2019 11:27:00 GMT):

Clipboard - July 31, 2019 2:26 PM

metadata (Wed, 31 Jul 2019 11:27:31 GMT):
ok

kopaygorodsky (Wed, 31 Jul 2019 13:02:41 GMT):
@yacovm anchor peers fixed the issue I had, thank you again :)

yacovm (Wed, 31 Jul 2019 13:03:02 GMT):
I'm still waiting for the JIRA

kopaygorodsky (Wed, 31 Jul 2019 13:03:17 GMT):
sec

yacovm (Wed, 31 Jul 2019 13:03:32 GMT):
and sure no problem... if you look at the video i put in the link, i have a slide that explains common problems with service discovery

yacovm (Wed, 31 Jul 2019 13:03:50 GMT):
i mean, user related problems of course

kopaygorodsky (Wed, 31 Jul 2019 13:13:05 GMT):
https://jira.hyperledger.org/browse/FAB-16150

kopaygorodsky (Wed, 31 Jul 2019 13:37:15 GMT):
@yacovm I fetched last block then proto.Marshal(), right?

yacovm (Wed, 31 Jul 2019 13:37:43 GMT):
no, just put it in the JIRA

kopaygorodsky (Wed, 31 Jul 2019 13:38:23 GMT):
I mean how can I get this last block? fetch it and then I need to marshal

kopaygorodsky (Wed, 31 Jul 2019 13:38:35 GMT):
to put in a file and attach to the ticket

kopaygorodsky (Wed, 31 Jul 2019 13:39:21 GMT):
I don't have configtx cli

kopaygorodsky (Wed, 31 Jul 2019 13:39:21 GMT):
I don't have configtx cli, I'm doing it using SDK

yacovm (Wed, 31 Jul 2019 13:42:26 GMT):
do you fetch it to a form of `common.Block` ?

yacovm (Wed, 31 Jul 2019 13:46:10 GMT):
?

yacovm (Wed, 31 Jul 2019 13:46:45 GMT):
no that's the channel creation transaction.

yacovm (Wed, 31 Jul 2019 13:46:47 GMT):
i need the block

kopaygorodsky (Wed, 31 Jul 2019 13:47:18 GMT):
yes, I query config, take block number and then query block by number. Just a sec, I'll update ticket with the block

yacovm (Wed, 31 Jul 2019 13:47:26 GMT):
ok

kopaygorodsky (Wed, 31 Jul 2019 13:51:56 GMT):
@yacovm updated

yacovm (Wed, 31 Jul 2019 13:55:04 GMT):
i don't see it...

kopaygorodsky (Wed, 31 Jul 2019 13:56:02 GMT):
in the attachments

kopaygorodsky (Wed, 31 Jul 2019 13:56:05 GMT):

Clipboard - July 31, 2019 4:56 PM

yacovm (Wed, 31 Jul 2019 13:56:32 GMT):
oh

yacovm (Wed, 31 Jul 2019 13:57:58 GMT):
thanks

yacovm (Wed, 31 Jul 2019 13:58:02 GMT):
i'll look tomorrow

yacovm (Wed, 31 Jul 2019 13:58:15 GMT):
can you please remind me tomorrow if i forget ?

kopaygorodsky (Wed, 31 Jul 2019 13:58:24 GMT):
yes, that I can do :)

yacovm (Wed, 31 Jul 2019 13:58:39 GMT):
cool thanks

kopaygorodsky (Wed, 31 Jul 2019 13:58:48 GMT):
I'll look into your design video, maybe I can help to contribute this thing

metadata (Wed, 31 Jul 2019 14:17:57 GMT):
I'm going through the chainhero setup.go file and I have a query regarding below code `resourceManagerClientContext := setup.sdk.Context(fabsdk.WithUser(setup.OrgAdmin), fabsdk.WithOrg(setup.OrgName))` what actually we r trying to achieve here?

Psingh (Wed, 31 Jul 2019 16:19:17 GMT):
here we are passing the identities of an Organization to create a client context which further used to create/update the channel

kopaygorodsky (Wed, 31 Jul 2019 16:42:29 GMT):
@troyronda could you tell me what to do regarding this PR: https://gerrit.hyperledger.org/r/c/fabric-sdk-go/+/32599/2/pkg/fab/discovery/discovery.go#58 Two options: move Request to 3rd_party or create a wrapping struct and wrap all the methods of the Request

troyronda (Wed, 31 Jul 2019 17:05:53 GMT):
I wonder if we could just embed the internal Request into a new struct. (I haven’t tried that with an internal before).

troyronda (Wed, 31 Jul 2019 17:06:10 GMT):
@kopaygorodsky

troyronda (Wed, 31 Jul 2019 17:06:17 GMT):
The alternative would

troyronda (Wed, 31 Jul 2019 17:08:19 GMT):
The alternative would be to restructure the internal discovery client to split out the Request. Ideally such that the split out Request becomes part of the SDK package.

troyronda (Wed, 31 Jul 2019 17:09:12 GMT):
Otherwise we need to treat the split out Request more like a proto.

troyronda (Wed, 31 Jul 2019 17:09:58 GMT):
(Ie that a package is requiring an out-of-package structure for its methods)

troyronda (Wed, 31 Jul 2019 17:10:17 GMT):
@bstasyszyn

kopaygorodsky (Wed, 31 Jul 2019 17:14:33 GMT):
I did it, but not submitted because found another easier way

kopaygorodsky (Wed, 31 Jul 2019 17:14:33 GMT):
I had done it, but did not submit because found another easier way

kopaygorodsky (Wed, 31 Jul 2019 17:14:41 GMT):

Clipboard - July 31, 2019 8:14 PM

kopaygorodsky (Wed, 31 Jul 2019 17:15:19 GMT):
this requires changing all places where you use internal struct, but I have it done too. So can resubmit this PR

kopaygorodsky (Wed, 31 Jul 2019 17:19:09 GMT):
I don't see any reason of returning Request from each method, it's golang, not js where chaining is important. `request := NewRequest() request.OnChannel(ch) request.DoSomething() `

kopaygorodsky (Wed, 31 Jul 2019 17:19:36 GMT):
so we can do a bit different API for Request and use it everywhere in SDK, in that way I don't need to proxy all the methods

troyronda (Wed, 31 Jul 2019 17:20:01 GMT):
Perhaps the signature of Send could be changed to take an interface instead?

kopaygorodsky (Wed, 31 Jul 2019 17:20:20 GMT):
agree, I would go with interface too

troyronda (Wed, 31 Jul 2019 17:20:31 GMT):
Cool

kopaygorodsky (Wed, 31 Jul 2019 17:20:47 GMT):
do we need somebody else to approve it?

troyronda (Wed, 31 Jul 2019 17:20:54 GMT):
I can

kopaygorodsky (Wed, 31 Jul 2019 17:21:04 GMT):
ok, then I'll update my PR, good?

kopaygorodsky (Wed, 31 Jul 2019 17:22:34 GMT):
just one more question: Request requires ChaincodeCall and ChaincodeIntereset, which are internals too, put behind interfaces too? basically ChaincodeIntereset is an array of ChaincodeCall, and ChaincodeCall is just a list of cc names.

troyronda (Wed, 31 Jul 2019 17:22:49 GMT):
yes please.

troyronda (Wed, 31 Jul 2019 17:39:40 GMT):
Looking at ChaincodeInterest and ChaincodeCall.

troyronda (Wed, 31 Jul 2019 17:42:08 GMT):
Those appear to be defined in the protos package.

troyronda (Wed, 31 Jul 2019 17:42:24 GMT):
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"

troyronda (Wed, 31 Jul 2019 17:42:54 GMT):
(not internal)

troyronda (Wed, 31 Jul 2019 17:43:12 GMT):
@kopaygorodsky

troyronda (Wed, 31 Jul 2019 17:44:04 GMT):
What did you mean by placing them behind an interface too?

kopaygorodsky (Wed, 31 Jul 2019 17:49:28 GMT):
Oh, then I suppose nothing to do with them

kopaygorodsky (Wed, 31 Jul 2019 17:49:41 GMT):
Just leave as it is, right ?

troyronda (Wed, 31 Jul 2019 18:10:41 GMT):
i would assume so -

troyronda (Wed, 31 Jul 2019 18:10:41 GMT):
i would assume so.

kopaygorodsky (Wed, 31 Jul 2019 18:14:10 GMT):
Good, I’ll resubmit PR in a few hours.

metadata (Thu, 01 Aug 2019 08:00:12 GMT):
I'm going through the `discovery` section of config.yaml . ``` #[Optional] options for retrieving discovery info discovery: #[Optional] discovery info will be retrieved for these number of random targets maxTargets: 2 #[Optional] retry options for retrieving discovery info retryOpts: #[Optional] number of retry attempts attempts: 4 #[Optional] the back off interval for the first retry attempt initialBackoff: 500ms #[Optional] the maximum back off interval for any retry attempt maxBackoff: 5s #[Optional] he factor by which the initial back off period is exponentially incremented backoffFactor: 2.0 ``` what's `maxTargets` ? Is it like the number of peers it is trying to connect or search?

metadata (Thu, 01 Aug 2019 08:01:05 GMT):
Is any doc available to understand this ?

metadata (Thu, 01 Aug 2019 08:24:46 GMT):
In below snippet(chainHero config.yaml), from where it is getting the value of `userName`? In some other config.yaml file, this `userName` is written as `username` ``` organizations: org1: mspid: org1.hf.chainhero.io cryptoPath: peerOrganizations/org1.hf.chainhero.io/users/{userName}@org1.hf.chainhero.io/msp ```

metadata (Thu, 01 Aug 2019 13:48:01 GMT):
Is port `7053` deprecated in `fabric-sdk-go`? if yes then how to use the `eventUrl` thing?

metadata (Thu, 01 Aug 2019 14:05:14 GMT):
@kopaygorodsky Can u please help? I guess u r the only one who is taking care of this whole group. Asked so many questions but no one answered. not sure why?

Psingh (Thu, 01 Aug 2019 14:07:23 GMT):
read here: https://hyperledger-fabric.readthedocs.io/en/release-1.4/peer_event_services.html

Psingh (Thu, 01 Aug 2019 14:10:40 GMT):
Gari Singh answered it: https://stackoverflow.com/questions/51578063/hyperledger-fabric-port-7053

yacovm (Thu, 01 Aug 2019 15:11:12 GMT):
@troyronda , @bstasyszyn (or anyone else) - can you guys tell me where in the github repo you have the equivalent file of `core.yaml` ? i.e - is there a `sampleconfig` folder that defines all the configuration? I saw config stuff in various test data, but where is the "authoritative" config file? The context is - I want to modify a custom fork of the go SDK to send transactions to all orderers

yacovm (Thu, 01 Aug 2019 15:12:36 GMT):
I see lots of `*.yaml` files but I'm wondering where is the file that is used as the ultimate authority

yacovm (Thu, 01 Aug 2019 15:12:36 GMT):
I see lots of `*.yaml` files but I'm wondering where is the file that is used as the ultimate source of truth

nyet (Thu, 01 Aug 2019 15:13:46 GMT):
HLF "documents" it's default conifigs by writing out its own config file, behavior which i still find baffling.

yacovm (Thu, 01 Aug 2019 15:14:09 GMT):
ok and where is the struct?

nyet (Thu, 01 Aug 2019 15:14:51 GMT):
It isn't actually a struct that I can tell. It builds a map when initializing then at some point writes it all out as yaml.

nyet (Thu, 01 Aug 2019 15:16:46 GMT):
I don't understand the point to this, since the environment is loaded after this construction happens, which means you end up with a file that contains a bunch of dfeaults that you have to edit to make permanent changes in. Even worse, it means that if upstream decidees to change something, it behaves differently depending if you've ever run the app once or not.

nyet (Thu, 01 Aug 2019 15:16:59 GMT):
It is by far the strangest piece of HLF i've found.

yacovm (Thu, 01 Aug 2019 15:17:13 GMT):
this is not HLF, this is go SDK

yacovm (Thu, 01 Aug 2019 15:17:22 GMT):
SDKs are not HLF :rolling_eyes:

nyet (Thu, 01 Aug 2019 15:18:30 GMT):
in that case, the reponse is usually "reference the test case yaml that is closest to your config" which is usual the config in e2e.

nyet (Thu, 01 Aug 2019 15:18:30 GMT):
in that case, the reponse is usually "reference the test case yaml that is closest to your config" which is usually the config in e2e.ly

nyet (Thu, 01 Aug 2019 15:19:13 GMT):
you said `core.yaml` which generally means the peer. the SDK uses `config.yml` i thought (typically?)

yacovm (Thu, 01 Aug 2019 15:19:38 GMT):
so what i meant to ask is - where is the config file that defines everyything

yacovm (Thu, 01 Aug 2019 15:19:49 GMT):
in fabric whenever i add a new config parameter, i add it to `core.yaml` or `orderer.yaml`

yacovm (Thu, 01 Aug 2019 15:20:17 GMT):
I think I got it: ``` //ChannelPolicies defines list of policies defined for a channel type ChannelPolicies struct { //Policy for querying channel block QueryChannelConfig QueryChannelConfigPolicy //Policy for querying discovery Discovery DiscoveryPolicy //Policy for endorser selection Selection SelectionPolicy //Policy for event service EventService EventServicePolicy } ```

nyet (Thu, 01 Aug 2019 15:20:32 GMT):
its "self" documented in the various test case configs :/

pvrbharg (Thu, 01 Aug 2019 15:20:41 GMT):
pvrbharg

nyet (Thu, 01 Aug 2019 15:21:05 GMT):
the actual struct/maps are scattered in the code

yacovm (Thu, 01 Aug 2019 15:21:06 GMT):
hmmm ok, i will tinker it until i manage to add a new config key to the config...

yacovm (Thu, 01 Aug 2019 15:22:03 GMT):
i am starting to experience what the users of this system feel

yacovm (Thu, 01 Aug 2019 15:22:08 GMT):
:joy:

nyet (Thu, 01 Aug 2019 15:22:15 GMT):
pkg/core/config/testdata/config_test.yaml

nyet (Thu, 01 Aug 2019 15:22:34 GMT):
yes it can be infuriating to literaly have to read source code to figure anything out :(

nyet (Thu, 01 Aug 2019 15:22:59 GMT):
pkg/core/config/testdata/config_test_entity_matchers.yaml

nyet (Thu, 01 Aug 2019 15:23:18 GMT):
test/fixtures/config/config_e2e.yaml

nyet (Thu, 01 Aug 2019 15:23:34 GMT):
test/fixtures/config/config_test.yaml

nyet (Thu, 01 Aug 2019 15:23:47 GMT):
those are the main ones i use as reference

nyet (Thu, 01 Aug 2019 15:23:57 GMT):
yes its bizarre that even those are spread around

nyet (Thu, 01 Aug 2019 15:24:29 GMT):
e2e is the one that is most exhaustive iirc

nyet (Thu, 01 Aug 2019 15:24:34 GMT):
i could be mistaking that is from memory

troyronda (Thu, 01 Aug 2019 15:57:13 GMT):
Note: you can also pass (or override) configuration structures progmatically (no need for config files) as shown here: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/configless/end_to_end_test.go

troyronda (Thu, 01 Aug 2019 15:57:40 GMT):
(but this would be more advanced usage).

troyronda (Thu, 01 Aug 2019 16:05:40 GMT):
fabric-sdk-go no longer supports the old event hub service.

palote2015 (Thu, 01 Aug 2019 16:52:00 GMT):
Has joined the channel.

metadata (Thu, 01 Aug 2019 17:22:21 GMT):
I went through above HLF docs and colcluded we don't have to use `7053` port any more. we can listen for events using `7051` port. any file or doc which I refer to?

metadata (Thu, 01 Aug 2019 17:22:21 GMT):
I went through above HLF docs and cocluded we don't have to use `7053` port any more. we can listen for events using `7051` port. any file or doc which I refer to?

metadata (Thu, 01 Aug 2019 17:22:21 GMT):
I went through above HLF docs and concluded we don't have to use `7053` port any more. we can listen for events using `7051` port. any file or doc which I refer to?

zzocker (Thu, 01 Aug 2019 20:05:20 GMT):
Has joined the channel.

ianco (Thu, 01 Aug 2019 20:24:00 GMT):
Has left the channel.

kopaygorodsky (Thu, 01 Aug 2019 22:48:12 GMT):
@troyronda @sudeshrshetty guys, I'm just wondering what's the purpose of this condition in endpoint config? https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/endpointconfig.go#L1447 This function was supposed to match peer with sdk config, but this returns true even peer does not exist in config. Is it for discovery service when you have some unknown peers on a channel?

sudeshrshetty (Thu, 01 Aug 2019 22:49:04 GMT):
@kopaygorodsky search key can be either URL or peer name/ID

kopaygorodsky (Thu, 01 Aug 2019 22:54:13 GMT):
so for now it's not clear how to work with endpoint config. So I have an app that works only with one org. I have a list of peers at application startup, so I can put them in config, but the question is idk which peer is joined which channel. Put them all in peers: [p1, p2,3], org.peers [p1,p2,p3] and channel: default_: [p1,p2,p3]

kopaygorodsky (Thu, 01 Aug 2019 22:54:13 GMT):
It's not clear how to work with endpoint config. I have an app that works only with one org. I have a list of peers at application startup, so I can put them in config, but the question is idk which peer is joined which channel. Put them all in peers: [p1, p2,3], org.peers [p1,p2,p3] and channel: default_: [p1,p2,p3]

kopaygorodsky (Thu, 01 Aug 2019 22:54:13 GMT):
It's not clear how to work with endpoint config. I have an app that works only with one org. I have a list of peers at application startup, so I can put them in config, but the question is idk which peer is joined which channel. Put them all in `peers: [p1, p2,3]`, `organization.peers [p1,p2,p3]` and `channel: default_: [p1,p2,p3]` ?

kopaygorodsky (Thu, 01 Aug 2019 22:54:13 GMT):
It's not clear how to work with endpoint config. I have an app that works only with one org. I have a list of peers at application startup, so I can put them in config, but the question is idk which peer is joined which channel. Put them all in `peers: [p1, p2, p3]`, `organization.peers [p1,p2,p3]` and `channel: default_: [p1,p2,p3]` ?

kopaygorodsky (Thu, 01 Aug 2019 22:55:31 GMT):
then with service discovery enabled I randomly get 'access denied' on those peers which are not joined to the channel, it depends on maxTartgets property as I understood. Need to specify it as big as possible, so all peers from default list will be queried.

sudeshrshetty (Thu, 01 Aug 2019 23:02:45 GMT):
@kopaygorodsky https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/endpointconfig.go#L1447

sudeshrshetty (Thu, 01 Aug 2019 23:04:25 GMT):
when config isn't able to find peer by URL, it constructs peer config using default settings and URL of the result will be search key... it is handy when you deal with discovery....

sudeshrshetty (Thu, 01 Aug 2019 23:07:43 GMT):
you don't have to define all the peers all the time in SDK config, you can construct peer config on go using entity matchers. define default peer config variables inside `peer: _default:`

sudeshrshetty (Thu, 01 Aug 2019 23:08:13 GMT):
entity matcher samples : https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/core/config/testdata/matcher-samples

sudeshrshetty (Thu, 01 Aug 2019 23:08:46 GMT):
tests: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/matchers_test.go

Rosan (Fri, 02 Aug 2019 08:53:37 GMT):
Has joined the channel.

kopaygorodsky (Fri, 02 Aug 2019 13:13:43 GMT):
Seems that's exactly what I needed

nyet (Fri, 02 Aug 2019 16:25:32 GMT):
its also to fixup ssl vs hostname inconsistencies or to fake DNS if you can't do it in /etc/hosts or properly set up DNS ...

nyet (Fri, 02 Aug 2019 16:25:32 GMT):
its also to fixup tls SAN vs endpoint hostname inconsistencies or to fake DNS if you can't do it in /etc/hosts or properly set up DNS ...

nyet (Fri, 02 Aug 2019 16:25:36 GMT):
bad news in production imo

metadata (Sat, 03 Aug 2019 06:03:55 GMT):
If anyone looking for go-sdk example. Here's the link https://chat.hyperledger.org/channel/fabric-questions?msg=5NQMs6q7wh5EWrBbf created by @DeeptimanPattnaik

DeeptimanPattnaik (Sat, 03 Aug 2019 06:03:55 GMT):
Has joined the channel.

kopaygorodsky (Mon, 05 Aug 2019 11:30:14 GMT):
@troyronda I have a proposal to modify a bit resMgmtClient's API. I don't like that for `CreateConfigSignature` I need to specify path to the file which I have in memory. Can we use io.Reader instead? It's must have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory, I don't want to save it to some tmp dir and then provide path to this dir and after installation delete it. It could be replaced with an array of io.Reader I just need an approve to create a PR for it.

kopaygorodsky (Mon, 05 Aug 2019 11:30:14 GMT):
@troyronda I have a proposal to modify a bit resMgmtClient's API. I don't like that for `CreateConfigSignature` I need to specify path to the config file which I have in memory. Can we use io.Reader instead? It's must have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory, I don't want to save it to some tmp dir and then provide path to this dir and after installation delete it. It could be replaced with an array of io.Reader I just need an approve to create a PR for it.

kopaygorodsky (Mon, 05 Aug 2019 11:30:14 GMT):
@troyronda I have a proposal to modify a bit resMgmtClient's API. I don't like that for `CreateConfigSignature` I need to specify path to the config file which I have in memory. Can we use io.Reader instead? It's must have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory, I don't want to save it to some tmp dir and then provide path to this dir and after installation delete it. It could be replaced with an array of io.Reader I just need an approve to create a PR with breaking changes. But sooner or later more people will ask about this feature.

kopaygorodsky (Mon, 05 Aug 2019 11:30:14 GMT):
@troyronda I have a proposal to modify a bit resMgmtClient's API. I don't like that for `CreateConfigSignature` I need to specify path to the config file which I have in memory. Can we use io.Reader instead? It's must have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory, I don't want to save it to some tmp dir and then provide path to this dir and after installation delete it. It could be replaced with an array of io.Reader I just need an approve to create a PR with breaking changes. But sooner or later more people will ask about this feature, it's a standard in Golang to use io.Reader, io.Writer

javapriyan (Mon, 05 Aug 2019 12:02:06 GMT):
I have a REST server that uses go sdk to interact with network. Not user how to authenticate this against user's key. Did anyone tried this before ?

DeeptimanPattnaik (Mon, 05 Aug 2019 12:58:09 GMT):
I have tried integrating Jwt signing as REST API authentication then Fabric CA as secondary authentication for peers

kopaygorodsky (Mon, 05 Aug 2019 15:24:21 GMT):
@troyronda @bstasyszyn I have a proposal to modify a bit resMgmtClient's API. I don't like that for `CreateConfigSignature` I need to specify path to the config file which I have in memory. Can we use io.Reader instead? It's must have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory, I don't want to save it to some tmp dir and then provide path to this dir and after installation delete it. It could be replaced with an array of io.Reader I just need an approve to create a PR with breaking changes. But sooner or later more people will ask about this feature, it's a standard in Golang to use io.Reader, io.Writer

kopaygorodsky (Mon, 05 Aug 2019 15:24:21 GMT):
@troyronda @bstasyszyn I have a proposal to modify a bit resMgmtClient's API. Why does `CreateConfigSignature` require to specify a path to the config file which I have in memory. Can we use io.Reader instead? It's must-have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory, I don't want to save it to some tmp dir and then provide path to this dir and after installation delete it. It could be replaced with an array of io.Reader I just need an approve to create a PR with breaking changes. But sooner or later more people will ask about this feature, it's a standard in Golang to use io.Reader, io.Writer

kopaygorodsky (Mon, 05 Aug 2019 15:24:21 GMT):
@troyronda @bstasyszyn I have a proposal to modify a bit `resMgmtClient`'s API. Why does `CreateConfigSignature` require to specify a path to the config file which I have in memory. Can we use io.Reader instead? It's must-have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory, I don't want to save it to some tmp dir and then provide path to this dir and after installation delete it. It could be replaced with an array of io.Reader I just need an approve to create a PR with breaking changes. But sooner or later more people will ask about this feature, it's a standard in Golang to use io.Reader, io.Writer

kopaygorodsky (Mon, 05 Aug 2019 15:24:21 GMT):
@troyronda @bstasyszyn I have a proposal to modify a bit `resMgmtClient`'s API. Why does `CreateConfigSignature` require to specify a path to the config file which I have in memory. Can we use io.Reader instead? It's must-have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory. I don't want to save it to tmp dir, then keep track of it and delete after installation. It could be replaced with an array of io.Readers I just need an approve to create a PR with breaking changes. But sooner or later more people will ask about this feature, it's a standard in Golang to use io.Reader, io.Writer

kopaygorodsky (Mon, 05 Aug 2019 15:24:21 GMT):
@troyronda @bstasyszyn I have a proposal to modify a bit `resMgmtClient`'s API. Why does `CreateConfigSignature` require to specify a path to the config file which I have in memory. Can we use io.Reader instead? It's must-have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory. I don't want to save it to tmp dir, then delete after installation. It could be replaced with an array of io.Readers I just need an approve to create a PR with breaking changes. But sooner or later more people will ask about this feature, it's a standard in Golang to use io.Reader, io.Writer

kopaygorodsky (Mon, 05 Aug 2019 15:24:21 GMT):
@troyronda @bstasyszyn I have a proposal to modify a bit `resMgmtClient`'s API. Why does `CreateConfigSignature` require to specify a path to the config file which I have in memory? Can we use io.Reader instead? It's must-have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory. I don't want to save it to tmp dir, then delete after installation. It could be replaced with an array of io.Readers I just need an approve to create a PR with breaking changes. But sooner or later more people will ask about this feature, it's a standard in Golang to use io.Reader, io.Writer

kopaygorodsky (Mon, 05 Aug 2019 15:24:21 GMT):
@troyronda @bstasyszyn I have a proposal to modify a bit `resMgmtClient`'s API. Why does `CreateConfigSignature` require to specify a path to the config file which I have in memory? Can we use io.Reader instead? It's must-have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory. I don't want to save it to tmp dir, then delete after installation. It could be replaced with an array of io.Readers I just need an approve to create a PR with breaking changes. But sooner or later more people will ask about this feature, it's a standard in Golang to use io.Reader, io.Writer https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/resmgmt.go#L1063

kopaygorodsky (Mon, 05 Aug 2019 15:24:21 GMT):
@troyronda @bstasyszyn I have a proposal to modify a bit `resMgmtClient`'s API. Why does `CreateConfigSignature` require to specify a path to the config file which I have in memory? Can we use io.Reader instead? It's must-have in Golang projects. The same issue with installing chaincode. What If I uploaded my chaincode and keep it in memory. I don't want to save it to tmp dir, then delete after installation. It could be replaced with an array of io.Readers I just need an approve to create a PR with breaking changes. But sooner or later more people will ask about this feature, it's a standard in Golang to use io.Reader, io.Writer https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/resmgmt.go#L1063 https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/ccpackager/gopackager/packager.go#L44

troyronda (Tue, 06 Aug 2019 15:02:43 GMT):
@kopaygorodsky I also prefer to have an io.Reader option (and should generally be the primary version). I'd prefer not to unnecessarily create breaking changes though (esp. without deprecating first). It would be nice to add an io.Reader version and refactor the old functions to use it.

troyronda (Tue, 06 Aug 2019 15:03:33 GMT):
@Baha-sk @bstasyszyn @aleksandar.likic

troyronda (Tue, 06 Aug 2019 15:03:33 GMT):
@Baha-sk @bstasyszyn @aleksandar.likic ^^^

Baha-sk (Tue, 06 Aug 2019 15:11:44 GMT):
@kopaygorodsky @troyronda I suggest a new function called `CreateConfigSignatureDataFromReader` that takes in an `io.Reader` instead of path.. the function will call `extractChConfigData(configReader)` to get the config object

kopaygorodsky (Tue, 06 Aug 2019 16:15:46 GMT):
Good, I’ll create a PR

kopaygorodsky (Tue, 06 Aug 2019 16:23:22 GMT):
What about installing chaincode ?

kopaygorodsky (Tue, 06 Aug 2019 16:24:11 GMT):
Right now you need to provide a path to a folder

troyronda (Tue, 06 Aug 2019 16:47:31 GMT):
@kopaygorodsky Do you have an example of a Golang projects that use an array of io.Readers this way?

troyronda (Tue, 06 Aug 2019 16:47:54 GMT):
(I also would like a non-path solution, but would prefer not to do something out of the ordinary).

metadata (Tue, 06 Aug 2019 17:39:17 GMT):
How to check if `chaincode` is `installed` or not on peers ? Is there any `func` available in go-sdk?

kopaygorodsky (Tue, 06 Aug 2019 18:10:14 GMT):
you get status 200

kopaygorodsky (Tue, 06 Aug 2019 18:10:14 GMT):
you get status 200 in response

DeeptimanPattnaik (Tue, 06 Aug 2019 18:10:46 GMT):
@metadata here how it's done : https://github.com/Deeptiman/multiorgledger/blob/master/blockchain/org/org_chaincode.go#L184

kopaygorodsky (Tue, 06 Aug 2019 18:12:40 GMT):
resMngmtClient.QueryInstalledChaincodes

metadata (Tue, 06 Aug 2019 18:22:35 GMT):
@kopaygorodsky there is one more method available in resmgmt.go `isChaincodeInstalled` which further uses `QueryInstalledChaincodes` method. which one do u suggest?

kopaygorodsky (Tue, 06 Aug 2019 18:23:30 GMT):
for what ? what are you trying to do?

metadata (Tue, 06 Aug 2019 18:24:00 GMT):
i want to check chaincode successfully installed on peers or not

metadata (Tue, 06 Aug 2019 18:24:00 GMT):
i want to check if chaincode successfully installed on peers or not

kopaygorodsky (Tue, 06 Aug 2019 18:24:27 GMT):
just check response of the InstallCC method?

kopaygorodsky (Tue, 06 Aug 2019 18:24:31 GMT):
it returns 200

metadata (Tue, 06 Aug 2019 18:25:08 GMT):
ok, that's perfect thanks

troyronda (Tue, 06 Aug 2019 19:43:52 GMT):
@kopaygorodsky You could also consider something similar to the tar package Writer pattern where you call a method for each file (that has an io.Reader signature). This way you don't need to open up all the Readers at once. https://golang.org/pkg/archive/tar/#Writer

kopaygorodsky (Tue, 06 Aug 2019 19:44:20 GMT):
yea, agree

nyet (Tue, 06 Aug 2019 19:44:30 GMT):
i like this idea

kopaygorodsky (Tue, 06 Aug 2019 19:44:41 GMT):
I'll create a PR for this too

haniavis (Tue, 06 Aug 2019 20:03:21 GMT):
Hi, if I want to just use the SDK and not contribute to the code, what is the procedure? Is there a tutorial for installing the dependencies or running the code examples?

nyet (Tue, 06 Aug 2019 20:03:23 GMT):
clever

troyronda (Tue, 06 Aug 2019 20:14:03 GMT):
@haniavis the SDK include Go module definitions, so the easiest way is to enable Go modules in your project.

haniavis (Tue, 06 Aug 2019 20:25:51 GMT):
thanks @troyronda for your reply. So after cloning the fabric-sdk-go outside my GOPATH folder, which is the next step? Do I need to build the code and from which directory? I am not familiar with go modules.

kopaygorodsky (Tue, 06 Aug 2019 21:48:53 GMT):
@haniavis maybe you need to learn go first?

kopaygorodsky (Tue, 06 Aug 2019 21:49:05 GMT):
also there are others sdk (nodejs, java)

kopaygorodsky (Tue, 06 Aug 2019 21:49:05 GMT):
also there are other sdks (nodejs, java)

kopaygorodsky (Tue, 06 Aug 2019 21:49:05 GMT):
also there are other SDKs (nodejs, java)

kopaygorodsky (Tue, 06 Aug 2019 21:55:05 GMT):
@troyronda I added first PR, but tests fail randomly https://gerrit.hyperledger.org/r/c/fabric-sdk-go/+/32754 I'm sure that my fix is not related to it at all. Last time issue like this was solved just with rerunning.

javapriyan (Wed, 07 Aug 2019 07:06:11 GMT):
I am facing this issue after removing my vendor and rebuilding

javapriyan (Wed, 07 Aug 2019 07:06:11 GMT):
I am facing this issue after removing my vendor folder and dep ensure. Any idea ?

javapriyan (Wed, 07 Aug 2019 07:06:14 GMT):
https://stackoverflow.com/questions/57105051/hyperledger-fabric-sdk-go-showing-cannot-convert-nil-to-type-csr-keyrequest

Rosan (Thu, 08 Aug 2019 06:13:25 GMT):
Hi all, How can I get the TxValidationCode (type pb.TxValidationCode) from Response object as a string?

Rosan (Thu, 08 Aug 2019 07:32:48 GMT):
Sorry my bad, now I get the string value by using "response.TxValidationCode.String()" method.

medikent (Fri, 09 Aug 2019 00:07:52 GMT):
Is the Fabric GO SDK changing significantly for 2.0.0?

medikent (Fri, 09 Aug 2019 00:08:18 GMT):
Or, does it need to change? I'd like to help upgrade the Go SDK for 2.0.0.

kopaygorodsky (Fri, 09 Aug 2019 07:57:28 GMT):
Check Jira maybe ?

medikent (Fri, 09 Aug 2019 15:51:36 GMT):
It looks like there is one remaining issue, FABG-785 (deploying node chaincode), for the 1.4 release. Is there anyone that can help me understand this issue?

medikent (Fri, 09 Aug 2019 15:52:01 GMT):
I just need some help thinking through it. I'd love to spend a few hours this weekend working on it.

troyronda (Fri, 09 Aug 2019 16:43:59 GMT):
A known topic for 2.0 is having the SDK support the updated chaincode lifecyle.

troyronda (Fri, 09 Aug 2019 16:47:41 GMT):
https://jira.hyperledger.org/browse/FABG-892

troyronda (Fri, 09 Aug 2019 16:50:43 GMT):
(assume to be large).

medikent (Fri, 09 Aug 2019 21:57:59 GMT):
Awesome, I'd like to help with that.

medikent (Fri, 09 Aug 2019 21:58:40 GMT):
What meetings can I attend that would help provide context and direction for successfully approaching and completing this task?

yacovm (Fri, 09 Aug 2019 22:08:25 GMT):
@medikent first I think you should watch the *lifecycle* playbacks at https://wiki.hyperledger.org/display/fabric/Playbacks

medikent (Fri, 09 Aug 2019 22:21:42 GMT):
Thanks, I'll start there.

javapriyan (Sat, 10 Aug 2019 02:06:14 GMT):
Is it possible to have both error and result value here ? ```result, errorObj := ch.Execute(channel.Request{ ChaincodeID: fSetup.ChainCodeID, Fcn: "create", Args: args, })``` I got the results form all the peers and chaincode status is 200, but got an error saying 'error registering for TxStatus event' And the transacted asset is not in the state DB

javapriyan (Sat, 10 Aug 2019 02:06:14 GMT):
Is it possible to have both error and result value here ? ```result, errorObj := ch.Execute(channel.Request{ ChaincodeID: fSetup.ChainCodeID, Fcn: "create", Args: args, })``` I got the results form all the peers and chaincode status is 200, but got an error saying 'error registering for TxStatus event' And the transacted asset is not in the state DB when I query

javapriyan (Sat, 10 Aug 2019 02:06:14 GMT):
Is it possible to have both error and result value here ? ```result, errorObj := ch.Execute(channel.Request{ ChaincodeID: fSetup.ChainCodeID, Fcn: "create", Args: args, })``` I got the results form all the peers and chaincode status is 200. Also, a valid error obj returned that says 'error registering for TxStatus event' And the transacted asset is not in the state DB when I query. Any idea ? Is it suppose to be an issue that should be filed ? or this is expected ?

javapriyan (Sat, 10 Aug 2019 02:06:14 GMT):
Is it possible to have both error and result value here ? ```result, errorObj := ch.Execute(channel.Request{ ChaincodeID: fSetup.ChainCodeID, Fcn: "create", Args: args, })``` I got the results form all the peers and chaincode status is 200. Also, a valid error obj returned that says 'error registering for TxStatus event' `TxStatus event: could not create client conn: server URL not specified` And the transacted asset is not in the state DB when I query. Any idea ? Is it suppose to be an issue that should be filed ? or this is expected ?

javapriyan (Sat, 10 Aug 2019 09:22:25 GMT):

my config file looks like this

dileban (Mon, 12 Aug 2019 12:08:02 GMT):
Has joined the channel.

dileban (Mon, 12 Aug 2019 12:08:46 GMT):
Does the Go SDK support the Service Discovery feature outlined here: https://hyperledger-fabric.readthedocs.io/en/release-1.4/discovery-overview.html

dileban (Mon, 12 Aug 2019 12:08:46 GMT):
Does the Go SDK support the Service Discovery feature outlined here?: https://hyperledger-fabric.readthedocs.io/en/release-1.4/discovery-overview.html

dileban (Mon, 12 Aug 2019 12:08:46 GMT):
Does the Go SDK support the Discovery Service feature outlined here?: https://hyperledger-fabric.readthedocs.io/en/release-1.4/discovery-overview.html If supported, is all of the configuration specified in the config yaml required? Is there any example on the use of the SDK obtaining network configuration through the Discovery Service?

dileban (Mon, 12 Aug 2019 12:08:46 GMT):
Does the Go SDK support the Discovery Service feature outlined here?: https://hyperledger-fabric.readthedocs.io/en/release-1.4/discovery-overview.html If supported, is all of the configuration specified in the config yaml required? It would appear the only configuration that's required is the client certs and trusted Discovery Service endpoints. Is there any example on the use of the SDK obtaining network configuration through the Discovery Service?

yacovm (Mon, 12 Aug 2019 12:36:30 GMT):
yes it does.

medikent (Mon, 12 Aug 2019 17:52:44 GMT):
How significant are the changes to the Fabric SDK Go from 1.4.2 to 2.0.0? I imagine the upgraded service discovery, chaincode lifecycle, and the new chaincode deployment model are the main changes. Is that right?

medikent (Mon, 12 Aug 2019 17:53:21 GMT):
I also heard that the Fabric SDK Go is not officially supported and is in more of an alpha state at the moment so it is more recommended to use the Node or Java SDKs. How accurate is that?

troyronda (Mon, 12 Aug 2019 17:56:22 GMT):
What do you mean by "upgraded service discovery"?

medikent (Mon, 12 Aug 2019 17:58:28 GMT):
I didn't have well-developed thoughts on the term, just going through the list of things I thought I remembered. It seemed like I heard or read about some components becoming discoverable through service discovery rather than only via static config.

troyronda (Mon, 12 Aug 2019 18:00:21 GMT):
This is already included in the SDK.

troyronda (Mon, 12 Aug 2019 18:00:47 GMT):
(and was available prior to Fabric 2.0)

troyronda (Mon, 12 Aug 2019 18:04:07 GMT):
The main 2.0 feature (that I'm aware of) are FAB-11237 - Improved chaincode lifecycle & FAB-6135 - Raft Consensus (https://gerrit.hyperledger.org/r/c/fabric/+/32747/3/release_notes/v2.0.0.txt)

troyronda (Mon, 12 Aug 2019 18:04:07 GMT):
The main 2.0 features (that I'm aware of, so far) are FAB-11237 - Improved chaincode lifecycle & FAB-6135 - Raft Consensus (https://gerrit.hyperledger.org/r/c/fabric/+/32747/3/release_notes/v2.0.0.txt)

yacovm (Mon, 12 Aug 2019 18:39:56 GMT):
@medikent - SD is a 1.2 item

medikent (Mon, 12 Aug 2019 19:27:43 GMT):
Thanks @troyronda and @yacovm . It sounds like things have mostly stayed the same other than chaincode lifecycle and Raft like you mentioned. I am just trying to judge rate of change of the SDKs.

swetha (Mon, 12 Aug 2019 19:36:28 GMT):
Hi, I am running into an error when using a CC package generated using the Go SDK. I am using the 1.0.0-alpha5 release. ``` Illegal wire type for field Message.Field .protos.ChaincodeDeploymentSpec.code_package: 7 (2 expected) ```. Any ideas of what could be the problem?

swetha (Mon, 12 Aug 2019 19:36:28 GMT):
Hi, I am running into an error when using a CC package generated using the Go SDK. I am using the 1.0.0-alpha5 release. ``` Illegal wire type for field Message.Field .protos.ChaincodeDeploymentSpec.code_package: 7 (2 expected) ``` Any ideas of what could be the problem?

medikent (Mon, 12 Aug 2019 19:50:23 GMT):
Have I heard correctly on the Go SDK being not officially supported and in an alpha-like state? I am trying to decide which SDK is best to use moving forward.

jambonrose (Tue, 13 Aug 2019 01:38:24 GMT):
Has joined the channel.

huxd (Wed, 14 Aug 2019 01:06:22 GMT):
Has joined the channel.

kopaygorodsky (Wed, 14 Aug 2019 18:09:03 GMT):
could you show your code please?

kopaygorodsky (Wed, 14 Aug 2019 18:09:15 GMT):
gist will work

swetha (Wed, 14 Aug 2019 18:11:00 GMT):
Here is the packaging code

swetha (Wed, 14 Aug 2019 18:11:00 GMT):
https://gist.github.com/swetharepakula/90f5db3c6fa3f6e1bebb3920bfd679fb

swetha (Wed, 14 Aug 2019 18:11:36 GMT):
Packaging https://github.com/swetharepakula/fabric-chaincode-evm/tree/split-evmcc-fab3/evmcc

swetha (Wed, 14 Aug 2019 18:15:33 GMT):
I get that error when I upload the packaged code to the VS Code extension

kopaygorodsky (Wed, 14 Aug 2019 18:15:57 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/resource/api.go#L57

kopaygorodsky (Wed, 14 Aug 2019 18:16:52 GMT):
you need to serialize whole struct, not only pkg.Code, because it's just tar.gz

swetha (Wed, 14 Aug 2019 18:17:08 GMT):
Okay, thanks!

kopaygorodsky (Wed, 14 Aug 2019 18:17:26 GMT):
so basically you are trying to submit tar.gz, not cds

swetha (Wed, 14 Aug 2019 18:17:51 GMT):
So I should marshal everything using json or proto?

swetha (Wed, 14 Aug 2019 18:18:02 GMT):
Or how should it be serialized?

kopaygorodsky (Wed, 14 Aug 2019 18:19:37 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/resource/lscc.go#L51

kopaygorodsky (Wed, 14 Aug 2019 18:19:45 GMT):
not sure, but that's how it works right now

kopaygorodsky (Wed, 14 Aug 2019 18:20:01 GMT):
cds is created under the hood before submitting proposal

kopaygorodsky (Wed, 14 Aug 2019 18:20:09 GMT):
you can try to do the same thing

swetha (Wed, 14 Aug 2019 18:20:38 GMT):
Perfect thanks for your help! That was the exact code I needed

kopaygorodsky (Wed, 14 Aug 2019 18:22:26 GMT):
@troyronda is there any way to update endpoints config on the fly? I need to keep peers list updated after adding/deleting

kopaygorodsky (Wed, 14 Aug 2019 18:24:25 GMT):
I have peer management api, peers can be added and deleted, I need to keep endpoing config updated for correct service discovery functioning.

kopaygorodsky (Wed, 14 Aug 2019 18:24:25 GMT):
I have peer management api, peers can be added and deleted, I need to keep endpoing config updated for correct service discovery functioning.

kopaygorodsky (Wed, 14 Aug 2019 18:24:25 GMT):
I have peer management api, peers can be added and deleted, I need to keep endpoind config updated for correct functioning of a service discovery.

kopaygorodsky (Wed, 14 Aug 2019 18:25:01 GMT):
I saw this issue, but don't know is it relevant or no

kopaygorodsky (Wed, 14 Aug 2019 18:25:02 GMT):
https://jira.hyperledger.org/browse/FABG-799

kopaygorodsky (Wed, 14 Aug 2019 18:27:56 GMT):
Service discovery makes no sense If I haven't specified all the peers I have

troyronda (Wed, 14 Aug 2019 18:31:24 GMT):
@medikent The SDK has been in a fairly stable state for awhile. I can't speak to your needs but FYI: we use the fabric-sdk-go in production.

troyronda (Wed, 14 Aug 2019 18:31:24 GMT):
@medikent The SDK has been in a fairly stable state for the last few months. I can't speak to your needs but FYI: we use the fabric-sdk-go in production.

troyronda (Wed, 14 Aug 2019 18:31:24 GMT):
@medikent The Go SDK has been in a fairly stable state for the last few months. I can't speak to your needs but FYI: we use the fabric-sdk-go in production.

troyronda (Wed, 14 Aug 2019 18:36:41 GMT):
@kopaygorodsky you can actually override the package that the SDK uses for discovery.

troyronda (Wed, 14 Aug 2019 18:38:00 GMT):
@kopaygorodsky I haven't thought too deeply about it, but you can override the config provider that the SDK uses.

troyronda (Wed, 14 Aug 2019 18:45:33 GMT):
Yes FABG-799 could be related. The endpoint config packages pre-loads all the peer configurations at instantiation. https://github.com/hyperledger/fabric-sdk-go/blob/658cc4a5662d3face9549246fbcd28ebbe028a3c/pkg/fab/endpointconfig.go#L587 (from https://github.com/hyperledger/fabric-sdk-go/blob/658cc4a5662d3face9549246fbcd28ebbe028a3c/pkg/fab/endpointconfig.go#L114)

kopaygorodsky (Wed, 14 Aug 2019 18:49:06 GMT):
so I can try to create my service that implements all the interfaces and add ability to reload it on the fly

kopaygorodsky (Wed, 14 Aug 2019 18:49:17 GMT):
right?

kopaygorodsky (Wed, 14 Aug 2019 19:07:53 GMT):
it's almost 2k lines of code to override

troyronda (Wed, 14 Aug 2019 19:26:55 GMT):
@kopaygorodsky https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/common/providers/fab/provider.go#L93

troyronda (Wed, 14 Aug 2019 19:28:16 GMT):
The reload scenario is probably not tested but the idea was that you could provide the interface implementation.

kopaygorodsky (Wed, 14 Aug 2019 19:43:34 GMT):
yea, but that's almost 2k lines of code. I'll try to embed exiting EndpointConfig implementation into my and override a bit, hope it will work

kopaygorodsky (Wed, 14 Aug 2019 19:43:34 GMT):
yea, but that's almost 2k lines of code. I'll try to embed exicting EndpointConfig implementation into my and override a bit, hope it will work

kopaygorodsky (Wed, 14 Aug 2019 19:57:41 GMT):
Seems I need to override only ChannelPeers(name string) method, it's used by Service Discovery internally. For all other clients/methods in SDK I can pass option WithTargetEndpoint() and avoid static discovery.

kopaygorodsky (Wed, 14 Aug 2019 19:57:41 GMT):
Seems I need to override only ChannelPeers(name string) method, it's used by Service Discovery internally. For all other clients/methods in SDK I can pass option WithTargetEndpoint() and avoid static discovery usage

kopaygorodsky (Wed, 14 Aug 2019 19:57:41 GMT):
Seems I need to override only ChannelPeers(name string) method, it's used by Service Discovery internally. For all other clients/methods in SDK I can pass option WithTargetEndpoint() and avoid static discovery usage and I saw that it's gonna be removed once 1.1 is out of support.

kopaygorodsky (Wed, 14 Aug 2019 19:57:41 GMT):
Seems I need to override only ChannelPeers(name string) method, it's used by Service Discovery internally. For all other clients/methods in SDK I can pass option WithTargetEndpoint() and avoid static discovery usage and I saw that it's gonna be removed once fabric 1.1 is out of support.

kopaygorodsky (Wed, 14 Aug 2019 19:58:49 GMT):
and again same question: If I don't know which peer is joined to which channel, what should I do? Specify all the peers under _default and set maxTargets to len(peers) ?

kopaygorodsky (Wed, 14 Aug 2019 19:58:49 GMT):
and again same question: If I don't know which peer is joined to which channel, what should I do? Specify all the peers under _default and set maxTargets to len(peers) ? In that way all of them will be queried every time to obtain membership info.

kopaygorodsky (Wed, 14 Aug 2019 19:58:49 GMT):
and again same question: If I don't know which peer is joined to which channel, what should I do? Specify all the peers under _default and set maxTargets to len(peers) ? In that way all of them will be queried every time to obtain membership info. It won't be a huge bottleneck I think, count of peers are usually small.

kopaygorodsky (Wed, 14 Aug 2019 19:58:49 GMT):
and again same question: If I don't know which peer is joined to which channel, what should I do? Specify all the peers under _default and set maxTargets to len(peers) ? In that way all of them will be queried every time to obtain membership info. It won't be a huge bottleneck I think, count of peers is usually small.

kopaygorodsky (Wed, 14 Aug 2019 19:58:49 GMT):
and again same question: If I don't know which peer is joined to which channel, what should I do? Specify all the peers under _default and set maxTargets to len(peers) ? In that way all of them will be queried every time to obtain membership info. It won't be a huge bottleneck, I think, count of peers is usually small.

kopaygorodsky (Wed, 14 Aug 2019 19:58:49 GMT):
and again same question: If I don't know which peer is joined to which channel, what should I do? Specify all the peers under _default and set maxTargets to len(peers) ? In that way all of them will be queried every time to obtain membership info. It won't be a huge bottleneck, count of peers is usually small.

kopaygorodsky (Wed, 14 Aug 2019 19:58:49 GMT):
and again same question: If I don't know which peer is joined to which channel, what should I do? Specify all the peers under _default and set maxTargets to len(peers) ? In that way all of them will be queried every time to obtain membership info. It won't be a huge bottleneck, count of peers is usually small. @troyronda

yacovm (Wed, 14 Aug 2019 20:33:13 GMT):
if you know at least one peer joined in a channel you can ask it what other peers are in the channel too, no?

yacovm (Wed, 14 Aug 2019 20:33:24 GMT):
@kopaygorodsky

kopaygorodsky (Wed, 14 Aug 2019 20:34:28 GMT):
yes, but how do I know at least one? I don't store any info about membership offchain

yacovm (Wed, 14 Aug 2019 20:34:49 GMT):
you don't know any peer at all?

kopaygorodsky (Wed, 14 Aug 2019 20:35:15 GMT):
I have a list of peers in my org, but I don't know which channels they joined

yacovm (Wed, 14 Aug 2019 20:35:25 GMT):
can't you ask them all?

kopaygorodsky (Wed, 14 Aug 2019 20:35:34 GMT):
yes, that's what I was thinking for

kopaygorodsky (Wed, 14 Aug 2019 20:35:34 GMT):
yes, that's what I was thinking of

kopaygorodsky (Wed, 14 Aug 2019 20:35:58 GMT):
specify all of them as default peers for any channel, then Service Discovery will be asking them every time

yacovm (Wed, 14 Aug 2019 20:36:36 GMT):
you can't ask peer `A` if peer `B` is in a channel that peer `A` is not in that channel though because it cannot know if you are authorized to know that or not

kopaygorodsky (Wed, 14 Aug 2019 20:39:11 GMT):
yes, and I'll get access denied for peer `A`

kopaygorodsky (Wed, 14 Aug 2019 20:39:11 GMT):
yes, and I'll get access denied for peer `A`, then I run a query for `B`

kopaygorodsky (Wed, 14 Aug 2019 20:44:18 GMT):
imagine I have [A, B, C, D, <>] peers, I need to ask each of them every time if they joined a specified channel. If at least one of them returned a success response, I can assume that this peer is on that channel.

kopaygorodsky (Wed, 14 Aug 2019 20:44:49 GMT):
This works right now with manual config

kopaygorodsky (Wed, 14 Aug 2019 20:44:52 GMT):

Clipboard - August 14, 2019 11:44 PM

kopaygorodsky (Wed, 14 Aug 2019 20:45:15 GMT):
so for any channel all of them are asked about membership

kopaygorodsky (Wed, 14 Aug 2019 20:45:15 GMT):
so for any channel all of them are asked about membership, not very efficient, but works. Later mb I'll store their membership in some db

yacovm (Wed, 14 Aug 2019 20:46:04 GMT):
you can also ask a peer of your organization, about the list of all peers without channel membership

yacovm (Wed, 14 Aug 2019 20:46:12 GMT):
it's a non-channel query

kopaygorodsky (Wed, 14 Aug 2019 20:46:25 GMT):
yes, that's another way

yacovm (Wed, 14 Aug 2019 20:46:35 GMT):
in the discovery CLI you just don't pass a --channel parameter

yacovm (Wed, 14 Aug 2019 20:47:10 GMT):
if you do it only upon the startup of your SDK / application i think this is not that bad

kopaygorodsky (Wed, 14 Aug 2019 20:47:26 GMT):
yes, but how to keep it updated?

yacovm (Wed, 14 Aug 2019 20:47:34 GMT):
why do you need to keep it updated?

kopaygorodsky (Wed, 14 Aug 2019 20:47:42 GMT):
I add/delete peers without restarting my app

yacovm (Wed, 14 Aug 2019 20:47:51 GMT):
how many times do you do that a day?

kopaygorodsky (Wed, 14 Aug 2019 20:48:21 GMT):
in real-world once in a month :)

yacovm (Wed, 14 Aug 2019 20:48:34 GMT):
if it's once a month then what is the problem?

kopaygorodsky (Wed, 14 Aug 2019 20:48:34 GMT):
maybe year

kopaygorodsky (Wed, 14 Aug 2019 20:48:34 GMT):
maybe a year

yacovm (Wed, 14 Aug 2019 20:49:13 GMT):
do it once a day or something....

yacovm (Wed, 14 Aug 2019 20:49:26 GMT):
is there something you think is missing in service discovery, by the way?

yacovm (Wed, 14 Aug 2019 20:49:31 GMT):
i mean, feature wise

kopaygorodsky (Wed, 14 Aug 2019 20:53:56 GMT):
seems no, I like the way it works

haniavis (Wed, 14 Aug 2019 22:26:05 GMT):
Hi, I am trying to connect the sdk with the first-network v1.4.2, is the structure of the crypto-config folder in test/fixtures/fabric different than the one in the fabric-samples repository?

kopaygorodsky (Fri, 16 Aug 2019 08:48:15 GMT):
hey. I have a problem with installing/instantiating chaincode, by default fabric saves installed chaincode in /var/hyperledger/production + path. https://github.com/hyperledger/fabric/blob/release-1.4/core/common/ccprovider/common.go#L15, but when it instantiates it looks for this package in $gopath and can't find it in any of /opt/go... Is it expected behavior or am I missing something?

kopaygorodsky (Fri, 16 Aug 2019 08:48:15 GMT):
hey. I have a problem with installing/instantiating chaincode, by default fabric saves installed chaincode in /var/hyperledger/production + path. https://github.com/hyperledger/fabric/blob/release-1.4/core/common/ccprovider/common.go#L15, but when it instantiates it looks for this package in $gopath and can't find it in any of /opt/go... Is it expected behavior or am I missing something? It's not a right channel, but I won't get any response in others :)

kopaygorodsky (Fri, 16 Aug 2019 08:48:15 GMT):
hey. I have a problem with installing/instantiating chaincode, by default fabric saves installed chaincode in /var/hyperledger/production + path. https://github.com/hyperledger/fabric/blob/release-1.4/core/common/ccprovider/common.go#L15, but when it instantiates it looks for this package in $gopath and can't find it in any of /opt/go... Is it expected behavior or am I missing something? It's not the right channel for such questions, but I won't get any response in others :)

kopaygorodsky (Fri, 16 Aug 2019 08:48:15 GMT):
hey. I have a problem with installing/instantiating chaincode, by default fabric saves installed chaincode in /var/hyperledger/production + path. https://github.com/hyperledger/fabric/blob/release-1.4/core/common/ccprovider/common.go#L15, but when it instantiates it looks for this package in $gopath and can't find package in any of /opt/go... Is it expected behavior or am I missing something? It's not the right channel for such questions, but I won't get any response in others :)

kopaygorodsky (Fri, 16 Aug 2019 08:48:15 GMT):
hey. I have a problem with installing/instantiating chaincode, by default fabric saves installed chaincode in /var/hyperledger/production + path. https://github.com/hyperledger/fabric/blob/release-1.4/core/common/ccprovider/common.go#L15, but when it instantiates it looks for this package in $gopath and can't find package in any of /opt/go... Is it expected behavior or am I missing something? All go packages should be inside $gopath/src. It's not the right channel for such questions, but I won't get any response in others :)

kopaygorodsky (Fri, 16 Aug 2019 08:48:15 GMT):
hey. I have a problem with installing/instantiating chaincode, by default fabric saves installed chaincode in /var/hyperledger/production + path. https://github.com/hyperledger/fabric/blob/release-1.4/core/common/ccprovider/common.go#L15, but when it instantiates it looks for this package in $gopath and can't find package in any of /opt/go... Is it expected behavior or am I missing something? All go packages should be inside $gopath/src.

javapriyan (Fri, 16 Aug 2019 10:02:49 GMT):
@haniavis Ideally, it will be the ```path/to/firstnetwork/crypto-config```

adineshreddy1 (Fri, 16 Aug 2019 11:48:47 GMT):
Has joined the channel.

andrew-coleman (Fri, 16 Aug 2019 15:04:12 GMT):
Has joined the channel.

batazor (Fri, 16 Aug 2019 23:34:43 GMT):
Has joined the channel.

batazor (Fri, 16 Aug 2019 23:39:04 GMT):
Hello. I'm trying to start helloWrold -> https://github.com/batazor/hyperledger-fabric But for some reason I can’t connect to `orderer.example.com (localhost:7050)` I get: `2019-08-16 22:59:10.624 UTC [core.comm] ServerHandshake -> ERRO 079 TLS handshake failed with error remote error: tls: bad certificate server=Orderer remoteaddress=172.24.0.1:57418` How can I find the cause of the error? the path to the certificate seems to be correct https://github.com/batazor/hyperledger-fabric/blob/master/config.yaml#L47

MHBauer (Fri, 16 Aug 2019 23:52:33 GMT):
when are we going to get another release?

MHBauer (Fri, 16 Aug 2019 23:52:57 GMT):
Too many 'master' dependencies in the alpha5 that make it very difficult to get something that works.

nyet (Sat, 17 Aug 2019 05:26:27 GMT):
2nd

CMajeri (Sat, 17 Aug 2019 13:29:22 GMT):
Has joined the channel.

CMajeri (Sat, 17 Aug 2019 13:29:23 GMT):
Hello, I get errors when I try to create an sdk object with a connection profile without any users/cryptopath. This is likely due to this check: ``` if orgConfig.CryptoPath == "" && len(orgConfig.Users) == 0 { return nil, errors.New("Either a cryptopath or an embedded list of users is required") } ``` here : `https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/identitymgr.go#L42` However, my application works fine without any user (it can generate valid certificates on the fly) This is confirmed by the fact that my workaround is currently defining dummy users or an invalid cryptopath. This seems like a weird check to perform, is there a more official workaround? Or can this check be removed in a future patch?

CMajeri (Sat, 17 Aug 2019 13:33:30 GMT):
Simply removing these 3 lines seems to work. It seems odd to require a cryptopath/list of user on creation, when errors are already raised when trying to use a non-defined user

Prabhakar17 (Sun, 18 Aug 2019 00:42:12 GMT):
Has joined the channel.

Prabhakar17 (Sun, 18 Aug 2019 00:42:13 GMT):
Hi, I am getting error while importing the fabric-go-sdk. Go version: 1.12 Machine: Linux

Prabhakar17 (Sun, 18 Aug 2019 00:42:28 GMT):

Clipboard - August 18, 2019 2:42 AM

Prabhakar17 (Sun, 18 Aug 2019 00:42:28 GMT):

Clipboard - August 18, 2019 2:42 AM

mffrench (Sun, 18 Aug 2019 17:06:26 GMT):
Has joined the channel.

mffrench (Sun, 18 Aug 2019 17:06:27 GMT):
Hello I saw fabric-sdk-go tags are not following HLF core release... We would like to test HLF SDK Go with last 2.0.0-alpha. Is that possible ?

metadata (Mon, 19 Aug 2019 07:27:09 GMT):
search it on google. there's a solution available on stackoverflow. AFAIK u have to add `nil` in one of the HLF file.

Psingh (Mon, 19 Aug 2019 07:37:39 GMT):
here's the link https://stackoverflow.com/questions/55811937/getting-error-not-enough-arguments-in-call-to-s-statsd-sendloop-when-running

Prabhakar17 (Mon, 19 Aug 2019 12:10:59 GMT):
Thanks, but how good solution it is to make that change locally. Every time we download the sdk on another machine we will have to make that change again. Wondering, why it is not fixed in the sdk itself.

galaxystar (Tue, 20 Aug 2019 01:16:55 GMT):
Has joined the channel.

Psingh (Tue, 20 Aug 2019 07:31:16 GMT):
I used the first solution and till now I'm not facing any such issues anymore. I have upgraded the sdk-go to latest version. it's working fine

Psingh (Tue, 20 Aug 2019 07:31:16 GMT):
I used the first solution and till now I'm not facing this issues anymore. I have upgraded the sdk-go to latest version. it's working fine

Psingh (Tue, 20 Aug 2019 07:31:16 GMT):
I used the first solution and till now I'm not facing this issues anymore. I have updated the sdk-go to latest version. it's working fine

troyronda (Tue, 20 Aug 2019 11:57:18 GMT):
@MHBauer @nyet yes - another release would be a good idea. I also raised a related topic in #fabric-maintainers: https://chat.hyperledger.org/channel/fabric-maintainers?msg=dx9Ro7iLPaRKy9gEn

troyronda (Tue, 20 Aug 2019 11:58:42 GMT):
The Fabric project is also discussing creating a fabric-protos-go repository, and I would like to switch away from the protos inside the third_party directory to the common ones in this new repo. https://chat.hyperledger.org/channel/fabric-maintainers?msg=4A4Zjz6kdbSjksKrC

kaos77 (Tue, 20 Aug 2019 12:55:53 GMT):
Has joined the channel.

kaos77 (Tue, 20 Aug 2019 12:55:54 GMT):
I need to change the signature scheme (ECDSA to Schnorr blind signature), how can I do it??

nyet (Tue, 20 Aug 2019 15:12:54 GMT):
@troyronda yes to all of the above. I assume the issue is manpower?

mffrench (Tue, 20 Aug 2019 15:45:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=MpGyjiKFG3aXfZFwE) Hello, I saw you begin to manage some HLF 2.0-alpha features in HLF SDK Go (https://github.com/hyperledger/fabric-sdk-go/tree/master/third_party/github.com/hyperledger/fabric/protos/token). Can I guess we can use HLF SDK Go with last 2.0.0-alpha ?

troyronda (Tue, 20 Aug 2019 15:52:21 GMT):
@mffrench we have imported the latest protos. i haven't yet run the tests against 2.0.0-alpha but it is certainly possible to do so.

mffrench (Tue, 20 Aug 2019 15:53:56 GMT):
thank @troyronda : can you tell me where I can find the HLF SDK Go CI server ? I could then to see how I can run integration test on HLF 1.4 and finally try to run it on an HLF 2.0-alpha ?

troyronda (Tue, 20 Aug 2019 15:56:08 GMT):
You can run locally with make integration-tests-prerelease, but first the versions need to be updated in the fixture files (particularly Makefile and the dockerenv folder).

troyronda (Tue, 20 Aug 2019 16:11:02 GMT):
It also looks like configtx.yaml will need updates for v2.

troyronda (Tue, 20 Aug 2019 16:11:02 GMT):
It also looks like configtx.yaml (test fixture) will need updates for v2.

paranjan (Wed, 21 Aug 2019 09:10:00 GMT):
Has joined the channel.

paranjan (Wed, 21 Aug 2019 09:52:11 GMT):
Has left the channel.

troyronda (Wed, 21 Aug 2019 11:18:22 GMT):
Cross posted the SDK status topic to the fabric mailing list: https://lists.hyperledger.org/g/fabric/message/6679

troyronda (Wed, 21 Aug 2019 13:38:40 GMT):
From the Fabric Contributor's call, the Fabric team is creating the new protos repos. I'll get started on a CR to shift our proto usage to an external repo.

troyronda (Wed, 21 Aug 2019 13:38:40 GMT):
From the Fabric Contributor's call, the Fabric team is creating the new protos repos. I'll get started on a CR to shift the SDK proto usage to an external repo (which will be pulled in as a dependency via Go modules).

troyronda (Wed, 21 Aug 2019 16:59:21 GMT):
CR pushed (but we need to wait for the real repo to be populated): https://gerrit.hyperledger.org/r/c/fabric-sdk-go/+/33084

troyronda (Wed, 21 Aug 2019 16:59:21 GMT):
CR pushed: https://gerrit.hyperledger.org/r/c/fabric-sdk-go/+/33084

shitaibin (Thu, 22 Aug 2019 12:16:54 GMT):
Has joined the channel.

mahoney1 (Thu, 22 Aug 2019 14:18:14 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

Tatse (Fri, 23 Aug 2019 06:09:58 GMT):
Has joined the channel.

troyronda (Fri, 23 Aug 2019 18:11:01 GMT):
FYI: The change to use externalized protos has been merged. If you have imported github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos, please update to github.com/hyperledger/fabric-protos-go

troyronda (Fri, 23 Aug 2019 18:11:01 GMT):
FYI: The change to use externalized protos has been merged. If you have imported github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos, please update to github.com/hyperledger/fabric-protos-go

troyronda (Fri, 23 Aug 2019 18:11:01 GMT):
The change to use externalized protos has been merged. If you have imported github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos, please update to github.com/hyperledger/fabric-protos-go (once you use the lastest SDK commit)

troyronda (Fri, 23 Aug 2019 18:11:01 GMT):
The change to use externalized protos has been merged. If you have imported github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos, please update to github.com/hyperledger/fabric-protos-go (once you use the lastest SDK commit)

troyronda (Fri, 23 Aug 2019 18:12:23 GMT):
We will also be deleting the protos folder from the SDK.

troyronda (Fri, 23 Aug 2019 18:12:53 GMT):

MHBauer (Mon, 26 Aug 2019 19:10:19 GMT):
good riddance

MHBauer (Mon, 26 Aug 2019 19:11:23 GMT):
and another alpha release at some point?

MHBauer (Mon, 26 Aug 2019 21:10:29 GMT):
do you guys have a meeting any times?

yxuco (Tue, 27 Aug 2019 05:38:09 GMT):
The externalized fabric-protos-go removed the PayloadVisibility field of the ChaincodeHeaderExtension struct, which caused the following error when compiling my client code: `vendor/github.com/hyperledger/fabric-sdk-go/pkg/fab/txn/txn.go:78:79: hdrExt.PayloadVisibility undefined (type *peer.ChaincodeHeaderExtension has no field or method PayloadVisibility)`. The project fabric-protos-go does not have any tags or branches that I can go back to. What can I do?

yxuco (Tue, 27 Aug 2019 13:47:41 GMT):
Would this external dependency on fabric-protos-go@master make fabric-sdk-go more fragile, unless the dependency is on a specific tagged version of the protos-go?

troyronda (Tue, 27 Aug 2019 13:48:09 GMT):
We use go.mod to set the version being used.

troyronda (Tue, 27 Aug 2019 14:44:21 GMT):
@yxuco I'm working on a fix for this error. (This field is no longer needed.) https://gerrit.hyperledger.org/r/c/fabric-sdk-go/+/33207/1/pkg/fab/txn/txn.go#b78

Alexoid83 (Tue, 27 Aug 2019 14:58:45 GMT):
Has joined the channel.

Alexoid83 (Tue, 27 Aug 2019 14:58:46 GMT):
Hi. I am facing an issue, that sometimes when invoking chaincode, I get an error message on grpc level like: "certificate signed by unknown authority". For me it seems that the sdk tries to talk to a peer node of another organization. Since TLS is enabled I wonder where my fabric-sdk gets the ca-tls-cert of the other organizations, because initially it only knows the CA-tls-certs of its "own" organization (through the custom-endpoint). But when the discovery service tries to discover new peers of the known channels, it calls "customEndpoint.PeerConfig()" at some point. But I am not able to set a tls-cert of the given peer, since I do not know it. What is the correct way to handle this?

troyronda (Tue, 27 Aug 2019 17:01:16 GMT):
It's looking like we will need another release. It would be nice to move beyond alphas...

troyronda (Tue, 27 Aug 2019 17:01:43 GMT):
just ad hoc...

troyronda (Tue, 27 Aug 2019 18:52:06 GMT):
@yxuco merged a fix.

troyronda (Tue, 27 Aug 2019 18:52:06 GMT):
@yxuco merged a fix. (please let me know if it works for you as I haven't reproduced that error.)

MHBauer (Tue, 27 Aug 2019 19:37:38 GMT):
so what, push one sooner rather than later.

MHBauer (Tue, 27 Aug 2019 19:37:45 GMT):
never pushed one with go modules,

MHBauer (Tue, 27 Aug 2019 19:38:03 GMT):
so I and a bunch of people still have a bunch of hardcoded transitive dependencise

troyronda (Tue, 27 Aug 2019 19:38:53 GMT):
I was also hoping to see fabric merge the protos change, and from there figure out what to do with the remainder of the third_party directory (https://github.com/hyperledger/fabric-sdk-go/tree/master/third_party/github.com/hyperledger/fabric)

troyronda (Tue, 27 Aug 2019 19:39:58 GMT):
We had copies of some Fabric utilities due to the protos being part of the SDK. Now we will have the same protos...

troyronda (Tue, 27 Aug 2019 19:40:12 GMT):
@MHBauer

MHBauer (Tue, 27 Aug 2019 19:40:29 GMT):
yay

MHBauer (Tue, 27 Aug 2019 19:40:54 GMT):
haven't seen the separate protos yet, but been hearing about it for a long time

MHBauer (Tue, 27 Aug 2019 20:30:36 GMT):
so where do you talk to each other to decide things and do stuff? this isn't really a structured record.

troyronda (Tue, 27 Aug 2019 20:37:16 GMT):
There hasn't been as many decisions to make lately. (the SDK has mainly stabilized as the core bits have been built out). We generally talk with each other and see if there are topics in this chat room.

troyronda (Tue, 27 Aug 2019 20:37:44 GMT):
I know there are few topics being discussed beyond the proto issue.

troyronda (Tue, 27 Aug 2019 20:37:44 GMT):
I know there are few topics being brought up beyond the proto issue.

troyronda (Tue, 27 Aug 2019 20:39:21 GMT):
(1) Fabric v2 features - particularly chaincode lifecycle. (2) Andrew Coleman has brought up the idea of layering their terminology on top of the SDK. (3) Having a stablized versioning / release.

MHBauer (Tue, 27 Aug 2019 20:46:56 GMT):
what about different system chaincodes, I remember there being issues accessing them, but it's been a while since anyone I know has tried.

troyronda (Tue, 27 Aug 2019 20:47:45 GMT):
We use system chaincodes. I'm not sure if I know which issue you are referring to.

MHBauer (Tue, 27 Aug 2019 20:48:00 GMT):
I'll attempt to take a critical look at it, but "setting up the sdk" is usually my biggest issue, followed by "how do I get an sdk config"

MHBauer (Tue, 27 Aug 2019 20:48:33 GMT):
non-standard system chaincodes. I use the regular ones all the time. Seem to be hardcoded tho.

troyronda (Tue, 27 Aug 2019 20:48:43 GMT):
we also use non-standard system chaincodes.

MHBauer (Tue, 27 Aug 2019 20:48:54 GMT):
alright, I'll have to take another look.

yxuco (Tue, 27 Aug 2019 21:04:55 GMT):
@troyronda I wonder how you would avoid the following runtime error. My client app uses fabric/protos/utils to process BlockEvents, which apparently also registers proto stucts. So when used with fabric-sdk-go together, it prints out the following errors and panics at startup. I guess that I can either re-write the code to avoid calling fabric/protos/utils, or go back to alpha5 version of fabric-sdk-go. Thanks. `2019/08/27 14:26:17 proto: duplicate proto type registered: common.MSPRole 2019/08/27 14:26:17 proto: duplicate proto type registered: common.MSPIdentityAnonymity 2019/08/27 14:26:17 proto: duplicate proto type registered: common.CombinedPrincipal panic: proto: duplicate enum registered: common.MSPPrincipal_Classification`

troyronda (Tue, 27 Aug 2019 21:30:36 GMT):
@yxuco I hope fabric master makes use of the fabric-protos-go soon. Note: It is now called protoutil.

troyronda (Tue, 27 Aug 2019 21:30:44 GMT):
FYI: The SDK has an internal copy of protoutil that does use fabric-protos-go at https://github.com/hyperledger/fabric-sdk-go/tree/master/internal/github.com/hyperledger/fabric/protoutil

troyronda (Tue, 27 Aug 2019 21:31:07 GMT):
(Of course, this cannot imported into an external project)

troyronda (Tue, 27 Aug 2019 21:31:07 GMT):
(Of course, this cannot be directly imported into an external project due to the internal path)

troyronda (Tue, 27 Aug 2019 21:44:56 GMT):
As a historical note, the previous SDK version maintained a second copy of the protos with the registered names prefixed to avoid collisions.

troyronda (Tue, 27 Aug 2019 21:48:51 GMT):
The idea now is that with one source of go protos, projects importing that same source will only have protos registered once... and names will no longer collide.

yxuco (Wed, 28 Aug 2019 04:34:48 GMT):
@troyronda Thanks for the pointer. will change my client code to replace the reference of fabric/protos.

abel23 (Wed, 28 Aug 2019 06:20:46 GMT):
Has joined the channel.

abel23 (Wed, 28 Aug 2019 08:44:13 GMT):
Why is the developing application section of the hyperledger docs only on node.js. Can the paper net app be made in go? Where can i learn to make apps using go SDK?

Alexoid83 (Wed, 28 Aug 2019 09:25:45 GMT):
What exactly is the Identity field in the discovery client Peer struct: type Peer struct { MSPID string AliveMessage *protoext.SignedGossipMessage StateInfoMessage *protoext.SignedGossipMessage Identity []byte }

Alexoid83 (Wed, 28 Aug 2019 09:25:45 GMT):
What exactly is the Identity field in the discovery client Peer struct: `type Peer struct { MSPID string AliveMessage *protoext.SignedGossipMessage StateInfoMessage *protoext.SignedGossipMessage Identity []byte }`

Alexoid83 (Wed, 28 Aug 2019 09:25:45 GMT):
What exactly is the Identity field in the discovery client Peer struct: ` type Peer struct { MSPID string AliveMessage *protoext.SignedGossipMessage StateInfoMessage *protoext.SignedGossipMessage Identity []byte } `

troyronda (Wed, 28 Aug 2019 13:29:20 GMT):
I have also, just now, made a suggestion to the Fabric folks via Jira for the protoutil to be part of fabric-lib-go: https://jira.hyperledger.org/browse/FAB-16457

troyronda (Wed, 28 Aug 2019 13:29:20 GMT):
I have also, just now, made a suggestion to the Fabric folks via Jira for the protoutil to be part of fabric-lib-go (or otherwise externalized): https://jira.hyperledger.org/browse/FAB-16457

Alexoid83 (Wed, 28 Aug 2019 19:37:26 GMT):
Somebody has experience with sdk discovery service?

yxuco (Thu, 29 Aug 2019 02:20:50 GMT):
@abel23 I was wondering about the same question a few months ago. I think that the paper-net sample can be implemented in Go, using ABAC, although I have not seen anyone tried to put it together. It is missing a Go utility for managing wallet of x509 keys similar to the js utility used by the paper-net sample. However, you can generate the user keys by using a CA server. For example, start the byfn network with "-a" option, and then generate the keys for paper-net users of the 2 bank orgs, and then write your chaincode to call cid lib API that extracts and verifies user attributes in paper-net transactions. With that said, I wish that fabric-sdk-go would provide a utility to support wallet similar to the js sdk.

bis2019 (Tue, 03 Sep 2019 15:58:11 GMT):
Has joined the channel.

amealwithbasil (Tue, 03 Sep 2019 23:57:58 GMT):
Has joined the channel.

amealwithbasil (Tue, 03 Sep 2019 23:57:58 GMT):
Hi, I am new to the Fabric Go SDK. Are there any configuration options that can be set in the Go SDK that can influence TPS and stability?

haardikkk (Wed, 04 Sep 2019 09:53:05 GMT):
Hey guys

haardikkk (Wed, 04 Sep 2019 09:53:20 GMT):
Can I pass decryption keys in hyperledger smart contracts or is that public information to anyone on the network?

haardikkk (Wed, 04 Sep 2019 09:53:33 GMT):
please take a look at my more detailed SO post here - https://stackoverflow.com/questions/57785884/passing-decryption-keys-in-hyperledger-fabric-smart-contracts

troyronda (Wed, 04 Sep 2019 15:35:31 GMT):
@yxuco FYI: The fabric folks have updated Fabric to use fabric-protos-go. E.g., https://github.com/hyperledger/fabric/tree/master/protoutil now has the same proto definitions as the SDK.

yxuco (Thu, 05 Sep 2019 04:12:16 GMT):
@troyronda Thanks for the note. wonder when they'll cut release 2.0. will look for an upgrade.

Alexoid83 (Thu, 05 Sep 2019 06:12:28 GMT):
Hi is there a fix for the following problem: When instantiating a new sdk and directly sending a transaction, the request may run into an "unknown authority" error since there can be a race-condition between the request using the certpool and the msp updating the cert-pool.

mattmaru (Thu, 05 Sep 2019 09:53:26 GMT):
Hi guys. I would need your help/opinion. I need to performs 2 actions and i haven't find anything online ... 1) I would call a query without any keys but using my asset's fields . Is it possible? 2) Is possible get all keys about records stores in the ledger?

mattmaru (Thu, 05 Sep 2019 09:53:36 GMT):
Can you help me ?

kopaygorodsky (Thu, 05 Sep 2019 09:54:28 GMT):
enrollment certificate of local msp id

swetha (Fri, 06 Sep 2019 19:29:27 GMT):
@mattmaru I am not sure about number 2. But in regards to number 1, are you asking if you can query without any args?

swetha (Fri, 06 Sep 2019 19:30:02 GMT):
To my knowledge the go sdk just passes along the args to the peer and they should match what your chaincode is expecting

nitinbondre (Sat, 07 Sep 2019 11:13:40 GMT):
Has joined the channel.

chanioxaris (Mon, 09 Sep 2019 15:34:52 GMT):
Has joined the channel.

yxuco (Mon, 09 Sep 2019 16:13:56 GMT):
@mattmaru For #1, you can use either a composite-key or rich-query to retrieve states by specified fields, however, you need to pre-define the composite-key or Couchdb index for the query fields to avoid a full database scan. For #2, you can do a range query by specifying a range that covers all possible key values.

rallam (Mon, 09 Sep 2019 17:51:51 GMT):
Has joined the channel.

rallam (Mon, 09 Sep 2019 17:57:12 GMT):
Hi, I have an application which does batch updates to the chaincode. Right now, it process only one transaction, and ignores the other one.How does chaincode/sdkclient act to multiple transaction submitted at the sametime..Does it have code in place to handle concurrency..? Thank you!

rallam (Mon, 09 Sep 2019 17:57:12 GMT):
Hi, I have an application which does batch updates to the chaincode. Right now, it process only one transaction, and ignores the other one. How does chaincode/sdkclient act to multiple transaction submitted at the sametime..Does it have code in place to handle concurrency..? Thank you!

dsessions (Mon, 09 Sep 2019 22:12:51 GMT):
Has joined the channel.

dsessions (Mon, 09 Sep 2019 22:12:52 GMT):
Are there version plans for the Go SDK that have solidified? https://chat.hyperledger.org/channel/fabric-maintainers?msg=dx9Ro7iLPaRKy9gEn

dsessions (Mon, 09 Sep 2019 22:15:32 GMT):
My org is one of those who has questions about the SDK's status, stability, and durability as it compares to the officially supported Java and Node SDKs

nyet (Mon, 09 Sep 2019 22:46:48 GMT):
Its a matter of perspective. Some people think "stable" means "hasn't changed in 3 years" some think "stable" means "they've released 3 major releases in as many months". Both can be misleading metrics.

nyet (Mon, 09 Sep 2019 22:47:18 GMT):
Actual stability can only be measured by your own use cases.

dsessions (Mon, 09 Sep 2019 22:47:40 GMT):
I agree on your first point.

dsessions (Mon, 09 Sep 2019 22:48:48 GMT):
Certainly there is a reason why Java and Node are the officially supported SDKs.

dsessions (Mon, 09 Sep 2019 22:49:32 GMT):
They've met some sort of metric within the project for that to be a thing.

nyet (Mon, 09 Sep 2019 22:49:37 GMT):
I'm not certain that reason is stability or durability, both have been around longer and just got embedded in all of the tutorials early on.

nyet (Mon, 09 Sep 2019 22:50:14 GMT):
Also, the barriers to entry for node and java are lower since there are a lot of students that use both over golang. Most get as far as the tutorials and move on.

dsessions (Mon, 09 Sep 2019 22:50:25 GMT):
They're also officially released, and don't have an alpha status though.

nyet (Mon, 09 Sep 2019 22:50:45 GMT):
IMO "alpha" means nothing, its just a word.

dsessions (Mon, 09 Sep 2019 22:51:06 GMT):
That designation means a lot to everyone else, I can guarantee you that. ;)

nyet (Mon, 09 Sep 2019 22:51:16 GMT):
i've see "gold" releases that are less than alpha for many protocols

nyet (Mon, 09 Sep 2019 22:52:09 GMT):
mainnets that should have been testnets for another year, minimum

dsessions (Mon, 09 Sep 2019 22:52:37 GMT):
I wouldn't disagree as far as exceptions, but I would say that the vast, vast majority of the world over looks at those designations as a way to determine the maturity and viability of a release.

nyet (Mon, 09 Sep 2019 22:52:47 GMT):
I agree, though, that the gosdk "branding" leaves a lot to be desired, and they should have tagged a real realease months ago.

nyet (Mon, 09 Sep 2019 22:52:58 GMT):
if not a year ago

nyet (Mon, 09 Sep 2019 22:53:12 GMT):
That critcism is absolutely warranted.

dsessions (Mon, 09 Sep 2019 22:54:29 GMT):
Would you have any insight then to the roadmap?

nyet (Mon, 09 Sep 2019 22:54:39 GMT):
If i was a maintainer, I would be concerned with image/optics. I'm not, in this case, just a end user dev, so i care about what the code actually does, and not what the latest tag looks like.

dsessions (Mon, 09 Sep 2019 22:54:48 GMT):
ah

nyet (Mon, 09 Sep 2019 22:54:50 GMT):
Nope, i have none, just an outside dev.

dsessions (Mon, 09 Sep 2019 22:54:55 GMT):
gotcha

dsessions (Mon, 09 Sep 2019 22:55:05 GMT):
Have you used any of the other SDKs?

dsessions (Mon, 09 Sep 2019 22:55:26 GMT):
rather . . have you used the Java or Node SDKs at all?

nyet (Mon, 09 Sep 2019 22:55:42 GMT):
the node one is all over the map, half of the examples are broken. Java instantiation of chain code documentation is lacking

nyet (Mon, 09 Sep 2019 22:56:11 GMT):
i'm more familiar with golang than java or node so im sticking with that.

dsessions (Mon, 09 Sep 2019 22:56:12 GMT):
The Go docs leave a bit to be desired as well (speaking from experience)

nyet (Mon, 09 Sep 2019 22:56:16 GMT):
yes for sure

nyet (Mon, 09 Sep 2019 22:56:32 GMT):
they overly depend on selfdocumenting go :(

nyet (Mon, 09 Sep 2019 22:56:55 GMT):
and they are sorely lacking in examples, and there are NO real working hlf go sdk tutorials (that i know of)

nyet (Mon, 09 Sep 2019 22:57:13 GMT):
(other than what is the the gosdk repo itself)

dsessions (Mon, 09 Sep 2019 22:57:49 GMT):
I couldn't agree more with those points

nyet (Mon, 09 Sep 2019 22:57:58 GMT):
Far too many "examples" are buried in test cases

dsessions (Mon, 09 Sep 2019 22:58:02 GMT):
I have a list as well ;)

nyet (Mon, 09 Sep 2019 22:58:06 GMT):
hehe yep

nyet (Mon, 09 Sep 2019 22:58:18 GMT):
top of my list is error reporting but that is a problem with fabric in general not just the sdk

nyet (Mon, 09 Sep 2019 22:58:35 GMT):
its almost impossible to figure out what went wrong w/o 1) reading code 2) adding more debugging

nyet (Mon, 09 Sep 2019 22:58:41 GMT):
thats my #1 complaint right now

nyet (Mon, 09 Sep 2019 22:58:57 GMT):
The stabilty is actually quite good in my experience

nyet (Mon, 09 Sep 2019 22:59:15 GMT):
99% of the issues are cert and/or config file related

dsessions (Mon, 09 Sep 2019 23:00:41 GMT):
I think once you can get something to work with the SDK, it seems to work consistently

dsessions (Mon, 09 Sep 2019 23:03:12 GMT):
I appreciate the conversation and perspective, for sure

MHBauer (Mon, 09 Sep 2019 23:28:24 GMT):
I use the sdk to talk to a chaincode. works for our cases.

MHBauer (Mon, 09 Sep 2019 23:28:51 GMT):
generally when I write an example or some tiny program for it, I copy the existing setup and paste it into a new main.

MHBauer (Mon, 09 Sep 2019 23:29:14 GMT):
but I almost know what I'm looking for when looking into the tests and what not.

yxuco (Tue, 10 Sep 2019 04:53:06 GMT):
I like go-sdk for a few obvious reasons, and we are using it to develop a UI modeling tool that hides the details of the implementation programming language, and allows user to implement fabric apps (both chaincode and client app) using graphical modeling. The project is open-source at: https://github.com/TIBCOSoftware/dovetail-contrib/tree/develop/hyperledger-fabric. I think that the go-sdk had served us very well, although I had to look at the source code to figure out how to do things, and I would like to see a 1.0 release tag sometime soon, so I do not have to regularly check if our tool still works with the latest go-sdk code :-)

heatherp (Tue, 10 Sep 2019 09:03:56 GMT):
Has joined the channel.

troyronda (Tue, 10 Sep 2019 14:30:04 GMT):
FYI: A new method has been added to the Go SDK to update channel configuration based on a channel config struct: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt#Client.UpdateChannelConfig (thanks aleks)

dsessions (Tue, 10 Sep 2019 21:13:59 GMT):
Question . . is there a way to load the properties from config.yaml as environment variables?

dsessions (Tue, 10 Sep 2019 21:14:07 GMT):
bypassing the requirement for config.yaml

troyronda (Tue, 10 Sep 2019 21:41:21 GMT):
Yes - the config processor is viper.

nyet (Tue, 10 Sep 2019 22:17:03 GMT):
The problem is maps and arrays

nyet (Tue, 10 Sep 2019 22:17:30 GMT):
You can't represent an entire yaml file in env vars

soumyanayak (Wed, 11 Sep 2019 14:26:12 GMT):
Has joined the channel.

troyronda (Wed, 11 Sep 2019 14:42:32 GMT):
We should apply the next release tag to the Fabric SDK Go (last tag was end of March). Fabric SDK Go Beta 1 CR has been proposed: https://gerrit.hyperledger.org/r/c/fabric-sdk-go/+/33455

dsessions (Wed, 11 Sep 2019 18:14:45 GMT):
thanks!

Lebski (Thu, 12 Sep 2019 06:53:51 GMT):
Has joined the channel.

Lebski (Thu, 12 Sep 2019 07:01:06 GMT):
Hi! I'm quite new to this section. I would like to run the go sdk with `go mod` but im running in to the issue `go: github.com/hyperledger/fabric-sdk-go@v0.0.0-00010101000000-000000000000: unknown revision 000000000000` all the time. Is this an actual error or is my go configuration wrong?

Lebski (Thu, 12 Sep 2019 07:01:06 GMT):
Hi! I'm quite new to this section. I would like to use the go sdk with `go mod` but im running in to the issue `go: github.com/hyperledger/fabric-sdk-go@v0.0.0-00010101000000-000000000000: unknown revision 000000000000` all the time. Is this an actual error or is my go configuration wrong?

MHBauer (Thu, 12 Sep 2019 19:21:05 GMT):
looks good. doesn't need to be a final release, but any release would help as providing an anchor point for people to use.

nyetnyet (Fri, 13 Sep 2019 01:02:31 GMT):
I don't see any reason to not tag, there hasn't been that much master branch activity or an uncontrollable list of unfixed bugs

KaseyAlusi (Fri, 13 Sep 2019 16:23:57 GMT):
Hi, is there a channel specifically for getting started contributing?

metadata (Mon, 16 Sep 2019 07:13:20 GMT):
Hi all, I'm getting below error when running `dep ensure` command ``` Solving failure: (1) failed to list versions for https://github.com/milagro-crypto/amcl: fatal: could not read Username for 'https://github.com': terminal prompts disabled : exit status 128 ``` `github.com/milagro-crypto/aml` doen't exist any workaround for this ?

metadata (Mon, 16 Sep 2019 07:13:20 GMT):
Hi all, I'm getting below error when running `dep ensure` command ``` Solving failure: (1) failed to list versions for https://github.com/milagro-crypto/amcl: fatal: could not read Username for 'https://github.com': terminal prompts disabled : exit status 128 ``` `github.com/milagro-crypto/amcl` doen't exist any workaround for this ?

dsessions (Mon, 16 Sep 2019 18:01:08 GMT):
That's a private repository, or it doesn't exist, one of the two . .

garunkumar450 (Mon, 16 Sep 2019 18:30:02 GMT):
Has joined the channel.

garunkumar450 (Mon, 16 Sep 2019 18:30:03 GMT):
iam using RegisterChaincodeEvent with options as BlockEvents but iam getting event as only one if i upload data into dlt as bulk i getting the last data in bulk upload only iam getting the event

metadata (Tue, 17 Sep 2019 05:23:45 GMT):
but fabric is using this repo

Psingh (Tue, 17 Sep 2019 05:27:59 GMT):
Fabric is not using this repo any more. Now they r using ```github.com/hyperledger/fabric-amcl``` for the same

Psingh (Tue, 17 Sep 2019 05:27:59 GMT):
Fabric is not using this repo any more. Now they r using ```github.com/hyperledger/fabric-amcl``` for the same purpose

Psingh (Tue, 17 Sep 2019 05:27:59 GMT):
Fabric is not using this repo anymore. Now it is using ```github.com/hyperledger/fabric-amcl``` for the same purpose

metadata (Tue, 17 Sep 2019 05:29:58 GMT):
but I'm continuously getting this error even after cloning the fabric-amcl to my local machine

metadata (Tue, 17 Sep 2019 08:18:47 GMT):
Hi all, I'm getting ``` Post https://localhost:7054/enroll: x509: certificate is valid for ca.seller.mytrade.com, not localhost" ``` error when trying to enrol the user after searching I found out that I have to add below config in `docker-compose.yaml` file under `ca` section ``` - FABRIC_CA_SERVER_CSR_CN=ca.seller.mytrade.com - FABRIC_CA_SERVER_CSR_HOSTS=ca.seller.mytrade.com,localhost ``` but still I'm getting the same result. Please help Do I have to generate all the certs again?

metadata (Tue, 17 Sep 2019 08:18:47 GMT):
Hi all, I'm getting ``` Post https://localhost:7054/enroll: x509: certificate is valid for ca.seller.mytrade.com, not localhost" ``` error when trying to enrol the user after searching I found out that I have to add below config in `docker-compose.yaml` file under `ca` section ``` - FABRIC_CA_SERVER_CSR_CN=ca.seller.mytrade.com - FABRIC_CA_SERVER_CSR_HOSTS=ca.seller.mytrade.com,localhost ``` but still I'm getting the same result. Please help Do I have to generate all the certs again?

metadata (Tue, 17 Sep 2019 08:18:47 GMT):
Hi all, I'm getting ` Post https://localhost:7054/enroll: x509: certificate is valid for ca.seller.mytrade.com, not localhost" ` error when trying to enrol the user after searching I found out that I have to add below config in `docker-compose.yaml` file under `ca` section ``` - FABRIC_CA_SERVER_CSR_CN=ca.seller.mytrade.com - FABRIC_CA_SERVER_CSR_HOSTS=ca.seller.mytrade.com,localhost ``` but still I'm getting the same result. Please help Do I have to generate all the certs again?

metadata (Tue, 17 Sep 2019 12:57:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=aedHqMwvncDzP63et) any help with this issue?

metadata (Tue, 17 Sep 2019 12:58:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=aedHqMwvncDzP63et) Can anyone please help?

nyet (Tue, 17 Sep 2019 16:36:25 GMT):
This is probably the wrong approach, typically localhost in a SAN is not recommended. You really want to assign every endpoint a real DNS hostname.

firas.qutishat (Wed, 18 Sep 2019 17:31:04 GMT):
@here fabric-sdk-go release v1.0.0-beta1: https://github.com/hyperledger/fabric-sdk-go/tree/v1.0.0-beta1

MHBauer (Wed, 18 Sep 2019 19:30:45 GMT):
\o/

dsessions (Wed, 18 Sep 2019 19:56:02 GMT):
Very nice!!

mahoney1 (Thu, 19 Sep 2019 15:24:09 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas%3A+Fabric+Application+Developer+Community+Call

josephnicholas (Thu, 19 Sep 2019 15:52:17 GMT):
Has joined the channel.

smith (Fri, 20 Sep 2019 06:17:21 GMT):
Has joined the channel.

dsessions (Fri, 20 Sep 2019 17:06:22 GMT):
Has any thought been given to moving to a newer version of Go? 1.13 in-particular, has a lot to offer (to say the least).

bstasyszyn (Fri, 20 Sep 2019 17:27:37 GMT):
@dsessions Go 1.13 support is included in the beta1 release: https://gerrit.hyperledger.org/r/c/fabric-sdk-go/+/33464

amudvari (Fri, 20 Sep 2019 21:06:38 GMT):
Has joined the channel.

amudvari (Sun, 22 Sep 2019 22:46:58 GMT):
Hi all, I recently tried implementing sdk-go with a chaincode I had written earlier. Upon trying to query using the Query function, I got an error saying: “Transaction processing for endorser [localhost:8051]: Chaincode status Code: (500) UNKNOWN. Description: function not found” I then realized that the chaincode was not installed correctly, even though the part of the code dealing with instantiation and initiation had returned no error. In fact, even if no chaincode file exists in the given path, a chaincode is shown to be instantiated in the peers. I was wondering if someone has a tip on how to proceed with solving this error; any suggestion would be greatly appreciated.

smith (Mon, 23 Sep 2019 09:47:40 GMT):
wallet

medikent (Wed, 25 Sep 2019 17:33:48 GMT):
Is having the '@' symbol in various paths from *config.yaml* intentional or is that accidental complexity? This causes a difficult situation when using Kubernetes with Fabric.

nyet (Wed, 25 Sep 2019 17:41:24 GMT):
You mean as identities? It's perfectly legal but not necessary. Not surprised kubernetes has issues, they can't seem to get a lot of things right.

medikent (Wed, 25 Sep 2019 17:42:56 GMT):
Do you mean Kubernetes not getting things right?

nyet (Wed, 25 Sep 2019 17:43:28 GMT):
yes. e.g. service names not being able to have more than one dot. Completely broken

medikent (Wed, 25 Sep 2019 17:43:40 GMT):
lol, Kubernetes is way less broken than Fabric.

nyet (Wed, 25 Sep 2019 17:43:42 GMT):
totally useless w/o a custom kubernetes DNS

medikent (Wed, 25 Sep 2019 17:44:02 GMT):
Definitely not totally useless if you have the right guy on your team.

nyet (Wed, 25 Sep 2019 17:44:36 GMT):
not defending fabric btw, it has a ton of issues.

nyet (Wed, 25 Sep 2019 17:44:44 GMT):
(not a fabric dev either)

nyet (Wed, 25 Sep 2019 17:45:01 GMT):
but while you're here, how do you solve service naming issues?

nyet (Wed, 25 Sep 2019 17:45:20 GMT):
specifically for fabric if your endpoint has more than one dot

medikent (Wed, 25 Sep 2019 17:45:26 GMT):
I delegate that to my devops guy :P

medikent (Wed, 25 Sep 2019 17:45:33 GMT):
Let me ask him

nyet (Wed, 25 Sep 2019 17:45:40 GMT):
hopefully he doesn't say hairpin

medikent (Wed, 25 Sep 2019 17:46:19 GMT):
He just says don't use dots in the names ever. He says it has to be DNS compatible so non-standard names will kill it.

medikent (Wed, 25 Sep 2019 17:46:19 GMT):
He just says don't use dots in the names ever. He says it has to be DNS compatible so non-standard characters will kill it.

nyet (Wed, 25 Sep 2019 17:46:33 GMT):
"DNS compatible" means more than one dot.

nyet (Wed, 25 Sep 2019 17:46:52 GMT):
how do i access service.org.consortium

nyet (Wed, 25 Sep 2019 17:47:08 GMT):
let me guess s/\./-/g

nyet (Wed, 25 Sep 2019 17:47:10 GMT):
lol

medikent (Wed, 25 Sep 2019 17:47:29 GMT):
I'll have to bow out here, getting beyond my familiarity.

dsessions (Wed, 25 Sep 2019 17:47:30 GMT):
@ signs can't be stored in Kubernetes secret names

nyet (Wed, 25 Sep 2019 17:47:58 GMT):
there is NOTHING in dns that says DNS must have zero dots in record inside subdomain, thats a k8s fabrication

dsessions (Wed, 25 Sep 2019 17:48:15 GMT):
we're talking about service names and secret names :)

dsessions (Wed, 25 Sep 2019 17:48:31 GMT):
Admin@ can not be stored as a kubernetes secret name

nyet (Wed, 25 Sep 2019 17:48:33 GMT):
sorry but both of those sound like related k8s fails ;)

nyet (Wed, 25 Sep 2019 17:48:47 GMT):
and you cant have a . in a service :(

dsessions (Wed, 25 Sep 2019 17:48:47 GMT):
Don't disagree

nyet (Wed, 25 Sep 2019 17:49:11 GMT):
even tho (foo.bar).subdomain.domain.com is perfectly legal in DNS

dsessions (Wed, 25 Sep 2019 17:49:23 GMT):
From a deployment perspective though, I'd say the vast majority of production deploys are likely going to be in a kubernetes environment, wouldn't you say?

dsessions (Wed, 25 Sep 2019 17:49:43 GMT):
It is . . but foo.bar is not a valid hostname

nyet (Wed, 25 Sep 2019 17:49:56 GMT):
its a perfectly valid DNS record

dsessions (Wed, 25 Sep 2019 17:50:01 GMT):
yes

dsessions (Wed, 25 Sep 2019 17:50:04 GMT):
agreed

nyet (Wed, 25 Sep 2019 17:50:52 GMT):
from the (limited) discussions i've had with k8s devs the origin of service naming was done by someone unfamiliar with DNS

dsessions (Wed, 25 Sep 2019 17:51:06 GMT):
charming

nyet (Wed, 25 Sep 2019 17:51:22 GMT):
so the @ limitation doesn't surprise me

dsessions (Wed, 25 Sep 2019 17:51:57 GMT):
I spent three weeks getting fabsdk to work in Kubernetes

nyet (Wed, 25 Sep 2019 17:52:03 GMT):
anyway, to summarize, no @ isn't a requirement in fabric identidies

nyet (Wed, 25 Sep 2019 17:52:11 GMT):
i spent at least as long lol

nyet (Wed, 25 Sep 2019 17:52:23 GMT):
again NOT defeinding fabric, it has a ton of bizarre things going on in it

dsessions (Wed, 25 Sep 2019 17:52:30 GMT):
Well, without it in the path, we get an error message stating that the user is invalid

dsessions (Wed, 25 Sep 2019 17:52:44 GMT):
only in the fabric-sdk-go

nyet (Wed, 25 Sep 2019 17:52:48 GMT):
AH ok that might be

nyet (Wed, 25 Sep 2019 17:52:59 GMT):
its not in fabric-ca or fabric itself

dsessions (Wed, 25 Sep 2019 17:53:06 GMT):
correct

dsessions (Wed, 25 Sep 2019 17:53:13 GMT):
the core hlf components don't care

nyet (Wed, 25 Sep 2019 17:53:22 GMT):
that sounds like a good candidate for a new bug

dsessions (Wed, 25 Sep 2019 17:53:33 GMT):
I'd be happy to file it :)

nyet (Wed, 25 Sep 2019 17:53:38 GMT):
But there is some internal construct stuff going on with @org

nyet (Wed, 25 Sep 2019 17:53:47 GMT):
so that is likely the issue

dsessions (Wed, 25 Sep 2019 17:53:49 GMT):
gotcha

nyet (Wed, 25 Sep 2019 17:54:05 GMT):
where and are parameterized

nyet (Wed, 25 Sep 2019 17:54:35 GMT):
that is likely the root cause if i had to guess, because that is unique to the sdk (afaik, i dont know if the otther sdks do this)

dsessions (Wed, 25 Sep 2019 17:54:52 GMT):
We haven't tried other SDKs to know

nyet (Wed, 25 Sep 2019 17:55:28 GMT):
i THINK it is only one way tho, that is to say, user and org are combined to make an identity, but an identity is not split apart ever in the sdk

nyet (Wed, 25 Sep 2019 17:56:25 GMT):
In any case i really appreciate you finding this since it will affect our k8s roadmap

dsessions (Wed, 25 Sep 2019 17:56:45 GMT):
:)

dsessions (Wed, 25 Sep 2019 17:58:07 GMT):
Do you want us to open a bug ticket?

nyet (Wed, 25 Sep 2019 17:58:28 GMT):
ok to clarify: i am NOT an official dev, but yes, i assume the sdk team would appreciate that.

dsessions (Wed, 25 Sep 2019 17:58:46 GMT):
ah

dsessions (Wed, 25 Sep 2019 17:58:48 GMT):
;)

nyet (Wed, 25 Sep 2019 17:59:17 GMT):
when i say "our" i mean the company I work for, not Hyperledger etc.

nyet (Wed, 25 Sep 2019 17:59:17 GMT):
when i say "our roadmap" i mean the company I work for, not Hyperledger etc.

nyet (Wed, 25 Sep 2019 17:59:20 GMT):
(or IBM lol)

dsessions (Wed, 25 Sep 2019 17:59:42 GMT):
gotcha

dsessions (Wed, 25 Sep 2019 18:12:31 GMT):
The jira instance for fabric-sdk-go isn't open . . what's the best way to file a bug report?

Baha-sk (Wed, 25 Sep 2019 18:26:40 GMT):
not sure what you @dsessions but i do see a `create` button at the top of the page

Baha-sk (Wed, 25 Sep 2019 18:26:40 GMT):
not sure what you mean @dsessions but i do see a `create` button at the top of the page

Baha-sk (Wed, 25 Sep 2019 18:27:06 GMT):
https://jira.hyperledger.org/projects/FABG/issues/FABG-794?filter=allopenissues

dsessions (Wed, 25 Sep 2019 18:39:52 GMT):
Hmm . . I do not, lol

dsessions (Wed, 25 Sep 2019 18:40:01 GMT):
Do you have an account?

medikent (Wed, 25 Sep 2019 18:40:57 GMT):
I see the button. I could make the bug.

Baha-sk (Wed, 25 Sep 2019 19:03:18 GMT):
yes, you need open an account

Baha-sk (Wed, 25 Sep 2019 19:03:18 GMT):
yes, you need to open an account

MHBauer (Wed, 25 Sep 2019 19:33:58 GMT):
Does the go sdk support this workflow https://fabric-sdk-node.github.io/tutorial-sign-transaction-offline.html ?

lehors (Wed, 25 Sep 2019 19:52:11 GMT):
Sorry, I don't know. Ask @troyronda

indira.kalagara (Thu, 26 Sep 2019 05:18:49 GMT):
Has joined the channel.

mffrench (Thu, 26 Sep 2019 16:41:49 GMT):
Hello

mffrench (Thu, 26 Sep 2019 17:37:24 GMT):
I'm looking a way to handle couchdb index using hlf sdk go but contrary to nodejs sdk where there is a `metadataPath` field in the install request I don't see such in go sdk install request : ``` type InstallCCRequest struct { Name string Path string Version string Package *resource.CCPackage } ```

mffrench (Thu, 26 Sep 2019 17:39:07 GMT):
also I don't see any json file in the test so it's seems to me this feature is not covered by HLF SDK go

mffrench (Thu, 26 Sep 2019 17:39:39 GMT):
can you confirm that ? if yes can you point me some way to enable such feature ?

mffrench (Thu, 26 Sep 2019 17:39:42 GMT):
thank you :)

mffrench (Fri, 27 Sep 2019 05:49:13 GMT):
OK looking to some chaincode in HLF core I see adding a META-INF directory in chaincode root path should be enough...

metadata (Sat, 28 Sep 2019 09:12:17 GMT):
Hi everyone, Please help with below issue. I was using `https://localhost:7054` for ca and getting this erro `cert is valid for ca.0rg1.example.com not localhost` so I have changed it tp `https://ca.org1.example.com` and now I'm using `https://ca.org1.example.com:7054` to enroll and register the new user but now I'm getting below error ```Post https://ca.org1.example.com:7054/enroll: dial tcp: lookup ca.org1.example.com on 192.168.0.1:53: no such host" ```

Rajatsharma (Mon, 30 Sep 2019 14:48:16 GMT):
Hi everyone, I'm trying to build a system chaincode, and now the code is very large so I was thinking of using `dep` for package management. So my Gopkg.toml is : https://hastebin.com/gahiqufana.cs And Gopkg.lock: https://hastebin.com/imetetuxiz.cs I'm building the plugin using: ``` go build -buildmode=plugin -o myscc.so main.go ``` But when I run the peer I'm getting the error: ``` panic: /debug/requests is already registered. You may have two independent copies of golang.org/x/net/trace in your binary, trying to maintain separate state. This may involve a vendored copy of golang.org/x/net/trace. goroutine 1 [running]: element/vendor/golang.org/x/net/trace.init.0() /opt/gopath/src/element/vendor/golang.org/x/net/trace/trace.go:116 +0x171 plugin.open(0xc00003ec40, 0xe, 0xc0000afad0, 0x0, 0x0) /opt/go/src/plugin/plugin_dlopen.go:113 +0xac8 plugin.Open(0xc00003ec40, 0x11, 0x18fb480, 0xc0000afad0, 0x0) /opt/go/src/plugin/plugin.go:32 +0x35 github.com/hyperledger/fabric/core/scc.loadPlugin(0xc00003ec40, 0x11, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:70 +0x175 github.com/hyperledger/fabric/core/scc.loadSysCCsWithConfig(0xc0000ba248, 0x1, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:51 +0x123 github.com/hyperledger/fabric/core/scc.loadSysCCs.func1() /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:44 +0x97 sync.(*Once).Do(0x24d2da8, 0x17e0fa0) /opt/go/src/sync/once.go:44 +0xb3 github.com/hyperledger/fabric/core/scc.loadSysCCs(0xc0000cdc20, 0x0, 0xc000206000, 0x16bfaa0) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:38 +0x39 github.com/hyperledger/fabric/core/scc.CreatePluginSysCCs(0xc0000cdc20, 0xc000283410, 0x18fafa0, 0xc0000cdc20) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/register_pluginsenabled.go:15 +0x40 github.com/hyperledger/fabric/peer/node.registerChaincodeSupport(0xc0001b2000, 0xc00003fde0, 0x19, 0x18ef580, 0xc00000e2b8, 0xc000289620, 0x18db560, 0xc0002751d0, 0xc000276520, 0xc000231300, ...) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:696 +0x842 github.com/hyperledger/fabric/peer/node.startChaincodeServer(0xc0000420a2, 0x14, 0x18db560, 0xc0002751d0, 0xc000276520, 0xc000160b00, 0x18e25c0, 0xc00023a750, 0xc000230180, 0x3, ...) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:747 +0x45d github.com/hyperledger/fabric/peer/node.serve(0x24d2cc0, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:267 +0xe79 github.com/hyperledger/fabric/peer/node.glob..func1(0x23c8ba0, 0x24d2cc0, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:121 +0x9c github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x23c8ba0, 0x24d2cc0, 0x0, 0x0, 0x23c8ba0, 0x24d2cc0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:762 +0x473 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x23c92c0, 0x8, 0x0, 0x23c8480) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:852 +0x2fd github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x23c92c0, 0xc000475f40, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:800 +0x2b main.main() /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:53 +0x2f7 ``` Can anyone help me with this ?

EltonSearcy (Mon, 30 Sep 2019 17:06:52 GMT):
Has joined the channel.

Baha-sk (Tue, 01 Oct 2019 14:31:14 GMT):
suggest not to use `dep` use `go mod` instead... as the fabric-sdk-go is currently using `go mod`

dsessions (Tue, 01 Oct 2019 18:32:38 GMT):
fabric-sdk-go supports go 1.13 now, which has full mod support

metadata (Wed, 02 Oct 2019 12:51:24 GMT):
Hi eveyone, Do I have to create different chaincode packages in case of multi-org setup?

metadata (Wed, 02 Oct 2019 12:51:24 GMT):
Hi eveyone, Do I have to create different chaincode packages for each Org in case of multi-org setup?

dsessions (Wed, 02 Oct 2019 15:03:18 GMT):
Probably best to ask this in #fabric-chaincode-dev

mahoney1 (Thu, 03 Oct 2019 10:46:22 GMT):
reminder that the Fabric Application Developer Community call today is at **3pm** UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

Psingh (Thu, 03 Oct 2019 14:54:53 GMT):
I'm getting below error when invoking `RegisterChaincodeEvent` method. ``` [fabsdk/client] 2019/10/03 14:33:44 UTC - dynamicdiscovery.(*ChannelService).evaluate -> WARN error getting peers from discovery response: access denied [fabsdk/client] 2019/10/03 14:33:44 UTC - dynamicdiscovery.(*ChannelService).evaluate -> WARN error getting peers from discovery response: access denied [fabsdk/fab] 2019/10/03 14:33:44 UTC - dispatcher.(*Dispatcher).Start.func1 -> DEBU Listening for events... [fabsdk/fab] 2019/10/03 14:33:44 UTC - client.(*Client).connect -> DEBU ... got error in connection response: access denied ```

kopaygorodsky (Sat, 05 Oct 2019 08:45:55 GMT):
it means DS selected target peer that is not on specified channel

kopaygorodsky (Sat, 05 Oct 2019 08:46:16 GMT):
it means DS selected a target peer that is not on specified channel

madiazp (Mon, 07 Oct 2019 12:28:58 GMT):
Has joined the channel.

wunderbarb (Tue, 08 Oct 2019 00:37:08 GMT):
I switched form an old version of fabric-sdk-go to the master. I am using go.mod. No problem at build, but when executing:

wunderbarb (Tue, 08 Oct 2019 00:37:08 GMT):
I switched form an old version of fabric-sdk-go to the master. I am using go.mod. No problem at build, but when executing:``` `2019/10/07 17:34:13 proto: duplicate proto type registered: msp.SerializedIdentity 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.SerializedIdemixIdentity 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.MSPConfig 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.FabricMSPConfig 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.FabricCryptoConfig 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.IdemixMSPConfig 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.IdemixMSPSignerConfig 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.SigningIdentityInfo 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.KeyInfo 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.FabricOUIdentifier 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.FabricNodeOUs panic: proto: duplicate enum registered: common.MSPPrincipal_Classification goroutine 1 [running]: github.com/golang/protobuf/proto.RegisterEnum(...) /home/eric/go/pkg/mod/github.com/golang/protobuf@v1.3.2/proto/properties.go:458 github.com/hyperledger/fabric-protos-go/msp.init.4() /home/eric/go/pkg/mod/github.com/hyperledger/fabric-protos-go@v0.0.0-20190821180310-6b6ac9042dfd/msp/msp_principal.pb.go:404 +0x438 ```` What did I do wrong? Thanks in advance ``` ```

wunderbarb (Tue, 08 Oct 2019 00:37:08 GMT):
I switched from an older version of fabric-sdk-go to the master. I am using go.mod. No problem at build, but when executing:``` `2019/10/07 17:34:13 proto: duplicate proto type registered: msp.SerializedIdentity 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.SerializedIdemixIdentity 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.MSPConfig 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.FabricMSPConfig 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.FabricCryptoConfig 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.IdemixMSPConfig 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.IdemixMSPSignerConfig 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.SigningIdentityInfo 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.KeyInfo 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.FabricOUIdentifier 2019/10/07 17:34:13 proto: duplicate proto type registered: msp.FabricNodeOUs panic: proto: duplicate enum registered: common.MSPPrincipal_Classification goroutine 1 [running]: github.com/golang/protobuf/proto.RegisterEnum(...) /home/eric/go/pkg/mod/github.com/golang/protobuf@v1.3.2/proto/properties.go:458 github.com/hyperledger/fabric-protos-go/msp.init.4() /home/eric/go/pkg/mod/github.com/hyperledger/fabric-protos-go@v0.0.0-20190821180310-6b6ac9042dfd/msp/msp_principal.pb.go:404 +0x438 ```` What did I do wrong? Thanks in advance ``` ```

kopaygorodsky (Tue, 08 Oct 2019 11:16:05 GMT):
I suppose you are using fabric packages ?

kopaygorodsky (Tue, 08 Oct 2019 11:17:09 GMT):
Fabric tries to register own proto types and sdk too in initI() function

kopaygorodsky (Tue, 08 Oct 2019 11:17:09 GMT):
Both Fabric and SDK try to init proto types

kopaygorodsky (Tue, 08 Oct 2019 11:17:46 GMT):
I was using encoder for creating a channel from Profile

kopaygorodsky (Tue, 08 Oct 2019 11:23:56 GMT):
@aleksandar.likic @troyronda hey guys, is there any way we can include functions from fabric encoder package to the SDK? I mean NewApplicationOrgGroup, NewConsortiumsGroup etc. It's good that we have Compute in SDK now, but for adding new org to a channel config I need to provide ConfigGroup, but I have only Organization struct which can be converted to ConfigGroup using NewApplicationOrgGroup and then passed to Compute.

kopaygorodsky (Tue, 08 Oct 2019 11:23:56 GMT):
@aleksandar.likic @troyronda hey guys, is there any way we can include functions from fabric encoder package to the SDK? I mean NewApplicationOrgGroup, NewConsortiumsGroup etc. It's good that we have Compute in SDK now, but for adding new org to a channel config I need to provide ConfigGroup, but I have only Organization struct which can be converted to ConfigGroup using NewApplicationOrgGroup and then passed to Compute. I can create a PR if you approve my idea.

kopaygorodsky (Tue, 08 Oct 2019 11:23:56 GMT):
@aleksandar.likic @troyronda hey guys, is there any way we can include functions from fabric encoder package to the SDK? I mean NewApplicationOrgGroup, NewConsortiumsGroup etc. It's good that we have Compute in SDK now, but for adding new org to a channel config I need to provide ConfigGroup. I have only Organization struct which can be converted to ConfigGroup using NewApplicationOrgGroup and then passed to Compute. I can create a PR if you approve my idea.

kopaygorodsky (Tue, 08 Oct 2019 11:23:56 GMT):
@aleksandar.likic @troyronda hey guys, is there any way we can include functions from fabric encoder package to the SDK? I mean NewApplicationOrgGroup, NewConsortiumsGroup, etc. It's good that we have to Compute in SDK now, but for adding new org to a channel config I need to provide ConfigGroup. I have only Organization struct which can be converted to ConfigGroup using NewApplicationOrgGroup and then passed to Compute. Basically, need to make this package public https://github.com/hyperledger/fabric-sdk-go/blob/d2b42602e52e051adfe74fef3d99badc0b2b4250/internal/github.com/hyperledger/fabric/sdkinternal/configtxgen/encoder/encoder.go#L306 I can create a PR if you approve my idea.

kopaygorodsky (Tue, 08 Oct 2019 11:23:56 GMT):
@aleksandar.likic @troyronda hey guys, is there any way we can include functions from fabric encoder package to the SDK? I mean NewApplicationOrgGroup, NewConsortiumsGroup, etc. It's good that we have Compute in SDK now, but for adding new org to a channel config I need to provide ConfigGroup. I have only Organization struct which can be converted to ConfigGroup using NewApplicationOrgGroup and then passed to Compute. Basically, need to make this package public https://github.com/hyperledger/fabric-sdk-go/blob/d2b42602e52e051adfe74fef3d99badc0b2b4250/internal/github.com/hyperledger/fabric/sdkinternal/configtxgen/encoder/encoder.go#L306 I can create a PR if you approve my idea.

mauricio (Wed, 09 Oct 2019 02:34:31 GMT):
Has joined the channel.

metadata (Wed, 09 Oct 2019 08:02:23 GMT):
what are the different types of identities that we can register with fabric-ca-server using go-sdk ?

Psingh (Thu, 10 Oct 2019 08:09:51 GMT):
Hey all, I have registered and enrolled a identity. I want to check whether the identity is pre-enrolled or not. Any API available in go-sdk?

Psingh (Thu, 10 Oct 2019 08:09:51 GMT):
Hey all, I have registered and enrolled an identity. I want to check whether the identity is pre-enrolled or not. Any API available in go-sdk?

EltonSearcy (Thu, 10 Oct 2019 16:34:23 GMT):
What would it take to get a similar PR to this one brought into the main source code? https://jira.hyperledger.org/browse/FAB-5015 It looks like this PR was Closed and marked as Won't do

EltonSearcy (Thu, 10 Oct 2019 16:40:07 GMT):
My Guess is that it's because of the external library, but we would like to have a way to test our getQueryResults method "along with several other methods" and the implementation is needed to be able to have enough code coverage to be able to promote the project to a production environment. Since we need this for our project we're willing to develop it, however I'd rather not implement it in a way that wouldn't be accepted as part of the project.

EltonSearcy (Thu, 10 Oct 2019 16:40:07 GMT):
My Guess is that it's because of the external library, but we would like to have a way to test our getQueryResults method "along with several other methods" and the implementation is needed to be able to have enough code coverage to be able to promote the project to a production environment. Since we need this for our project we're willing to develop it, however I'd rather not implement it in a way that wouldn't be accepted as part of the project.

wunderbarb (Thu, 10 Oct 2019 18:18:42 GMT):
Bingo. I put in the same project the source code of the chaincode and the source code of the apps using SDK. I wrote a pkg that encapsulated the calls to the chaincode via SDK. To use in this pkg some of the types retruned by smart contracts and also the constants, I imported a package from the chaincode. THis raised the issue. I solved it by making a copy of this information in a .go file that I added to my SDK-based package. It works. Does some body have an elegant method to "import" types, errors and constants from the chaincode into the apps using SDK?

shitaibin (Fri, 11 Oct 2019 02:07:45 GMT):
Hi guys, is there any progress of refatoring fabric-sdk-go?

EltonSearcy (Fri, 11 Oct 2019 21:20:55 GMT):
To my question Above. my goal is to find out how and where you guys would like to have it implemented. We have the mockstub implemented and are using it in our project, but want to make it available for more people to use since its a serious issue to not have. - We are very open to implementing this mockstub in the core chaincode library or even in a library such as github.com/s7techlab/cckit - We've also considered that creating a mocking framework project for go chaincode may be a good idea.. if we want to decouple the main chaincode from mocking.

TopJohn (Mon, 14 Oct 2019 07:07:33 GMT):
hello does anyone know wheteher the go-sdk has moved from gerrit to github?

MHBauer (Mon, 14 Oct 2019 20:43:11 GMT):
It's not on the list https://hyperledger-fabric.readthedocs.io/en/latest/CONTRIBUTING.html

kopaygorodsky (Tue, 15 Oct 2019 08:21:08 GMT):
@aleksandar.likic hey, any update on this ? I would like to do PR, just need an approval if it makes sense from anybody of maintainers

lorenzofang (Tue, 15 Oct 2019 10:40:28 GMT):
hello.When the endorsement policy is set to AND ``` "AND ('Org1MSP.peer','Org2MSP.peer')", ``` I am a Org1 node, I don't know the certificate and private key of the Org2 node. If I want to call the invoke method of the Chaincode, I need to collect the endorsement results of 2 nodes. How can I achieve the code? Sdk only provides the Execute method,But need to configure org2 information in the configuration file. ``` func (cc *Client) Execute(request Request, options ...RequestOption) (Response, error) { options = append(options, addDefaultTimeout(fab.Execute)) options = append(options, addDefaultTargetFilter(cc.context, filter.EndorsingPeer)) return callExecute(cc, request, options...) } ```

kopaygorodsky (Tue, 15 Oct 2019 10:46:37 GMT):
As I know SDK collects endorsement results under the hood. In my case Service Discovery takes care of it by targeting needed peers

aleksandar.likic (Tue, 15 Oct 2019 20:24:27 GMT):
@kopaygorodsky hey, we've been thinking about the best approach to this. The thing is, we don't like that SDK has fabric code in its codebase. We would prefer that fabric was written in a modular way, where common libraries used by e.g. peer, orderer, command line tools, etc., are in its own project(s), and peer, orderer, SDK, etc. use them from there. Fabric already started a bit on this, externalizing fabric-protos-go and creating fabric-lib-go as a placeholder project where fabric libraries will eventually reside. Here is the JIRA ticket which describes this need from the SDK point of view https://jira.hyperledger.org/browse/FAB-16461. Basically, we are saying that SDK needs parts of the fabric functionality, but the only way to use it currently is to copy the code into the SDK codebase. We would rather remove all copies of fabric code from SDK and import them from fabric-lib-go. In retrospect, exposing parts of fabric configtxgen and configtxlator codebase in SDK might have been an error. Now you are asking that the SDK exposes more fabric functions. If we keep it up, SDK will soon become a dump for fabric functions whose happy home should be fabric-lib-go. Perhaps it's time that people start creating pull requests in fabric-lib-go for functions they need to use from there. My company is working on some projects which will need some common fabric go functions, so we are very interested in contributing. However, we also want to move fast, that is, we don't want to be dependent on possibly long delays caused by necessary process bottlenecks like code reviews, design considerations, etc. So we decided to start a repository with our own flavour of fabric-lib-go (building it using the same code-copy mechanism used by SDK) and use fabric functions from there until they become available in hyperledger. SDK will for now keep what's there, but at some point we should probably deprecate configtxgen and configtxlator functions in SDK. Any thoughts?

aleksandar.likic (Tue, 15 Oct 2019 20:24:27 GMT):
@kopaygorodsky hey, we've been thinking about the best approach to this. The thing is, we don't like that SDK has fabric code in its codebase. We would prefer that fabric was written in a modular way, where common libraries used by e.g. peer, orderer, command line tools, etc., are in its own project(s), and peer, orderer, SDK, etc. use them from there. Fabric already started a bit on this, externalizing fabric-protos-go and creating fabric-lib-go as a placeholder project where fabric libraries will eventually reside. Here is the JIRA ticket which describes this need from the SDK point of view https://jira.hyperledger.org/browse/FAB-16461. Basically, we are saying that SDK needs parts of the fabric functionality, but the only way to use it currently is to copy the code into the SDK codebase. We would rather remove all copies of fabric code from SDK and import them from fabric-lib-go. In retrospect, exposing parts of fabric configtxgen and configtxlator codebase in SDK might have been an error. Now you are asking that the SDK exposes more fabric functions. If we keep it up, SDK will soon become a dump for fabric functions whose happy home should be fabric-lib-go. Perhaps it's time for people to start creating pull requests in fabric-lib-go for functions they need to use from there. My company is working on some projects which will need some common fabric go functions, so we are very interested in contributing. However, we also want to move fast, that is, we don't want to be dependent on possibly long delays caused by necessary process bottlenecks like code reviews, design considerations, etc. So we decided to start a repository with our own flavour of fabric-lib-go (building it using the same code-copy mechanism used by SDK) and use fabric functions from there until they become available in hyperledger. SDK will for now keep what's there, but at some point we should probably deprecate configtxgen and configtxlator functions in SDK. Any thoughts?

aleksandar.likic (Tue, 15 Oct 2019 20:24:27 GMT):
@kopaygorodsky hey, we've been thinking about the best approach to this. The thing is, we don't like that SDK has fabric code in its codebase. We would prefer that fabric was written in a modular way, where common libraries used by e.g. peer, orderer, command line tools, etc., are in its own project(s), and peer, orderer, SDK, etc. use them from there. Fabric already started a bit on this, externalizing fabric-protos-go and creating fabric-lib-go as a placeholder project where fabric libraries will eventually reside. Here is the JIRA ticket which describes this need from the SDK point of view https://jira.hyperledger.org/browse/FAB-16461. Basically, we are saying that SDK needs parts of the fabric functionality, but the only way to use it currently is to copy the code into the SDK codebase. We would rather remove all copies of fabric code from SDK and import them from fabric-lib-go. In retrospect, exposing parts of fabric configtxgen and configtxlator codebase in SDK might have been an error. Now you are asking that the SDK exposes more fabric functions. If we keep adding, SDK will soon become a dump for fabric functions whose happy home should be fabric-lib-go. Perhaps it's time for people to start creating pull requests in fabric-lib-go for functions they need to use from there. My company is working on some projects which will need some common fabric go functions, so we are very interested in contributing. However, we also want to move fast, that is, we don't want to be dependent on possibly long delays caused by necessary process bottlenecks like code reviews, design considerations, etc. So we decided to start a repository with our own flavour of fabric-lib-go (building it using the same code-copy mechanism used by SDK) and use fabric functions from there until they become available in hyperledger. SDK will for now keep what's there, but at some point we should probably deprecate configtxgen and configtxlator functions in SDK. Any thoughts?

aleksandar.likic (Tue, 15 Oct 2019 20:24:27 GMT):
@kopaygorodsky hey, we've been thinking about the best approach to this. The thing is, we don't like that SDK has fabric code in its codebase. We would prefer if fabric was written in a modular way, where common libraries used by e.g. peer, orderer, command line tools, etc., are in its own project(s), and peer, orderer, SDK, etc. use them from there. Fabric already started a bit on this, externalizing fabric-protos-go and creating fabric-lib-go as a placeholder project where fabric libraries will eventually reside. Here is the JIRA ticket which describes this need from the SDK point of view https://jira.hyperledger.org/browse/FAB-16461. Basically, we are saying that SDK needs parts of the fabric functionality, but the only way to use it currently is to copy the code into the SDK codebase. We would rather remove all copies of fabric code from SDK and import them from fabric-lib-go. In retrospect, exposing parts of fabric configtxgen and configtxlator codebase in SDK might have been an error. Now you are asking that the SDK exposes more fabric functions. If we keep adding, SDK will soon become a dump for fabric functions whose happy home should be fabric-lib-go. Perhaps it's time for people to start creating pull requests in fabric-lib-go for functions they need to use from there. My company is working on some projects which will need some common fabric go functions, so we are very interested in contributing. However, we also want to move fast, that is, we don't want to be dependent on possibly long delays caused by necessary process bottlenecks like code reviews, design considerations, etc. So we decided to start a repository with our own flavour of fabric-lib-go (building it using the same code-copy mechanism used by SDK) and use fabric functions from there until they become available in hyperledger. SDK will for now keep what's there, but at some point we should probably deprecate configtxgen and configtxlator functions in SDK. Any thoughts?

EltonSearcy (Tue, 15 Oct 2019 23:12:31 GMT):
Hi, I am trying to implement a couch db query to use skip and limits for the pagination. When executing the same query against my local couch db instance, it returns a limited list and skips properly. But, after going through the getQueryResults of the chaincode, it's showing all the records ignoring the skip and limit. Does fabric support limit and skip for the pagination or is it just bookmark..?

Ammu (Thu, 17 Oct 2019 08:00:06 GMT):

intall_error.png

mahoney1 (Thu, 17 Oct 2019 09:04:44 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

troyronda (Thu, 17 Oct 2019 15:19:44 GMT):
yes it was moved.

TopJohn (Thu, 17 Oct 2019 15:21:28 GMT):
But gerrit didn’t become read only yet

twoneks (Thu, 17 Oct 2019 16:56:33 GMT):
Hello friends!

kopaygorodsky (Fri, 18 Oct 2019 11:10:17 GMT):
@aleksandar.likic thank you for your reply. I agree, it feels weird when SDK is built on top of internal packages which are copy of fabric. Do you opensource your `fabric-lib-go`? I see that original one is almost empty, idk even where to start and what intensions of fabric community regarding this repo.

kopaygorodsky (Fri, 18 Oct 2019 11:10:17 GMT):
@aleksandar.likic thank you for your reply. I agree, it feels weird when SDK is built on top of internal packages which are copy of fabric. Do you opensource your `fabric-lib-go`? I see that original one is almost empty, idk even where to start and what intentions fabric community has regarding this repo.

aleksandar.likic (Fri, 18 Oct 2019 14:55:06 GMT):
@kopaygorodsky I am not a maintainer of hyperledger/fabric-lib-go. It is true, it has almost nothing there and it's hard to tell when and how quickly it will grow. To be independent of its progress, we started https://github.com/trustbloc/fabric-lib-go-ext. It's just a shell at the moment, with a single PR which is a work in progress. Our intention is to contribute to hyperledger/fabric-lib-go as well, but frankly our priority will be our own flavour of it so we are not blocked on the progress of the hyperledger/fabric-lib-go. I imagine there will be lengthy discussions on how to best organize it, what exactly goes into it and such.

kopaygorodsky (Sat, 19 Oct 2019 20:07:15 GMT):
@aleksandar.likic maybe it's a good idea to start contributing your lib

kopaygorodsky (Sat, 19 Oct 2019 20:07:34 GMT):
I see you are working on configtx right now :) that's exactly what I need

jds (Mon, 21 Oct 2019 17:07:02 GMT):
Has joined the channel.

jds (Mon, 21 Oct 2019 17:07:04 GMT):
Hi, is the following a valid `connection-profile`? ``` { "name": "single-ca", "description": "whaterver", "version": "0.0.1", "client": { "organization": "Org0", "credentialStore": { "path": "/tmp/hfc-kvs", "cryptoStore": { "path": "/tmp/hfc-cvs" }, "wallet": "wallet-name" } }, "organizations": { "orderer.example.com": { "mspid": "OrdererMSP", "orderers": ["orderer.example.com"], "certificateAuthorities": ["ca.org0.example.com"], "users": { "Admin": { "cert": "/home/vagrant/fabric/artifacts/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem", "private_key": "/home/vagrant/fabric/artifacts/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/c79ba072a45cc7c9b41e3549cb95c3d903e03132a67424ef4371cd28293d33bb_sk" } } }, "org0.example.com": { "mspid": "Org0MSP", "peers": [ "peer0.org0.example.com" ], "certificateAuthorities": ["ca.org0.example.com"], "users": { "Admin": { "cert": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/users/Admin@org0.example.com/msp/signcerts/Admin@org0.example.com-cert.pem", "private_key": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/users/Admin@org0.example.com/msp/keystore/bf74b9ee2839b1d4433a43df9fdd75cec3a6e33dc1f8d173e1b93888c7c624b3_sk" }, "User1": { "cert": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/users/User1@org0.example.com/msp/signcerts/User1@org0.example.com-cert.pem", "private_key": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/users/User1@org0.example.com/msp/keystore/3f4f702b7cb0d9232e03f25cdf6a0149973057fb2c0e59a396a011bf1a98d97f_sk" } } } }, "orderers": { "orderer.example.com": { "url": "orderer.example.com:7050", "grpcOptions": { "grpc.ssl_target_name_override": "orderer.example.com", "grpc-max-send-message-length": 15 }, "tlsCACerts": { "path": "/home/vagrant/fabric/artifacts/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem" } } }, "peers": { "peer0.org0.example.com": { "url": "peer0.org0.example.com:7051", "eventUrl": "peer0.org0.example.com:7053", "grpcOptions": { "grpc.ssl_target_name_override": "peer0.org0.example.com", "grpc.http2.keepalive_time": 15 }, "tlsCACerts": { "path": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/peers/peer0.org0.example.com/msp/tlscacerts/tlsca.org0.example.com-cert.pem" } } }, "certificateAuthorities": { "ca.org0.example.com": { "url": "ca.org0.example.com:7054", "grpcOptions": { "verify": true }, "tlsCACerts": { "path": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/ca/ca.org0.example.com-cert.pem" }, "registrar": [ {"enrollId": "admin", "enrollSecret": "adminpw"} ] } } } ```

jds (Mon, 21 Oct 2019 17:07:04 GMT):
Hi, is the following a valid `connection-profile`? ``` { "name": "single-ca", "description": "whaterver", "version": "0.0.1", "client": { "organization": "Org0", "credentialStore": { "path": "/tmp/hfc-kvs", "cryptoStore": { "path": "/tmp/hfc-cvs" }, "wallet": "wallet-name" } }, "organizations": { "orderer.example.com": { "mspid": "OrdererMSP", "orderers": ["orderer.example.com"], "certificateAuthorities": ["ca.org0.example.com"], "users": { "Admin": { "cert": "/home/vagrant/fabric/artifacts/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem", "private_key": "/home/vagrant/fabric/artifacts/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/c79ba072a45cc7c9b41e3549cb95c3d903e03132a67424ef4371cd28293d33bb_sk" } } }, "org0.example.com": { "mspid": "Org0MSP", "peers": [ "peer0.org0.example.com" ], "certificateAuthorities": ["ca.org0.example.com"], "users": { "Admin": { "cert": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/users/Admin@org0.example.com/msp/signcerts/Admin@org0.example.com-cert.pem", "private_key": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/users/Admin@org0.example.com/msp/keystore/bf74b9ee2839b1d4433a43df9fdd75cec3a6e33dc1f8d173e1b93888c7c624b3_sk" }, "User1": { "cert": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/users/User1@org0.example.com/msp/signcerts/User1@org0.example.com-cert.pem", "private_key": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/users/User1@org0.example.com/msp/keystore/3f4f702b7cb0d9232e03f25cdf6a0149973057fb2c0e59a396a011bf1a98d97f_sk" } } } }, "orderers": { "orderer.example.com": { "url": "orderer.example.com:7050", "grpcOptions": { "grpc.ssl_target_name_override": "orderer.example.com", "grpc-max-send-message-length": 15 }, "tlsCACerts": { "path": "/home/vagrant/fabric/artifacts/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem" } } }, "peers": { "peer0.org0.example.com": { "url": "peer0.org0.example.com:7051", "eventUrl": "peer0.org0.example.com:7053", "grpcOptions": { "grpc.ssl_target_name_override": "peer0.org0.example.com", "grpc.http2.keepalive_time": 15 }, "tlsCACerts": { "path": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/peers/peer0.org0.example.com/msp/tlscacerts/tlsca.org0.example.com-cert.pem" } } }, "certificateAuthorities": { "ca.org0.example.com": { "url": "ca.org0.example.com:7054", "grpcOptions": { "verify": true }, "tlsCACerts": { "path": "/home/vagrant/fabric/artifacts/crypto-config/peerOrganizations/org0.example.com/ca/ca.org0.example.com-cert.pem" }, "registrar": [ {"enrollId": "admin", "enrollSecret": "adminpw"} ] } } } ``` It works with the python sdk, but not the go

jds (Mon, 21 Oct 2019 17:08:40 GMT):
`go` error is, ``` vagrant@hlfpy:/vagrant/golang$ ./golang 2019/10/21 16:48:18 main.go:24: failed to initialize configuration: unable to load endpoint config: failed to initialize endpoint config from config backend: network configuration load failed: failed to parse 'organizations' config item to endpointConfigurationEntity.Organizations type: 3 error(s) decoding: * '[orderer.example.com].Users[admin].Cert' expected a map, got 'string' * '[org0.example.com].Users[admin].Cert' expected a map, got 'string' * '[org0.example.com].Users[user1].Cert' expected a map, got 'string' ```

jds (Mon, 21 Oct 2019 17:09:26 GMT):
go code is, ``` package main import ( "log" "os" "time" "github.com/hyperledger/fabric-sdk-go/pkg/client/channel" "github.com/hyperledger/fabric-sdk-go/pkg/client/event" "github.com/hyperledger/fabric-sdk-go/pkg/core/config" "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk" ) func main() { log.SetFlags(log.LstdFlags | log.Lshortfile) rdr, err := os.Open("/vagrant/network.json") if err != nil { log.Fatal(err) } sdk, err := fabsdk.New(config.FromReader(rdr, "json")) if err != nil { log.Fatal(err) } defer sdk.Close() clientContext := sdk.ChannelContext("mychannel", fabsdk.WithUser("User1")) client, err := channel.New(clientContext) if err != nil { log.Fatal(err) } event, err := event.New(clientContext) if err != nil { log.Fatal(err) } reg, notifier, err := event.RegisterChaincodeEvent("mycc", "eventInvoke") if err != nil { log.Fatal(err) } defer event.Unregister(reg) var args []string args = append(args, "invoke") args = append(args, "invoke") args = append(args, "hello") args = append(args, "10") transientDataMap := make(map[string][]byte) transientDataMap["result"] = []byte("Transient data in hello invoke") response, err := client.Execute(channel.Request{ChaincodeID: "mycc", Fcn: "invoke", Args: [][]byte{[]byte(args[1]), []byte(args[2]), []byte(args[3])}, TransientMap: transientDataMap}) if err != nil { log.Fatal(err) } select { case e := <-notifier: log.Printf("received: %v\n", e) case <-time.After(time.Second * 20): log.Fatal("invoke timed out") } log.Printf("%s\n", response.TransactionID) } ```

jds (Mon, 21 Oct 2019 17:10:34 GMT):
and python code is, ``` import asyncio from hfc.fabric import Client def invoke(client, usr): args = ['a', 'b', '100'] loop = asyncio.get_event_loop() response = loop.run_until_complete(client.chaincode_invoke( requestor=usr, channel_name='mychannel', peers=['peer0.org0.example.com'], args=args, cc_name='mycc')) print("invoke chaincode done.") print(response) def query(client, usr): args = ['b'] loop = asyncio.get_event_loop() response = loop.run_until_complete(client.chaincode_query( requestor=usr, channel_name='mychannel', peers=['peer0.org0.example.com'], args=args, cc_name='mycc')) print("query chaincode done.") print(response) def main(): cli = Client(net_profile='/vagrant/network.json') cli.new_channel('mychannel') usr = cli.get_user(org_name='org0.example.com', name= 'User1') invoke(cli, usr) query(cli, usr) if __name__ == '__main__': main() ```

madiazp (Tue, 22 Oct 2019 03:13:59 GMT):
I use a yaml and I load it with the FromFile method from "github.com/hyperledger/fabric-sdk-go/pkg/core/config"

jds (Tue, 22 Oct 2019 08:01:24 GMT):
The src seems to indicate either `json` or `yaml` is valid, https://github.com/hyperledger/fabric-sdk-go/blob/2f8e5d34205b56c9499be31506fa58ba3d15b115/pkg/core/config/config.go#L38

Taaanos (Tue, 22 Oct 2019 12:28:35 GMT):
When I run `make all` this one fails. Any ideas? ``` ```

Taaanos (Tue, 22 Oct 2019 12:28:35 GMT):
When I run `make all` this one fails. Any ideas? ``` Makefile:312: recipe for target 'integration-tests-stable' failed make[1]: *** [integration-tests-stable] Error 1 make[1]: Leaving directory '/home/thanos/go/src/github.com/hyperledger/fabric-sdk-go' Makefile:392: recipe for target 'integration-test' failed make: *** [integration-test] Error 2 ```

karthikeyanb (Wed, 23 Oct 2019 06:04:31 GMT):
Has joined the channel.

karthikeyanb (Wed, 23 Oct 2019 06:04:33 GMT):
Hi, How to upgrade the chaincode using fabric sdk go #fabric-sdk-go #fabric

metadata (Wed, 23 Oct 2019 07:28:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=FAnoNsDTR9JK4EDPp) ```// Package resmgmt enables creation and update of resources on a Fabric network import ("github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt") ```

metadata (Wed, 23 Oct 2019 07:31:25 GMT):
first create a UpgradeCC resource parameters like `resmgmt.UpgradeCCRequest{ASSIGN VALUES to PARAMETERS}` then call `UpgradeCC()` method. u can't call `UpgradeCC()` like `resmgmt.UpgradeCC()`

metadata (Wed, 23 Oct 2019 07:31:25 GMT):
first create a UpgradeCC resource parameters like `resmgmt.UpgradeCCRequest{ASSIGN VALUES to PARAMETERS}` then call `UpgradeCC()` method. u can't call `UpgradeCC()` like `resmgmt.UpgradeCC()` It should be like `resmgmt_cli_object.UpgradeCC()`

metadata (Wed, 23 Oct 2019 10:25:14 GMT):
first create a UpgradeCC resource parameters like `resmgmt.UpgradeCCRequest{ASSIGN VALUES to PARAMETERS}` then call `UpgradeCC()` method. u can't call `UpgradeCC()` like `resmgmt.UpgradeCC()` It should be like `resmgmt_cli_object.UpgradeCC()`

Sai_S 1 (Wed, 23 Oct 2019 14:51:29 GMT):
Has joined the channel.

hendry19901990 (Wed, 23 Oct 2019 20:13:42 GMT):
somebody helps me

hendry19901990 (Wed, 23 Oct 2019 20:13:51 GMT):
I have the following error

hendry19901990 (Wed, 23 Oct 2019 20:13:52 GMT):

Clipboard - October 23, 2019 3:13 PM

hendry19901990 (Wed, 23 Oct 2019 20:14:10 GMT):
sometimes orderer works well

hendry19901990 (Wed, 23 Oct 2019 20:41:32 GMT):
here sdk developers don't help

hendry19901990 (Wed, 23 Oct 2019 20:41:50 GMT):
:sob:

metadata (Thu, 24 Oct 2019 04:53:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=DuizE7AqA9WZcQTCu) share your config.yaml file and the logs

troyronda (Thu, 24 Oct 2019 17:37:42 GMT):
fabric-sdk-go in gerrit has now been set read only.

haniavis (Fri, 25 Oct 2019 20:09:59 GMT):
Hi, does the go sdk support private data collections in fabric?

metadata (Sat, 26 Oct 2019 09:44:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=F8PMDSb3ikuGxvxN9) yes, it does

metadata (Sat, 26 Oct 2019 09:54:58 GMT):
@haniavis check this repo https://github.com/Deeptiman/privateledger

Tom-Xu-CNXA (Tue, 29 Oct 2019 07:42:34 GMT):
Has joined the channel.

Tom-Xu-CNXA (Tue, 29 Oct 2019 07:42:34 GMT):
Hi dear, I wonder, how much gap from the current fabric-sdk-node 1.0-alpha to the coming version 1.0? Will there be big changes?

akshay.sood (Thu, 31 Oct 2019 08:14:48 GMT):
Hi guys Is there any date for releasing stable version of go-sdk?

AllanHansen (Fri, 01 Nov 2019 00:36:42 GMT):
Has joined the channel.

FabricBeer (Fri, 01 Nov 2019 05:35:39 GMT):
Has joined the channel.

metadata (Fri, 01 Nov 2019 06:44:06 GMT):
@akshay.sood it is already stable I guess.

akshay.sood (Fri, 01 Nov 2019 06:45:07 GMT):
@metadata it is in beta1

metadata (Fri, 01 Nov 2019 06:52:17 GMT):
@akshay.sood https://chat.hyperledger.org/channel/fabric-maintainers?msg=dx9Ro7iLPaRKy9gEn

akshay.sood (Fri, 01 Nov 2019 07:01:23 GMT):
@metadata there must something pending, something preventing the contributors to release a stable version. Otherwise, they would have released a stable version.

akshay.sood (Fri, 01 Nov 2019 07:01:23 GMT):
@metadata there must be something pending, something preventing the contributors to release a stable version. Otherwise, they would have released a stable version.

akshay.sood (Fri, 01 Nov 2019 07:02:26 GMT):
@metadata why would anyone want to keep the application in beta version instead of releasing a stable version if it is stable enough?

metadata (Fri, 01 Nov 2019 07:24:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=obSQwun4FQihttRgu) @troyronda

HarisC (Fri, 01 Nov 2019 13:20:46 GMT):
Has joined the channel.

BellaAdams (Fri, 01 Nov 2019 15:20:52 GMT):
[fabsdk/fab] 2019/11/01 15:18:19 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unavailable desc = transport is closing] 2019/11/01 23:18:19 fetchBlock.go:53: failed to initialize HFC Client : event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [peer0.org1.dis.top:7051]: gRPC Transport Status Code: (14) Unavailable. Description: transport is closing

BellaAdams (Fri, 01 Nov 2019 15:21:05 GMT):
When I use go sdk the error occurs

BellaAdams (Fri, 01 Nov 2019 15:21:13 GMT):
How to solve this problem

BellaAdams (Fri, 01 Nov 2019 15:23:58 GMT):
version: 1.0.0 client: organization: org1 logging: level: info global: timeout: query: 180s execute: 180s resmgmt: 180s cache: connectionIdle: 30s eventServiceIdle: 2m channelConfig: 30m channelMembership: 30s discovery: 10s selection: 10m cryptoconfig: path: F:/workspace/GO/src/fabric/fetchBlock credentialStore: path: F:/workspace/GO/src/fabric/fetchBlock/tmp/state-store cryptoStore: path: F:/workspace/GO/src/fabric/fetchBlock/tmp/msp BCCSP: security: enabled: false default: provider: "SW" hashAlgorithm: "SHA2" softVerify: true level: 256 tlsCerts: systemCertPool: false channels: mychannel: peers: peer0.org1.dis.top: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true organizations: org1: mspid: Org1MSP cryptoPath: F:/workspace/GO/src/fabric/fetchBlock/peerOrganizations/org1.dis.top/users/org1Admin@org1.dis.top/msp peers: - peer0.org1.dis.top OrdererOrg: # Membership Service Provider ID for this organization mspID: OrdererMSP # Needed to load users crypto keys and certs for this org (absolute path or relative to global crypto path, DEV mode) cryptoPath: F:\\workspace\\GO\\src\\fabric\\fetchBlock\\ordererOrganizations\\orderers.dis.top\\users\\ordererAdmin@dis.top\\msp #ryptoPath: F:\workspace\GO\src\fabric\fetchBlock\peerOrganizations\org1.dis.top\msp peers: peer0.org1.dis.top: url: peer0.org1.dis.top:7051 eventUrl: grpcs://peer0.org1.dis.top:7053 grpcOptions: ssl-target-name-override: peer0.org1.dis.top keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: true tlsCACerts: path: F:/workspace/GO/src/fabric/fetchBlock/peerOrganizations/org1.dis.top/peers/peer0.org1.dis.top/msp/tlscacerts/tlsca.dis.top-cert.pem orderers: orderers.dis.com: # [Optional] Default: Infer from hostname url: orderer0.dis.top:7050 # these are standard properties defined by the gRPC library # they will be passed in as-is to gRPC client constructor grpcOptions: ssl-target-name-override: orderer.example.com # These parameters should be set in coordination with the keepalive policy on the server, # as incompatible settings can result in closing of connection. # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs allow-insecure: false tlsCACerts: # Certificate location absolute path path: F:\workspace\GO\src\fabric\fetchBlock\ordererOrganizations\orderers.dis.top\msp\tlscacerts\tlsca.dis.top-cert.pem

BellaAdams (Fri, 01 Nov 2019 15:24:08 GMT):
This is my config file

firas.qutishat (Fri, 01 Nov 2019 19:05:49 GMT):
@akshay.sood fabric-sdk-go is stable. The reason that still in beta just for missing some documentation

akshay.sood (Sat, 02 Nov 2019 05:52:36 GMT):
Thanks @firas.qutishat

Tom-Xu-CNXA (Sat, 02 Nov 2019 11:02:03 GMT):
So good a news.

Tom-Xu-CNXA (Sat, 02 Nov 2019 11:03:38 GMT):
Thanks to all contributors.

Tom-Xu-CNXA (Sat, 02 Nov 2019 11:05:38 GMT):
One more question, the Fabric SDK Go is very different from SDK Node, will they always be different? Do we have any plan to have them to be consistent? Thanks.

GreatMartial (Sat, 02 Nov 2019 14:51:55 GMT):
Has joined the channel.

hawkinggg (Mon, 04 Nov 2019 07:14:34 GMT):
Has joined the channel.

heatherp (Mon, 04 Nov 2019 16:20:52 GMT):
Hey @Tom-Xu-CNXA are you referring to the features provided by the "new programming model" functionality? (Link below). The Programming model squad responsible for delivering the high-level APIs provided in the node/java sdks are planning on providing the same for go - and we're hoping to present this proposal at a contributors meeting soon https://hyperledger-fabric.readthedocs.io/en/release-1.4/whatsnew.html#improved-programming-model-for-developing-applications

Tom-Xu-CNXA (Tue, 05 Nov 2019 01:31:35 GMT):
Thank you @heatherp , That is great we will have a high-level Go API, otherwise, we have to deal with the underlying apis. Is the coding began already?

Tom-Xu-CNXA (Tue, 05 Nov 2019 01:32:02 GMT):
Thank you @heatherp , That is great we will have a high-level Go API, otherwise, we have to deal with the underlying apis. Is the coding began already?

heatherp (Tue, 05 Nov 2019 10:02:18 GMT):
I don't have any code to send you at the moment but I'll set myself a reminder to post on this channel when we do! - feel free to chase me if you don't hear anything in the next couple of months!

Tom-Xu-CNXA (Wed, 06 Nov 2019 01:55:46 GMT):
Thank you @heatherp . Actually I am beginning my working on Fabric SDK Go, if there is not high level API, I have to work on the current API, it will also be fine, if that will be stable. Thanks again.

mattmaru (Wed, 06 Nov 2019 11:39:28 GMT):
Hi guys can you tell me how to solve "mvcc read conflict" when i send multiple transactions to create an object ?

HarisC (Thu, 07 Nov 2019 13:23:15 GMT):
Hello guys, is there an example/tutorial about adding a new organization to existing fabric network using fabric-sdk-go? I already implemented using the fabric tools

gen_el (Thu, 07 Nov 2019 18:10:21 GMT):
Create transaction structures and flows which avoid concurrently editing the same key/record. Avoid that at all cost. That solved it for me.

mastersingh24 (Tue, 12 Nov 2019 09:50:44 GMT):
https://chat.hyperledger.org/channel/fabric-questions?msg=CXoQqHKEpKGjLXey2

giuzero (Tue, 12 Nov 2019 16:38:41 GMT):
Has joined the channel.

giuzero (Tue, 12 Nov 2019 16:38:43 GMT):
Hi how to create a connection profile to use with client-sdk for a network based on this fabric-ca guide https://hyperledger-fabric-ca.readthedocs.io/en/latest/operations_guide.html ??

delao (Tue, 12 Nov 2019 18:33:16 GMT):
Has joined the channel.

VadimInshakov (Wed, 13 Nov 2019 06:13:54 GMT):
Has joined the channel.

VadimInshakov (Wed, 13 Nov 2019 06:15:26 GMT):
Thanks for repost! I will be grateful for an explanation or links to specific examples

VadimInshakov (Wed, 13 Nov 2019 06:38:34 GMT):
If we specify channel.Execute() (https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Client.Execute) without targets, to which nodes will requests be sent?

VadimInshakov (Wed, 13 Nov 2019 06:41:15 GMT):
I can't find defaults in go sdk sources :(

karthikeyanb (Thu, 14 Nov 2019 05:33:11 GMT):
policy for [Group] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining

karthikeyanb (Thu, 14 Nov 2019 05:33:21 GMT):
getting this error while creating a channel

kopaygorodsky (Thu, 14 Nov 2019 07:36:19 GMT):
then you don't have permissions for creating a channel

kopaygorodsky (Thu, 14 Nov 2019 07:36:43 GMT):
wrong user, wrong org, check your genesis block

metadata (Thu, 14 Nov 2019 07:40:59 GMT):
Hey all, I'm using `raft` as an ordering service. how can I use it with `sdk-go`? I know that I have to mention all the orderer nodes in the config.yaml file but in the comments it is wriiten that ``` # List of orderers to send transaction and channel create/update requests to. For the time # being only one orderer is needed. If more than one is defined, which one get used by the # SDK is implementation specific. Consult each SDK's documentation for its handling of orderers. ```

metadata (Thu, 14 Nov 2019 07:42:45 GMT):
can someone please explain this line ``` If more than one is defined, which one get used by the # SDK is implementation specific ```

metadata (Thu, 14 Nov 2019 07:42:45 GMT):
can someone please explain this line ``` If more than one is defined, which one get used by the SDK is implementation specific ```

VadimInshakov (Thu, 14 Nov 2019 11:26:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=NfxPF8fYaKZxpQ3oK) Hey, is anybody here? :sweat_smile:

VadimInshakov (Thu, 14 Nov 2019 11:26:56 GMT):
Service discovery in go sdk Where I can find any tutorial of using service discovery with go sdk? I can't understand how that changes ordinary workflow without discovery service. At least examples are needed I don't specify peers urls in orinary flow (get channel client, execute query/invoke). So, how service discovery can simplify anything?

VadimInshakov (Thu, 14 Nov 2019 11:26:56 GMT):
**Service discovery in go sdk** Where I can find any tutorial of using service discovery with go sdk? I can't understand how that changes ordinary workflow without discovery service. At least examples are needed I don't specify peers urls in orinary flow (get channel client, execute query/invoke). So, how service discovery can simplify anything?

bstasyszyn (Thu, 14 Nov 2019 22:22:44 GMT):
By default, the SDK uses service discovery to select peers for endorsements. Service discovery looks at the endorsement policy of a chaincode and (randomly) selects a minimal set of peers that satisfies the policy. If you wish, you can override discovery and provide the specific peers that you wish to endorse the proposal. Service discovery is something that you don't need to think about unless you wish to override default behavior.

BellaAdams (Fri, 15 Nov 2019 05:56:31 GMT):
user not found

BellaAdams (Fri, 15 Nov 2019 05:56:50 GMT):
How to solve the problem

BellaAdams (Fri, 15 Nov 2019 05:56:52 GMT):
???

metadata (Fri, 15 Nov 2019 07:37:18 GMT):
@BellaAdams please share some logs.

Ammu (Sat, 16 Nov 2019 09:57:55 GMT):
peer chaincode install -n mycc -v 1.0 -p github.com/chaincode/chaincode_example02/go/

Ammu (Sat, 16 Nov 2019 09:58:18 GMT):
how to take path for chaincode......

BellaAdams (Sun, 17 Nov 2019 15:08:56 GMT):
Thanks ; I have solved this problem。 I add user info in the org section in the config file

metadata (Mon, 18 Nov 2019 05:18:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=wNXABe7utpZ2X5Qw7) can someone please help?

sung (Thu, 21 Nov 2019 08:48:08 GMT):
Has joined the channel.

DiAnh (Thu, 21 Nov 2019 09:13:27 GMT):
Has joined the channel.

hendry19901990 (Thu, 21 Nov 2019 23:04:17 GMT):
` failed to get client context to create channel client`

hendry19901990 (Thu, 21 Nov 2019 23:04:34 GMT):
` Failed getting key for SKI`

hendry19901990 (Thu, 21 Nov 2019 23:04:41 GMT):
I've got this error

hendry19901990 (Thu, 21 Nov 2019 23:04:46 GMT):
help me please

balazs_prehoda (Thu, 21 Nov 2019 23:57:10 GMT):
Has joined the channel.

balazs_prehoda (Fri, 22 Nov 2019 00:00:35 GMT):
@Ammu I think there might be a missing `GODEBUG=netdns=go` peer env variable in your docker compose file...

yxuco (Fri, 22 Nov 2019 19:43:33 GMT):
why is this failing `go get -u -d github.com/hyperledger/fabric-sdk-go@v1.0.0-beta1`?

yxuco (Fri, 22 Nov 2019 19:43:35 GMT):
``` go get -u -d github.com/hyperledger/fabric-sdk-go@v1.0.0-beta1 ... go: finding github.com/alecthomas/template latest go: finding github.com/kisielk/sqlstruct latest go: github.com/coreos/go-systemd@v0.0.0-20191111152658-2d78030078ef: go.mod has post-v0 module path "github.com/coreos/go-systemd/v22" at revision 2d78030078ef go: finding github.com/armon/consul-api latest go get: error loading module requirements ```

yxuco (Fri, 22 Nov 2019 19:44:13 GMT):
go version go version go1.12.6 darwin/amd64

yxuco (Sat, 23 Nov 2019 04:32:59 GMT):
got it resolved by setting env: `os.Setenv("FLOGO_RUNNER_TYPE", "DIRECT")`

yxuco (Sat, 23 Nov 2019 04:32:59 GMT):
OK, it appears Go version issue

yxuco (Sat, 23 Nov 2019 04:35:40 GMT):
Go 1.13.4 works fine, but Go 1.12.6 gives me the above issue.

yxuco (Sat, 23 Nov 2019 04:39:22 GMT):
On the contrary, fabric v1.4.4 works only with Go1.12.x, so I had to change Go version when toggle between apps that use these 2 packages.

toddinpal (Sun, 24 Nov 2019 11:22:05 GMT):
Has joined the channel.

toddinpal (Sun, 24 Nov 2019 11:28:18 GMT):
Is there a target date for when the Go SDK will be officially supported?

giuzero (Sun, 24 Nov 2019 15:50:29 GMT):
What version of fabric should I use?

giuzero (Sun, 24 Nov 2019 17:19:52 GMT):
How can I enroll and register a client?

giuzero (Sun, 24 Nov 2019 17:40:11 GMT):
Where can i find a tutorial about this? Can't find anything like fabcar in node js...

glin (Mon, 25 Nov 2019 11:06:21 GMT):
Has joined the channel.

glin (Mon, 25 Nov 2019 11:06:56 GMT):
Hi, when is the stable version of this SDK expected to release?

glin (Mon, 25 Nov 2019 11:15:03 GMT):
Hi, I see from the chat history that it is stable enough and lack of documents is preventing release of stable version. Is this as good as the node.js SDK or does it have any features missing as compared to node.js SDK?

heatherp (Mon, 25 Nov 2019 16:44:20 GMT):
Hey @glin The go sdk does not currently provide the high-level programming model features, as explained here: https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/application.html which is available in the node sdk (fabric-network) and gateway-java. We are planning on implementing it though, and we're hoping to present that proposal at a fabric contributors call soon

glin (Tue, 26 Nov 2019 09:57:36 GMT):
Hi, does this SDK provide create channel API similar to https://fabric-sdk-node.github.io/release-1.4/Client.html#createChannel?

pschilakantitech (Wed, 27 Nov 2019 07:17:48 GMT):
Has joined the channel.

mffrench (Wed, 27 Nov 2019 10:13:30 GMT):
Hello, I would like to know if there is fabric go-sdk version usable against HLF 2.0-alpha ?

mffrench (Wed, 27 Nov 2019 10:17:13 GMT):
Or does some work needed ? Is it possible to get some roadmap/todo list - I may contribute to provide help on that subject as I'm working on a project were we would like to use HLF 2.0 ...

pschilakantitech (Wed, 27 Nov 2019 10:26:53 GMT):
Any one please help, I need to have multiple smart contracts in single chaincode with Go. I am not getting much material on this.

troyronda (Wed, 27 Nov 2019 15:50:22 GMT):
@bstasyszyn may have more info - we have used against some snapshots of HLF 2.0.

mffrench (Thu, 28 Nov 2019 00:32:10 GMT):
great ! @bstasyszyn : let me know your experience and advices :)

mahoney1 (Thu, 28 Nov 2019 11:58:36 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

karthikeyanb (Fri, 29 Nov 2019 06:15:03 GMT):
Can you simple sample code

hendry19901990 (Fri, 29 Nov 2019 19:54:55 GMT):
does anyone know about?

hendry19901990 (Fri, 29 Nov 2019 19:54:55 GMT):
does anyone know this error?

hendry19901990 (Fri, 29 Nov 2019 19:55:00 GMT):
```ERRO ff5251 TLS handshake failed with error remote error: tls: bad certificate server=ChaincodeServer```

hendry19901990 (Fri, 29 Nov 2019 21:40:58 GMT):
problem solved

hendry19901990 (Fri, 29 Nov 2019 21:41:22 GMT):
that was a bad reference to crypto-config

haniavis (Tue, 03 Dec 2019 21:54:03 GMT):
Hi, I am trying to invoke a transaction through fabric sdk go, to a chaincode with policy `-P "AND ('Org1MSP.peer','Org2MSP.peer','Org3MSP.peer')"`. I am specifying the list of peers in the config.yaml file of the sdk (1 from each Org) so that it knows where to send various requests to. But I am getting this error:

haniavis (Tue, 03 Dec 2019 21:54:15 GMT):
`[fabsdk/client] 2019/12/03 21:51:14 UTC - pgresolver.(*randomLBP).Choose -> WARN No available peer groups`

haniavis (Tue, 03 Dec 2019 21:54:54 GMT):
any hints?

Qeven (Thu, 05 Dec 2019 07:08:58 GMT):
Has joined the channel.

VadimInshakov (Thu, 05 Dec 2019 19:58:45 GMT):
How does SDK know that MVCC conflict happened on endorsing phase (client.execute()), if validation phase occur later?

VadimInshakov (Thu, 05 Dec 2019 22:13:52 GMT):
Does CCEvents emitted on the simulation or commit phase?

yacovm (Thu, 05 Dec 2019 22:26:29 GMT):
commit

VadimInshakov (Fri, 06 Dec 2019 05:27:06 GMT):
thanks, @yacovm ! And can you explain, how we get errors from simulation phase (client.execute() method return value), if validation actually occur later?

VadimInshakov (Fri, 06 Dec 2019 06:50:29 GMT):
Or is SDK waiting for validation/commit before returning an answer?

metadata (Fri, 06 Dec 2019 08:00:29 GMT):
Hey All, anyone tried `go-sdk` with `raft ordering service` ? If yes, Please share the example. So far I'm using single orderer node with go-sdk. Now, I want to use raft ordering service.

metadata (Fri, 06 Dec 2019 08:00:29 GMT):
Hey All, anyone tried `go-sdk` with `raft ordering service` ? If yes, Please share the example. So far I'm using single orderer node with go-sdk. Now, I want to use raft ordering service. I want to know the configuration part like what and where to add the orderer nodes info in the config.yaml file and in sdk code.

Psingh (Fri, 06 Dec 2019 12:35:44 GMT):
Hi everyone, I have a query that when I invoke the chaincode then it returns some `response`. Now my questions are 1. Does response contains a txnID which would give me the values that I have stored if i use it to query the chaincode?

Psingh (Fri, 06 Dec 2019 12:35:44 GMT):
Hi everyone, I have a query that when I invoke the chaincode then it returns some `response`. Now my questions is 1. Does response contains a txnID which would give me the values that I have stored if i use it to query the chaincode?

Psingh (Fri, 06 Dec 2019 12:35:44 GMT):
Hi everyone, I have a query that when I invoke the chaincode then it returns some `response`. Now my questions is 1. Does response contains a txnID which would give me the values that I have stored if i use it to query the chaincode? 2. if not then please suggest the steps to do the same.

Psingh (Fri, 06 Dec 2019 12:35:44 GMT):
Hi everyone, I have a query that when I invoke the chaincode then it returns some `response`. Now my questions are 1. Does response contains a txnID which would give me the values that I have stored if i use it to query the chaincode? 2. if not then please suggest the steps to do the same.

Psingh (Fri, 06 Dec 2019 12:35:44 GMT):
Hi everyone, I have a query that when I invoke the chaincode then it returns some `response`. Now my questions are 1. Does response contains a txnID which would give me the values that I have stored if i use it to query the chaincode? 2. if not then please suggest the steps to do the same. 3. Is there any method available for querying the chaincode usig txnID?

haniavis (Fri, 06 Dec 2019 17:12:42 GMT):
Hi @metadata, the configuration of the raft service is done in the underlying fabric network (docker containers) if you do the configuration there, then it is easy to connect to this network using the go-sdk. You don't have to modify the config.yaml of the sdk. Except if you want the sdk to talk to a specific orderer

metadata (Fri, 06 Dec 2019 17:17:54 GMT):
@haniavis what if the orderer node(let say `orderer1.example.com`) that i'm using is went down. Is there any solution to avoid single point of failure?

metadata (Fri, 06 Dec 2019 17:17:54 GMT):
@haniavis what if the orderer node(let say `orderer1.example.com`) that i'm using is went down. Is there any solution to avoid single point of failure? like a load balancing thing?

haniavis (Fri, 06 Dec 2019 17:21:18 GMT):
you can list more than 1 orderers in the config.yaml file for redundancy. But I don't know the details of how this is handled by the sdk, which orderer is used if more than one is listed. Someone from the sdk team could help here.

metadata (Fri, 06 Dec 2019 17:24:45 GMT):
thanks @haniavis @troyronda @nyet please help?

Psingh (Sat, 07 Dec 2019 04:14:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=9DEDAHB2pcCo5NWgR) Please help with 1st and 2nd question. I think I got the answer for 3rd `"github.com/hyperledger/fabric-sdk-go/pkg/client/ledger"` offers `QueryTransaction` method.

yxuco (Sat, 07 Dec 2019 06:45:49 GMT):
The following call printed out an error `access denied: channel [mychannel]`. But the returned channel client works fine for both query and invoke. I suspect it is some issue of my network config yaml, or I missed some crypto files. How can I find the root of the issue? ``` client, err := channel.New(sdk.ChannelContext(channelID, opts...)) ``` ``` [fabsdk/fab] 2019/12/07 06:35:48 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [mychannel] creator org [netop1MSP]] ```

yxuco (Sat, 07 Dec 2019 21:04:50 GMT):
Resolved. This message indicates that one of the peers did not join the channel. The app still works as long as another peer had joined the channel.

metadata (Mon, 09 Dec 2019 17:02:40 GMT):
Hey all, Is this group active or not?

haniavis (Mon, 09 Dec 2019 20:26:20 GMT):
Hi all, I have a running fabric network and a fabric client using the sdk. When I run the client in the same machine as one of the peers, it works fine. But when a move the client to another machine and try to connect to the fabric network I get the following error. The transaction is successful as I can see from the logs in the peer.

haniavis (Mon, 09 Dec 2019 20:26:22 GMT):
[fabsdk/fab] 2019/12/09 20:23:52 UTC - dispatcher.(*Dispatcher).handleDeliverResponseStatus -> WARN Got deliver response status event: &peer.DeliverResponse_Status{Status:400}. Disconnecting... [fabsdk/fab] 2019/12/09 20:23:52 UTC - client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: got error status from deliver server: BAD_REQUEST [fabsdk/fab] 2019/12/09 20:23:52 UTC - client.(*Client).monitorConnection -> WARN Attempting to reconnect... [fabsdk/fab] 2019/12/09 20:23:52 UTC - client.(*Client).reconnect -> INFO Event client has reconnected

haniavis (Mon, 09 Dec 2019 20:27:21 GMT):
The error repeats for ever and it hangs the client process

haniavis (Mon, 09 Dec 2019 21:05:03 GMT):
ok I just found that the time/date of all the nodes was not synced, now it works

Psingh (Tue, 10 Dec 2019 05:08:01 GMT):
Hello everyone, I found ```DEBU Block height of connected peer [grpcs://peer0.org1.example.com:7051] from Discovery: 0, Last block received: 4, Max block height from Discovery: 0``` in sdk logs. `Discovery` unable to find the block height. these logs keeps coming. `EXTERNAL_ENDPOINTS` in the docker-peer file are already set. please help/.

Psingh (Tue, 10 Dec 2019 05:08:01 GMT):
Hello everyone, I found ```DEBU Block height of connected peer [grpcs://peer0.org1.example.com:7051] from Discovery: 0, Last block received: 4, Max block height from Discovery: 0``` in sdk logs. `Discovery` unable to find the block height. these logs keeps coming. `EXTERNAL_ENDPOINTS` in the docker-peer file are already set. please help.

Psingh (Tue, 10 Dec 2019 05:08:01 GMT):
Hello everyone, I found ```DEBU Block height of connected peer [grpcs://peer0.org1.example.com:7051] from Discovery: 0, Last block received: 4, Max block height from Discovery: 0``` in sdk logs. `Discovery` unable to find the block height. these logs keeps coming. `EXTERNAL_ENDPOINTS` in the docker-peer files are already set. please help.

metadata (Tue, 10 Dec 2019 14:56:10 GMT):
Hello All, I want to fetch the details stored in ledger via transactionID. Is there any function which I can use?

metadata (Tue, 10 Dec 2019 14:56:10 GMT):
Hello All, I want to fetch the details stored in ledger via transactionID. Is there any function which I can use? @haniavis @DeeptimanPattnaik

metadata (Tue, 10 Dec 2019 14:56:10 GMT):
Hello All, I want to fetch the details stored in ledger via transactionID. Is there any function which I can use? @haniavis @DeeptimanPattnaik I tried below method ``` "github.com/hyperledger/fabric-sdk-go/pkg/client/ledger" ledgerClient, err := ledger.New(clientCtx) <-- created a object ledgerClient.QueryTransaction(txnID, ledger.WithTargets(Peers[0], Peers[1])) ```

metadata (Tue, 10 Dec 2019 14:56:10 GMT):
Hello All, I want to fetch the details stored in ledger via transactionID. Is there any function which I can use? @haniavis @DeeptimanPattnaik I tried below method ``` "github.com/hyperledger/fabric-sdk-go/pkg/client/ledger" ledgerClient, err := ledger.New(clientCtx) <-- created a object ledgerClient.QueryTransaction(txnID, ledger.WithTargets(Peers[0], Peers[1])) ```

metadata (Tue, 10 Dec 2019 14:56:10 GMT):
Hello All, I want to fetch the details stored in ledger via transactionID. Is there any function which I can use? @haniavis @DeeptimanPattnaik I tried below method ``` "github.com/hyperledger/fabric-sdk-go/pkg/client/ledger" ledgerClient, err := ledger.New(clientCtx) <-- created a object ledgerClient.QueryTransaction(txnID, ledger.WithTargets(Peers[0], Peers[1])) ```

metadata (Tue, 10 Dec 2019 14:56:10 GMT):
Hello All, I want to fetch the details stored in ledger via transactionID. Is there any function which I can use? @haniavis @DeeptimanPattnaik I tried below method ``` "github.com/hyperledger/fabric-sdk-go/pkg/client/ledger" ledgerClient, err := ledger.New(clientCtx) <-- created a object ledgerClient.QueryTransaction(txnID, ledger.WithTargets(Peers[0], Peers[1])) ``` what I want is lets say I have stored `A` in the ledger and got a txID `X` Now I want to query using `X` to get `A` . Is it possible?

haniavis (Tue, 10 Dec 2019 21:20:34 GMT):
is that https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/ledger#Client.QueryTransaction what you are looking for?

metadata (Wed, 11 Dec 2019 05:26:12 GMT):
I have already tried it and I'm getting this type of response ``` (C}{Ojws$y Q O myccA storeData 06 Dec 2019 JAVA SHUBHAM Org1 SHUBHAM storeData  &y VN~ 6 !o/  E lscc mycc- mycc% ``` How to parse it

metadata (Wed, 11 Dec 2019 05:26:12 GMT):
I have already tried it and I'm getting this type of response ``` (C}{Ojws$y Q O myccA storeData 06 Dec 2019 JAVA ABC Org1 ABC storeData  &y VN~ 6 !o/  E lscc mycc- mycc% ``` How to parse it

metadata (Wed, 11 Dec 2019 05:30:11 GMT):

Screenshot (75).png

metadata (Wed, 11 Dec 2019 13:55:07 GMT):
@haniavis In the `node-sdk`, we have `BlockDecoder` to parse such response. anything similar in `go-sdk`?

troyronda (Wed, 11 Dec 2019 14:16:32 GMT):
https://chat.hyperledger.org/channel/fabric-maintainers?msg=hxTp2zRtPRgGPwu6a

troyronda (Wed, 11 Dec 2019 14:17:02 GMT):
https://chat.hyperledger.org/channel/fabric-maintainers?msg=ZKwpETxszgWXJYXpS

metadata (Wed, 11 Dec 2019 14:24:25 GMT):
@troyronda can you please help with below issue? https://stackoverflow.com/questions/59284916/how-to-get-the-data-stored-in-the-ledger-via-txnid-in-fabric-sdk-go

tommyjay (Wed, 11 Dec 2019 15:04:23 GMT):
https://sourcegraph.com/github.com/hyperledger/fabric-sdk-go/-/blob/pkg/client/ledger/ledger.go#L194:18

haniavis (Wed, 11 Dec 2019 16:29:08 GMT):
check the documentation for the QueryTransaction function. You will see that it returns a [ProcessedTransaction](https://godoc.org/github.com/hyperledger/fabric-protos-go/peer#ProcessedTransaction) which includes an envelop that I guess you can unmarshal and get the payload

tommyjay (Wed, 11 Dec 2019 16:56:14 GMT):
then use the DeepUnmarshalJSON function on the payload

wunderbarb (Thu, 12 Dec 2019 01:30:43 GMT):
A trivial question. Can somebody explain how I can avoid to have the following message displayed on the console when enrolling a new user?

wunderbarb (Thu, 12 Dec 2019 01:30:43 GMT):
A trivial question. Can somebody explain how I can avoid to have the following messages displayed on the console when enrolling a new user? `[fabsdk/fab] 2019/12/12 01:18:43 UTC - n/a -> INFO TLS Enabled [fabsdk/fab] 2019/12/12 01:18:43 UTC - n/a -> INFO generating key: &{A:ecdsa S:256} [fabsdk/fab] 2019/12/12 01:18:43 UTC - logbridge.(*cLogger).Info -> INFO encoded CSR `

swetha (Fri, 13 Dec 2019 17:02:58 GMT):
Hi! I have a couple questions about the go sdk. 1) In the past I was not able to use the go sdk to communicate with a non-TLS fabric network. Is this still the case?

swetha (Fri, 13 Dec 2019 17:02:58 GMT):
Hi! I have a couple questions about the go sdk. 1) In the past I was not able to use the go sdk to communicate with a non-TLS fabric network. Is this still the case? 2) Does the go sdk work with the new chaincode lifecycle? As in does it work with contracts that no longer have the init & invoke interface?

metadata (Sat, 14 Dec 2019 06:16:33 GMT):
Hi All, I'm getting below Discovery logs. ``` [fabsdk/fab] 2019/12/14 05:47:11 UTC - minblockheight.(*PeerResolver).ShouldDisconnect -> DEBU Block height of connected peer [grpcs://peer1.org1.example.com:8051] from Discovery: 0, Last block received: 7, Max block height from Discovery: 0 ```

metadata (Sat, 14 Dec 2019 06:16:33 GMT):
Hi All, I'm getting below Discovery logs. Block height from Discovery and Last block height are different. `CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051` in the docker file is enabled ``` [fabsdk/fab] 2019/12/14 05:47:11 UTC - minblockheight.(*PeerResolver).ShouldDisconnect -> DEBU Block height of connected peer [grpcs://peer1.org1.example.com:8051] from Discovery: 0, Last block received: 7, Max block height from Discovery: 0 ```

Tom-Xu-CNXA (Sun, 15 Dec 2019 01:17:07 GMT):
In a Go project, if fabric-sdk-go is imported, once "github.com/hyperledger/fabric/protos/utils" is also imported in the same project, an error of 'panic: proto: duplicate enum registered: common.MSPPrincipal_Classification' will be thrown during compiling the Go project. I think the problem is caused duplicated files in 'fabric-protos-go' or others. So, do you have any solution on this? Thanks!

Tom-Xu-CNXA (Sun, 15 Dec 2019 01:17:07 GMT):
In a Go project, if fabric-sdk-go is imported, once "github.com/hyperledger/fabric/protos/utils" is also imported in the same project, an error of 'panic: proto: duplicate enum registered: common.MSPPrincipal_Classification' will be thrown during compiling the Go project. I think the problem is caused by duplicated files in 'fabric-protos-go' or others. So, do you have any solution on this? Thanks!

Tom-Xu-CNXA (Sun, 15 Dec 2019 01:17:07 GMT):
In a Go project, if fabric-sdk-go is imported, once "github.com/hyperledger/fabric/protos/utils" is also imported in the same project, an error of 'panic: proto: duplicate enum registered: common.MSPPrincipal_Classification' will be thrown during compiling the Go project. I think the problem is caused by duplicated files. So, do you have any solution on this? Thanks!

Tom-Xu-CNXA (Sun, 15 Dec 2019 01:17:07 GMT):
In a Go project, if fabric-sdk-go is imported, once "github.com/hyperledger/fabric/protos/utils" is also imported in the same project, an error of 'panic: proto: duplicate enum registered: common.MSPPrincipal_Classification' will be thrown during compiling the Go project. I think the problem is caused by duplicated files. So, do you have any solution on this? No details now, but if anyone experienced this, please let me know. Or I will paste more details. Thanks!

Tom-Xu-CNXA (Sun, 15 Dec 2019 01:17:07 GMT):
In a Go project, if fabric-sdk-go is imported, once "github.com/hyperledger/fabric/protos/utils" (or other any protos/...) is also imported in the same project, an error of 'panic: proto: duplicate enum registered: common.MSPPrincipal_Classification' will be thrown during compiling the Go project. I think the problem is caused by duplicated files. So, do you have any solution on this? No details now, but if anyone experienced this, please let me know. Or I will paste more details. Thanks!

Tom-Xu-CNXA (Sun, 15 Dec 2019 01:17:07 GMT):
In a Go project, if fabric-sdk-go is imported, once "github.com/hyperledger/fabric/protos/utils" (or other any protos/...) is also imported in the same project, an error of 'panic: proto: duplicate enum registered: common.MSPPrincipal_Classification' will be thrown during compiling the Go project. I think the problem is caused by duplicated files. So, So, do you have any other solution on this? No details now, but if anyone experienced this, please let me know. Or I will paste more details. Thanks!

Tom-Xu-CNXA (Sun, 15 Dec 2019 02:21:17 GMT):
`github.com/hyperledger/fabric/protos/utils` cannot be imported with `fabric-sdk-go` together in a project, otherwise, an error likes `panic: proto: duplicate enum registered: common.MSPPrincipal_Classification` will be thrown. Since there is conflict with `github.com/hyperledger/fabric-protos-go`. Anyone experienced the same issue? Thanks!

metadata (Tue, 17 Dec 2019 05:16:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ZKYR93vxA4DfKCcrZ) please help?

Baha-sk (Tue, 17 Dec 2019 21:59:23 GMT):
peer0 and peer1 might be at different block height at the time of writing this log @metadata

metadata (Wed, 18 Dec 2019 06:29:24 GMT):
@Baha-sk I checked the peer block height using `docker-cli` and it wasn't zero.

metadata (Wed, 18 Dec 2019 06:29:24 GMT):
@Baha-sk I checked the peer block height using `docker-cli` and it wasn't zero and I'm getting this log for every peer.

ashlinSajan (Wed, 18 Dec 2019 10:49:00 GMT):
Has joined the channel.

metadata (Wed, 18 Dec 2019 18:45:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=ZKYR93vxA4DfKCcrZ) someone from dev team please help.

AbhijeetSamanta (Thu, 19 Dec 2019 05:08:12 GMT):
Has joined the channel.

Chem (Thu, 19 Dec 2019 07:34:31 GMT):
Has joined the channel.

delao (Thu, 19 Dec 2019 15:18:44 GMT):
What is the matter?

metadata (Thu, 19 Dec 2019 17:38:01 GMT):
I'm getting these logs whenever a event is triggered and they keep coming. I'm not able to figure out the root cause. the only thing that came to my mind was checking the `CORE_PEER_GOSSIP_EXTERNALENDPOINT` in docker files.

metadata (Thu, 19 Dec 2019 17:38:01 GMT):
I'm getting these logs whenever a event is triggered and they keep coming. I'm not able to figure out the root cause. the only thing that came to my mind was checking the `CORE_PEER_GOSSIP_EXTERNALENDPOINT` in docker files and it exists in the file

bstasyszyn (Thu, 19 Dec 2019 18:46:11 GMT):
These are debug logs and will be output every 5 seconds. Is there something not working?

metadata (Thu, 19 Dec 2019 18:48:10 GMT):
yes, response from the event get timedout

metadata (Thu, 19 Dec 2019 18:50:42 GMT):
what are the other factors on which `Sdk Discovery` depends on? liek something in the config.yaml file

metadata (Thu, 19 Dec 2019 18:50:42 GMT):
what are the other factors on which `Sdk Discovery` depends? liek something in the config.yaml file

metadata (Thu, 19 Dec 2019 18:50:42 GMT):
what are the other factors on which `Sdk Discovery` depends? like something in the config.yaml file

metadata (Thu, 19 Dec 2019 18:52:30 GMT):
this is the snippet of my config.yaml file ``` peer: timeout: connection: 10s response: 180s discovery: # # Expiry period for discovery service greylist filter # # The channel client will greylist peers that are found to be offline # # to prevent re-selecting them in subsequent retries. # # This interval will define how long a peer is greylisted greylistExpiry: 10s eventService: # the below timeouts are commented out to use the default values that are found in # "pkg/fab/endpointconfig.go" # the client is free to override the default values by uncommenting and resetting # the values as they see fit in their config file type: deliver timeout: registrationResponse: 15s resolverStrategy: Balanced balancer: RoundRobin ```

bstasyszyn (Thu, 19 Dec 2019 18:56:27 GMT):
There are two different thing: 1) Event service - which you specified to be the deliver service from Fabric and (2) Discovery

bstasyszyn (Thu, 19 Dec 2019 18:56:53 GMT):
The type of Discovery is selected based on channel capabilities...

bstasyszyn (Thu, 19 Dec 2019 18:57:48 GMT):
If you have the V1_2 application capability defined in the channel then Fabric's discovery service is used - otherwise static discovery is used

bstasyszyn (Thu, 19 Dec 2019 18:58:25 GMT):
Are you able to get the SDK's integration tests running?

metadata (Thu, 19 Dec 2019 19:09:56 GMT):
running right now. one more thing Integration-test is using `fabric v1.4.2`. So Is there any compatibility issue with `v1.4.3`? I'm using `v1.4.3` with `go-sdk alpha5`

bstasyszyn (Thu, 19 Dec 2019 19:12:05 GMT):
It should be fine with 1.4.3. I'm running the latest SDK (from master) with Fabric 2.0 and it's working fine.

metadata (Thu, 19 Dec 2019 19:12:36 GMT):
ok, I'll update you about the integration-test results.

metadata (Thu, 19 Dec 2019 19:50:09 GMT):
@bstasyszyn Integration test results ``` integration-tests_1 | Running integration.sh integration-tests_1 | Enabling data race detection integration-tests_1 | Code level stable (Fabric v1.4) integration-tests_1 | Running integration tests ... integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/e2e 40.863s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/e2e/configless 1.857s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/e2e/orgs 262.932s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/channel 755.366s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/common/discovery 394.268s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/common/selection 493.294s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/event 5.805s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/ledger 5.588s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/msp 10.286s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/client/resmgmt 76.589s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/context 2.468s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/fab 12.669s integration-tests_1 | ok github.com/hyperledger/fabric-sdk-go/test/integration/pkg/fabsdk/provider 5.664s integration-tests_1 | ? github.com/hyperledger/fabric-sdk-go/test/integration/util/runner [no test files] fabsdkgo_integration-tests_1 exited with code 0 ```

Psingh (Thu, 19 Dec 2019 20:04:19 GMT):
Hey all, I have few queries about raft ordering serivce with fabric-sdk-go. 1. Is there any integration test available to follow? 2. I have added all the nodes in config.yaml file. Any other config is required? 3. How sdk-go switches between nodes if one of the node is down. Is it using any load-balancing thing?

Psingh (Thu, 19 Dec 2019 20:04:19 GMT):
Hey all, I have few queries about raft ordering serivce with fabric-sdk-go. 1. Is there any integration test available to follow? 2. I have added all the nodes in config.yaml file. Any other config is required? 3. How sdk-go switches between nodes if one of the node is down. Is it using any load-balancing thing? 4. It is related to peer nodes. How can I balance the load of the peers via sdk-go?

metadata (Tue, 24 Dec 2019 12:24:41 GMT):
Hello @bstasyszyn , I've couple of questions. 1. Any doc available to differentiate between sdk-go master and alpha5? 2. Can I use `master` branch with fabric `v1.4.3`?

andreevym (Wed, 25 Dec 2019 16:54:39 GMT):
Has joined the channel.

root10 (Tue, 31 Dec 2019 14:42:32 GMT):
Hi guys. Is it possible to use go sdk to sign an offline transaction like node sdk? my idea is to create transaction with backend, send it to client, sign it, return the signedProposal/Transaction to beckend and send it to the blockchain

root10 (Tue, 31 Dec 2019 14:42:32 GMT):
Hi guys. Is it possible to use go sdk to sign an offline transaction (e.g. invoke a chaincode function) like node sdk? my idea is to create transaction with backend, send it to client, sign it, return the signedProposal/Transaction to backend and send it to the blockchain

Psingh (Tue, 31 Dec 2019 15:10:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7HvGQTmcuahP7hcoE) Please help.

yakumioto (Thu, 02 Jan 2020 11:12:11 GMT):
Has joined the channel.

yakumioto (Thu, 02 Jan 2020 11:12:12 GMT):
@root10 Hi, yes, refer to: https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/resource/config.go#L90, https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/resmgmt.go#L1028, https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/resource/resource.go#L228

Chem (Mon, 06 Jan 2020 06:27:37 GMT):
system chaincodes

indirajith (Wed, 08 Jan 2020 13:24:05 GMT):
Hi all. iit seems like shim packages, peer proto packages and others are moved/ re structured. Is there any plac where I can find these changes? I am trying to run a very very basic chaincode with just two key values(a,b, 20, 100) and stuck with it instantiation failure for a long time. I am using binaries version 1.4.4 and is it necessary to package chaincode?

metadata (Thu, 09 Jan 2020 06:07:40 GMT):
``` "github.com/hyperledger/fabric-chaincode-go/shim" "github.com/hyperledger/fabric-protos-go/peer"```

metadata (Thu, 09 Jan 2020 06:08:23 GMT):
clone `fabric-chaincode-go` and `fabric-protos-go`

indirajith (Thu, 09 Jan 2020 09:25:28 GMT):
Thank you @metadata !

indirajith (Thu, 09 Jan 2020 11:54:26 GMT):
Can you help me a bit. I have cloned these repos to my local system, But still when I try to install the chaincode, the go code unable to fidn these repos in the GOROOT and GOPATH. I think I am missing something in vendoring or packaging the dependencies with the sourcecode.

indirajith (Thu, 09 Jan 2020 11:54:54 GMT):
Can you please shed some light on what should I do in this scenario

metadata (Thu, 09 Jan 2020 11:55:02 GMT):
run `dep ensure` in the chaincode dir

indirajith (Thu, 09 Jan 2020 11:55:02 GMT):
Thank you in advance!

metadata (Thu, 09 Jan 2020 11:55:26 GMT):
it will create a `vendor` dir inside `chaincode` dir

metadata (Thu, 09 Jan 2020 11:56:25 GMT):
`dep` is a dependency management tool. u can try `go mod` too if running latest go version `1.13`

metadata (Thu, 09 Jan 2020 11:56:25 GMT):
`dep` is a dependency management tool. u can try `go mod` too if running latest go version `1.13`. `go mod` is also a dependency management tool

indirajith (Thu, 09 Jan 2020 11:57:46 GMT):
yeah I am using go mod but still getting the error. I will tru to fix this with dep now

metadata (Thu, 09 Jan 2020 11:58:53 GMT):
try running the go mod again.

indirajith (Thu, 09 Jan 2020 12:04:17 GMT):
Sure, thanks. I will try that :slight_smile:

indirajith (Thu, 09 Jan 2020 13:26:24 GMT):
Thank you, it worked. I created vender directory locally. But still having problem instantiating the chaincode. I get the following error for several weeks and could not rectify this problem. ``` failed to invoke chaincode name:"lscc" , error: container exited with 2 github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1 /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1337 chaincode registration failed ``` Is there anyway I can figure out what causes this error?

metadata (Thu, 09 Jan 2020 13:29:04 GMT):
even I'm getting almost same error in one of my project. recently ported it from v1.4.2 to v1.4.3 and I'm not able to figure out the solution. Can't check the chaincode container as it exists instantly.

indirajith (Thu, 09 Jan 2020 15:18:07 GMT):
oh, I am using 1.4.4, SO it works with 1.4.2?

metadata (Thu, 09 Jan 2020 16:12:15 GMT):
not sure

Fiorri (Sat, 11 Jan 2020 20:22:53 GMT):
Has joined the channel.

Fiorri (Sat, 11 Jan 2020 20:22:55 GMT):
Hi! i have question: how can I get a user private key in []bytes, in sdk `func (k *ecdsaPrivateKey) Bytes() ([]byte, error) { return nil, errors.New("Not supported.") }` and i cant't access field privKey to convert it manually it is "private" thx

Fiorri (Sat, 11 Jan 2020 20:22:55 GMT):
Hi! i have question: how can I get a user private key in []bytes, in sdk ```func (k *ecdsaPrivateKey) Bytes() ([]byte, error) { return nil, errors.New("Not supported.") }``` and i cant't access field privKey to convert it manually it is "private" thx

Fiorri (Sat, 11 Jan 2020 20:22:55 GMT):
Hi! i have question: how can I get a user private key in []byte, in sdk ```func (k *ecdsaPrivateKey) Bytes() ([]byte, error) { return nil, errors.New("Not supported.") }``` and i cant't access field privKey to convert it manually it is "private" thx

braduf (Sat, 11 Jan 2020 23:25:13 GMT):
I think for 1.4.4 you should still use ``` import "github.com/hyperledger/fabric/core/chaincode/shim" ``` and make sure in your go.mod you require `github.com/hyperledger/fabric v1.4.4` I think the new fabric-chaincode-go repo is for v2.0.0, as you can see in the fabric repo, the v1.4.4 tag still has the core/chaincode/shim folder...

braduf (Sat, 11 Jan 2020 23:25:13 GMT):
I think for 1.4.4 you should still use ``` import "github.com/hyperledger/fabric/core/chaincode/shim" ``` and make sure in your go.mod you require `github.com/hyperledger/fabric v1.4.4` I think the new fabric-chaincode-go repo is for v2.0.0, as you can see in the fabric repo the v1.4.4 tag still has the core/chaincode/shim folder...

braduf (Sat, 11 Jan 2020 23:25:13 GMT):
I think for 1.4.4 you should still use ``` import "github.com/hyperledger/fabric/core/chaincode/shim" ``` and make sure in your go.mod you require `github.com/hyperledger/fabric v1.4.4` I think the new fabric-chaincode-go repo is for v2.0.0, as you can see in the fabric repo the v1.4.4 tag still has the core/chaincode/shim folder... I am not 100% sure though, maybe the fabric-chaincode-go should also work in 1.4.4, I haven't tried it out yet.

metadata (Sun, 12 Jan 2020 06:03:13 GMT):
@braduf `fabric-chaincode-go` and `fabric-protots-go` are working with `v1.4.3` too. I think you can use them with any `1.4.x` as they are libraries.

braduf (Sun, 12 Jan 2020 06:04:20 GMT):
Ok, good to know, thank you! :thumbsup:

k.sung (Tue, 14 Jan 2020 02:24:55 GMT):
Has joined the channel.

heatherp (Tue, 14 Jan 2020 13:07:30 GMT):
Hi everyone, I am requesting that we enter the final comment period for the RFC to implement the Fabric Programming Model into the Go SDK, link: https://github.com/hyperledger/fabric-rfcs/pull/14. We're looking for any final comments, objections, and support 🙂, from those interested in fabric-go-sdk development I'm proposing that it is merged at the end of this period, in one week. Please reach out to @andrew-coleman or me with any queries

metadata (Tue, 14 Jan 2020 14:12:31 GMT):
@heatherp I have couple of questions. 1. Can I say that that the package `gatway` is going to be wrapper package around current functionality? 2. If a Node/Java dev is moving to Go then he/she has to deal with `Pointers` and In current scenario, the go-sdk is revolves around pointer. Is it going to be addressed too?

metadata (Tue, 14 Jan 2020 14:12:31 GMT):
@heatherp I have couple of questions. 1. Can I say that that the package `gateway` is going to be wrapper package around current functionality? 2. If a Node/Java dev is moving to Go then he/she has to deal with `Pointers` and In current scenario, the go-sdk is revolves around pointer. Is it going to be addressed too?

metadata (Tue, 14 Jan 2020 14:18:21 GMT):
3. How it is going to impact the current go-sdk users? I'm talking about the community support and regular updates.

metadata (Tue, 14 Jan 2020 14:18:21 GMT):
3. How it is going to impact the current go-sdk users? I'm talking about the community support and regular updates. yes, The idea is good as there is no proper documentation available for go-sdk hence it is pretty hard for node/java dev's to switch to go-sdk.

andrew-coleman (Tue, 14 Jan 2020 15:33:50 GMT):
1. Yes, the Gateway SDK will be implemented using the existing APIs. There will be no breaking changes to the existing SDK/APIs 2. The Go Gateway SDK will have the same concepts and structures as the Node/Java Gateway SDK, but will use idiomatic Go syntax. So it will use pointers since they are fundamental to Go. Java/Node will continue to be supported and developed so users can stay with those if they don't like Go syntax. 3. The Go Gateway SDK will be fully documented and supported. It is intended to extend the 'Developing Applications' chapter of the official Fabric documentation site with this SDK

Retonator (Tue, 14 Jan 2020 16:26:35 GMT):
Has joined the channel.

Retonator (Tue, 14 Jan 2020 16:26:36 GMT):
Hi, I got a question concerning querying and the selection of peers in the sdk. When just querying chaincode a peer does not have to be an endorsing peer, but in the sdk code the peers seems to be filtered by the organisation that are contained within the current endorsment policy.

Retonator (Tue, 14 Jan 2020 16:26:51 GMT):
Is this how it should work or possible a bug?

Retonator (Tue, 14 Jan 2020 16:47:06 GMT):
I think the problem is in the way we select and set the Target peers

jeetabhi15 (Wed, 15 Jan 2020 12:12:43 GMT):
Has joined the channel.

jeetabhi15 (Wed, 15 Jan 2020 12:12:44 GMT):
Hi Everyone ...I want to connect IBP2 with goSDK ...can anyone help me please

Tom-Xu-CNXA (Thu, 16 Jan 2020 02:11:34 GMT):
Do you mean IBM Blockchain Platform?

Tom-Xu-CNXA (Thu, 16 Jan 2020 02:11:55 GMT):
You need connection profile, identity cert, key...

Tom-Xu-CNXA (Thu, 16 Jan 2020 02:14:18 GMT):
You can find some examples within the fabric-sdk-go source under integration|end-end testing folders.

jeetabhi15 (Thu, 16 Jan 2020 06:05:55 GMT):
HI Tom-Xu ..Thanks for the information.... can you confirm me one thing..does goSDK has that connection file for IBP version 2....

parthibanselvaraj (Thu, 16 Jan 2020 06:12:26 GMT):
Has joined the channel.

krabradosty (Thu, 16 Jan 2020 17:15:17 GMT):
Has joined the channel.

medikent (Fri, 17 Jan 2020 01:29:16 GMT):
I want to help with the Gateway implementation in the Go SDK. who is leading this effort?

Tom-Xu-CNXA (Sat, 18 Jan 2020 01:38:15 GMT):
Yes, GoSDK can use the same profile within the example in NodeSDK for IBP.

dineshthemacho1 (Wed, 22 Jan 2020 06:05:43 GMT):
Has joined the channel.

f23h (Thu, 23 Jan 2020 12:25:01 GMT):
Has joined the channel.

f23h (Thu, 23 Jan 2020 12:25:51 GMT):
Hello, i have a question about go-sdk. How to create a configuration for my sdk example if i want to use a basic network? I tried to use the configuration from the Java SDK tutorial, but I have an error with initializing identity.

mahoney1 (Thu, 23 Jan 2020 13:57:30 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

haniavis (Thu, 23 Jan 2020 17:11:07 GMT):
@andrew-coleman for someone starting now to develop an app using the Go SDK, would you recommend waiting for the new programming model? Is it ok to start using the SDK as it is right now and then transfer to the new model as soon as it is implemented?

yacovm (Thu, 23 Jan 2020 22:07:49 GMT):
Hey Go SDK developers, FYI - you can now ask discovery to skip filtering out peers that are not in the collection but have a collection reference in the same query. This is a bit of a niche, but it can be used to make an endorsement query for a transaction that performs private data "blind write" on a chaincode that has a collection level endorsement policy (thus you need to pass the collections in the query). Before this change, any peer not in the collection was filtered out whenever you specified a collection. https://github.com/hyperledger/fabric/pull/538/commits/26fc7a50260aa41322c6e27fdcd6803b5f9255cf The added support is via a new flag in the protobuf - `NoPrivateReads` in the `ChaincodeCall` struct. Now, although this is merged, the support for collection level endorsement policy is yet to be merged, but you can already start implementing this in the Go SDK. In addition, since this adds a new protobuf field - there is no API break because this field is `false` by default. @troyronda @bstasyszyn

yacovm (Thu, 23 Jan 2020 22:07:49 GMT):
Hey Go SDK developers, FYI - you can now ask discovery to skip filtering out peers that are not in the collection but have a collection reference in the same query. This is a bit of a niche, but it can be used to make an endorsement query for a transaction that performs private data "blind write" on a chaincode that has a collection level endorsement policy (thus you need to pass the collections in the query). Before this change, any peer not in the collection was filtered out whenever you specified a collection. https://github.com/hyperledger/fabric/pull/538/commits/26fc7a50260aa41322c6e27fdcd6803b5f9255cf The added support is via a new flag in the protobuf - `NoPrivateReads` in the `ChaincodeCall` struct. Now, although this is merged, the support for collection level endorsement policy is yet to be merged, but you can already start implementing this in the Go SDK. In addition, despite this adds a new protobuf field - there is no API break because this field is `false` by default. @troyronda @bstasyszyn

yacovm (Thu, 23 Jan 2020 22:07:49 GMT):
Hey Go SDK developers (developers of Go SDK, not Go SDK users), FYI - you can now ask discovery to skip filtering out peers that are not in the collection but have a collection reference in the same query. This is a bit of a niche, but it can be used to make an endorsement query for a transaction that performs private data "blind write" on a chaincode that has a collection level endorsement policy (thus you need to pass the collections in the query). Before this change, any peer not in the collection was filtered out whenever you specified a collection. https://github.com/hyperledger/fabric/pull/538/commits/26fc7a50260aa41322c6e27fdcd6803b5f9255cf The added support is via a new flag in the protobuf - `NoPrivateReads` in the `ChaincodeCall` struct. Now, although this is merged, the support for collection level endorsement policy is yet to be merged, but you can already start implementing this in the Go SDK. In addition, despite this adds a new protobuf field - there is no API break because this field is `false` by default. @troyronda @bstasyszyn

georgi (Fri, 24 Jan 2020 14:27:08 GMT):
Has joined the channel.

idanilt (Sun, 26 Jan 2020 09:54:58 GMT):
Has joined the channel.

idanilt (Sun, 26 Jan 2020 09:55:00 GMT):
Hello I am getting started to work with the go-sdk, I have hard time to start: 1. I didn't find any documentation for the go sdk, I found only 1 very old tutorial that seem to be not up to date, is there any good resources? 2. We need to listen to blocks events and get the TX data, I saw that unlike the NODE sdk, the data in the events is raw, is there any utility that can help me get it?

metadata (Sun, 26 Jan 2020 16:26:24 GMT):
https://github.com/hyperledger/fabric-sdk-go/tree/master/test

tongli (Mon, 27 Jan 2020 01:41:25 GMT):
does the current sdk support fabric 2.0 chaincode lifecycle?

tongli (Mon, 27 Jan 2020 01:41:47 GMT):
if not, are there someone working on this? Thanks.

Tom-Xu-CNXA (Mon, 27 Jan 2020 15:02:23 GMT):
Hi all, do we have any fabric-sdk-go ways to, discover `all` orderers if the consensus type is etcdraft, and multiple orderer nodes are deployed? (An example environment is the etcdraft orderers in first-network.)

Tom-Xu-CNXA (Mon, 27 Jan 2020 15:02:23 GMT):
Hi all, do we have any fabric-sdk-go ways to, discover `all` orderers if the consensus type is etcdraft, and multiple orderer nodes are deployed? (An example environment is the etcdraft orderers in first-network.) Thanks!

Tom-Xu-CNXA (Tue, 28 Jan 2020 00:25:06 GMT):
Currently, the discovery.ChannelResponse.Config only includes the orderer endpoints configured in the connection profile. It didn't return the all orderers of the channel.

yacovm (Tue, 28 Jan 2020 00:32:19 GMT):
You mean https://github.com/hyperledger/fabric-sdk-go/blob/master/internal/github.com/hyperledger/fabric/discovery/client/api.go#L44 ?

yacovm (Tue, 28 Jan 2020 00:32:41 GMT):
It doesn't go to the connection profile...

Tom-Xu-CNXA (Tue, 28 Jan 2020 00:39:45 GMT):
Thank you @yacovm . I mean the `all` orderers for channel what but not listed in the connection profile. How can we discover them?

yacovm (Tue, 28 Jan 2020 00:41:53 GMT):
Using this API....

yacovm (Tue, 28 Jan 2020 00:42:00 GMT):
It queries the peer

yacovm (Tue, 28 Jan 2020 00:42:16 GMT):
The peer parses the config block and returns all the orderers in the channel

yacovm (Tue, 28 Jan 2020 00:42:34 GMT):
Look at the discovery-cli tool

yacovm (Tue, 28 Jan 2020 00:42:39 GMT):
It's the same thing

Tom-Xu-CNXA (Tue, 28 Jan 2020 00:57:03 GMT):
But in current first-network etcdraft example, it only return the orderer.example.com:7050, without others. I am looking into this, but sure of the root cause. Do you have any idea on this?

Tom-Xu-CNXA (Tue, 28 Jan 2020 00:57:03 GMT):
But in current first-network etcdraft example, it only return the orderer.example.com:7050, without others. I am looking into this, but not sure of the root cause. Do you have any idea on this?

Tom-Xu-CNXA (Tue, 28 Jan 2020 00:57:05 GMT):
Thanks!

ashlinSajan (Tue, 28 Jan 2020 06:26:36 GMT):
@tkuhrt How the endorser identify creator/client from the signed proposal?

metadata (Tue, 28 Jan 2020 07:09:37 GMT):
by their certificate(i.e client signature). so the PROPOSAL format is `` where tx = `clientID,chaincodeID,txPayload,timestamp,clientSig` for further deatils check this out: https://hyperledger-fabric.readthedocs.io/en/release-1.4/arch-deep-dive.html#propose-message-format

metadata (Tue, 28 Jan 2020 07:09:37 GMT):
by their certificate(i.e client signature). so the PROPOSAL format is `` where tx = `clientID,chaincodeID,txPayload,timestamp,clientSig` for further details check this out: https://hyperledger-fabric.readthedocs.io/en/release-1.4/arch-deep-dive.html#propose-message-format

ashlinSajan (Wed, 29 Jan 2020 05:29:52 GMT):
According to my knowledge in node.js sdk the user information including the org name and certificate is stored in "./fabric-client-kv-org*" But I need to know in go-sdk where the file containing the user information is getting generated and how is it stored ?

ashlinSajan (Wed, 29 Jan 2020 05:29:52 GMT):
@metadata @tkuhrt According to my knowledge in node.js sdk the user information including the org name and certificate is stored in "./fabric-client-kv-org*" But I need to know in go-sdk where the file containing the user information is getting generated and how is it stored ?

metadata (Wed, 29 Jan 2020 06:17:00 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/8f3d32c9d1a66f88d405c9f5335870c5277f773a/test/fixtures/config/config_e2e.yaml#L72

ashlinSajan (Wed, 29 Jan 2020 11:17:16 GMT):
Thanks I couldn't find the /tmp/state-store in my system

metadata (Wed, 29 Jan 2020 11:19:05 GMT):
that was just for reference :) check the config.yaml file and then check the `path` under `credentialStore`

metadata (Wed, 29 Jan 2020 11:19:05 GMT):
that was just for reference :) check your config.yaml file and then check the `path` under `credentialStore`

tongli (Thu, 30 Jan 2020 18:19:24 GMT):
guys, we are using go sdk in hfrd for performance tests.

tongli (Thu, 30 Jan 2020 18:20:26 GMT):
when we used 2.0.0 cryptogen to generate certificates, go sdk still looks for hashcode named private key, but 2.0.0 cryptogen is no longer doing that, now the private key file is named priv_sk.

tongli (Thu, 30 Jan 2020 18:20:44 GMT):
thus, the gosdk wont be able to find the key, all things fall apart.

tongli (Thu, 30 Jan 2020 18:20:55 GMT):
any idea how this can be fixed?

ashlinSajan (Fri, 31 Jan 2020 12:35:16 GMT):
How can I enroll and register a client?

troyronda (Fri, 31 Jan 2020 16:03:06 GMT):
Ok. I assume we will need some updates in the Go SDK with the release of Fabric 2.0. We have been using the Go SDK with Fabric 2.0 beta (but not sure if we tried with cryptogen).

VadimInshakov (Sat, 01 Feb 2020 07:18:08 GMT):
Hi guys, I created PR to eliminate gopackager dependence from GOPATH: https://github.com/hyperledger/fabric-sdk-go/pull/44 I run unit tests for gopackager locally, and it's were successful, but now I see some "post-job" errors on Azure CI. Can you help me understand what went wrong?

metadata (Sat, 01 Feb 2020 07:39:05 GMT):
package `fabric-sdk-go/pkg/client/msp/client.go` ``` // Register registers a User with the Fabric CA // Parameters: // request is registration request // // Returns: // enrolment secret func (c *Client) Register(request *RegistrationRequest) (string, error) ```

Tom-Xu-CNXA (Sun, 02 Feb 2020 09:22:33 GMT):
It works now.:grinning:

nikolas (Sun, 02 Feb 2020 21:29:44 GMT):
Has joined the channel.

ashlinSajan (Mon, 03 Feb 2020 05:54:05 GMT):
Thanks for your reply. ``` I got the file. But in which file the Register function is invoked? ```

ashlinSajan (Mon, 03 Feb 2020 05:54:05 GMT):
@metadata Thanks for your reply. ``` I got the file. But in which file the Register function is invoked? ```

metadata (Mon, 03 Feb 2020 07:10:04 GMT):
check the client_test.go file https://github.com/hyperledger/fabric-sdk-go/tree/master/pkg/client/msp also check this out https://github.com/hyperledger/fabric-sdk-go/tree/master/test/integration

nikolas (Mon, 03 Feb 2020 07:41:09 GMT):
Hi, when I try to call a chaincode func I get back "Client Status Code: (6) NO_PEERS_FOUND. Description: targets were not provided". It works fine from cli. Peers are running locally dockerized, with exposed ports on localhost. urll override rules have been set in the sdk configuration. Thanks for your hints.

jeetabhi15 (Tue, 04 Feb 2020 13:53:12 GMT):
hi medikent...can you please help me to connect IBP with go SDK

jeetabhi15 (Tue, 04 Feb 2020 14:03:54 GMT):
hi Tom can you please guide me...if you have any sample code to connect IBP with goSDK

BrajeshA (Wed, 05 Feb 2020 09:05:00 GMT):
Has joined the channel.

kopaygorodsky (Wed, 05 Feb 2020 10:47:28 GMT):
@troyronda hey, I noticed that resMgmt.QueryConfigFromOrderer does not return policies and other values of config. Is there any reason why you do not copy it's value to result ConfigGroup? https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/chconfig/chconfig.go#L475 There is TODO Do smth with this value, but what to do? At least we should copy it to final ConfigGroup and let users to parse it.

kopaygorodsky (Wed, 05 Feb 2020 10:47:28 GMT):
@troyronda hey, I noticed that resMgmt.QueryConfigFromOrderer does not return policies and other values of config versions. Is there any reason why you do not copy it's value to result ConfigGroup? https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/fab/chconfig/chconfig.go#L475 There is TODO Do smth with this value, but what to do? At least we should copy it to final ConfigGroup and let users to parse it.

kopaygorodsky (Wed, 05 Feb 2020 10:47:41 GMT):
If you agree, I could do PR

kopaygorodsky (Wed, 05 Feb 2020 10:47:41 GMT):
If you agree, I could do PR to fix this

vieiramanoel (Wed, 05 Feb 2020 20:11:25 GMT):
Hey guys, PRs can be made by github by now, is it necessary to open a Jyra for it?

vieiramanoel (Wed, 05 Feb 2020 20:11:25 GMT):
Hey guys, PRs can be made by github by now? is still necessary to open a Jyra for it?

vieiramanoel (Wed, 05 Feb 2020 20:11:25 GMT):
Hey guys, can PRs be made by github by now? is still necessary to open a Jyra for it?

vieiramanoel (Wed, 05 Feb 2020 20:11:25 GMT):
Hey guys, can PRs be made by github by now? is still necessary to open a Jira for it?

vieiramanoel (Wed, 05 Feb 2020 20:42:54 GMT):
https://github.com/hyperledger/fabric-sdk-go/pull/46 pĺs review (azure pipelines seems broken on master)

vieiramanoel (Wed, 05 Feb 2020 20:42:54 GMT):
https://github.com/hyperledger/fabric-sdk-go/pull/46 pĺs review (azure pipelines seems broken on master, at least the sticker on readme say this)

nikolas (Thu, 06 Feb 2020 12:08:46 GMT):
Hi, in go-sdk the channel client can call the "Execute" method, which submits the proposal and sends the proposal response to the orderers in one call. Is there some API that can brake this down to 2 steps, so that first as a dev submit the proposal -> receive the proposal response -> then submit the proposal response to the ordering service ?

kopaygorodsky (Thu, 06 Feb 2020 12:39:19 GMT):
Could somebody from maintainers review this PR? https://github.com/hyperledger/fabric-sdk-go/pull/47

vieiramanoel (Thu, 06 Feb 2020 17:28:38 GMT):
Could any maintainer review this PR? https://github.com/hyperledger/fabric-sdk-go/pull/46

venzi (Thu, 06 Feb 2020 17:35:14 GMT):
Hey guys, is Fabric SDK Go supporting generating CRL after revoking a certificate? I am having the same trouble as shown in this message: https://chat.hyperledger.org/channel/fabric-sdk-go?msg=GRTqFLeyKsQWZiN3b

metadata (Fri, 07 Feb 2020 06:19:32 GMT):
Are you looking for a (Revoke)method OR u already know the method and it isn't working?

metadata (Fri, 07 Feb 2020 06:19:32 GMT):
Are you looking for a (Revoke)method OR u already knew the method and it isn't working?

ashlinSajan (Fri, 07 Feb 2020 10:10:45 GMT):
Can anyone help me working on external chaincode launcher in local system?

ashlinSajan (Fri, 07 Feb 2020 10:10:45 GMT):
Can anyone help me working on external chaincode launcher in local system?(latest update in 2.0)

ashlinSajan (Fri, 07 Feb 2020 10:10:45 GMT):
Can anyone help me working on external chaincode launcher ?(latest update in 2.0)

kopaygorodsky (Fri, 07 Feb 2020 12:52:21 GMT):
what kind of help do you want exactly?

venzi (Fri, 07 Feb 2020 13:11:21 GMT):
I am already using the revoke method and it's working fine. The problem, as far as I can tell, is that there's no `GenCRL` field in the `msp.RevocationRequest`. The `msp.RevocationResponse`, which has `RevokedCerts` and `CRL` fields, comes with an empty `[]byte` for the `CRL`.

metadata (Fri, 07 Feb 2020 13:48:54 GMT):
ok. even I'm curious how they are generating the CRL by itself. though they are sending it in `RevocationResponse` and you have already mentioned it nil. @kopaygorodsky Could you please help?

metadata (Fri, 07 Feb 2020 13:48:54 GMT):
ok. even I'm curious how they are generating the CRL by itself. though they are sending it in `RevocationResponse` and you have already mentioned its nil. @kopaygorodsky Could you please help?

kopaygorodsky (Fri, 07 Feb 2020 13:53:46 GMT):
I'm just a user, not maintainer :) idk, haven't tried this yet in my app

metadata (Fri, 07 Feb 2020 13:55:18 GMT):
Can you please tag someone from core team ?

venzi (Fri, 07 Feb 2020 14:05:57 GMT):
@troyronda

venzi (Fri, 07 Feb 2020 18:07:19 GMT):
I just fixed it and made a PR: https://github.com/hyperledger/fabric-sdk-go/pull/49

narendranathreddy (Sat, 08 Feb 2020 08:29:38 GMT):
Hello All iam proud to announce that my book `Mastering Hyperledger fabric` is now available for pre-order https://www.amazon.com/dp/B084KZP9M7?ref_=pe_3052080_276849420

metadata (Sun, 09 Feb 2020 07:13:24 GMT):
Anyone tried running chaincode container with non-root user? I found this in sdk-go integration directory but not sure whether it is related to running chaincode containers with non-root user https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha5/test/fixtures/dockerenv/docker-compose-chaincoded.yaml

metadata (Sun, 09 Feb 2020 07:13:24 GMT):
Anyone tried running chaincode container with non-root user? I found below link in sdk-go integration directory but not sure whether it is related to running chaincode containers with non-root user https://github.com/hyperledger/fabric-sdk-go/blob/v1.0.0-alpha5/test/fixtures/dockerenv/docker-compose-chaincoded.yaml

venzi (Mon, 10 Feb 2020 17:00:25 GMT):
Could any maintainer please review this PR? https://github.com/hyperledger/fabric-sdk-go/pull/49

ChrisSargent (Mon, 10 Feb 2020 17:03:25 GMT):
Has joined the channel.

ChrisSargent (Mon, 10 Feb 2020 20:40:04 GMT):
Hi Everyone, thanks for creating this forum. I posted this question on Stack Overflow and I was wondering if anyone here had a different answer? https://stackoverflow.com/questions/60075552/how-to-connect-a-go-client-application-to-the-ibm-vs-code-fabric-extension

ChrisSargent (Mon, 10 Feb 2020 20:40:56 GMT):
I saw a few questions just above related to IBP and Fabric 2.0 so I'm wondering if this will be addressed then?

vieiramanoel (Mon, 10 Feb 2020 21:09:32 GMT):
I didn't saw anything related, fabric is very agonistic to platforms. But I can be wrong haha

vieiramanoel (Mon, 10 Feb 2020 21:09:32 GMT):
I didn't saw anything related, fabric is very agnistic to platforms. But I can be wrong haha

vieiramanoel (Mon, 10 Feb 2020 21:09:32 GMT):
I didn't saw anything related, fabric is very agnostic to platforms. But I can be wrong haha

nikolas (Tue, 11 Feb 2020 10:46:15 GMT):
Hi is there a way to convert a common.block into readable structured data? If I try to get the struct into json, I get base64 values. When I try to decode them, it is a blob containing readable and non-readable characters. Is there a way to get structured information of a block?

nikolas (Tue, 11 Feb 2020 10:46:15 GMT):
Hi is there a way to convert a common.block into readable structured data? If I try to get the struct into json, I get base64 values. When I try to decode them, it is a blob containing readable and non-readable characters. Is there a way to get structured information of a block? Header is ok, but data & metadata not. Thanks.

tongli (Tue, 11 Feb 2020 11:07:52 GMT):
@nikolas use configtxlator to decode common.block to json, however each tx invocation paparameters will be still base64 encoded. You will need to use jq to decide each field.

tongli (Tue, 11 Feb 2020 11:08:12 GMT):
Decode

nikolas (Tue, 11 Feb 2020 11:08:37 GMT):
@tongli thanks a lot! I am looking for some ref in order to programmatically do it via the gosdk... anything in mind?

tongli (Tue, 11 Feb 2020 11:08:41 GMT):
Minifabric does all these for you already.

tongli (Tue, 11 Feb 2020 11:09:06 GMT):
Oh.

tongli (Tue, 11 Feb 2020 11:10:13 GMT):
What I did in minifabric was to use configtxlator decode into json, then extract fields that I need, then decode each tx invocation fields.

tongli (Tue, 11 Feb 2020 11:11:25 GMT):
I would think that you can use configtxlator code (which is in go) do the same.

tongli (Tue, 11 Feb 2020 11:12:56 GMT):
Minifabric is a tool that I created recently. You can take a look here https://github.com/litong01/minifabric

tongli (Tue, 11 Feb 2020 11:14:06 GMT):
Once you do minifab up, you can try to use minifab invoke and minifab blockquery to see blocks on your ledger.

tongli (Tue, 11 Feb 2020 11:14:14 GMT):
Very easy to use

vieiramanoel (Tue, 11 Feb 2020 11:18:09 GMT):
Could any maintainer review this PR? https://github.com/hyperledger/fabric-sdk-go/pull/46

Tom-Xu-CNXA (Tue, 11 Feb 2020 12:57:42 GMT):
@jeetabhi15 Please refer to https://github.com/tomxucnxa/ibp_project_1

andrew-coleman (Tue, 11 Feb 2020 14:16:51 GMT):
Hi Maintainers, it looks like the integration tests for `fabric-sdk-go` have been failing in the Azure Pipelines build since December. I think it is caused by the added support for Java/Node chaincode (FABG-736/932/785). The docker images `fabric-javaenv` and `fabric-nodeenv` are not getting pulled which I suspect has a bearing, but also there are other errors. Is there work underway to fix this? @troyronda @aleksandar.likic @yakumioto Thanks!

narendranathreddy (Tue, 11 Feb 2020 14:52:56 GMT):

Mastering Hyperledger fabric - February 11, 2020 6:52 PM

narendranathreddy (Tue, 11 Feb 2020 14:59:27 GMT):
Mastering Hyperledger Fabric. A one-stop solution to become Master in the Hyperledger Fabric Key Features Detailed Explanation of One way TLS and mutual TLS Detailed Explanation of docker sockets (docker.sock) Exposed functionalities of Fabric CLI’s and SDK’s Enterprise level chaincode development Advanced examples of Node and golang Fabric SDK Onboard new organization using nodejs SDK (No more CLI) CI/CD for chaincode (Install chaincode directly onto peers from GitHub using Node.js) Fabric setup explanation with Different real time use cases Deployment of Hyperledger Fabric using docker swarm and kubernetes Setup and configure caliper to check benchmarks Monitor consortium with Prometheus and grafana Monitor docker and docker swarm using swarmpit and logspout Logging consortium with ELK/EFK stack Some interesting open source tools and some Bonus concepts Table of Contents Chapter1: Introduction to the Hyperledger Landscape Chapter2: The Disruptive Potential of TLS Chapter3: All about docker sockets Chapter4: Installation Guide Of Prerequisites Chapter5: All about fabric CLI Chapter6: All about SDK's (go lang and Node.js) Chapter7: Advanced Chaincode Chapter8: Running fabric consortium with Solo consensus using docker Chapter9: Running fabric Consortium with Kafka consensus using docker swarm Chapter10: Running fabric Consortium with Raft consensus using kubernetes Chapter11: Private Data Concept Chapter12: Setup and Benchmark Blockchain Consortium Using Caliper Chapter13: Monitoring Consortium with Prometheus and grafana Chapter14: Logging Consortium with ELK Stack Chapter15: Some Interesting tools Who this Book is For This Book benefits Software Engineers who are ready to shift their focus to distributed technologies and Blockchain. This book provides a comprehensive view of Solution Architecture so, it will be easy for architects to architect their solution. CTO’s around the world want to add hyperledger fabric to their technology stack. Managers to cope up with the latest trend. Faculty Professors in order to get industry insights. Even Engineering Students who want to be ready with the latest technologies. Book Description Mastering Hyperledger Fabric is a craving topic for all Hyperledger Fabric Developers around the world. Hyperledger Fabric is an open-source project that helps organizations create and maintain permissioned distributed Blockchain consortiums. This book is for readers who are looking for Hyperledger offerings to build end-to-end projects with growing complexity and functionalities. This book will be a one-stop solution for all developers who want to build blockchain consortiums using Hyperledger Fabric. Topics includes TLS, Unix sockets, caliper(Benchmark tool), raft consensus, advanced chaincode development, key collision and MVCC, chaincode access controls, chaincode encryption, node.js SDK, golang SDK, docker daemon API, private data concepts, onboarding organizations using node.js SDK, deploy hyperledger fabric using Kubernetes, deploy hyperledger fabric using docker swarm, monitoring hyperledger fabric, monitoring Kubernetes, monitoring docker swarm, logging hyperledger fabric. After reading this book the reader will be able to set up Production grade hyperledger fabric consortium using raft consensus mechanisms with monitoring using Prometheus and grafana, even logging. This book can be read by software engineers, blockchain engineers, university professors, university students, any level from beginner to master. A deep learning cure is there for beginners. This book explains so many key concepts of hyperledger fabric and written with three years of hyperledger fabric production experience.

ChrisSargent (Tue, 11 Feb 2020 15:17:12 GMT):
I would like to install and instantiate my own chaincode on the 'test-network' provided in v2, is there an easy way of doing this right now or does it require a modified version of the `deployCC.sh` script?

ChrisSargent (Tue, 11 Feb 2020 15:17:12 GMT):
I would like to install and instantiate my own chaincode on the 'test-network' provided in v2, is there an simple way of doing this right now or does it require a modified version of the `deployCC.sh` script?

ChrisSargent (Tue, 11 Feb 2020 15:34:59 GMT):
Also FYI, I am getting this error when trying to run `./network.sh deployCC` with a fresh repo and Docker images: `Error: failed to retrieve endorser client for commit: endorser client failed to connect to localhost:9051: failed to create new connection: context deadline exceeded`

ChrisSargent (Tue, 11 Feb 2020 15:34:59 GMT):
Also FYI, I am getting this error when trying to run `./network.sh deployCC` with a fresh repo and Docker images: `Error: failed to retrieve endorser client for commit: endorser client failed to connect to localhost:9051: failed to create new connection: context deadline exceeded` Further Info: This was happening from `master` branch, if I checkout `v2.0.0-beta` it works fine again. Looks like a dependency changed somewhere but I'm not sure if that's related.

tongli (Tue, 11 Feb 2020 16:40:58 GMT):
@ChrisSargent if you keep having issues with test network, I suggest you try this

tongli (Tue, 11 Feb 2020 16:41:35 GMT):
https://github.com/litong01/minifabric

ChrisSargent (Tue, 11 Feb 2020 17:29:17 GMT):
Thanks @tongli - I'm keen to stick with some 'official / supported' sources though

ChrisSargent (Wed, 12 Feb 2020 12:18:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=7kSt2xye9kiZgs5Bu) Does anyone know if the client Go application needs to be in a Docker container, in order to communicate with `test-network`?

vieiramanoel (Wed, 12 Feb 2020 17:07:41 GMT):
Could any maintainer review this PR? https://github.com/hyperledger/fabric-sdk-go/pull/46 guys this pr is stalled pls review

vieiramanoel (Wed, 12 Feb 2020 17:07:41 GMT):
ttps://github.com/hyperledger/fabric-sdk-go/pull/46 guys this pr is stalled pls review

vieiramanoel (Wed, 12 Feb 2020 17:07:41 GMT):
https://github.com/hyperledger/fabric-sdk-go/pull/46 guys this pr is stalled pls review

vieiramanoel (Wed, 12 Feb 2020 17:08:07 GMT):
changes were already made i just need discussion to continue

vieiramanoel (Wed, 12 Feb 2020 17:08:07 GMT):
changes were already made i just need the discussion to be continued

Tom-Xu-CNXA (Thu, 13 Feb 2020 13:03:49 GMT):
Hi, I am trying to install `Node/Javascript Chaincode` via this fabric-sdk-go, it seems that installation got succeed, but it cannot be instantiated. There might be some `path` problems, I tried several path patterns, and hacked some path validation, and made a Node type chaincode package, it can be installed without error, but when instantiation, there always be 2 kinds of errors: the first likes `msg chaincode registration failed: container exited with 254`, and another possible error is `cp: cannot stat '/chaincode/input/src/`. Have anyone same experiences? Do have any easy way to install `Node language chaincode` via this fabric-sdk-go? Thanks a lot!

Tom-Xu-CNXA (Thu, 13 Feb 2020 15:16:15 GMT):
Basically, the error is: ```github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1 /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 chaincode registration failed``` The Fabric is 1.4.3

Tom-Xu-CNXA (Thu, 13 Feb 2020 15:18:04 GMT):
I think this error goes far.

Tom-Xu-CNXA (Thu, 13 Feb 2020 15:48:08 GMT):
It is absolutely Node chaincode path issue, the path is problem under the generated image `/usr/local/src`

Tom-Xu-CNXA (Thu, 13 Feb 2020 15:48:08 GMT):
It is absolutely Node chaincode path issue, the path is problem under the generated image `/usr/local/src/PATH`. But actually the path should not be there. How can I solve it in fabric-sdk-go?

Tom-Xu-CNXA (Thu, 13 Feb 2020 15:49:28 GMT):
Yes, the image has already been built, but it cannot start.

vieiramanoel (Thu, 13 Feb 2020 17:55:21 GMT):
up once again, almost one week have passed

ChrisSargent (Thu, 13 Feb 2020 23:51:02 GMT):
@tongli - would I be able to add a Go client application (REST api) to communicate with the network / CC on Minifab? And also, does it use the CA? (my application creates and registers users)

tongli (Fri, 14 Feb 2020 02:06:08 GMT):
Minifabric create a fully functional fabric network. You can add new org to it and new peers to join it. You can use any app to access the network and minifabric even creates an connection profile for gosdk based the application.

ChrisSargent (Fri, 14 Feb 2020 23:43:03 GMT):
Can I use the fabric-ca client / server with it?

tongli (Sat, 15 Feb 2020 01:04:56 GMT):
Absolutely . It is a fully functional fabric network.

joshtharakan (Sat, 15 Feb 2020 07:24:06 GMT):
Has joined the channel.

VadimInshakov (Mon, 17 Feb 2020 08:35:47 GMT):
Can I sign arbitrary bytes with my private key using sdk? I tried to use msp.SigningIdentity `Sign` method, but it's not implemented.

ChrisSargent (Mon, 17 Feb 2020 10:06:50 GMT):
I am running a network on Minifabric and I'm getting this error when trying to enroll a user: `Post https://ca.org1.example.com:7054/enroll: x509: certificate is valid for tlsca.org1.example.com, not ca.org1.example.com` Clearly this points to some TLS handshake error, which I would assume means I'm using the wrong tlsa certificate in the certficateAuthorities section of my connection profile. However, I've tried changing that path to point to a completely different certificate but I still get the same error. Basically, I can't figure out where the go sdk is taking this certificate from - can anyone shed some light?

ChrisSargent (Mon, 17 Feb 2020 10:25:56 GMT):
okay, I finally managed to get past this error by setting a different `FABRIC_CA_SERVER_TLS_KEYFILE` & `FABRIC_CA_SERVER_TLS_CERTFILE` in the minifab setup.

tongli (Mon, 17 Feb 2020 13:02:10 GMT):
All certs are saved in vars/keyfiles directory since they were produced by cryptogen

ChrisSargent (Mon, 17 Feb 2020 13:20:47 GMT):
Hey @tongli - sorry to be the bane of your life right now! :-)

ChrisSargent (Mon, 17 Feb 2020 13:21:13 GMT):
Yes, I saw all the certs there but I think I tried all of them at some point.

ChrisSargent (Mon, 17 Feb 2020 13:22:17 GMT):
The only way I could get it to work was changing the above parameters to use like: ``` FABRIC_CA_SERVER_TLS_KEYFILE=/certs/ca/{{ allkeys[item.org].pkey.split('/')[-1] }} FABRIC_CA_SERVER_TLS_CERTFILE=/certs/ca/ca.{{ item.org }}-cert.pem ```

ChrisSargent (Mon, 17 Feb 2020 13:22:28 GMT):
i.e. using the ca certs instead of tlsca.

ChrisSargent (Mon, 17 Feb 2020 13:24:09 GMT):
it seems those 'original' tlsca certs on the server are signed to use tlsca.org1.example.com

tongli (Mon, 17 Feb 2020 13:29:57 GMT):
Depends on how and where you want to connect to. If you connect to ca, you need to use the ca tls key.

tongli (Mon, 17 Feb 2020 13:30:28 GMT):
If you can’t use the tls key, then it should be a bug.

ChrisSargent (Mon, 17 Feb 2020 13:34:06 GMT):
I'm working with the Go SDK - a Go application proving a restapi. This was whilst just trying to register / enroll a user with the CA.

ChrisSargent (Mon, 17 Feb 2020 13:34:35 GMT):
as far as I can tell, minifab doesn't bring up any server or endpoints with tlsca.xxx

tongli (Mon, 17 Feb 2020 13:34:58 GMT):
Right. So the connection profiles were made including all the peer and orderer nodes.

tongli (Mon, 17 Feb 2020 13:35:30 GMT):
I did not include all the ca nodes info in it. I should have added that.

ChrisSargent (Mon, 17 Feb 2020 13:35:44 GMT):
I've added that, no worries.

ChrisSargent (Mon, 17 Feb 2020 13:35:59 GMT):
``` certificateAuthorities: ca.org1.example.com: url: https://ca.org1.example.com:7054 tlsCACerts: # Must be absolute path path: ${APP_CRYPTO_PATH}/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem httpOptions: # Set to false to avoid 'self signed cert' errors verify: false # Need the caName to avoid 'ca.org1.example.com' does not exist errors caName: ca # Go SDK needs the registrar section registrar: enrollId: admin enrollSecret: adminpw ```

ChrisSargent (Mon, 17 Feb 2020 13:35:59 GMT):
``` certificateAuthorities: ca.org1.example.com: url: https://ca.org1.example.com:7054 tlsCACerts: path: ${APP_CRYPTO_PATH}/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem httpOptions: verify: false caName: ca registrar: enrollId: admin enrollSecret: adminpw ```

tongli (Mon, 17 Feb 2020 13:36:08 GMT):
You can do a pull request to minifab if you like

tongli (Mon, 17 Feb 2020 13:36:38 GMT):
So all the connection profiles generated will include ca info.

ChrisSargent (Mon, 17 Feb 2020 13:36:44 GMT):
sure.

tongli (Mon, 17 Feb 2020 13:37:10 GMT):
I would think that changes only need to be made in the template file

ChrisSargent (Mon, 17 Feb 2020 13:42:54 GMT):
okay, making those changes now, can you confirm the correct path to the certs please?

ChrisSargent (Mon, 17 Feb 2020 15:35:38 GMT):
submitted PR.

tongli (Mon, 17 Feb 2020 17:07:38 GMT):
@ChrisSargent reviewed it and has a question, can you respond to the question?

ArvonHuang (Tue, 18 Feb 2020 02:02:55 GMT):
Has joined the channel.

ArvonHuang (Tue, 18 Feb 2020 02:02:56 GMT):
Hi, every one, i wonder how I can retrieve range of blocks with fabric-go-sdk

dileban (Thu, 20 Feb 2020 04:48:46 GMT):
This is more of an IBM related question, but is there a convenient way to consume either the connection profile or exported certs from IBP (IBM Blockchain Platform) to the Go SDK?

dileban (Thu, 20 Feb 2020 04:48:59 GMT):
I'm aware that the Node and Java SDKs support this

metadata (Thu, 20 Feb 2020 05:20:21 GMT):
I guess this can help you. https://stackoverflow.com/questions/60075552/how-to-connect-a-go-client-application-to-the-ibm-vs-code-fabric-extension/60075787?noredirect=1#comment106508348_60075787

dileban (Thu, 20 Feb 2020 05:59:34 GMT):
@metadata Given the connection profile essentially contains the same information, would it a script to convert and dump the certs from the connection profile to the format required by Go SDK work?

metadata (Thu, 20 Feb 2020 06:14:54 GMT):
not sure if there's any script available right now.

metadata (Thu, 20 Feb 2020 06:15:44 GMT):
Can you share the config.aml file created by IBM blockchain platform?

metadata (Thu, 20 Feb 2020 06:16:21 GMT):
best thing is to compare both files (IBP vs go-sdk) and check the idfferences

metadata (Thu, 20 Feb 2020 06:16:21 GMT):
best thing is to compare both files (IBP vs go-sdk) and check the dfferences

metadata (Thu, 20 Feb 2020 06:16:21 GMT):
best thing is to compare both files (IBP vs go-sdk) and check the differences

metadata (Thu, 20 Feb 2020 06:16:21 GMT):
best thing is to compare both files (IBP vs go-sdk) and check the difference

davidkel (Thu, 20 Feb 2020 08:27:57 GMT):
I'm aware that the go sdk doesn't quite conform to the connection profile standard and so the connection profiles require slight modification to work and these only work with the Go SDK.

metadata (Thu, 20 Feb 2020 08:45:08 GMT):
@davidkel Is the new go-sdk-programming model suggested by @andrew-coleman in progress?

davidkel (Thu, 20 Feb 2020 08:46:12 GMT):
It is, so hopefully they will fix the issues with the connection profile but we will see

davidkel (Thu, 20 Feb 2020 08:46:12 GMT):
It is, I see that a PR has been merged with some initial stuff

ChrisSargent (Thu, 20 Feb 2020 09:00:12 GMT):
I was doing a bit of work on this and I was able to get an exported connection profile from Minifab (https://github.com/litong01/minifabric) to work with the Go SDK. I would have thought that given the right information and certs, that this profile (which was written based on the links in that SO question) couldn't be updated to work with other networks. But I haven't tried it.... ;-)

ChrisSargent (Thu, 20 Feb 2020 09:01:32 GMT):
For example, I'm not sure of the consequences of the comment, "Wallets are not compatible with the Go SDK currently."

davidkel (Thu, 20 Feb 2020 10:18:36 GMT):
The Go SDK doesn't have the the wallet concept provided by fabric-gateway-java and fabric-network (from node) as so doesn't have the api's yet, nor can it work with the persisted format on the filesystem. As the Go SDK is to get the new programming api available in node and java, the ability to work with persisted wallets as well as import identities in the same way as the other implemetations will come

dileban (Thu, 20 Feb 2020 10:51:41 GMT):
Have you written any code/script that converts a connection profile to a form required by the Go SDK?

dileban (Thu, 20 Feb 2020 10:51:41 GMT):
@ChrisSargent Have you written any code/script that converts a connection profile to a form required by the Go SDK?

ChrisSargent (Thu, 20 Feb 2020 11:10:20 GMT):
well, in my case the connection profile is ostensibly the same - I've tried using the same for a JS api and a Go api. Just that the Golang one has more information.

ChrisSargent (Thu, 20 Feb 2020 11:12:37 GMT):
this is the template that is used in Minifabric: https://github.com/litong01/minifabric/blob/master/playbooks/ops/profilegen/templates/goprofileyaml.j2

davidkel (Thu, 20 Feb 2020 11:32:25 GMT):
As an example, cryptopath is not a standard connection profile entry. Therefore is should be optional, not mandatory and should have started with `x-` ``` "organizations": {% for org in allorgs %} {% set orgelements = allkeys.values() | selectattr('org', 'equalto', org) | list %} "{{ org }}": "mspid": "{{ org.split('.')|join('') }}" "cryptoPath": "{{ org }}/users/{username}@{{ org}}/msp" ```

dileban (Thu, 20 Feb 2020 11:36:58 GMT):
Is there a straight forward way to run the Ansible code where I could just feed it a connection profile JSON and it would spit out the corresponding .yaml? (without having to launch a mini-fabric network in the process)?

ChrisSargent (Thu, 20 Feb 2020 11:38:10 GMT):
I don't know, but all it does is output something similar to the examples in https://github.com/hyperledger/fabric-sdk-go/tree/master/test/fixtures/config

ChrisSargent (Thu, 20 Feb 2020 11:44:41 GMT):
This is interesting

metadata (Thu, 20 Feb 2020 11:45:20 GMT):
@dileban I came across a repo that uses python jinja2 for creating the docker-compose files. you can try something like this. https://github.com/prayagsingh/Python-Jinja2-templating

ChrisSargent (Thu, 20 Feb 2020 11:45:23 GMT):
@davidkel - the BCCSP is also said to be optional, yet if I mark it with an `x-`, it breaks it.

davidkel (Thu, 20 Feb 2020 11:47:17 GMT):
bccsp should be optional, my point about the `x-` was that if the go-sdk wanted to add optional extras to the connection profile, they should have been marked with `x-` but they didn't. I think bccsp is part of the specification and was specified as optional

davidkel (Thu, 20 Feb 2020 11:47:17 GMT):
bccsp should be optional, my point about the `x-` was that if the go-sdk wanted to add optional extras (ie not part of the specification) to the connection profile, they should have been marked with `x-` but they didn't. I think bccsp is part of the specification and was specified as optional

ChrisSargent (Thu, 20 Feb 2020 11:50:56 GMT):
ah, I see what you mean. I took it that the `x-` prefix only meant to things that aren't at all part of the connection profile and not related to any fabric config... i.e. just another way of passing some extra config variables in, like an app version or something, like: https://github.com/americanexpress/fabric-integration/blob/master/src/test/config/connection-profile-without-ca.json But I guess you're saying that cryptoconfig isn't part of the official 'spec' - though I'm not actually sure where to find an official spec :-)

davidkel (Thu, 20 Feb 2020 11:56:19 GMT):
It's buried in a jira somewhere but even that spec is now out of date. It wasn't updated for when features like discovery were introducefd

davidkel (Thu, 20 Feb 2020 11:56:19 GMT):
It's buried in a jira somewhere but even that spec is now out of date. It wasn't updated for when features like discovery were introduced

ChrisSargent (Thu, 20 Feb 2020 11:56:44 GMT):
like every piece of great software!

dileban (Thu, 20 Feb 2020 11:57:44 GMT):
A slightly different question while I have your attention. Do you think the Go SDK follows idiomatic Go or attempts to follow idomatic TypeScript?

davidkel (Thu, 20 Feb 2020 12:00:38 GMT):
Go is a very different thing to typescript so I think it would be hard for any Go code to follow idomatic typescript

dileban (Thu, 20 Feb 2020 12:01:23 GMT):
I do agree, but I didn't get that impression reading through the Go SDK

dileban (Thu, 20 Feb 2020 12:01:41 GMT):
It felt like there was an excessive use of function pointers

dileban (Thu, 20 Feb 2020 12:02:03 GMT):
Many that are deeply nested

davidkel (Thu, 20 Feb 2020 12:02:33 GMT):
Function pointers were a `C` concept long before anonymous functions in javascript

dileban (Thu, 20 Feb 2020 12:03:59 GMT):
Also agree :) ... but, I does feel like an overuse when more simpler object composition would have worked

dileban (Thu, 20 Feb 2020 12:03:59 GMT):
Also agree :) ... but, it does feel like an overuse when more simpler object composition would have worked

dileban (Thu, 20 Feb 2020 12:04:22 GMT):
I say this having not contributed to the SDK, so it might just be a personal take on my short read through

davidkel (Thu, 20 Feb 2020 12:05:09 GMT):
I think I know what you are referring too, I don't know why that particular pattern was used. A good idea at the time ?

dileban (Thu, 20 Feb 2020 12:06:17 GMT):
Or maybe the original developers wrote a lot of TypeScript and also contributed to the Node SDK

dileban (Thu, 20 Feb 2020 12:06:36 GMT):
It did mimic the Node SDK a lot

davidkel (Thu, 20 Feb 2020 12:07:34 GMT):
The GO SDK maintainers didn't have any involvement in the node sdk and I doubt very much that they tried to minic to node sdk

davidkel (Thu, 20 Feb 2020 12:08:04 GMT):
or javascript/typescript

davidkel (Thu, 20 Feb 2020 12:26:37 GMT):
@dileban Any reason why you are choosing to use the Go SDK vs Node SDK ?

dileban (Fri, 21 Feb 2020 06:16:30 GMT):
@davidkel Currently working on a relayer to shuffle messages across different DLT platforms so they could interoperate. Currently includes Fabric, Corda, Quorum/Besu but hope to extended this to a few public networks (where it makes sense). The relayer is currently written in Go.

HarisC (Mon, 24 Feb 2020 09:35:49 GMT):
@vieiramanoel Hello Manoel. I came across the same problem that i can't define hosts using sdk-go. I saw your issue on JIRA and PR on github. Is there any change to complete the requested changes, so it can be merged into the master branch. Thanks for your work and time

ChrisSargent (Mon, 24 Feb 2020 17:46:48 GMT):
Hey all, I'm make a call to an Invoke method in Go SDK which requires Args in `[][]byte` format. I'm pulling the args from a url query string. Is there any package or method ready to convert URL query params to `[][]byte` type?

ChrisSargent (Mon, 24 Feb 2020 17:47:40 GMT):
url example is like `/stats?arg1=hey1&arg2=yo`

metadata (Tue, 25 Feb 2020 07:07:53 GMT):
@ChrisSargent check this url. It returns map. https://golang.org/pkg/net/url/#ParseQuery

ChrisSargent (Tue, 25 Feb 2020 20:15:00 GMT):
@metadata - thanks.... I'm wondering about how to ensure order of args too.

nikolas (Thu, 27 Feb 2020 10:09:38 GMT):
hi, is there a straight forward sample somewhere with registering new users with the go-sdk?

metadata (Thu, 27 Feb 2020 12:17:30 GMT):
https://github.com/Deeptiman/multiorgledger

nikolas (Thu, 27 Feb 2020 12:33:58 GMT):
thanks I ll check it

kopaygorodsky (Thu, 27 Feb 2020 14:13:50 GMT):
After upgrading to 2.0 and enabling 2.0 capability I receve "unknown service discovery.Discovery" when try to use discovery service (when target selects by sdk)

kopaygorodsky (Thu, 27 Feb 2020 14:13:50 GMT):
After upgrading to 2.0 and enabling 2.0 capability I receve "unknown service discovery.Discovery" when try to use discovery service (when target selects by sdk) . Does somebody has this issue? It's covered in this test case, but idk what I'm doing wrong. https://github.com/hyperledger/fabric/blob/a282f7132565d509d3ba6d502cd9c07cc5e567f0/discovery/cmd/stub_test.go#L23

kopaygorodsky (Thu, 27 Feb 2020 14:13:50 GMT):
After upgrading to 2.0 and enabling 2.0 capability I receive "unknown service discovery.Discovery" when try to use discovery service (when target selects by sdk) . Does somebody has this issue? It's covered in this test case, but idk what I'm doing wrong. https://github.com/hyperledger/fabric/blob/a282f7132565d509d3ba6d502cd9c07cc5e567f0/discovery/cmd/stub_test.go#L23

kopaygorodsky (Thu, 27 Feb 2020 14:13:50 GMT):
After upgrading to 2.0 and enabling 2.0 capability I receive "unknown service discovery.Discovery" when try to use discovery service (target selects by sdk) . Does somebody has this issue? It's covered in this test case, but idk what I'm doing wrong. https://github.com/hyperledger/fabric/blob/a282f7132565d509d3ba6d502cd9c07cc5e567f0/discovery/cmd/stub_test.go#L23

kopaygorodsky (Thu, 27 Feb 2020 14:13:50 GMT):
After upgrading to 2.0 and enabling 2.0 capability I receive "unknown service discovery.Discovery" when try to use discovery service. All peers from endpoint config are joined to this a channel. Does somebody has this issue? It's covered in this test case, but idk what I'm doing wrong. https://github.com/hyperledger/fabric/blob/a282f7132565d509d3ba6d502cd9c07cc5e567f0/discovery/cmd/stub_test.go#L23

kopaygorodsky (Thu, 27 Feb 2020 14:13:50 GMT):
After upgrading to 2.0 and enabling 2.0 capability I receive "unknown service discovery.Discovery" when try to use discovery service(Peer membership query). All peers from endpoint config are joined to this a channel. Does somebody has this issue? It's covered in this test case, but idk what I'm doing wrong. https://github.com/hyperledger/fabric/blob/a282f7132565d509d3ba6d502cd9c07cc5e567f0/discovery/cmd/stub_test.go#L23

kopaygorodsky (Thu, 27 Feb 2020 14:13:50 GMT):
After upgrading to 2.0 and enabling 2.0 capability I receive "unknown service discovery.Discovery" when try to use resmgmt client, which uses discovery service(Peer membership query) underlying for selecting targets. All peers from endpoint config are joined to this a channel. Does somebody has this issue? It's covered in this test case, but idk what I'm doing wrong. https://github.com/hyperledger/fabric/blob/a282f7132565d509d3ba6d502cd9c07cc5e567f0/discovery/cmd/stub_test.go#L23

kopaygorodsky (Thu, 27 Feb 2020 14:13:50 GMT):
After upgrading to 2.0 and enabling 2.0 capability I receive "unknown service discovery.Discovery" when try to use resmgmt client, which uses discovery service(Peer membership query) underlying for selecting targets. All peers from endpoint config are joined to this a channel. Does somebody have this issue? It's covered in this test case, but idk what I'm doing wrong. https://github.com/hyperledger/fabric/blob/a282f7132565d509d3ba6d502cd9c07cc5e567f0/discovery/cmd/stub_test.go#L23

kopaygorodsky (Thu, 27 Feb 2020 14:13:50 GMT):
After upgrading to 2.0 and enabling 2.0 capability I receive "unknown service discovery.Discovery" when try to use resmgmt client, which uses discovery service(Peer membership query) underlying for selecting targets. All peers from endpoint config are joined to this a channel. Does somebody have this issue? It's covered in this test case, but idk what I'm doing wrong(or sdk). https://github.com/hyperledger/fabric/blob/a282f7132565d509d3ba6d502cd9c07cc5e567f0/discovery/cmd/stub_test.go#L23

kopaygorodsky (Thu, 27 Feb 2020 14:13:50 GMT):
After upgrading to 2.0 and enabling 2.0 capability I receive "unknown service discovery.Discovery" when try to use resmgmt client, which uses discovery service(Peer membership query) underlying for selecting targets. All peers from endpoint config are joined to this a channel. Does somebody have this issue? It's covered in this test case, but idk what I'm doing wrong(or sdk). Nothing appears in peer's logs. https://github.com/hyperledger/fabric/blob/a282f7132565d509d3ba6d502cd9c07cc5e567f0/discovery/cmd/stub_test.go#L23

yacovm (Thu, 27 Feb 2020 14:19:20 GMT):
you're probably using the wrong peer port

yacovm (Thu, 27 Feb 2020 14:19:29 GMT):
it needs to be the same port as the endorser

kopaygorodsky (Thu, 27 Feb 2020 14:20:27 GMT):
I see that SDK connects to the peer, I can join it to a channel

yacovm (Thu, 27 Feb 2020 14:21:11 GMT):
is the discovery service disabled in the peer? https://github.com/hyperledger/fabric/blob/master/sampleconfig/core.yaml#L412

kopaygorodsky (Thu, 27 Feb 2020 14:23:26 GMT):
oh, could it be that I've overridden this config by injecting custom core yaml? I mean I have a custom core.yml for enabling external chaincode, but I don't include whole config, only parts I needed.

kopaygorodsky (Thu, 27 Feb 2020 14:23:47 GMT):
all other parts should be default, right?

kopaygorodsky (Thu, 27 Feb 2020 14:23:47 GMT):
all other parts should be default, right? I have custom peer.handlers and chaincode topics

yacovm (Thu, 27 Feb 2020 14:24:07 GMT):
try to enable it via environment variables

kopaygorodsky (Thu, 27 Feb 2020 14:28:00 GMT):
yes, that's was a problem, thx. I just added peer.discovery topic to my custom core.yaml. So it means that it overrides the whole config and if you miss smth - it doesn't set as default.

yacovm (Thu, 27 Feb 2020 14:30:38 GMT):
cool

kopaygorodsky (Thu, 27 Feb 2020 16:06:02 GMT):
I get this error when I try to instantiate chaincode using 2.0 capabilities. https://github.com/hyperledger/fabric/blob/6cdc08ff999a04b1f109c88d912b5c353ab6159c/core/scc/lscc/lscc.go#L1006 it says lscc chaincode shouldn't be used in 2.0, but I see this in sdk when it instantiates my chaincode https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/lscc.go#L85

kopaygorodsky (Thu, 27 Feb 2020 16:06:02 GMT):
I get this error when I try to instantiate chaincode using 2.0 capabilities. They are set in Orderer, Channel, Application groups. https://github.com/hyperledger/fabric/blob/6cdc08ff999a04b1f109c88d912b5c353ab6159c/core/scc/lscc/lscc.go#L1006 it says lscc chaincode shouldn't be used in 2.0, but I see this in sdk when it instantiates my chaincode https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/lscc.go#L85

kopaygorodsky (Thu, 27 Feb 2020 16:06:32 GMT):
Is sdk compatible with 2.0 chaincodes?

kopaygorodsky (Thu, 27 Feb 2020 16:06:32 GMT):
Is sdk of the latest release compatible with 2.0 chaincodes?

kopaygorodsky (Thu, 27 Feb 2020 16:06:32 GMT):
Is sdk of the latest release compatible with 2.0 chaincodes?

kopaygorodsky (Thu, 27 Feb 2020 16:08:20 GMT):
@aleksandar.likic @troyronda @bstasyszyn

kopaygorodsky (Thu, 27 Feb 2020 16:31:37 GMT):
I get this error when I try to instantiate chaincode using 2.0 capabilities. They are set in Orderer, Channel, Application groups. https://github.com/hyperledger/fabric/blob/6cdc08ff999a04b1f109c88d912b5c353ab6159c/core/scc/lscc/lscc.go#L1006 it says lscc chaincode shouldn’t be used in 2.0, but I see this in sdk when it instantiates my chaincode https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/resmgmt/lscc.go#L85 Then I realized that lifecycle is totally different and sdk does not support it, right? I don't see any functionality about approveformyorg, checkcommitreadiness, querycommitted etc

yacovm (Thu, 27 Feb 2020 16:51:24 GMT):
maybe use the peer CLI @kopaygorodsky

yacovm (Thu, 27 Feb 2020 16:51:32 GMT):
ugly but works

kopaygorodsky (Thu, 27 Feb 2020 16:53:52 GMT):
yes, that's what I'm thinking about now exec.Run(peer ...) :(

yacovm (Thu, 27 Feb 2020 16:54:44 GMT):
You can perhaps embed the code?

yacovm (Thu, 27 Feb 2020 16:54:48 GMT):
somehow...

kopaygorodsky (Thu, 27 Feb 2020 16:55:11 GMT):
you mean reuse from fabric repo?

yacovm (Thu, 27 Feb 2020 16:55:16 GMT):
yeah

kopaygorodsky (Thu, 27 Feb 2020 16:55:23 GMT):
I saw it's in internal pkg

yacovm (Thu, 27 Feb 2020 16:55:27 GMT):
the Go SDK actually reuses the discovery code from the fabric repo

yacovm (Thu, 27 Feb 2020 16:55:37 GMT):
> I saw it's in internal pkg screw that, copy it :joy:

kopaygorodsky (Thu, 27 Feb 2020 16:56:00 GMT):
https://github.com/hyperledger/fabric/tree/af66ef834f2314b1bb2501e9d746b4aa1fdbb6c9/internal/peer/lifecycle/chaincode right?

yacovm (Thu, 27 Feb 2020 16:56:08 GMT):
yeah

yacovm (Thu, 27 Feb 2020 16:56:17 GMT):
look all you need is to be able to sign stuff

yacovm (Thu, 27 Feb 2020 16:56:29 GMT):
no?

kopaygorodsky (Thu, 27 Feb 2020 16:56:56 GMT):
yes, exactly, I'll try

kopaygorodsky (Thu, 27 Feb 2020 16:56:58 GMT):
Also, I can start doing PR for adding this functionality to sdk, could sdk maintainers tell what’s the plan for it?

yacovm (Thu, 27 Feb 2020 16:57:03 GMT):
if you need a signing object, you can construct https://github.com/hyperledger/fabric/tree/master/cmd/common/signer

kopaygorodsky (Thu, 27 Feb 2020 16:57:19 GMT):
maybe they could accept copied code from fabric :)

yacovm (Thu, 27 Feb 2020 16:57:53 GMT):
> maybe they could accept copied code from fabric Probably not from that area in the code base, it's like CoronaVirus

kopaygorodsky (Thu, 27 Feb 2020 16:58:05 GMT):
hahah

kopaygorodsky (Thu, 27 Feb 2020 16:58:39 GMT):
yea, anyway I need to start somewhere. thanks for the advice!

yacovm (Thu, 27 Feb 2020 16:58:43 GMT):
np

kopaygorodsky (Thu, 27 Feb 2020 17:01:02 GMT):
Is running everything on 2.0 containers using 1.4 capabilities a good idea? I'll just use externalbuilder

kopaygorodsky (Thu, 27 Feb 2020 17:01:02 GMT):
Is running everything on 2.0 containers using 1.4 capabilities a good idea? I'll just use the externalbuilder

yacovm (Thu, 27 Feb 2020 17:26:26 GMT):
should be fine

kopaygorodsky (Thu, 27 Feb 2020 17:42:51 GMT):
thx

kopaygorodsky (Thu, 27 Feb 2020 17:42:57 GMT):
for those who are interested - https://jira.hyperledger.org/browse/FAB-11237

kopaygorodsky (Thu, 27 Feb 2020 17:42:57 GMT):
for those who are interested - https://jira.hyperledger.org/browse/FAB-11237, in progress

kopaygorodsky (Thu, 27 Feb 2020 17:42:57 GMT):
for those, who are interested - https://jira.hyperledger.org/browse/FAB-11237, in progress

kopaygorodsky (Thu, 27 Feb 2020 17:42:57 GMT):
for those, who are interested - https://jira.hyperledger.org/projects/FABG/issues/FABG-892, in backlog still

kopaygorodsky (Thu, 27 Feb 2020 22:17:10 GMT):
As I understood even install process is different, even it worked with lsss and 2.0 capability.

kopaygorodsky (Thu, 27 Feb 2020 22:17:10 GMT):
As I understood even install process is different, even it worked with lscc and 2.0 capability.

kopaygorodsky (Thu, 27 Feb 2020 22:17:10 GMT):
As I understood even install process is different, even it worked with lscc and 2.0 capability (same ChaincodeBuilder is used I think in both)

kopaygorodsky (Thu, 27 Feb 2020 22:17:10 GMT):
As I understood install process is different, even it worked with lscc and 2.0 capability (same ChaincodeBuilder is used I think in both)

GuilhermeLionzo (Mon, 02 Mar 2020 00:02:39 GMT):
Has joined the channel.

GuilhermeLionzo (Mon, 02 Mar 2020 00:24:00 GMT):
*[DOUBT - Get started with GO-SDK]* Hi guys, I hope everybody is ok. I`m newbie on the hyperledger field and I want to build a server side using GO-SDK. Could you guys provide some information about how I can get started? Thanks in advance :smile:

kopaygorodsky (Mon, 02 Mar 2020 01:01:23 GMT):
have you looked in google?

metadata (Mon, 02 Mar 2020 06:00:33 GMT):
hello @GuilhermeLionzo There isn't any proper documentation available but you can refer to some examples. You can go through @DeeptimanPattnaik multiorgledger for end-to-end example link: https://github.com/Deeptiman/multiorgledger

metadata (Mon, 02 Mar 2020 06:03:53 GMT):
also checkout the `fabric-sdk-go/test` directory

indirajith (Mon, 02 Mar 2020 12:06:41 GMT):
Hi all, can anyone help me understand the 'credentialStore', and 'cryptoStore' in go-sdk's config.yaml file? How to generate them if I use fabric-ca and 'sw ' BCCSP?

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? I'm using 2.0 and plugins feature is disabled. I cloned fabric, added my scc to pkg/core/scc/mycc and registered it in https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go#L730. I see peer accepted it and deployed. When I try to call it using sdk I get `returned error: lscc's state for [mycc] not found`. I tried to debug it until proposal is sent, I see that it invokes mycc, so I don't think it's sdk's problem Also, I fount this issue, maybe this is related somehow, but there are a lot of changes from 1.0 to 2.0 https://jira.hyperledger.org/browse/FAB-5671

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? I'm using 2.0 and plugins feature is disabled. I cloned fabric, added my scc to pkg/core/scc/mycc and registered it in https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go#L730. I see peer accepted it and deployed. When I try to call it using sdk I get `returned error: lscc's state for [mycc] not found`. I tried to debug it until proposal is sent, I see that it invokes mycc, so I don't think it's sdk's problem Also, I fount this issue, maybe this is related somehow, but there are a lot of changes from 1.0 to 2.0 https://jira.hyperledger.org/browse/FAB-5671 Mycc is very similar to _lifecycle in a way that I need to store votes(approvals) for channel governance

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? I'm using 2.0 and plugins feature is disabled. I cloned fabric, added my scc to pkg/core/scc/mycc and registered it in https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go#L730. I see peer accepted it and deployed. When I try to call it using sdk I get `returned error: lscc's state for [mycc] not found`. My first thoughts were that it tries to Invoke sys cc using lscc lifecycle, which is not right. I tried to debug it until proposal is sent, I see that it invokes mycc directly, so I don't think it's sdk's problem Also, I fount this issue, maybe this is related somehow, but there are a lot of changes from 1.0 to 2.0 https://jira.hyperledger.org/browse/FAB-5671 Mycc is very similar to _lifecycle in a way that I need to store votes(approvals) for channel governance

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? I'm using 2.0 and plugins feature is disabled. I cloned fabric, added my scc to pkg/core/scc/mycc and registered it in https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go#L730. I see peer accepted it and deployed. When I try to call it using sdk I get `returned error: lscc's state for [mycc] not found`. My first thoughts were that it tries to Invoke sys cc using lscc lifecycle, which is not right. I tried to debug it until proposal is sent, I see that it invokes mycc directly, so I don't think it's sdk's problem Also, I fount this issue, maybe this is related somehow, but there are a lot of changes from 1.0 to 2.0 https://jira.hyperledger.org/browse/FAB-5671 Mycc is very similar to _lifecycle in a way that I need to store votes(approvals) for channel governance

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? I'm using 2.0 and plugins feature is disabled. I cloned fabric, added my scc to pkg/core/scc/mycc and registered it in https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go#L730. I see peer accepted it and deployed. When I try to call it using sdk I get `returned error: lscc's state for [mycc] not found`. My first thoughts were that it tries to Invoke sys cc using lscc lifecycle, which is not right. I tried to debug it until proposal is sent, I see that it invokes mycc directly, so I don't think it's sdk's problem. ChaincodeId:Name is mycc in final proposal that is being sent. Also, I fount this issue, maybe this is related somehow, but there are a lot of changes from 1.0 to 2.0 https://jira.hyperledger.org/browse/FAB-5671 Mycc is very similar to _lifecycle in a way that I need to store votes(approvals) for channel governance

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? I'm using 2.0 and plugins feature is disabled. I cloned fabric, added my scc to pkg/core/scc/mycc and registered it in https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go#L730. I see peer accepted it and deployed. When I try to call it using sdk I get `returned error: lscc's state for [mycc] not found`. My first thoughts were that it tries to Invoke sys cc using lscc lifecycle, which is not right. I tried to debug it until proposal is sent, I see that it invokes mycc directly, so I don't think it's sdk's problem. ChaincodeId:Name is mycc in final proposal that is being sent by sdk. Also, I fount this issue, maybe this is related somehow, but there are a lot of changes from 1.0 to 2.0 https://jira.hyperledger.org/browse/FAB-5671 Mycc is very similar to _lifecycle in a way that I need to store votes(approvals) for channel governance

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? I'm using 2.0 and plugins feature is disabled. I cloned fabric, added my scc to pkg/core/scc/mycc and registered it in https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go#L730. I see peer accepted it and deployed. When I try to call it using sdk I get `returned error: lscc's state for [mycc] not found`. My first thoughts were that it tries to Invoke sys cc using lscc lifecycle, which is not right. I tried to debug it until proposal is sent, I see that it invokes mycc directly, so I don't think it's sdk's problem. ChaincodeId:Name is mycc in final proposal that is being sent by sdk. Also, I found this issue, maybe this is related somehow, but there are a lot of changes from 1.0 to 2.0 https://jira.hyperledger.org/browse/FAB-5671 Mycc is very similar to _lifecycle in a way that I need to store votes(approvals) for channel governance

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? I'm using 2.0 and plugins feature is disabled. I cloned fabric, added my scc to pkg/core/scc/mycc and registered it in https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go#L730. I see peer accepted it and deployed. When I try to call it using sdk I get `returned error: lscc's state for [mycc] not found`. My first thoughts were that it tries to Invoke sys cc using lscc lifecycle, which is not right. I tried to debug it until proposal is sent, I see that it invokes mycc directly, so I don't think it's sdk's problem. ChaincodeId:Name is mycc in final proposal that is being sent by sdk. Also, I found this issue, maybe this is related somehow, but there are a lot of changes from 1.0 to 2.0 https://jira.hyperledger.org/browse/FAB-5671 Mycc is very similar to _lifecycle in a way that I stores votes(approvals) for channel governance

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? I'm using 2.0 and plugins feature is disabled. I cloned fabric, added my scc to pkg/core/scc/mycc and registered it in https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go#L730. I see peer accepted it and deployed. When I try to call it using sdk I get `returned error: lscc's state for [mycc] not found`. My first thoughts were that it tries to Invoke sys cc using standard lscc lifecycle, not system one. which is not right. Also, I found this issue, maybe this is related somehow, but there are a lot of changes from 1.0 to 2.0 https://jira.hyperledger.org/browse/FAB-5671 Mycc is very similar to _lifecycle in a way that I stores votes(approvals) for channel governance

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? I'm using 2.0 and plugins feature is disabled. I cloned fabric, added my scc to pkg/core/scc/mycc and registered it in https://github.com/hyperledger/fabric/blob/master/internal/peer/node/start.go#L730. I see peer accepted it and deployed. When I try to call it using sdk I get `returned error: lscc's state for [mycc] not found`. My first thoughts were that it tries to Invoke sys cc using standard lscc lifecycle, not system one. which is not right. Also, I found this issue, maybe this is related somehow, but there are a lot of changes from 1.0 to 2.0 https://jira.hyperledger.org/browse/FAB-5671 Mycc is very similar to _lifecycle in a way that I stores votes(approvals) for channel governance https://pastebin.com/DsJ5G8k5 logs from peer

kopaygorodsky (Mon, 02 Mar 2020 12:07:11 GMT):
Could somebody help me pls with system chaincode persistence? https://jira.hyperledger.org/browse/FAB-17564

kopaygorodsky (Mon, 02 Mar 2020 12:07:48 GMT):
@aleksandar.likic I see you were working on it, could you please help ?

kopaygorodsky (Mon, 02 Mar 2020 12:07:48 GMT):
@aleksandar.likic @troyronda I see you were working on it, could you please help ?

kopaygorodsky (Mon, 02 Mar 2020 12:15:12 GMT):

Clipboard - March 2, 2020 2:15 PM

metadata (Mon, 02 Mar 2020 12:19:54 GMT):
whenever you register a user with fabric-ca then u have store the identities of that user. so `credentialStore` and `cryptoStore` are those places. u can change it any path of your choice.

metadata (Mon, 02 Mar 2020 12:19:54 GMT):
whenever you register a user with fabric-ca then u have to store the identities of that user. so `credentialStore` and `cryptoStore` are those places. u can change it any path of your choice.

metadata (Mon, 02 Mar 2020 12:24:10 GMT):
`credentialStore` for cert and `cryptoStore` isfor key

indirajith (Mon, 02 Mar 2020 12:24:58 GMT):
So, I have to provide the file path of sign cert of for eg. Admin in the credentialStrore not the whole msp, have I got it correct?

indirajith (Mon, 02 Mar 2020 12:25:27 GMT):
Thank you very much for the help @metadata

GuilhermeLionzo (Mon, 02 Mar 2020 12:26:38 GMT):
Thank you for the information @metadata :smile:

metadata (Mon, 02 Mar 2020 12:28:14 GMT):
Deeptiman's repository is a complete package. u will find most of the things there.

metadata (Mon, 02 Mar 2020 12:29:31 GMT):
I never tried it so don't want to give u any wrong info.

metadata (Mon, 02 Mar 2020 12:30:09 GMT):
In my case I'm not registering a new user.

metadata (Mon, 02 Mar 2020 12:30:30 GMT):
so still using hardcoded Admin identity

metadata (Mon, 02 Mar 2020 12:31:54 GMT):
for most of the projects I'm still using cryptogen tool (cwl)

metadata (Mon, 02 Mar 2020 12:31:54 GMT):
for most of the projects I'm still using cryptogen tool :joy:

indirajith (Mon, 02 Mar 2020 12:32:06 GMT):
Oh okay. thank you verymuch. We need this onlyy if we register a user using the SDK. No need to worry of we register in other ways for example directly using CLI.

indirajith (Mon, 02 Mar 2020 12:32:24 GMT):
Thanks a lot!

indirajith (Mon, 02 Mar 2020 13:01:47 GMT):
@metadata One last thing, how and where do you hard code the admin identity in the config? In the organizations::adminPrivateKey:path: ?

metadata (Mon, 02 Mar 2020 13:02:06 GMT):
yes

indirajith (Mon, 02 Mar 2020 14:54:47 GMT):
Hi, I am encountering "Unable to initialize the Fabric SDK: failed to create channel management client from Admin identity: failed to create resmgmt client due to context error: user not found " problem. Do you have any idea what could be the problem?

kopaygorodsky (Mon, 02 Mar 2020 15:14:49 GMT):
@yacovm sorry for interruption, could you please confirm my thoughts about discovery service. I have installed my cc as a system one (here https://jira.hyperledger.org/browse/FAB-17564) and now I try to invoke it. When discovery services tries to find endorsers for my cc on a channel it returns an error that descriptor couldn't be built "failed constructing descriptor for chaincodes: "

kopaygorodsky (Mon, 02 Mar 2020 15:14:49 GMT):
@yacovm sorry for interruption, could you please confirm my thoughts about discovery service. I have installed my cc as a system one (here https://jira.hyperledger.org/browse/FAB-17564) and now I try to invoke it. When discovery services tries to find endorsers for my cc on a channel it returns an error that descriptor couldn't be built "failed constructing descriptor for chaincodes: " It means that discovery service is not working with the system chaincode and not able to select possible targets.

kopaygorodsky (Mon, 02 Mar 2020 15:14:49 GMT):
@yacovm sorry for interruption, could you please confirm my thoughts about discovery service. I have installed my cc as a system one (here https://jira.hyperledger.org/browse/FAB-17564) and now I try to invoke it. When discovery services tries to find endorsers for my cc on a channel it returns an error that descriptor couldn't be built "failed constructing descriptor for chaincodes: " It means that discovery service is not working with the system chaincode and not able to select possible endorsers.

kopaygorodsky (Mon, 02 Mar 2020 15:14:49 GMT):
@yacovm sorry for interruption, could you please confirm my thoughts about discovery service. I have installed my cc as a system one (here https://jira.hyperledger.org/browse/FAB-17564) and now I try to invoke it. When discovery service tries to find endorsers for my cc on a channel it returns an error that descriptor couldn't be built "failed constructing descriptor for chaincodes: " It means that discovery service is not working with the system chaincode and not able to select possible endorsers.

kopaygorodsky (Mon, 02 Mar 2020 15:14:49 GMT):
@yacovm sorry for interruption, could you please confirm my thoughts about discovery service. I have installed my cc as a system one (here https://jira.hyperledger.org/browse/FAB-17564) and now I try to invoke it. When discovery service tries to find endorsers for my cc on a channel it returns an error that descriptor couldn't be built "failed constructing descriptor for chaincodes: " It means that discovery service is not working with the system chaincode and not able to select possible endorsers, am I right ?

yacovm (Mon, 02 Mar 2020 15:51:56 GMT):
Yes @kopaygorodsky , system chaincodes have the same endorsement policy of signed by any member

yacovm (Mon, 02 Mar 2020 15:52:10 GMT):
And discovery doesnt supprt system chaincodes

kopaygorodsky (Mon, 02 Mar 2020 16:07:28 GMT):
thank you!

kopaygorodsky (Mon, 02 Mar 2020 16:07:28 GMT):
thank you!

kopaygorodsky (Mon, 02 Mar 2020 16:07:28 GMT):
thank you

Rajatsharma (Mon, 02 Mar 2020 16:26:59 GMT):
Hi @kopaygorodsky @yacovm, So there's no way we could use features like discovery service or private data in a system chaincode.

Rajatsharma (Mon, 02 Mar 2020 16:27:12 GMT):
Even i wanted to leverage that in my project.

yacovm (Mon, 02 Mar 2020 17:07:25 GMT):
why do you need it to be a system chaincode @Rajatsharma ?

Rajatsharma (Mon, 02 Mar 2020 17:09:27 GMT):
The thing is a system chaincode is automatically instantiated and deployed on every channel. And it will save a bit of time too. We had used this in our project's logic.

Rajatsharma (Mon, 02 Mar 2020 17:09:47 GMT):
That's why we were using a system chaincode.

yacovm (Mon, 02 Mar 2020 17:11:31 GMT):
save a bit of time? are you in a hurry?

yacovm (Mon, 02 Mar 2020 17:11:56 GMT):
the fact that you don't instantiate it, means that you don't set an endorsement policy in the world state

yacovm (Mon, 02 Mar 2020 17:12:11 GMT):
so there is no way to ensure the same endorsement policy among all peers

Rajatsharma (Mon, 02 Mar 2020 17:12:29 GMT):
We wanted to save time as much time as possible in every transaction. This was important for the client we were dealing.

yacovm (Mon, 02 Mar 2020 17:13:18 GMT):
but you instantiate a chaincode exactly one :O

yacovm (Mon, 02 Mar 2020 17:13:18 GMT):
but you instantiate a chaincode exactly once :thinking_face:

Rajatsharma (Mon, 02 Mar 2020 17:13:19 GMT):
Intially when we had started the project in fabric 1.4. We had read a system chaincode does not follow the full transaction lifecycle as a normal chaincode.

yacovm (Mon, 02 Mar 2020 17:13:20 GMT):
*once

kopaygorodsky (Mon, 02 Mar 2020 19:45:43 GMT):
My example: governance of a channel(proposals, signing). Instead of installing, approving it for each channel/peer it’s done automatically, policy does not matter, anyone is fine because it’s used as distributed storage.

kopaygorodsky (Mon, 02 Mar 2020 19:45:43 GMT):
My example: governance of a channel(proposals, signing). Instead of installing, approving it for each channel/peer it’s done automatically, policy does not matter, anyone is fine because it’s used as distributed storage, so all participant will see new proposals and could approve or not. Actually it’s very similar to current lifecycle chaincode where you approve and check readiness for commit

kopaygorodsky (Mon, 02 Mar 2020 19:45:43 GMT):
My example: governance of a channel(proposals, signing). Instead of installing, approving it for each channel/peer it’s done automatically, policy does not matter, anyone is fine because it’s used as distributed storage, so all participant will see new proposals and could approve or not. Actually it’s very similar to current lifecycle chaincode where you approve and check readiness for commit. Ofc this Aligned with whole system and all peers have this cc installed.

kopaygorodsky (Mon, 02 Mar 2020 19:45:43 GMT):
My example: governance of a channel(proposals, signing). Instead of installing, approving it for each channel/peer it’s done automatically, policy does not matter, anyone is fine because it’s used as distributed storage, so all participant will see new proposals and could approve or not. Actually it’s very similar to current lifecycle chaincode where you approve and check readiness for commit. Ofc this is aligned with whole system and all peers have this cc installed.

kopaygorodsky (Mon, 02 Mar 2020 20:29:10 GMT):
instantiation is a one time operation, it won't take long

kopaygorodsky (Mon, 02 Mar 2020 20:29:39 GMT):
I think you are moving in a wrong direction, I would suggest to use normal lifecycle, it's really easy with 2.0

kopaygorodsky (Mon, 02 Mar 2020 20:30:10 GMT):
especially I like external builder

Rajatsharma (Mon, 02 Mar 2020 20:31:13 GMT):
But in every transaction too, there's a difference between the time it takes. Moreover we wanted to use the feature that whenever any channel is made system chaincode is deployed and instantiated on that channel on its own. But now we're facing difficulties due to that

kopaygorodsky (Mon, 02 Mar 2020 20:33:00 GMT):
How much time ? Only policies are checked

kopaygorodsky (Mon, 02 Mar 2020 20:33:19 GMT):
Have you measured ?

kopaygorodsky (Mon, 02 Mar 2020 20:33:30 GMT):
I don’t think it’s correct assumption

Rajatsharma (Tue, 03 Mar 2020 07:37:27 GMT):
The main part we've used for designing the solution was that system chaincode were automatically deployed and instantiated. So we're logically forming channels and using that. I was not part of the designing phase intially, Do you think there's some problem with this ? @yacovm @kopaygorodsky

kopaygorodsky (Tue, 03 Mar 2020 09:32:30 GMT):
yes, you are using fabric in a wrong way, it wasn't supposed to be used like this. I'm using system chaincode like distributed storage to collect signs from participants, nothing else

kopaygorodsky (Tue, 03 Mar 2020 09:32:30 GMT):
yes, you are using fabric in a wrong way, it wasn't supposed to be used like this

garunkumar450 (Wed, 04 Mar 2020 04:57:28 GMT):
helo

garunkumar450 (Wed, 04 Mar 2020 05:17:45 GMT):
iam using fabric 1.4.1 and go 1.13 version which fabric-sdk-go version is comptiable for fabric 1.4.1

garunkumar450 (Wed, 04 Mar 2020 05:18:14 GMT):
iam getting error while running application go/packages/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util/csp.go:46:8: cannot convert nil to type csr.KeyRequest

garunkumar450 (Wed, 04 Mar 2020 05:18:28 GMT):
and also go/packages/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util/csp.go:119:37: cannot use req.KeyRequest (type *csr.KeyRequest) as type csr.KeyRequest in argument to getBCCSPKeyOpts

metadata (Wed, 04 Mar 2020 07:45:18 GMT):
1. check the value that u r passing is `nil` or not. add a condition to check error is saying that whatever u r passing is `nil` and it can't convert `nil` value to type csr.KeyRequest 2. pointer issue. u r using it in a wrong way. for eg: can not use `A` whose type is `pointer to B` as type `B` check the difference `pointer to B` and 'B'

metadata (Wed, 04 Mar 2020 07:45:18 GMT):
1. check the value that u r passing is `nil` or not. add a condition to check error is saying that whatever u r passing is `nil` and it can't convert `nil` value to type csr.KeyRequest 2. pointer issue. u r using it in a wrong way. for eg: can not use `A` whose type is `pointer to B` as type `B` check the difference type `pointer to B` and `B`

metadata (Wed, 04 Mar 2020 07:45:18 GMT):
1. check the value that u r passing is `nil` or not. add a condition to check error is saying that whatever u r passing is `nil` and it can't convert `nil` value to type csr.KeyRequest 2. pointer issue. u r using it in a wrong way. for eg: can not use `A` whose type is `pointer to B` as type `B` check the difference one is type `pointer to B` and other type is `B`

metadata (Wed, 04 Mar 2020 07:45:18 GMT):
1. check the value that u r passing is `nil` or not. add a condition to check error is saying that whatever u r passing is `nil` and it can't convert `nil` value to type csr.KeyRequest 2. pointer issue. u r using it in a wrong way. for eg: can not use `A` whose type is `pointer to B` as type `B` check the difference one is `type pointer to B` and other is `type B`

metadata (Wed, 04 Mar 2020 07:45:18 GMT):
1. check the value that u r passing is `nil` or not. add a condition to check it. error is saying that whatever u r passing is `nil` and it can't convert `nil` value to type csr.KeyRequest 2. pointer issue. u r using it in a wrong way. for eg: can not use `A` whose type is `pointer to B` as type `B` check the difference one is `type pointer to B` and other is `type B`

garunkumar450 (Fri, 06 Mar 2020 06:27:56 GMT):
2020-03-06 17:22:33.423 IST [entity-event-listener] Process_Event -> INFO 001 Got status &{BAD_REQUEST}

garunkumar450 (Fri, 06 Mar 2020 06:27:56 GMT):
2020-03-06 17:22:33.423 IST Process_Event -> INFO 001 Got status &{BAD_REQUEST}

garunkumar450 (Fri, 06 Mar 2020 06:28:21 GMT):
while running evenclients.go

Tom-Xu-CNXA (Sun, 08 Mar 2020 14:38:17 GMT):
Hi all, I'd share you an open source project, Fablet, what is a browser-based dashboard and tools set for Hyperledger Fabric blockchain platform. It's based on Go SDK, for learning purpose, maybe we can get more in this project. Thanks. The site is: https://github.com/IBM/fablet

kopaygorodsky (Tue, 10 Mar 2020 14:07:37 GMT):
I would be glad if somebody from fabric maintainers responded to my question under this issue https://jira.hyperledger.org/browse/FAB-15708 @yacovm could you take a quick look whenever you have time, please? I checked fabric source code, but haven't found a clue yet about it. It's about BootstrapMethod None in orderers

yacovm (Tue, 10 Mar 2020 17:37:33 GMT):
@kopaygorodsky it's a placeholder for future work that removes the system channel

yacovm (Tue, 10 Mar 2020 17:37:33 GMT):
@kopaygorodsky it's a placeholder for future work that adds support to bootstrap an orderer without a system channel

yacovm (Tue, 10 Mar 2020 17:38:18 GMT):
In the future you should be able to create a genesis block of an application channel and then give it to an orderer node and it will start servicing this channel

yacovm (Tue, 10 Mar 2020 17:38:39 GMT):
Currently, channel creation is done by sending a transaction to the system channel and then it creates a new application channel

yacovm (Tue, 10 Mar 2020 17:38:45 GMT):
stay tuned for more updates ;)

kopaygorodsky (Tue, 10 Mar 2020 18:59:36 GMT):
thanks a lot for this update

nikolas (Wed, 11 Mar 2020 11:43:53 GMT):
Hi, can someone clarify the difference between "createIdentity" and "Register" in the msp package? In both cases, seems that an enrollment token is returned, so I assume in both cases, the identity is registered in the CA. What is the difference?

kopaygorodsky (Wed, 11 Mar 2020 14:19:51 GMT):
it uses different endpoints + as I see in the code Register takes default registrar credentials while Create identity does not

kopaygorodsky (Wed, 11 Mar 2020 14:19:51 GMT):
it uses different endpoints. Also, as I see in the code, Register takes default registrar credentials while Create identity does not

kopaygorodsky (Wed, 11 Mar 2020 14:25:48 GMT):
I suggest to use register

nikolas (Wed, 11 Mar 2020 14:27:12 GMT):
thanks. I am using register and works but I am wondering the purpose of "Create Identity". It claims to also register a user in CA, and to my understanding this should mean it needs to do it as registrar... so I am wondering what is that I am missing

Abhishekkishor (Wed, 11 Mar 2020 16:03:04 GMT):
Has joined the channel.

metadata (Thu, 12 Mar 2020 13:20:45 GMT):
Hello all, i have a query. In the below code snippet if I mention `peer0` and `peer1` and one of the peer is down then Is it still able to fetch the query? ``` response, err := ChannelClient.Query(channel.Request{ ChaincodeID: ChaincodeID, Fcn: "getData", Args: [][]byte{[]byte(txnID), []byte(eventID)}, //Args: [][]byte{[]byte("query"), []byte("")}, TransientMap: transientDataMap, }, channel.WithRetry(retry.DefaultChannelOpts), channel.WithTargets(Peers[0],Peers[1])) ```

kopaygorodsky (Thu, 12 Mar 2020 18:52:59 GMT):
I think yes

tongli (Thu, 12 Mar 2020 21:34:25 GMT):
@metadata you should receive a list of response , in your case one should fail and one should succeed. Since your purpose is to read, normally you do not need to send request to multiple peers unless you worried about inconsistency in the case of a peer has not catching up with the latest block.

metadata (Fri, 13 Mar 2020 05:53:15 GMT):
@tongli @kopaygorodsky thanks for the response. Actually I tried it by stopping(using docker-compose) one of the peer and it didn't work. below is the error I'm getting in logs. ``` [fabsdk/fab] 2020/03/13 04:51:02 UTC - txn.SendProposal.func1 -> DEBU Received error response from txn proposal processing: Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.org1.example.com:7051] [fabsdk/common] 2020/03/13 04:51:02 UTC - retry.(*RetryableInvoker).Invoke -> DEBU Failed with err [required minimum 2 endorsments got 1] on attempt #1. Checking if retry is warranted... ```

metadata (Fri, 13 Mar 2020 05:53:15 GMT):
@tongli @kopaygorodsky thanks for the response. Actually I tried it by stopping(using docker-compose) one of the peer and it didn't work. below is the error I'm getting in logs when trying to invoke the chaincode. this is happening for both invoke and query. ``` [fabsdk/fab] 2020/03/13 04:51:02 UTC - txn.SendProposal.func1 -> DEBU Received error response from txn proposal processing: Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer0.org1.example.com:7051] [fabsdk/common] 2020/03/13 04:51:02 UTC - retry.(*RetryableInvoker).Invoke -> DEBU Failed with err [required minimum 2 endorsments got 1] on attempt #1. Checking if retry is warranted... ```

bjwswang (Fri, 13 Mar 2020 13:00:52 GMT):
Hi, I am trying to use sdk-go to operate fabric 2.0 network. anyone knows which version or revision I should use ? Thanks in advance!

kopaygorodsky (Fri, 13 Mar 2020 14:41:14 GMT):
latest one

kopaygorodsky (Fri, 13 Mar 2020 14:41:41 GMT):
I'm using last commit version, works fine

kopaygorodsky (Fri, 13 Mar 2020 14:41:41 GMT):
I'm using last commit version, works just fine

kopaygorodsky (Fri, 13 Mar 2020 14:41:41 GMT):
I'm using the last commit version, works just fine

bjwswang (Sat, 14 Mar 2020 03:00:29 GMT):
thank you!

metadata (Sun, 15 Mar 2020 10:44:17 GMT):
@kopaygorodsky @tongli I have two peers and I want to install chaincode on one of the peer only. How can I do it? Also when we use below config on `config.yaml` file then Is there any relation between below config and chaincode installation like only `peer0` is endorsing peer so SDK is going to install the CC on `peer0` only? ``` channels: mychannel: # Optional. list of peers from participating orgs peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer1.org1.example.com: endorsingPeer: false chaincodeQuery: false ledgerQuery: true eventSource: false ```

metadata (Sun, 15 Mar 2020 10:44:17 GMT):
@kopaygorodsky @tongli I have two peers and I want to install chaincode on one of the peer only. How can I do it? I know about `WithTarget(peer0,peer1)` function. Also when we use below config on `config.yaml` file then Is there any relation between below config and chaincode installation like only `peer0` is endorsing peer so SDK is going to install the CC on `peer0` only? ``` channels: mychannel: # Optional. list of peers from participating orgs peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer1.org1.example.com: endorsingPeer: false chaincodeQuery: false ledgerQuery: true eventSource: false ```

metadata (Sun, 15 Mar 2020 10:44:17 GMT):
Hello @kopaygorodsky @tongli I have two peers and I want to install chaincode on one of the peer only. How can I do it? I know about `WithTarget(peer0,peer1)` function. Also when we use below config on `config.yaml` file then Is there any relation between below config and chaincode installation like only `peer0` is endorsing peer so SDK is going to install the CC on `peer0` only? ``` channels: mychannel: # Optional. list of peers from participating orgs peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true peer1.org1.example.com: endorsingPeer: false chaincodeQuery: false ledgerQuery: true eventSource: false ```

kopaygorodsky (Sun, 15 Mar 2020 12:34:45 GMT):
install is not related to any channel at all

kopaygorodsky (Sun, 15 Mar 2020 12:35:37 GMT):
installation process is about copyingyour pkg onto peer filesystem

kopaygorodsky (Sun, 15 Mar 2020 12:35:37 GMT):
installation process is about copying your pkg onto peer filesystem

kopaygorodsky (Sun, 15 Mar 2020 12:36:17 GMT):
You can use WithTarget or WithTargetEndpoint

metadata (Sun, 15 Mar 2020 16:50:44 GMT):
@kopaygorodsky what's the purpose of using above config then?

metadata (Mon, 16 Mar 2020 12:11:41 GMT):
@kopaygorodsky @tongli The policy that I'm using is `OR(Org1.member,Org2.member)` but still it is looking min. 2 endorsers. Using cli, It's working fine. I have stopped one of the peer and invoke/query functionalities are working fine. But if I'm invoking/querying CC using SDK with same policy with one peer down then it's not working

tongli (Mon, 16 Mar 2020 12:33:02 GMT):
If it is working when using cli, then the policy and your network are ok. If it fails using sdk, it seems to me sdk may have issues or you may miss some flags when calling. Not really sure what the issue is.

metadata (Tue, 17 Mar 2020 11:49:05 GMT):
@tongli @kopaygorodsky Using SDK-go, how can I check which peer is up and which one is down? Is there any method/func available to check it?

root10 (Tue, 17 Mar 2020 11:53:35 GMT):
Hi guys. I have a config with three orderers. If I set one orderer in the sdk config ```yaml orderers: orderer1.example.com: url: orderer1.example.com:7050 grpcOptions: ssl-target-name-override: orderer1.example.com:7050 allow-insecure: false tlsCACerts: path: /go/src/...../tlsca/tlsca.snam.com-cert.pem ``` i get this error : `TLS handshake failed with error remote error: tls: bad certificate server=Orderer`

kopaygorodsky (Tue, 17 Mar 2020 14:06:17 GMT):
no, there is no way, it's not sdk's responsibility

kopaygorodsky (Tue, 17 Mar 2020 14:06:35 GMT):
you can use health check endpoint of a peer

kopaygorodsky (Tue, 17 Mar 2020 14:06:35 GMT):
you can use health check endpoint of a peer. fabric-lib-go@v1.0.0 healthz pkg

kopaygorodsky (Tue, 17 Mar 2020 16:06:14 GMT):
https://github.com/hyperledger/fabric-lib-go/tree/master/healthz

metadata (Wed, 18 Mar 2020 04:24:39 GMT):
Thanks @kopaygorodsky

metadata (Wed, 18 Mar 2020 04:25:01 GMT):
thanks @kopaygorodsky

metadata (Wed, 18 Mar 2020 07:06:07 GMT):
what's the use of DiscoverLocalPeer? https://github.com/hyperledger/fabric-sdk-go/blob/e71412ff3db10f32672e632c48e94ea25f778003/test/integration/base_test_setup.go#L440

metadata (Wed, 18 Mar 2020 07:07:39 GMT):
what I'm able to understand is that It just check for peers associated with an Organization. It doesn't matter whether the peer is UP or DOWN. Right ?

bjwswang (Wed, 18 Mar 2020 08:18:09 GMT):
Hi, I am confused on the imported `fabric code`. which fabric version are we using in this project? Do we upgrade fabric code when new fabric version is released.

bjwswang (Wed, 18 Mar 2020 08:18:09 GMT):
Hi, I am confused on the imported `fabric code`. which fabric version are we using in this project? Do we upgrade fabric code when new fabric version is released?

bjwswang (Wed, 18 Mar 2020 08:19:46 GMT):
and I found we have a `sdkpatch` in https://github.com/hyperledger/fabric-sdk-go/tree/master/internal/github.com/hyperledger/fabric-ca/sdkpatch. What's this for ?

mahoney1 (Thu, 19 Mar 2020 11:00:20 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 12noon ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

mahoney1 (Thu, 19 Mar 2020 11:00:20 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 12noon ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas%3A+Fabric+Application+Developer+Community+Call+Meetings

VadimInshakov (Thu, 19 Mar 2020 12:35:33 GMT):
guys check the PR please: https://github.com/hyperledger/fabric-sdk-go/pull/60

skoret (Thu, 19 Mar 2020 12:58:38 GMT):
Has joined the channel.

bjwswang (Thu, 19 Mar 2020 13:42:31 GMT):
Hi , I was trying to use `securekey/fabric-samples` to drive fabric 2.0 networks. After network was up and executed `channel create` command by using `fabric-cli`, it told me it can't find private key in keystore. After debug in the source code, I found seems sdk is looking for private key by using `SKI_sk`, but all private keys generated by cryptogen in fabric2.0 are stored as `priv_sk` .

bjwswang (Thu, 19 Mar 2020 13:42:31 GMT):
Hi , I was trying to use `securekey/fabric-samples` to drive fabric 2.0 networks. After network was up and executed `channel create` command by using `fabric-cli`, it told me it can't find private key in keystore. After look into the code, I found seems sdk is looking for private key by using `SKI_sk`, but all private keys generated by cryptogen in fabric2.0 are stored as `priv_sk` .

bjwswang (Thu, 19 Mar 2020 13:43:32 GMT):
can we just search private key by load the file in path `msp/keystore/` ?

bjwswang (Thu, 19 Mar 2020 13:43:32 GMT):
can we just search private key by reading the file in path `msp/keystore/` ?

bjwswang (Thu, 19 Mar 2020 13:43:32 GMT):
can we just search private key by reading the file under path `msp/keystore/` ?

bjwswang (Thu, 19 Mar 2020 13:43:32 GMT):
anyone knows how to fix this issue? I have to replace the private key name with `SKI_sk` each time I want to use that priv key.

bjwswang (Thu, 19 Mar 2020 13:43:32 GMT):
anyone knows how to fix this issue? I have to replace the private key name with `SKI_sk` each time I want to use that priv key for now

bjwswang (Thu, 19 Mar 2020 13:59:04 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/filekeystore.go#L37 how about searching file with `_sk` as suffix under keystore path ?

bjwswang (Thu, 19 Mar 2020 13:59:04 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/msp/filekeystore.go#L37 should we consider searching file with `_sk` as suffix under keystore path ?

kopaygorodsky (Thu, 19 Mar 2020 18:19:14 GMT):
yes, it does not matter. you can use dynamic discovery service for it (sdk uses it internally if you have 1_2 cap enabled or higher)

kopaygorodsky (Thu, 19 Mar 2020 18:21:20 GMT):
do not use cryptogen, I'm using 2.0 and all private keys are stored in keystore folder with SKI_sk

kopaygorodsky (Thu, 19 Mar 2020 18:21:20 GMT):
do not use cryptogen, I'm using 2.0 and all private keys are stored in keystore folder with SKI_sk name

kopaygorodsky (Thu, 19 Mar 2020 18:21:20 GMT):
do not use cryptogen, I'm using 2.0 for creating all network identities and all private keys are stored in keystore folder with SKI_sk name.

BrettLogan (Thu, 19 Mar 2020 21:13:40 GMT):
Has joined the channel.

bjwswang (Fri, 20 Mar 2020 06:39:35 GMT):
thanks @kopaygorodsky what do you use to create network identities ?

metadata (Fri, 20 Mar 2020 06:44:41 GMT):
u can use this repo: https://github.com/lepar/hyperledger-fabric-generic-network

bjwswang (Fri, 20 Mar 2020 07:10:34 GMT):
awesome! thank you @metadata

bjwswang (Fri, 20 Mar 2020 07:34:43 GMT):
I think most of the people will use cryptogen or fabric-ca to generate identities, so we should consider allow people to use private key file with different name format.

bjwswang (Fri, 20 Mar 2020 07:34:43 GMT):
I think most of the people will use cryptogen or fabric-ca to generate identities, so we should consider allow people to use private key file with different name format. @kopaygorodsky

kopaygorodsky (Fri, 20 Mar 2020 10:08:44 GMT):
@bjwswang I'm using SDK, just create ca client and you will have register, enroll etc

VadimInshakov (Fri, 20 Mar 2020 14:03:39 GMT):
@troyronda please look at this PR: https://github.com/hyperledger/fabric-sdk-go/pull/60

bjwswang (Fri, 20 Mar 2020 14:08:37 GMT):
thank you @kopaygorodsky I will have a try.

VadimInshakov (Fri, 20 Mar 2020 14:24:07 GMT):
@kopaygorodsky thanks for recommendations!

VadimInshakov (Mon, 23 Mar 2020 12:08:17 GMT):
@troyronda this PR is ready to merge, thanks for your time!

VadimInshakov (Mon, 23 Mar 2020 15:17:09 GMT):
@troyronda please see new pull request: https://github.com/hyperledger/fabric-sdk-go/pull/61

nikolas (Tue, 24 Mar 2020 09:37:26 GMT):
Hi, when I subscribe for chaincode events, I get the event, but the payload is null. As I see in the code, this is intended for "filtered events". Can I somehow get the payload? (e.g. by not actually filtering the events?)

randyshu (Wed, 25 Mar 2020 06:23:12 GMT):
Has joined the channel.

metadata (Wed, 25 Mar 2020 07:22:32 GMT):
Hi all, How to send `collection_config.json` file used for private data when Instantiating the CC?

metadata (Wed, 25 Mar 2020 07:22:32 GMT):
Hi all, How to send `collection_config.json` file used for `private data` when Instantiating the CC?

metadata (Wed, 25 Mar 2020 07:22:32 GMT):
Hi all, How to send `collection_config.json` file used for `private data` when Instantiating CC?

randyshu (Wed, 25 Mar 2020 09:08:51 GMT):
Does fabric-sdk-go config support pem format certificate ?

kopaygorodsky (Wed, 25 Mar 2020 10:01:33 GMT):
Yes

VadimInshakov (Wed, 25 Mar 2020 14:30:19 GMT):
just a bump :) https://github.com/hyperledger/fabric-sdk-go/pull/61

VadimInshakov (Wed, 25 Mar 2020 14:32:08 GMT):
guys, why there is no tasks (on jira) about integrating `approve` functionality to SDK?

VadimInshakov (Wed, 25 Mar 2020 15:27:57 GMT):
is there any upgrade plan?

kopaygorodsky (Wed, 25 Mar 2020 19:28:28 GMT):
you mean for lifecycle 2.0?

kopaygorodsky (Wed, 25 Mar 2020 19:32:17 GMT):
could you show code snippet for it?

kopaygorodsky (Wed, 25 Mar 2020 20:55:27 GMT):
I can confirm that

kopaygorodsky (Wed, 25 Mar 2020 20:55:27 GMT):
I can confirm, even in dispatcher it's nil

kopaygorodsky (Wed, 25 Mar 2020 20:55:27 GMT):
I can confirm, even in dispatcher it's nil, but I was sending some data which is not empty for sure.

kopaygorodsky (Wed, 25 Mar 2020 20:56:30 GMT):

Clipboard - March 25, 2020 10:56 PM

kopaygorodsky (Wed, 25 Mar 2020 20:56:38 GMT):

Clipboard - March 25, 2020 10:56 PM

randyshu (Thu, 26 Mar 2020 02:18:18 GMT):

any ideas for this problem?

metadata (Thu, 26 Mar 2020 06:41:30 GMT):
Hello all, Is below package moved to `fabric-protos-go` or `fabric-protos`? `"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"` with `sdk-v1.0.0-beta1` I'm getting a package not found error.

randyshu (Thu, 26 Mar 2020 06:43:29 GMT):
I fetch newly channel config and want to convert it to json format ,what should i do?

metadata (Thu, 26 Mar 2020 06:45:58 GMT):
first unmarshel it to interface(if u aren't sure the type of data) or struct then marshel it

randyshu (Thu, 26 Mar 2020 06:47:26 GMT):
Is there no definite type?

metadata (Thu, 26 Mar 2020 06:52:47 GMT):
it is there but u have to dig into the code to check what kind of data it is going to return? u can build something like this. https://github.com/Deeptiman/blockreader

metadata (Thu, 26 Mar 2020 06:54:17 GMT):
via cli commands: https://medium.com/coinmonks/hyperledger-fabric-updating-channel-configs-45082a5dc9b2

randyshu (Thu, 26 Mar 2020 07:01:54 GMT):
got it,thank you.

metadata (Thu, 26 Mar 2020 07:39:25 GMT):
@kopaygorodsky @troyronda I'm trying to use collection config and I'm getting `package deprecated` warning. Is this package moved to somewhere else?

metadata (Thu, 26 Mar 2020 07:39:25 GMT):
@kopaygorodsky @troyronda I'm trying to use collection config and I'm getting `package deprecated` warning. Is this package moved to somewhere else? Using `sdk-go v1.0.0 beta` and `fabric-protos-go: latest`

metadata (Thu, 26 Mar 2020 07:39:30 GMT):

Clipboard - March 26, 2020 1:09 PM

VadimInshakov (Thu, 26 Mar 2020 16:07:17 GMT):
yes

metadata (Thu, 26 Mar 2020 17:24:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=bMRuesZi6yzx4jNeK) Please help

metadata (Thu, 26 Mar 2020 19:28:59 GMT):
It is moved to `fabric-protos-go/peer` from `fabric-protos-go/common` https://github.com/hyperledger/fabric-protos-go/tree/master/peer

metadata (Thu, 26 Mar 2020 19:28:59 GMT):
It is moved to `fabric-protos-go/peer` from `fabric-protos-go/common` https://github.com/hyperledger/fabric-protos-go/tree/master/peer

kopaygorodsky (Fri, 27 Mar 2020 11:44:50 GMT):
https://jira.hyperledger.org/projects/FABG/issues/FABG-892?filter=allopenissues

kopaygorodsky (Fri, 27 Mar 2020 11:45:15 GMT):
I started working on it, I'll try to deliver in the next 2 weeks

kopaygorodsky (Fri, 27 Mar 2020 11:45:15 GMT):
I started working on it, I'll try to deliver in the next 2 weeks

VadimInshakov (Fri, 27 Mar 2020 12:47:48 GMT):
Cool! :) PM me, if you'll need any help

basilky (Sat, 28 Mar 2020 06:55:58 GMT):
Has joined the channel.

basilky (Sat, 28 Mar 2020 06:56:00 GMT):
Hi all, I have created a sample application to demonstrate fabric features using Go SDK beta version. It's available at https://github.com/basilky/gosdk-example. I hope this will be helpful for others.

metadata (Sat, 28 Mar 2020 11:16:18 GMT):
it looks great. Just few suggestions 1. remove the Org2 config from configOrg1.yaml and vice-versa. 2. also don't put everything in a single docker-compose file. create different files like docker-compose-peer0-org1.yaml

basilky (Sat, 28 Mar 2020 13:13:15 GMT):
Thanks metadata. 1. Can you elaborate on which portions on the config file can be removed? I think the config file have to contain information about peers of other organizations also, to get endorsements. 2. docker-compose-e2e-template.yaml is actually generated by byfn.sh, similar to first-network in fabric-samples.

metadata (Sat, 28 Mar 2020 14:05:52 GMT):
u r using `org1config.yaml` and `org2config.yaml` . but u r using `peer0.org2.example.com` in `org1config.yaml`

metadata (Sat, 28 Mar 2020 14:06:28 GMT):
remove `*.org2.example.*` from `org1config` and vice-versa

metadata (Sun, 29 Mar 2020 06:56:54 GMT):
Anyone tried sending private data using TransientMap as input?

metadata (Sun, 29 Mar 2020 06:56:54 GMT):
Anyone tried sending private data using TransientMap as input via SDK?

metadata (Sun, 29 Mar 2020 06:56:54 GMT):
Anyone tried sending private data using TransientMap for input via SDK?

basilky (Mon, 30 Mar 2020 08:48:11 GMT):
explorer

VadimInshakov (Mon, 30 Mar 2020 09:30:13 GMT):
Please check PR anybody https://github.com/hyperledger/fabric-sdk-go/pull/61

haniavis (Mon, 30 Mar 2020 17:20:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=jZJY9ibah8TJF7Ast) yes @metadata I have done it

haniavis (Mon, 30 Mar 2020 17:21:31 GMT):
yes I have dont it

haniavis (Mon, 30 Mar 2020 17:21:31 GMT):
yes I have done it

randyshu (Tue, 31 Mar 2020 03:22:37 GMT):
Any docs for introducing how to improve Hyperledger fabric 's performance ?

randyshu (Tue, 31 Mar 2020 03:22:37 GMT):
The tps is below 100 till now and can not deal with much more than 200 requests per second if do so , the peer will exit. I know some methods to improve it , for example : improve machine's config , create cluster for improve IO , but i didn't know why I should to do it exactly .

kopaygorodsky (Tue, 31 Mar 2020 08:33:11 GMT):
which performance are you talking exactly? what issues do yo have? that is config of your org? how many endosers? etc

kopaygorodsky (Tue, 31 Mar 2020 08:33:11 GMT):
which performance are you talking exactly? what issues do yo have? that is config of your org? how many endosers?

kopaygorodsky (Tue, 31 Mar 2020 08:33:11 GMT):
about what performance are you talking exactly? what issues do yo have? that is config of your org? how many endosers?

kopaygorodsky (Tue, 31 Mar 2020 08:33:11 GMT):
about what performance are you talking exactly? what issues do yo have? what is config of your org? how many endosers?

feiyang_tan (Tue, 31 Mar 2020 12:15:46 GMT):
Has joined the channel.

kukgini (Thu, 02 Apr 2020 07:39:05 GMT):
Has joined the channel.

kukgini (Thu, 02 Apr 2020 07:39:05 GMT):
Can anyone tell me when fabric-sdk-go will be released? It seems to remain in beta for quite some time.

mahoney1 (Thu, 02 Apr 2020 11:11:21 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

mahoney1 (Thu, 02 Apr 2020 11:11:21 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

root10 (Thu, 02 Apr 2020 11:13:27 GMT):
Hi guys. After some requests, I get the error: ```bash # peer 2020-04-01 16:53:35.518 UTC [comm.grpc.server] 1 -> INFO 20489cc unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.request_deadline=2020-04-01T16:53:35.518Z grpc.peer_address=172.28.0.6:60232 error="context canceled" grpc.code=Unknown grpc.call_duration=2m59.99990063s ```

root10 (Thu, 02 Apr 2020 11:13:27 GMT):
Hi guys. After some requests, I get the error: ```bash # peer (1.4.6) 2020-04-01 16:53:35.518 UTC [comm.grpc.server] 1 -> INFO 20489cc unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.request_deadline=2020-04-01T16:53:35.518Z grpc.peer_address=172.28.0.6:60232 error="context canceled" grpc.code=Unknown grpc.call_duration=2m59.99990063s ``` ```bash # fabric-go-sdk (alpha-5) [fabsdk/fab] 2020/04/01 16:53:35 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = DeadlineExceeded desc = context deadline exceeded] ```

kopaygorodsky (Thu, 02 Apr 2020 17:13:47 GMT):
it took too long to process, ctx was canceled and then you got these errors

root10 (Fri, 03 Apr 2020 10:48:50 GMT):
I don't get why it happens after some sequential inserts with random values

fasmat (Fri, 03 Apr 2020 18:44:04 GMT):
Has joined the channel.

fasmat (Fri, 03 Apr 2020 18:45:39 GMT):
hi! I'm considering to update my hyperledger 1.4.6 setup to hyperledger 2.0; I'm using the fabric-sdk-go to interact with the network, is it ready to be used with 2.0?

metadata (Fri, 03 Apr 2020 18:55:37 GMT):
no it is not as per this issue https://jira.hyperledger.org/projects/FABG/issues/FABG-892?filter=allopenissues

Hsequeda (Fri, 03 Apr 2020 18:55:39 GMT):
Has joined the channel.

fasmat (Fri, 03 Apr 2020 18:57:20 GMT):
The chaincode that we are using are still using the "old" pattern with just having an instantiate and invoke function and doing your own function routing

fasmat (Fri, 03 Apr 2020 18:57:44 GMT):
We don't need to upgrade to the new lifecycle

Hsequeda (Fri, 03 Apr 2020 18:59:37 GMT):
Hi, in the tuto Writing Your First Applicacion I tried to develop the Invoke program of Fabcar application in golang, because that is not present in the tuto, but when I trying to load the ConfigOption from the connections-org1.yml or connections-org1.json the program returns me this error : failed to initialize configuration: unable to load identity config: failed to initialize identity config from config backend: failed to create identity config from backends: failed to parse 'certificateAuthorities' config item to identityConfigEntity.CertificateAuthorities type: 1 error(s) decoding: * '[ca.org1.example.com].TLSCACerts.Pem': source data must be an array or slice, got string

metadata (Fri, 03 Apr 2020 18:59:59 GMT):
I think @kopaygorodsky tested it `v2.0`. @kopaygorodsky Please share your view on this.

metadata (Fri, 03 Apr 2020 18:59:59 GMT):
I think @kopaygorodsky tested `v2.0`. @kopaygorodsky Please share your view on this.

shaotian (Sun, 05 Apr 2020 12:35:11 GMT):
Has joined the channel.

HarisC (Mon, 06 Apr 2020 10:20:12 GMT):
Hello guys, does anyone know how i can use the sdk function InstallCC(), using although the binary from the command 'peer chaincode package' instead of path?

kopaygorodsky (Wed, 08 Apr 2020 14:49:40 GMT):
Hey, has anybody used fabric with HSM recently? Any problems? As I see, SDK should support it, but haven't tried it yet.

VadimInshakov (Wed, 08 Apr 2020 21:29:35 GMT):
I want to implement new storage for wallet (for new Gateway). Gateway API is not yet fully implemented, so I would like to cooperate with those who make it. @andrew-coleman, can we chat anywhere a little bit?

VadimInshakov (Wed, 08 Apr 2020 21:29:35 GMT):
I want to implement new storage for wallet (for new Gateway). Gateway API is not yet fully implemented, so I would like to cooperate with those who develop it. @andrew-coleman, can we chat anywhere a little bit?

kopaygorodsky (Wed, 08 Apr 2020 22:52:44 GMT):
what is the purpose of wallet? Is it related to IBM platform only?

VadimInshakov (Thu, 09 Apr 2020 13:51:07 GMT):
Vault storage impl https://jira.hyperledger.org/browse/FABG-960 https://github.com/hyperledger/fabric-sdk-go/pull/68

VadimInshakov (Thu, 09 Apr 2020 15:55:06 GMT):
@troyronda @andrew-coleman please check pull request

kopaygorodsky (Thu, 09 Apr 2020 17:04:43 GMT):
I think users should do this on their own, I don't agree that you are using vault and here you work with PK directly: gateway.NewX509Identity("mspid", "testCert", "testPrivKey")

kopaygorodsky (Thu, 09 Apr 2020 17:04:43 GMT):
I think users should do this on their own, I don't agree that you are using Vault by working with PK directly: gateway.NewX509Identity("mspid", "testCert", "testPrivKey")

kopaygorodsky (Thu, 09 Apr 2020 17:05:08 GMT):
@VadimInshakov

kopaygorodsky (Thu, 09 Apr 2020 17:06:46 GMT):
the purpose of having Vault is to do not interact with PK directly

kopaygorodsky (Thu, 09 Apr 2020 17:06:46 GMT):
the purpose of having Vault is to do not interact with PK directly, it should be generated inside Vault already.

kopaygorodsky (Thu, 09 Apr 2020 17:06:46 GMT):
the purpose of having Vault is to do not interact with PK directly, it should be generated inside Vault already.

kopaygorodsky (Thu, 09 Apr 2020 17:06:46 GMT):
the purpose of having Vault is to do not interact with PK in any way, only by Vault protocol, it should be generated inside Vault already.

VadimInshakov (Thu, 09 Apr 2020 17:09:53 GMT):
@kopaygorodsky >>gateway.NewX509Identity("mspid", "testCert", "testPrivKey") you right, but it can be fixed

kopaygorodsky (Thu, 09 Apr 2020 17:10:51 GMT):
yes, it can be, but need custom implementation of BCCSP

kopaygorodsky (Thu, 09 Apr 2020 17:10:51 GMT):
yes, it can be, but need custom implementation of BCCSP I was planning to deliver that functionality later.

kopaygorodsky (Thu, 09 Apr 2020 17:10:51 GMT):
yes, it can be, but need custom implementation of BCCSP I was planning to deliver that functionality later too

kopaygorodsky (Thu, 09 Apr 2020 17:10:51 GMT):
yes, it can be, but need custom implementation of BCCSP I was planning to deliver such functionality later too

kopaygorodsky (Thu, 09 Apr 2020 17:20:40 GMT):
@yacovm could you, please, confirm my thoughts regarding system channel. Is Orderer config from system channel propagated in some way to application channels? Or it's just serving a purpose to be able to reach consensus for updating system channel?

kopaygorodsky (Thu, 09 Apr 2020 17:20:40 GMT):
@yacovm could you, please, confirm my thoughts regarding system channel. Is Orderer config from system channel propagated in some way to application channels? Or it's just serving a purpose to be able to reach consensus for updating system channel? I'm working on RAFT management and trying to understand what will happen if I delete orderer from system channel, but not from application one. Is application channel going to work then? https://hyperledger-fabric.readthedocs.io/en/release-2.0/raft_configuration.html (system channel update required in NOTE, but have no idea what will happen in the case described above)

kopaygorodsky (Thu, 09 Apr 2020 17:20:40 GMT):
@yacovm could you, please, confirm my thoughts regarding system channel. Is Orderer config from system channel propagated in some way to application channels? Or it's just serving a purpose to be able to reach consensus for updating system channel? By following you answer here(https://lists.hyperledger.org/g/fabric/topic/what_is_the_difference/70075660) I suppose it's not propagated in any way to application channels. I'm working on RAFT management and trying to understand what will happen if I delete orderer from system channel, but not from application one. Is application channel going to work then?

kopaygorodsky (Thu, 09 Apr 2020 17:20:40 GMT):
@yacovm could you, please, confirm my thoughts regarding system channel. Is Orderer config from system channel propagated in some way to application channels? Or it's just serving a purpose to be able to reach consensus for updating system channel? By following your answer here(https://lists.hyperledger.org/g/fabric/topic/what_is_the_difference/70075660) I suppose it's not propagated in any way to application channels. I'm working on RAFT management and trying to understand what will happen if I delete orderer from system channel, but not from application one. Is application channel going to work then?

kopaygorodsky (Thu, 09 Apr 2020 17:20:40 GMT):
@yacovm could you, please, confirm my thoughts regarding system channel. Is Orderer config from system channel propagated in some way to application channels? Or it's just serving a purpose to be able to reach consensus for updating system channel and bootstrapping? By following your answer here(https://lists.hyperledger.org/g/fabric/topic/what_is_the_difference/70075660) I suppose it's not propagated in any way to application channels. I'm working on RAFT management and trying to understand what will happen if I delete orderer from system channel, but not from application one. Is application channel going to work then?

VadimInshakov (Thu, 09 Apr 2020 17:25:22 GMT):
@kopaygorodsky fixed example, now without filesystem reads: ``` vaultConfig := &api.Config{Address: "http://localhost:8200"} wallet := gateway.NewVaultWallet("crypto", "MYVAULTTOKEN", vaultConfig) identity, err := wallet.Get("user1") if err != nil { panic(err) } ``` wallet.Put("user", gateway.NewX509Identity("mspid", identity.Certificate(), identity.Key())) gw, err := gateway.Connect(gateway.WithConfig(config.FromFile("connection-tls.json"), gateway.WithIdentity(wallet, "user"), gateway.WithDiscovery(false), gateway.WithCommitHandler(gateway.DefaultCommitHandlers.OrgAny)) ``` ```

VadimInshakov (Thu, 09 Apr 2020 17:25:22 GMT):
@kopaygorodsky fixed example, now without filesystem reads: ``` vaultConfig := &api.Config{Address: "http://localhost:8200"} wallet := gateway.NewVaultWallet("crypto", "MYVAULTTOKEN", vaultConfig) identity, err := wallet.Get("user1") if err != nil { panic(err) } wallet.Put("user", gateway.NewX509Identity("mspid", identity.Certificate(), identity.Key())) gw, err := gateway.Connect(gateway.WithConfig(config.FromFile("connection-tls.json"), gateway.WithIdentity(wallet, "user"), gateway.WithDiscovery(false), gateway.WithCommitHandler(gateway.DefaultCommitHandlers.OrgAny)) ``` ```

VadimInshakov (Thu, 09 Apr 2020 17:33:03 GMT):
It's big deal, but it will take a long time

yacovm (Thu, 09 Apr 2020 21:27:25 GMT):
When you create a channel you specify some stuff and what you *don't* specify - is inherited from system channel

yacovm (Thu, 09 Apr 2020 21:27:33 GMT):
you can override it

yacovm (Thu, 09 Apr 2020 21:28:41 GMT):
look at https://github.com/hyperledger/fabric/blob/master/integration/raft/config_test.go#L791-L875

yacovm (Thu, 09 Apr 2020 21:28:52 GMT):
an orderer channel is created with a subset of nodes

kopaygorodsky (Thu, 09 Apr 2020 21:30:01 GMT):
So yes, it means that I can ignore Orderer part for applications channels if I'm sure that they are going to have same concenters. Checking your link...

yacovm (Thu, 09 Apr 2020 21:30:43 GMT):
Honestly, that part of the channel config is black magic to me... I try to avoid the channel config as much as possible

yacovm (Thu, 09 Apr 2020 21:31:10 GMT):
if it's not clear how to do it, you can either look at the integration test and backward engineer it

yacovm (Thu, 09 Apr 2020 21:31:25 GMT):
or ask in #fabric-orderer - ask Jason since he is probably the only one knows

kopaygorodsky (Thu, 09 Apr 2020 21:31:50 GMT):
I'm working on second option and now I'm looking into integration test

kopaygorodsky (Thu, 09 Apr 2020 21:31:50 GMT):
I'm working on second option and now I'm looking into integration tests

yacovm (Thu, 09 Apr 2020 21:32:08 GMT):
Make sure you don't make mistakes because i heard someone once made a mistake and summoned Cthulhu using a channel config update

yacovm (Thu, 09 Apr 2020 21:32:42 GMT):
it was solved by tearing down the docker container where it spawned

kopaygorodsky (Thu, 09 Apr 2020 21:36:31 GMT):
hahahah, I don't have any docker scripts, I'm using SDK. Everything is pretty structured, I pulled out of fabric configtx, created a lib and now I easily manage config in any way. I just need to know what to do with that config, how to configure it properly, so yes "backward engineering" is everything I have. I'll try to ask this question in orderer group, just never seen it.

yacovm (Thu, 09 Apr 2020 21:37:19 GMT):
you might wanna take a look at the new library people are writing in https://github.com/hyperledger/fabric/tree/master/pkg/config

yacovm (Thu, 09 Apr 2020 21:37:45 GMT):
it is in Go, and it changes the channel config with Go APIs instead of the current JSON manipulation

kopaygorodsky (Thu, 09 Apr 2020 21:38:37 GMT):
damn, I have really a thing that is really close to one you send

kopaygorodsky (Thu, 09 Apr 2020 21:38:37 GMT):
damn, I have a thing that is really close to one you send

kopaygorodsky (Thu, 09 Apr 2020 21:40:56 GMT):
thx for your help, very much appreciated!

kopaygorodsky (Thu, 09 Apr 2020 21:53:19 GMT):
I just do not understand why it can't be separated component, in that way go sdk could use it instead of copy pasting.

yacovm (Thu, 09 Apr 2020 21:53:33 GMT):
what can be separate ?

kopaygorodsky (Thu, 09 Apr 2020 21:53:48 GMT):
https://github.com/hyperledger/fabric/tree/master/pkg/config

yacovm (Thu, 09 Apr 2020 21:54:03 GMT):
i think they will move it to `fabric-common` repo when they're done

yacovm (Thu, 09 Apr 2020 21:54:18 GMT):
but it's easier to copy code in the same repo ;)

kopaygorodsky (Thu, 09 Apr 2020 21:55:02 GMT):
yes, and when it's go sdk they need to do /internal/copypastedfabric/configtx , for example

kopaygorodsky (Thu, 09 Apr 2020 21:55:02 GMT):
yes, and then it's go sdk they need to do /internal/copypastedfabric/configtx , for example

kopaygorodsky (Thu, 09 Apr 2020 21:55:02 GMT):
yes, and then go sdk needs to do /internal/copypastedfabric/configtx , for example

yacovm (Thu, 09 Apr 2020 21:55:54 GMT):
yes

yacovm (Thu, 09 Apr 2020 21:56:00 GMT):
life is hard, no doubt.

VadimInshakov (Fri, 10 Apr 2020 07:02:09 GMT):
remark to discussion about https://github.com/hyperledger/fabric-sdk-go/pull/68 By the way, I can make some helpers for configuring Vault as intermediate CA. But I need some guidance from maintainers to be sure that I didn’t do anything stupid

VadimInshakov (Sat, 11 Apr 2020 09:31:40 GMT):
@troyronda I can deliver new KeyStore implementation for Vault option, it makes sense? Can I do this without patches (I’ll just create new files in the internal, I won’t touch the existing ones)?

VadimInshakov (Sat, 11 Apr 2020 09:41:24 GMT):
This is a question for all maintainers, I just want to understand whether the new functionality will be accepted

VadimInshakov (Sat, 11 Apr 2020 09:41:24 GMT):
This is a question for all maintainers, I just want to understand whether the new functionality will be accepted or it's not needed

metadata (Mon, 13 Apr 2020 10:06:42 GMT):
Is there any update on new LSCC support in sdk-go? Is it in progress? If not then Is it possible to use current sdk-go with `fabric:v2.0.1`?

kopaygorodsky (Mon, 13 Apr 2020 11:38:58 GMT):
I'm working on it

jaraujo (Wed, 15 Apr 2020 16:55:59 GMT):
Has joined the channel.

kopaygorodsky (Thu, 16 Apr 2020 10:59:23 GMT):

Clipboard - April 16, 2020 1:59 PM

miabeckequiniti (Wed, 22 Apr 2020 10:30:28 GMT):
Has joined the channel.

mffrench (Thu, 23 Apr 2020 10:33:02 GMT):
Dear @kopaygorodsky do you have some idea when your work on that topic would be available to the community ?

lanzay (Fri, 24 Apr 2020 03:45:35 GMT):
Has joined the channel.

jordy24 (Fri, 24 Apr 2020 14:53:01 GMT):
Has joined the channel.

jordy24 (Fri, 24 Apr 2020 14:53:01 GMT):
am learning to use the go sdk to interact with a fabric network... Am getting this error when calling channel.ChannelContext() `failed to get client context to create channel client: user not found`... I need some help

jordy24 (Fri, 24 Apr 2020 14:59:21 GMT):
I tried to use "{username}" and "Admin" but both failed ..... this is how my connection_profile looks like `"organizations": { "Org1": { "mspid": "Org1MSP", "cryptoPath": "../fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp", "peers": [ "peer0.org1.example.com" ], "certificateAuthorities": [ "ca.org1.example.com" ] } },`

jordy24 (Fri, 24 Apr 2020 14:59:29 GMT):
am learning to use the go sdk to interact with a fabric network... Am getting this error when calling channel.ChannelContext() failed to get client context to create channel client: user not found... I need some help

jordy24 (Fri, 24 Apr 2020 14:59:29 GMT):
am learning to use the go sdk to interact with a fabric network... Am getting this error when calling channel.ChannelContext() `failed to get client context to create channel client: user not found`... I need some help

VadimInshakov (Fri, 24 Apr 2020 18:43:43 GMT):
Hi community! Please explain me why does the channel.Client size increases (as we can see in profiler) in direct proportion to the number of private keys in the store? Does channel.Client references to some cache? I can't find it in code

garunkumar450 (Sun, 26 Apr 2020 14:23:07 GMT):
Hi which version of fabric-sdk-go is suitable for fabric 1.4.0 and how to install all dependenciess

kopaygorodsky (Sun, 26 Apr 2020 21:26:37 GMT):
in a few weeks, were pretty busy recently with other issues. Feel free to contribute if you have time :)

kopaygorodsky (Sun, 26 Apr 2020 21:26:37 GMT):
in a few weeks, were pretty busy recently with other issues. Feel free to contribute if you have time :) Right now I'm using 2.0 with 1.4 capabilities, not big difference, except chaincode lifecycle.

andrii482 (Mon, 27 Apr 2020 14:37:14 GMT):
Has joined the channel.

MattB97 (Mon, 27 Apr 2020 15:28:40 GMT):
Has joined the channel.

MHBauer (Mon, 27 Apr 2020 19:39:39 GMT):
the go sdk seems to be a bit overzealous when parsing the config. I haven't used it with an msp/fabric-ca before, which is really hanging me up on trying to get it working with even a sample network.

metadata (Tue, 28 Apr 2020 09:39:16 GMT):
@kopaygorodsky So Core Dev's aren't supporting sdk-go anymore. Is it so?

metadata (Tue, 28 Apr 2020 09:41:01 GMT):
Haven't heard any updates from them except the new programming model.

Rachit-gaur (Tue, 28 Apr 2020 18:11:24 GMT):
Has joined the channel.

Rachit-gaur (Tue, 28 Apr 2020 18:11:25 GMT):
Hello, I am having problems in getting a package while instantiating the chaincode. can someone help me out? 1.4.4 version

mffrench (Wed, 29 Apr 2020 12:08:17 GMT):
I'll be happy to contribute @kopaygorodsky however I would need some introductions on the rules to follow while contributing and in that particular case (lifecycle v2 management) if you have any soft architecture spec defined to follow

mffrench (Wed, 29 Apr 2020 12:08:17 GMT):
I'll be happy to contribute @kopaygorodsky however I would need some introductions on the rules to follow while contributing (if any) and in that particular case (lifecycle v2 management) if you have any soft architecture spec defined to follow

kopaygorodsky (Wed, 29 Apr 2020 15:04:53 GMT):
@metadata they do, I see tasks moving constantly, but for some reason this one was delayed. I step into and said that will do 2.0 cc lifecycle, seems everyone is waiting me now. I'll try to deliver it in the next few weeks (my project requires 2.0 cc too)

Quotidian (Thu, 30 Apr 2020 02:28:59 GMT):
Has joined the channel.

Quotidian (Thu, 30 Apr 2020 02:29:00 GMT):
I've a question regarding the override for Entity matching. Where is it launched and by what? fabsdk? What does it override? I'm basing my test on balance-transfer and I'm getting an error:

Quotidian (Thu, 30 Apr 2020 02:29:00 GMT):
I've a question regarding the override for Entity matching. Where is it launched and by what? fabsdk? What does it override? I'm basing my test on *balance-transfer *and I'm getting an error: ` [fabsdk/fab] 2020/04/29 18:37:49 UTC - channel.orderersFromChannelCfg -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to override orderer configuration [fabsdk/fab] 2020/04/29 18:37:49 UTC - channel.orderersFromChannelCfg -> WARN visit https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/local_entity_matchers.yaml for samples failed to invoke funds: Transaction processing for endorser [peer1.org2.example.com:10051]: Chaincode status Code: (500) UNKNOWN. Description: cannot retrieve package for chaincode mycc/1.0, error open /var/hyperledger/production/chaincodes/mycc.1.0: no such file or directory `

mahoney1 (Thu, 30 Apr 2020 12:23:17 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

vieiramanoel (Mon, 04 May 2020 16:55:24 GMT):
hey guys important

vieiramanoel (Mon, 04 May 2020 16:55:49 GMT):
why is pkcs11 missing from code when I hit `go get github.com/hyperledger/fabric-sdk-go`

vieiramanoel (Mon, 04 May 2020 16:56:00 GMT):
it causes failed to initialize configuration: unable to initialize cryptosuite using crypto suite config: failed to initialize crypto suite: Unsupported BCCSP Provider: "pkcs11"

vieiramanoel (Mon, 04 May 2020 16:56:00 GMT):
it causes `failed to initialize configuration: unable to initialize cryptosuite using crypto suite config: failed to initialize crypto suite: Unsupported BCCSP Provider: "pkcs11"`

vieiramanoel (Mon, 04 May 2020 16:59:03 GMT):

Clipboard - May 4, 2020 1:58 PM

vieiramanoel (Mon, 04 May 2020 16:59:14 GMT):
as you can see bccsp folder is missing pkcs11 code

vieiramanoel (Mon, 04 May 2020 16:59:32 GMT):
`go get -u go get -u github.com/hyperledger/fabric-sdk-go@v1.0.0-beta1` `go mod vendor`

vieiramanoel (Mon, 04 May 2020 17:07:22 GMT):
@kp

vieiramanoel (Mon, 04 May 2020 18:19:03 GMT):
nvm found in tests, if someone hits this problem too: https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/pkcs11/e2e_test.go

BrettLogan (Mon, 04 May 2020 18:20:37 GMT):
The PKCS11 provider is not included in the Fabric binaries/images by default. If you want to use an HSM you will need to build the images/binaries yourself with the tag enabled `GO_TAGS=pkcs11 make docker` from the fabric repo

BrettLogan (Mon, 04 May 2020 18:20:37 GMT):
The PKCS11 provider is not included in the Fabric binaries/images by default, it is gated via a build tag. If you want to use an HSM you will need to build the images/binaries yourself with the tag enabled. The command is `GO_TAGS=pkcs11 make docker` from the fabric repo

BrettLogan (Mon, 04 May 2020 18:20:37 GMT):
The PKCS11 provider is not included in the Fabric binaries/images by default. If you want to use an HSM you will need to build the images/binaries yourself with the tag enabled. The command is `GO_TAGS=pkcs11 make docker` from the fabric repo

vieiramanoel (Mon, 04 May 2020 18:53:00 GMT):
this isn't what I meant, thanks for you attention, anyway :) I've posted the solution

vieiramanoel (Mon, 04 May 2020 18:53:00 GMT):
this isn't what I meant, thanks for you attention, anyway :) I've posted the solution above

tongli (Thu, 07 May 2020 18:56:14 GMT):
@kopaygorodsky any progress on the LSCC support?

zZz (Tue, 12 May 2020 08:04:26 GMT):
Hi everyone, I want to register a user using fabric-go-sdk but I get the following error ``` Register return error enroll failed: enroll failed: Failed to parse response: Client sent an HTTP request to an HTTPS server. : invalid character 'C' looking for beginning of value ```

zZz (Tue, 12 May 2020 08:05:13 GMT):
please help me

ChrisSargent (Tue, 12 May 2020 09:10:18 GMT):
I think this error is normally related to json marshalling

metadata (Wed, 13 May 2020 08:04:17 GMT):
`Client sent an HTTP request to an HTTPS server`. I think tls is enabled in CA and you are trying to send http request to it.

zZz (Wed, 13 May 2020 08:18:46 GMT):
:grinning:

metadata (Wed, 13 May 2020 08:19:21 GMT):
fixed ?

zZz (Wed, 13 May 2020 08:20:06 GMT):
Please wait for me, I'm trying it

zZz (Wed, 13 May 2020 08:22:56 GMT):
Great, it worked

metadata (Wed, 13 May 2020 08:23:23 GMT):
:thumbsup:

zZz (Wed, 13 May 2020 08:23:57 GMT):
Are you using the go version v1.0.0-beta1 ?

zZz (Wed, 13 May 2020 08:24:13 GMT):
please help me

zZz (Wed, 13 May 2020 08:24:31 GMT):
```failed to create resmgmt client due to context error: user not found```

metadata (Wed, 13 May 2020 08:24:39 GMT):
yes

zZz (Wed, 13 May 2020 08:25:01 GMT):
```client: # Which organization does this application instance belong to? The value must be the name of an org # defined under "organizations" organization: intage logging: level: info # Global configuration for peer, event service and orderer timeouts # if this this section is omitted, then default values will be used (same values as below) # peer: # timeout: # connection: 10s # response: 180s # discovery: # # Expiry period for discovery service greylist filter # # The channel client will greylist peers that are found to be offline # # to prevent re-selecting them in subsequent retries. # # This interval will define how long a peer is greylisted # greylistExpiry: 10s eventService: # Event service type (optional). If not specified then the type is automatically # determined from channel capabilities. type: deliver # the below timeouts are commented out to use the default values that are found in # "pkg/fab/endpointconfig.go" # the client is free to override the default values by uncommenting and resetting # the values as they see fit in their config file # timeout: # connection: 15s # registrationResponse: 15s # orderer: # timeout: # connection: 15s # response: 15s # global: # timeout: # query: 180s # execute: 180s # resmgmt: 180s # cache: # connectionIdle: 30s # eventServiceIdle: 2m # channelConfig: 30m # channelMembership: 30s # discovery: 10s # selection: 10m # Root of the MSP directories with keys and certs. cryptoconfig: path: fixtures/crypto-config # Some SDKs support pluggable KV stores, the properties under "credentialStore" # are implementation specific credentialStore: path: wallet/store # [Optional]. Specific to the CryptoSuite implementation used by GO SDK. Software-based implementations # requiring a key store. PKCS#11 based implementations does not. cryptoStore: path: wallet/msp```

zZz (Wed, 13 May 2020 08:26:35 GMT):
```resourceManagerClientContext := f.sdk.Context( fabsdk.WithUser('Admin'), fabsdk.WithOrg('intage'), ) resMgmtClient, err := resmgmt.New(resourceManagerClientContext) if err != nil { log.Println(err) return err } f.resmgmtClient = resMgmtClient```

zZz (Wed, 13 May 2020 08:27:11 GMT):
It cannot find the user for me

metadata (Wed, 13 May 2020 08:28:07 GMT):
`fabsdk.WithUser('Admin'), `check if it's `Admin` or `admin`

zZz (Wed, 13 May 2020 08:28:42 GMT):

Clipboard - May 13, 2020 3:28 PM

zZz (Wed, 13 May 2020 08:29:11 GMT):
I want to use admin in crypto-config

zZz (Wed, 13 May 2020 08:30:32 GMT):
I want to use the default user and do not want to create a new user, this I did in version v1.0.0-alpha4

metadata (Wed, 13 May 2020 08:32:00 GMT):
check the path of admin`signedCert` and private key under organization section in config.yaml file.

metadata (Wed, 13 May 2020 08:33:25 GMT):
TBH its really hard to tell. what you can do is to add some checks like Print statement to check the values

zZz (Wed, 13 May 2020 08:34:16 GMT):

config.txt

zZz (Wed, 13 May 2020 08:34:35 GMT):
can you see if help me?

zZz (Wed, 13 May 2020 08:35:20 GMT):
``` cryptoPath: fixtures/crypto-config/peerOrganizations/intage.example.com/users/{userName}@intage.example.com/msp ```

zZz (Wed, 13 May 2020 08:35:50 GMT):
I think I configured it at cryptoPath, right?

zZz (Wed, 13 May 2020 08:36:23 GMT):
I really don't know how to Print statement to check the values

metadata (Wed, 13 May 2020 08:36:40 GMT):
you can refer to this repo: https://github.com/Deeptiman/multiorgledger I'm really sorry but I'm busy with other stuff.

metadata (Wed, 13 May 2020 08:37:15 GMT):
I'll take a look whenever I'm free

zZz (Wed, 13 May 2020 08:37:36 GMT):
:heart_eyes: thanks you

zZz (Wed, 13 May 2020 15:44:39 GMT):
I am using fabric 2.1 and using go-sdk to deploy chaincode and I get the following error ``` sending deploy transaction proposal failed: Multiple errors occurred: - Transaction processing for endorser [localhost:7151]: Chaincode status Code: (500) UNKNOWN. Description: Channel 'mychannel' has been migrated to the new lifecycle, LSCC is now read-only ``` How do I solve it?

metadata (Wed, 13 May 2020 18:30:40 GMT):
2.1 LSCC isn't supported yet in sdk-go

metadata (Wed, 13 May 2020 18:36:34 GMT):
add 1.4 capabilities

kopaygorodsky (Wed, 13 May 2020 21:30:36 GMT):
+

zZz (Thu, 14 May 2020 01:37:06 GMT):
Can you give me the config file?

zZz (Thu, 14 May 2020 03:09:43 GMT):
Can someone explain me why I am getting this error? ``` error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied ``` ``` Application: &ApplicationDefaults # Organizations is the list of orgs which are defined as participants on # the application side of the network Organizations: # Policies defines the set of policies at this level of the config tree # For Application policies, their canonical path is # /Channel/Application/ Policies: Readers: Type: ImplicitMeta Rule: "ANY Readers" Writers: Type: ImplicitMeta Rule: "ANY Writers" Admins: Type: ImplicitMeta Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta Rule: "MAJORITY Endorsement" # Capabilities describes the application level capabilities, see the # dedicated Capabilities section elsewhere in this file for a full # description Capabilities: <<: *ApplicationCapabilities ```

zZz (Thu, 14 May 2020 03:09:43 GMT):
Can someone explain me why I am getting this error? ``` create channel failed: SendEnvelope failed: calling orderer 'localhost:7050' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: error validating channel creation transaction for new channel 'mychannel', could not successfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied ``` ``` Application: &ApplicationDefaults # Organizations is the list of orgs which are defined as participants on # the application side of the network Organizations: # Policies defines the set of policies at this level of the config tree # For Application policies, their canonical path is # /Channel/Application/ Policies: Readers: Type: ImplicitMeta Rule: "ANY Readers" Writers: Type: ImplicitMeta Rule: "ANY Writers" Admins: Type: ImplicitMeta Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta Rule: "MAJORITY Endorsement" # Capabilities describes the application level capabilities, see the # dedicated Capabilities section elsewhere in this file for a full # description Capabilities: <<: *ApplicationCapabilities ```

zZz (Thu, 14 May 2020 04:17:00 GMT):
I added but still got the error ``` Capabilities: Channel: &ChannelCapabilities V2_0: true V1_4_2: true Orderer: &OrdererCapabilities V2_0: true V1_4_2: true Application: &ApplicationCapabilities V2_0: true V1_4_2: true ```

metadata (Thu, 14 May 2020 06:45:31 GMT):
you need to recreate genesis block. then channel.tx and anchor peer thing

metadata (Thu, 14 May 2020 06:45:31 GMT):
you need to recreate genesis block. then channel.tx and anchor peer things

zZz (Thu, 14 May 2020 06:46:32 GMT):
yes

zZz (Thu, 14 May 2020 06:46:32 GMT):
yes

ChrisSargent (Thu, 14 May 2020 07:46:38 GMT):
@zZz - if you're struggling with network setup and you want to move quickly to writing actual code and business logic, I can highly recommend https://github.com/litong01/minifabric, MiniFab, which is written by one of the guys on here (@tongli). It makes the network setup much more straightforward.

ChrisSargent (Thu, 14 May 2020 07:46:38 GMT):
@zZz - if you're struggling with network setup and you want to move quickly to writing actual code and business logic, I can highly recommend https://github.com/litong01/minifabric, MiniFab, which is written by one of the guys on here ( @tongli ). It makes the network setup much more straightforward.

mahoney1 (Thu, 14 May 2020 08:31:05 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

zZz (Thu, 14 May 2020 10:27:30 GMT):
I use go-sdk to create, join channel, and Install chaincode but I can't instantiate This is my code: ``` ccPolicy := cauthdsl.AcceptAllPolicy args := models.QueryCC{Func: "InitLedger"} req := resmgmt.InstantiateCCRequest{ Name: Fabric.ChainCodeID, Path: Fabric.ChainCodeGoPath, Version: Fabric.ChainCodeVersion, Args: utils.AsBytes(utils.NewContext(), args.Args), Policy: ccPolicy, //CollConfig: collConfig, } _, err = Fabric.resmgmtClient.InstantiateCC( Fabric.ChannelID, req, resmgmt.WithTargets(Fabric.peers[0]), ) ``` I get this error every time I call instantiate chaincode ``` CreateAndSendTransaction failed: SendTransaction failed: calling orderer '127.0.0.1:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [127.0.0.1:7050]: connection is in TRANSIENT_FAILURE ``` This is the orderer log ``` 2020-05-14 10:11:25.261 UTC [grpc] Warning -> DEBU 01a grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams received bogus greeting from client: \"\\x16\\x03\\x01\\x00\\xfb\\x01\\x00\\x00\\xf7\\x03\\x03_\\xe0^\\xbcKF)\\xeb\\xf8\\xa6Ƌ\\xb2\"" ``` Can someone please help me, what's going on?

zZz (Thu, 14 May 2020 10:27:30 GMT):
I use go-sdk to create, join channel, and Install chaincode but I can't instantiate chaincode This is my code: ``` ccPolicy := cauthdsl.AcceptAllPolicy args := models.QueryCC{Func: "InitLedger"} req := resmgmt.InstantiateCCRequest{ Name: Fabric.ChainCodeID, Path: Fabric.ChainCodeGoPath, Version: Fabric.ChainCodeVersion, Args: utils.AsBytes(utils.NewContext(), args.Args), Policy: ccPolicy, //CollConfig: collConfig, } _, err = Fabric.resmgmtClient.InstantiateCC( Fabric.ChannelID, req, resmgmt.WithTargets(Fabric.peers[0]), ) ``` I get this error every time I call instantiate chaincode ``` CreateAndSendTransaction failed: SendTransaction failed: calling orderer '127.0.0.1:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [127.0.0.1:7050]: connection is in TRANSIENT_FAILURE ``` This is the orderer log ``` 2020-05-14 10:11:25.261 UTC [grpc] Warning -> DEBU 01a grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams received bogus greeting from client: \"\\x16\\x03\\x01\\x00\\xfb\\x01\\x00\\x00\\xf7\\x03\\x03_\\xe0^\\xbcKF)\\xeb\\xf8\\xa6Ƌ\\xb2\"" ``` Can someone please help me, what's going on?

MattB97 (Thu, 14 May 2020 14:50:40 GMT):
Hi, does anyone know how to set the anchor peers on a channel using sdk go? I can create a channel using the channel.tx file but I can't see any option to update the anchor peers. I have the Org1MSPanchors.tx files but it doesn't look like sdk go uses them

BrettLogan (Thu, 14 May 2020 20:19:18 GMT):
Generally this means the certificates you presented weren't valid. Make sure you have the correct client certs, and that they have either a valid CN or the endpoint you are trying to connect to (127.0.0.1) is included in the SANS section of the certs

Rachit-gaur (Thu, 14 May 2020 22:12:25 GMT):
Does anyone know when we call instantiate using fabric sdk the caller always goes Admin@org1.com instead of the one we send as arguments

kukgini (Sat, 16 May 2020 01:32:50 GMT):
Has left the channel.

zZz (Tue, 19 May 2020 02:27:39 GMT):
I tried it but it still fails, the sdk doesn't match fabric 2.0. I encountered a lot of errors with it.

fishlyliu (Tue, 19 May 2020 08:09:06 GMT):
Has joined the channel.

fishlyliu (Tue, 19 May 2020 08:09:08 GMT):
hello, i have some questions about Hyperledger fabric. i am using go-sdk, how could i update part of sdk config when processing, for example, when adding a peer, i want to add it in config provider

fishlyliu (Tue, 19 May 2020 08:18:45 GMT):
or, is there a way to get channel client, which not config in sdk?

fishlyliu (Tue, 19 May 2020 08:19:10 GMT):

Clipboard - May 19, 2020 4:19 PM

fishlyliu (Tue, 19 May 2020 08:19:12 GMT):
with this function

kopaygorodsky (Tue, 19 May 2020 09:01:56 GMT):
you can implement your own EndpointConfig NetworkPeers() method or use opts each time channelClient.DoSmth(fdfdf, fdfdf, WithTargetEndpoint)

kopaygorodsky (Tue, 19 May 2020 09:01:56 GMT):
you can implement your own EndpointConfig NetworkPeers() method or use opts each time channelClient.DoSmth(fdfdf, fdfdf, WithTargetEndpoint(peerURL))

zZz (Fri, 22 May 2020 03:24:25 GMT):
I am not getting the payload in listener :| Can someone tell me where I was wrong? This is the code in my chaincode: ``` err = ctx.GetStub().PutState(state.Key, state.GetBytes()) if err != nil { log.Println("Put state error with ", err) return err } err = ctx.GetStub().SetEvent("Invoke", state.GetBytes()) if err != nil { log.Println("Set event error with ", err) return err } return nil ``` I use fabric go sdk v1.0.0-beta1 and fabric 2.0 ``` Received CC event:: {"TxID":"2776ba8e87145f3aee7bfa5b790572266b556dc9801eac796fcd7e570a0dfd6d","ChaincodeID":"simple-db","EventName":"Invoke","Payload":null,"BlockNumber":12,"SourceURL":"localhost:7051"} ```

pritam_01 (Fri, 22 May 2020 08:39:47 GMT):
Has joined the channel.

kopaygorodsky (Fri, 22 May 2020 11:07:56 GMT):
I can confirm that there is no payload in event

kopaygorodsky (Fri, 22 May 2020 11:07:56 GMT):
I can confirm that there is no payload in an event

BrajeshA (Sun, 24 May 2020 02:48:47 GMT):
I wanted to check if there is away to achieve the following in nodejs client of fabric-ca-client 2.1 - 1) pass text CSR fields and generate PEM encoded CSR for external signing. 2) adding CSR fields like organizatin, country , state etc during enrollment with nodejs client- seems like I can affiliation that is added in OU . All these work with fabric-ca-client command line but I would like to use it in nodejs

metadata (Sun, 24 May 2020 06:04:41 GMT):
didn't get your question. If you are looking for nodejs solution then you can ask here #fabric-sdk-node

Matrixik (Mon, 25 May 2020 08:26:33 GMT):
Has joined the channel.

AaronWilmoth (Mon, 25 May 2020 15:25:33 GMT):
Has joined the channel.

sergefdrv (Mon, 25 May 2020 15:49:19 GMT):
Has joined the channel.

sergefdrv (Mon, 25 May 2020 15:49:22 GMT):
hi guys, I have a question regarding support for Fabric v2. Was https://jira.hyperledger.org/browse/FABG-834 supposed to track the status of Fabric v2 support?

sergefdrv (Mon, 25 May 2020 15:51:44 GMT):
I see, the issue is closed, but the readme on gh doesn't indicate fabric v2 is supported...

sergefdrv (Mon, 25 May 2020 15:51:44 GMT):
I see the issue is closed, but the readme on gh doesn't indicate fabric v2 is supported...

zZz (Tue, 26 May 2020 02:16:11 GMT):
Do you have any workarounds for it?

metadata (Tue, 26 May 2020 08:26:21 GMT):
@zZz I don't think it's a bug hence no workaround needed.

zZz (Tue, 26 May 2020 08:27:39 GMT):
so why "Payload":null

kopaygorodsky (Tue, 26 May 2020 10:47:09 GMT):
because it's a bug :)

zZz (Tue, 26 May 2020 10:47:52 GMT):
is it my bug?

troyronda (Tue, 26 May 2020 10:58:14 GMT):
https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/event/example_test.go#L82

troyronda (Tue, 26 May 2020 10:59:02 GMT):
“ If you require payload for chaincode events you have to use WithBlockEvents() option”

cryptopatrick (Tue, 26 May 2020 19:57:09 GMT):
Has joined the channel.

y0zg (Wed, 27 May 2020 18:36:01 GMT):
Has joined the channel.

y0zg (Wed, 27 May 2020 18:36:55 GMT):
hi everyone! Do you have an idea how to solve this dependency error? ``` git clone https://github.com/hyperledger/fabric-sdk-go.git cd fabric-sdk-go dep init -v ... ... (524) ← backtrack: popped 6 pkgs from github.com/golangci/dupl (523) ← backtrack: popped 6 pkgs from github.com/golangci/dupl (522) ← backtrack: no more versions of github.com/golangci/golangci-lint to try (97) ? continue github.com/golangci/golangci-lint with 25 pkgs; 1 more versions to try (522) try github.com/golangci/golangci-lint@test-reporting (522) ✗ package github.com/golangci/golangci-lint/internal/cache does not exist within project github.com/golangci/golangci-lint panic: runtime error: index out of range goroutine 1 [running]: github.com/golang/dep/gps.(*solver).findValidVersion(0xc00030c000, 0xc00201a460, 0xc000b3f860, 0x19, 0x19, 0x0, 0xc000b3f860) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:945 +0x4cc github.com/golang/dep/gps.(*solver).backtrack(0xc00030c000, 0xadbdc0, 0xc000028160, 0x0, 0x0, 0x0) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:1079 +0xbdc github.com/golang/dep/gps.(*solver).solve(0xc00030c000, 0xadbdc0, 0xc000028160, 0x5, 0xc0001f0158, 0xc0000dd698) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:510 +0x872 github.com/golang/dep/gps.(*solver).Solve(0xc00030c000, 0xadbdc0, 0xc000028160, 0xc00019e5d0, 0xc000026077, 0xd, 0xc00050fa70) /Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:440 +0x1eb main.(*initCommand).Run(0xc00014b772, 0xc0000c6880, 0xc00016a680, 0x0, 0x0, 0x0, 0x0) /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/init.go:155 +0x5ad main.(*Config).Run(0xc000078f00, 0x0) /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/main.go:212 +0x111c main.main() /Users/travis/gopath/src/github.com/golang/dep/cmd/dep/main.go:84 +0x636 ```

mahoney1 (Thu, 28 May 2020 14:01:50 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

cryptopatrick (Thu, 28 May 2020 16:45:48 GMT):
Is the meeting over?

sergefdrv (Thu, 28 May 2020 22:03:24 GMT):
Has left the channel.

troyronda (Tue, 02 Jun 2020 13:44:51 GMT):
@here We tagged v1.0.0-beta2. This release has bug fixes and adds the Fabric gateway programming model (@andrew-coleman).

troyronda (Tue, 02 Jun 2020 13:44:51 GMT):
@here We tagged v1.0.0-beta2. This release adds the Fabric gateway programming model (@andrew-coleman) and contains bug fixes.

troyronda (Tue, 02 Jun 2020 13:44:51 GMT):
@here We tagged v1.0.0-beta2. This release adds the Fabric gateway programming model ( @andrew-coleman ) and contains bug fixes.

troyronda (Tue, 02 Jun 2020 13:45:08 GMT):
Gateway package: https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go/pkg/gateway

metadata (Tue, 02 Jun 2020 17:38:37 GMT):
This is amazing. thank you so much @troyronda @andrew-coleman . @troyronda @kopaygorodsky Any updates on new LSCC support?

cryptopatrick (Wed, 03 Jun 2020 07:10:28 GMT):
@metadata What's the LSCC support? Thanks in advance!

metadata (Wed, 03 Jun 2020 08:47:16 GMT):
LSCC stands for `Lifecycle System Chaincode` . new LSCC means fabric v2.1 support in sdk-go.

cryptopatrick (Wed, 03 Jun 2020 09:11:11 GMT):
Thanks!:pray:

afrouzMashaykhi (Wed, 03 Jun 2020 12:59:11 GMT):
Has joined the channel.

scmanjarrez (Wed, 03 Jun 2020 13:44:13 GMT):
Has joined the channel.

z3100 (Fri, 05 Jun 2020 09:25:54 GMT):
Has joined the channel.

nbasker (Sat, 06 Jun 2020 04:02:14 GMT):
Has joined the channel.

BrettLogan (Tue, 09 Jun 2020 02:03:17 GMT):
Does the fabsdk client enforce that there be an `https` endpoint for a Fabric CA. For testing purposes I really don't want to deal with TLS enabled CA's

BrettLogan (Tue, 09 Jun 2020 02:04:03 GMT):
There doesn't seem to be a way to prevent having to provide the `tlsCACerts` field in the CA portion of the config file

BrettLogan (Tue, 09 Jun 2020 05:09:11 GMT):
We are in the process of evaluating moving the Fabric System Test tooling from the Node SDK to the Go SDK

BrettLogan (Tue, 09 Jun 2020 05:09:11 GMT):
We are in the process of evaluating moving the Fabric System Test tooling from the Node SDK to the Go SDK for all testing done in the open source community and we are looking for any complexities or gaps we may need to fill

sudeshrshetty (Tue, 09 Jun 2020 20:38:39 GMT):
@BrettLogan unfortunately there doesn't seems to be a way to avoid `TLSCACerts` in identity config https://github.com/hyperledger/fabric-sdk-go/blob/60484ddc28ab4a8de28df675a67523553d334dd7/pkg/msp/identityconfig.go#L329

sudeshrshetty (Tue, 09 Jun 2020 20:41:05 GMT):
try using some random pem in config to get around it. https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/core/config/testdata/template/config.yaml#L386

BrettLogan (Tue, 09 Jun 2020 20:56:11 GMT):
That's worth a shot, we can just carry a dummy pem around to plug in for now. Appreciate the thoughts

sudeshrshetty (Tue, 09 Jun 2020 20:56:32 GMT):
:thumbsup:

DeepBeepSleep (Thu, 11 Jun 2020 07:19:01 GMT):
Has joined the channel.

mahoney1 (Thu, 11 Jun 2020 08:47:15 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

davidkhala (Thu, 18 Jun 2020 03:54:43 GMT):
@BrettLogan Hi bret, in npm `fabric-ca-client` i remember we could skip config `tlsCACerts`. meanwhile it required ca-server side configuring TLS disabled.

davidkel (Thu, 18 Jun 2020 10:06:12 GMT):
@davidkhala Unfortunately there was (is ?) an issue with the go sdk in the fact that it didn't support communicating with a CA using http only.

kopaygorodsky (Thu, 18 Jun 2020 14:17:08 GMT):

Clipboard - June 18, 2020 5:17 PM

kopaygorodsky (Thu, 18 Jun 2020 14:17:20 GMT):
this piece of config was working just fine

pouya (Sun, 21 Jun 2020 05:15:25 GMT):
Has joined the channel.

jital (Tue, 23 Jun 2020 06:23:13 GMT):
Has joined the channel.

jital (Tue, 23 Jun 2020 06:23:13 GMT):
I need to do pagination for my GetPrivateDataByPartialCompositeKey API 1. Pagination is available for non private version of same API, is there a reason why it is not implemented for private 2. I tried solving this problem via GetPrivateDataByRange and writing a cursor based pagination myself, but it does not scan in composite key range, Please help here

Diddy_O (Wed, 24 Jun 2020 12:42:10 GMT):
Has joined the channel.

mffrench (Thu, 25 Jun 2020 13:41:08 GMT):
Hello, it's not clear to me if this release adds new LCC support. Does it ?

Diddy_O (Thu, 25 Jun 2020 14:17:45 GMT):
hello I'm new to fabric and I need to build an external oracle in go with sdk-go, someone can suggest me some documentation, or some goo articles? thanks

metadata (Thu, 25 Jun 2020 14:36:31 GMT):
@kopaygorodsky

skyliulu (Fri, 26 Jun 2020 09:19:52 GMT):
Has joined the channel.

Diddy_O (Fri, 26 Jun 2020 13:32:16 GMT):
why vs code replace "github.com/hyperledger/fabric-sdk-go/pkg/gateway" with "github.com/hyperledger/fabric-sdk-go/pkg/core/config" when save file?

dongming (Fri, 26 Jun 2020 14:40:43 GMT):
Has joined the channel.

pd93 (Fri, 26 Jun 2020 14:41:55 GMT):
Hi, Me and my team are trying to use fabric-sdk-go for a PoC for my company. Just struggling to understand how to handle error messages generated in the chaincode. We're using shim.Error() whenever an error occurs in the chaincode, but when we try to retrieve the error using the SDK, the response (including payload) is empty. This makes it really hard to isolate the error message as err is combined with a bunch of other info. Are we missing something here or is this simply because it's still in beta?

troyronda (Fri, 26 Jun 2020 15:00:29 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=g8mZ8hsi6vfLuEdBe https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RPmNHjjzkty8FhBAH https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Thty523bpZHCaikk7

troyronda (Fri, 26 Jun 2020 15:01:33 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-go?msg=g8mZ8hsi6vfLuEdBe https://chat.hyperledger.org/channel/fabric-sdk-go?msg=RPmNHjjzkty8FhBAH https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Thty523bpZHCaikk7

pd93 (Fri, 26 Jun 2020 15:25:04 GMT):
@troyronda Thanks for the reply. Our problem is that we want to return an error code (ie. >= 400) and we want to be able to access the error message returned in that message. Is there a particular reason why status codes >= 400 aren't returned?

pd93 (Fri, 26 Jun 2020 15:27:57 GMT):
Thanks for the reply. Our problem is that we want to return an error code (ie. >= 400) and we want to be able to access the error message returned in that message. Is there a particular reason why status codes >= 400 aren't returned?

troyronda (Fri, 26 Jun 2020 15:41:35 GMT):
As I recall this isn’t a limitation of the SDK but rather a peer behaviour. (It has been awhile for me since I last heard about this topic though.)

dongming (Fri, 26 Jun 2020 15:54:55 GMT):
Hi, I override the config following the examples given in https://github.com/hyperledger/fabric-sdk-go/blob/master/test/integration/e2e/configless/end_to_end_test.go But I see the error message below: 2020/06/26 09:54:13 Failed to create new SDK: Error in option passed to New: option []interface {}{(*utils.exampleIsSecurityEnabled)(0x14af120), (*utils.exampleSecurityAlgorithm)(0x14af120), (*utils.exampleSecurityLevel)(0x14af120), (*utils.exampleSecurityProvider)(0x14af120), (*utils.exampleSoftVerify)(0x14af120), (*utils.exampleSecurityProviderLibPath)(0x14af120), (*utils.exampleSecurityProviderPin)(0x14af120), (*utils.exampleSecurityProviderLabel)(0x14af120), (*utils.exampleKeyStorePath)(0x14af120)} is not a sub interface of CryptoSuiteConfig, at least one of its functions must be implemented. exit status 1 Here is my code: sdk, err := fabsdk.New(nil, fabsdk.WithCryptoSuiteConfig(utils.CryptoConfigImpls), fabsdk.WithEndpointConfig(utils.EndpointConfigImpls), fabsdk.WithIdentityConfig(utils.IdentityConfigImpls)) Am I missing anything?

pd93 (Fri, 26 Jun 2020 17:33:39 GMT):
No problem, thanks. From the reading I've done, this part of Fabric has been changed a couple of times, but I felt like this wasn't the best place to discuss this in detail, so I opened a JIRA issue. I'd really appreciate it if you could take a look when you have the time. https://jira.hyperledger.org/browse/FABG-974 I have linked some related issues which address the topic

sijo.c (Fri, 26 Jun 2020 18:15:03 GMT):
Has joined the channel.

sijo.c (Fri, 26 Jun 2020 18:18:03 GMT):
Hi , trying to run gosdk samples on latest master. I copied over bin & config folders from the fabric repo build. Is that the right approach? I am able to run javascript fabcar, but go fabcar errors with CONNECTION_FAILED

sijo.c (Fri, 26 Jun 2020 18:18:41 GMT):
``` go run fabcar.go [fabsdk/core] 2020/06/26 18:00:25 UTC - cryptosuite.GetDefault -> INFO No default cryptosuite found, using default SW implementation Failed to evaluate transaction: Failed to evaluate: Multiple errors occurred: - Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: waiting for connection failed: context deadline exceeded - Transaction processing for endorser [peer0.org2.example.com:9051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org2.example.com:9051]: waiting for connection failed: context deadline exceeded exit status 1```

ViokingTung (Mon, 29 Jun 2020 08:39:19 GMT):
Has joined the channel.

andrew-coleman (Mon, 29 Jun 2020 09:12:22 GMT):
@sijo.c try setting the following env-var before running: `export DISCOVERY_AS_LOCALHOST=TRUE`

sijo.c (Mon, 29 Jun 2020 15:03:26 GMT):
thanks that works. @andrew-coleman , I can improve the fabcar instruction to set above env

sijo.c (Mon, 29 Jun 2020 15:05:29 GMT):
do we have any WIP to add Gateway Connector Option for discovery as localhost. Like we have in java/javascript sdk. If not , @andrew-coleman if you help me with pointers, I can start working on it

troyronda (Tue, 30 Jun 2020 17:11:24 GMT):
The SDK stable integration tests now target Fabric v2.1 (and will update to v2.2 when it is out). There are a few caveats (still on old CC lifecycle, CC builder, cryptogen file structure).

troyronda (Tue, 30 Jun 2020 17:11:24 GMT):
The SDK stable integration tests now target Fabric v2.1 (and will update to v2.2 when it is out). There are a few caveats (still on old CC lifecycle, old CC builder, cryptogen file structure).

troyronda (Tue, 30 Jun 2020 17:11:24 GMT):
The SDK stable integration tests now target Fabric v2.1 (and will update to v2.2 when it is out). There are a few caveats (still on old CC lifecycle, old CC builder, old cryptogen file structure).

troyronda (Tue, 30 Jun 2020 17:12:58 GMT):
The prev integration tests now target v1.4.7. (no longer v1.3).

Diddy_O (Tue, 30 Jun 2020 20:34:42 GMT):
Hi there, I'm new with fabric, I try to understand how can I build a listener in golang that could be an oracle for smart contract, have you some doc to suggest me? thanks

BrettLogan (Wed, 01 Jul 2020 20:05:01 GMT):
@troyronda Your last change to the SDK broke the integration tests. I kicked off a test of the raw master branch and saw the same error we are seeing in PR's. Here is the test of the current master: https://dev.azure.com/Hyperledger/Fabric-SDK-Go/_build/results?buildId=16854&view=logs&j=133bd042-0fac-58b5-e6e7-01018e6dc4d4&t=133bd042-0fac-58b5-e6e7-01018e6dc4d4

baohua (Wed, 08 Jul 2020 01:01:08 GMT):
@troyronda hi troy, do you have recommendation of which version of sdk-go to work with fabric v1.4.7? Thanks!

troyronda (Wed, 08 Jul 2020 01:05:15 GMT):
@baohua latest works.

baohua (Wed, 08 Jul 2020 01:08:23 GMT):
got, so the latest release is v1.0.0-beta2!

sergeikus (Fri, 10 Jul 2020 10:11:48 GMT):
Has joined the channel.

sergeikus (Fri, 10 Jul 2020 10:35:02 GMT):
Hello! I am having a problem with running "fabcar" in fabric-samples repository, Go SDK implementation. Orderer drops the connection as it mentions that TLS certificate is bad. ``` ~/github/fabric-samples/fabcar/go$ go run fabcar.go [fabsdk/core] 2020/07/10 10:34:44 UTC - cryptosuite.GetDefault -> INFO No default cryptosuite found, using default SW implementation [{"Key":"CAR0","Record":{"make":"Toyota","model":"Prius","colour":"blue","owner":"Tomoko"}},{"Key":"CAR1","Record":{"make":"Ford","model":"Mustang","colour":"red","owner":"Brad"}},{"Key":"CAR12","Record":{"make":"Honda","model":"Accord","colour":"Black","owner":"Tom"}},{"Key":"CAR2","Record":{"make":"Hyundai","model":"Tucson","colour":"green","owner":"Jin Soo"}},{"Key":"CAR3","Record":{"make":"Volkswagen","model":"Passat","colour":"yellow","owner":"Max"}},{"Key":"CAR4","Record":{"make":"Tesla","model":"S","colour":"black","owner":"Adriana"}},{"Key":"CAR5","Record":{"make":"Peugeot","model":"205","colour":"purple","owner":"Michel"}},{"Key":"CAR6","Record":{"make":"Chery","model":"S22L","colour":"white","owner":"Aarav"}},{"Key":"CAR7","Record":{"make":"Fiat","model":"Punto","colour":"violet","owner":"Pari"}},{"Key":"CAR8","Record":{"make":"Tata","model":"Nano","colour":"indigo","owner":"Valeria"}},{"Key":"CAR9","Record":{"make":"Holden","model":"Barina","colour":"brown","owner":"Shotaro"}}] Failed to submit transaction: Failed to submit: CreateAndSendTransaction failed: SendTransaction failed: calling orderer '127.0.0.1:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [127.0.0.1:7050]: connection is in TRANSIENT_FAILURE exit status ```

sergeikus (Fri, 10 Jul 2020 10:36:25 GMT):
I additionally had the same TRANSIENT_FAILURE with EvaluateTransaction() function, but it resolved with adding entityMatcher in to connection-ccp.yaml.

sergeikus (Fri, 10 Jul 2020 10:36:25 GMT):
I additionally had the same TRANSIENT_FAILURE with EvaluateTransaction() function, but it resolved with adding entityMatcher in connection-ccp.yaml.

sergeikus (Fri, 10 Jul 2020 10:36:25 GMT):
I additionally had the same TRANSIENT_FAILURE with EvaluateTransaction() function, but it resolved with adding entityMatcher for peers in connection-ccp.yaml.

sergeikus (Fri, 10 Jul 2020 10:37:16 GMT):
Here is the log from Orderer: ``` 2020-07-10 10:34:42.364 UTC [orderer.consensus.etcdraft] Check -> DEBU 19d5 Current active nodes in cluster are: [1] channel=mychannel node=1 2020-07-10 10:34:43.155 UTC [orderer.consensus.etcdraft] Check -> DEBU 19d6 Current active nodes in cluster are: [1] channel=system-channel node=1 2020-07-10 10:34:44.186 UTC [core.comm] ServerHandshake -> ERRO 19d7 TLS handshake failed with error remote error: tls: bad certificate server=Orderer remoteaddress=172.25.0.1:39040 2020-07-10 10:34:44.186 UTC [grpc] Warningf -> DEBU 19d8 grpc: Server.Serve failed to complete security handshake from "172.25.0.1:39040": remote error: tls: bad certificate 2020-07-10 10:34:44.364 UTC [orderer.consensus.etcdraft] Check -> DEBU 19d9 Current active nodes in cluster are: [1] channel=mychannel node=1 ```

sergeikus (Fri, 10 Jul 2020 10:40:15 GMT):
I am pretty sure that this is related to Go SDK, as with TypeScript and Java implementations everything worked OK.

sergeikus (Fri, 10 Jul 2020 14:06:16 GMT):
Small update: I updated repository to Fabric 2.2.0 and now I am stuck behind this error: ``` Failed to submit transaction: Failed to submit: CreateAndSendTransaction failed: SendTransaction failed: orderers is nil ``` So now I think that my problem is in the connection-ccp.yaml file. Can someone hint me to what exactly I am missing?

zhubao315 (Sat, 11 Jul 2020 03:45:35 GMT):
Has joined the channel.

sergeikus (Sat, 11 Jul 2020 15:34:49 GMT):
Oookey, update: I managed to use the fabcar gateway implementation in the fabric-samples repository with version 2.1.1. The complete solution to use "go" gateway implementation is to: 1. Add entityMatchers for peers: ``` entityMatchers: peer: - pattern: peer0.org1.example.com:7051 urlSubstitutionExp: localhost:7051 sslTargetOverrideUrlSubstitutionExp: peer0.org1.example.com mappedHost: peer0.org1.example.com - pattern: peer0.org2.example.com:9051 urlSubstitutionExp: localhost:9051 sslTargetOverrideUrlSubstitutionExp: peer0.org2.example.com mappedHost: peer0.org2.example.com ``` 2. Add --csr.hosts 127.0.0.1 on orderer.example.com enrollment (My setup uses Fabric-CA) I hope this information will help someone one day.

sergeikus (Sat, 11 Jul 2020 15:34:49 GMT):
Oookey, update: I managed to use the fabcar gateway implementation in the fabric-samples repository with version 2.1.1. 1. Add entityMatchers for peers: ``` entityMatchers: peer: - pattern: peer0.org1.example.com:7051 urlSubstitutionExp: localhost:7051 sslTargetOverrideUrlSubstitutionExp: peer0.org1.example.com mappedHost: peer0.org1.example.com - pattern: peer0.org2.example.com:9051 urlSubstitutionExp: localhost:9051 sslTargetOverrideUrlSubstitutionExp: peer0.org2.example.com mappedHost: peer0.org2.example.com ``` 2. Add --csr.hosts 127.0.0.1 on orderer.example.com enrollment (My setup uses Fabric-CA) I hope this information will help someone one day.

sergeikus (Sat, 11 Jul 2020 15:34:49 GMT):
Oookey, update: I managed to use the fabcar gateway implementation in the fabric-samples repository with version 2.1.1. 1. Add entityMatchers for peers in connection-cpp.(yaml/json): ``` entityMatchers: peer: - pattern: peer0.org1.example.com:7051 urlSubstitutionExp: localhost:7051 sslTargetOverrideUrlSubstitutionExp: peer0.org1.example.com mappedHost: peer0.org1.example.com - pattern: peer0.org2.example.com:9051 urlSubstitutionExp: localhost:9051 sslTargetOverrideUrlSubstitutionExp: peer0.org2.example.com mappedHost: peer0.org2.example.com ``` 2. Add --csr.hosts 127.0.0.1 on orderer.example.com enrollment (My setup uses Fabric-CA) I hope this information will help someone one day.

BrettLogan (Sat, 11 Jul 2020 17:24:58 GMT):
Did your `/etc/hosts` have an entry matching `localhost` to `127.0.0.1` seems you were just missing the default dns mapping in `/etc/hosts

BrettLogan (Sat, 11 Jul 2020 17:24:58 GMT):
Did your `/etc/hosts` have an entry matching `localhost` to `127.0.0.1` seems you were just missing the default dns mapping in `/etc/hosts`

sergeikus (Sat, 11 Jul 2020 18:58:25 GMT):
yes, it did

braduf (Mon, 13 Jul 2020 21:47:14 GMT):
Hi, I would like to know why the Go SDK is still in beta, what are the known issues why it is still a beta?

braduf (Mon, 13 Jul 2020 21:47:14 GMT):
Hi, I would like to know why the Go SDK is still in beta, what are the known issues that kept it in beta still?

metadata (Tue, 14 Jul 2020 05:09:17 GMT):
Fabriv v2.X LSCC isn't available yet. that's why it's in beta

braduf (Tue, 14 Jul 2020 06:43:26 GMT):
Great! Thanks a lot for your answer, if that's the only thing missing, it will work for me.

braduf (Tue, 14 Jul 2020 06:43:26 GMT):
Great! Thanks a lot for your answer, if that's the only thing missing, it will work for me for now.

kopaygorodsky (Thu, 16 Jul 2020 12:17:44 GMT):
It will be available very soon

nanmin (Fri, 17 Jul 2020 00:33:47 GMT):
Fabcar giving TRANSIENT FAILURE

metadata (Fri, 17 Jul 2020 10:05:57 GMT):
@kopaygorodsky Do you have any idea about implicit private collection in v2.x? Like In case of `private data`, we can set `blockToLive` in collection defination like below ``` { "name": "collectionMarbles", "policy": "OR('Org1MSP.member', 'Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":1000000, "memberOnlyRead": true, "memberOnlyWrite": true } ``` But In case of implicit-private data, Is it possible to set the value of `blockToLive`? If yes then how to set it?

metadata (Fri, 17 Jul 2020 10:05:57 GMT):
@kopaygorodsky Do you have any idea about implicit private collection in v2.x? Like In case of `private data`, we can set `blockToLive` in collection definition like below ``` { "name": "collectionMarbles", "policy": "OR('Org1MSP.member', 'Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 3, "blockToLive":1000000, "memberOnlyRead": true, "memberOnlyWrite": true } ``` But In case of implicit-private data, Is it possible to set the value of `blockToLive`? If yes then how to set it?

silliman (Fri, 17 Jul 2020 21:08:48 GMT):
Has joined the channel.

Yambe (Sat, 18 Jul 2020 22:59:56 GMT):
Has joined the channel.

shenyumin (Sun, 19 Jul 2020 13:47:13 GMT):
Has joined the channel.

shenyumin (Sun, 19 Jul 2020 13:52:57 GMT):
Hello! I'm new with fabric-sdk-go, and I have searched many articles about how to use fabric-sdk-go. But I only find the method to use sdk in solo model. Now, I have a

shenyumin (Sun, 19 Jul 2020 13:58:52 GMT):
Hello! I'm new with fabric-sdk-go, and I have searched many articles on how to use the fabric-sdk-go. But I only find the method to use the fabric-sdk-go in fabric solo model. Now, I have the need to use the fabric-sdk-go in fabric kafka model. Can anybody tell me how to use it? Thank you!:smiley:

nasermirzaei89 (Sun, 19 Jul 2020 14:12:21 GMT):
Has joined the channel.

BrettLogan (Sun, 19 Jul 2020 19:01:49 GMT):
Kafka and solo are deprecated in both the 1.4 and 2.x streams. Raft is the ordering service we use today

shenyumin (Mon, 20 Jul 2020 00:53:44 GMT):
Although kafka is deprecated, kafka is needed in my project. I still want to know how to use fabric-sdk-go in kafka model?:woo:

BrettLogan (Mon, 20 Jul 2020 02:37:29 GMT):
What is it you are looking to do with the SDK. The programming models don't have anything to do with the underlying orderer implementation, that's blind to the application developers

shenyumin (Mon, 20 Jul 2020 07:22:53 GMT):
I want to use the SDK to do some experiments with my fabric project. I need the result to write a paper.:grin:

shenyumin (Mon, 20 Jul 2020 07:22:53 GMT):
I want to use the SDK to do some experiments with my fabric project. I need the result to write a paper. :grin:

duwenhui (Tue, 21 Jul 2020 02:22:41 GMT):
Has joined the channel.

Ferrymania (Tue, 21 Jul 2020 06:34:17 GMT):
Has joined the channel.

Yambe (Tue, 21 Jul 2020 18:07:39 GMT):
Hello, Im having troubles to setting up a basic connection between fabric-sdk-go and my hyperledger network, I tried to figured out what's happen and I found the cause, but Im stuck with that. First I create my crypto-material using CA-Server and test it using commands so it works well.

Yambe (Tue, 21 Jul 2020 18:07:39 GMT):
Hello, Im having troubles to setting up a basic connection between fabric-sdk-go and my hyperledger network, I tried to figured out what's happen and I found the cause, but Im stuck with that. First I create my crypto-material using CA-Server and test it using commands so thats part works well. The problem comes from the sdk itself, As I see, when I try to connect a new user the sdk at first look for a cert file in the credentialStore path and later it's suppose to look in the crypto-config folder for a embedded cert, but actually the sdk gets stuck in this method:

Yambe (Tue, 21 Jul 2020 18:07:39 GMT):
Hello, Im having troubles to setting up a basic connection between fabric-sdk-go and my hyperledger network, I tried to figured out what's happen and I found the cause, but Im stuck with that. First I create my crypto-material using CA-Server and test it using commands so thats part works well. The problem comes from the sdk itself, As I see, when I try to connect a new user the sdk at first look for a cert file in the credentialStore path and later it's suppose to look in the crypto-config folder for a embedded cert, but actually the sdk gets stuck in this method:``` `func (fkvs *FileKeyValueStore) Load(key interface{}) (interface{}, error) { file, err := fkvs.keySerializer(key) if err != nil { return nil, err } if _, err1 := os.Stat(file); os.IsNotExist(err1) { return nil, core.ErrKeyValueNotFound }```` This gives me the following error:``` `getting private key from cert failed: Failed getting key for SKI [[132 154 22 16 193 9 32 107 139 123 4 135 29 214 161 230 157 250 154 159 16 115 245 96 129 86 92 189 101 59 235 174]]: Key with SKI 849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae not found in /etc/fabric-network/tmp/msp/keystore` ``` ```

Yambe (Tue, 21 Jul 2020 18:07:39 GMT):
Hello, Im having troubles to setting up a basic connection between fabric-sdk-go and my hyperledger network, I tried to figured out what's happen and I found the cause, but Im stuck with that. First I create my crypto-material using CA-Server and test it using commands so thats part works well. The problem comes from the sdk itself, As I see, when I try to connect a new user the sdk at first look for a cert file in the credentialStore path and later it's suppose to look in the crypto-config folder for a embedded cert, but actually the sdk gets stuck in this method:``` `func (fkvs *FileKeyValueStore) Load(key interface{}) (interface{}, error) { file, err := fkvs.keySerializer(key) if err != nil { return nil, err } if _, err1 := os.Stat(file); os.IsNotExist(err1) { return nil, core.ErrKeyValueNotFound }```` Returning the core.ErrKeyValueNotFound exception :``` `getting private key from cert failed: Failed getting key for SKI [[132 154 22 16 193 9 32 107 139 123 4 135 29 214 161 230 157 250 154 159 16 115 245 96 129 86 92 189 101 59 235 174]]: Key with SKI 849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae not found in /etc/fabric-network/tmp/msp/keystore` ``` `````` The config file say that credentialStore are optional but actually it`s mandatory. I'm confused, I found previous questions asking for the same issue, but they were not resolved. Can someone help me?, please

Yambe (Tue, 21 Jul 2020 18:07:39 GMT):
Hello, Im having troubles to setting up a basic connection between fabric-sdk-go and my hyperledger network, I tried to figured out what's happen and I found the cause, but Im stuck with that. First I create my crypto-material using CA-Server and test it using commands so thats part works well. The problem comes from the sdk itself, As I see, when I try to connect a new user the sdk at first look for a cert file in the credentialStore path and later it's suppose to look in the crypto-config folder for a embedded cert, but actually the sdk gets stuck in this method:``` `func (fkvs *FileKeyValueStore) Load(key interface{}) (interface{}, error) { file, err := fkvs.keySerializer(key) if err != nil { return nil, err } if _, err1 := os.Stat(file); os.IsNotExist(err1) { return nil, core.ErrKeyValueNotFound }```` Returning the core.ErrKeyValueNotFound exception :``` `getting private key from cert failed: Failed getting key for SKI [[132 154 22 16 193 9 32 107 139 123 4 135 29 214 161 230 157 250 154 159 16 115 245 96 129 86 92 189 101 59 235 174]]: Key with SKI 849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae not found in /etc/fabric-network/tmp/msp/keystore` ``` `````` The config file say that credentialStore are optional but actually it`s mandatory. I'm confused, I found previous questions asking for the same issue, but they were not resolved. Can someone help me? please

Yambe (Tue, 21 Jul 2020 18:07:39 GMT):
Hello, Im having troubles to setting up a basic connection between fabric-sdk-go and my hyperledger network, I tried to figured out what's happen and I found the cause, but Im stuck with that. First I create my crypto-material using CA-Server and test it using commands so thats part works well. The problem comes from the sdk itself, As I see, when I try to connect a new user, the sdk at first look for a cert file in the credentialStore path and later it's suppose to look in the crypto-config folder for a embedded cert, but actually the sdk gets stuck in this method:``` `func (fkvs *FileKeyValueStore) Load(key interface{}) (interface{}, error) { file, err := fkvs.keySerializer(key) if err != nil { return nil, err } if _, err1 := os.Stat(file); os.IsNotExist(err1) { return nil, core.ErrKeyValueNotFound }```` Returning the core.ErrKeyValueNotFound exception :``` `getting private key from cert failed: Failed getting key for SKI [[132 154 22 16 193 9 32 107 139 123 4 135 29 214 161 230 157 250 154 159 16 115 245 96 129 86 92 189 101 59 235 174]]: Key with SKI 849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae not found in /etc/fabric-network/tmp/msp/keystore` ``` `````` The config file say that credentialStore are optional but actually it`s mandatory. I'm confused, I found previous questions asking for the same issue, but they were not resolved. Can someone help me? please

Yambe (Tue, 21 Jul 2020 18:07:39 GMT):
Hello, Im having troubles to setting up a basic connection between fabric-sdk-go and my hyperledger network, I tried to figured out what's happen and I found the cause, but Im stuck with that. First I create my crypto-material using CA-Server and test it using commands so thats part works well. The problem comes from the sdk itself, As I see, when I try to connect a new user, the sdk at first look for a cert file in the credentialStore path and later it's suppose to look in the crypto-config folder for a embedded cert, but actually the sdk gets stuck in this method:``` `func (fkvs *FileKeyValueStore) Load(key interface{}) (interface{}, error) { file, err := fkvs.keySerializer(key) if err != nil { return nil, err } if _, err1 := os.Stat(file); os.IsNotExist(err1) { return nil, core.ErrKeyValueNotFound }```` Returning the core.ErrKeyValueNotFound exception :``` `getting private key from cert failed: Failed getting key for SKI [[132 154 22 16 193 9 32 107 139 123 4 135 29 214 161 230 157 250 154 159 16 115 245 96 129 86 92 189 101 59 235 174]]: Key with SKI 849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae not found in /etc/fabric-network/tmp/msp/keystore` ``` My config.yml``` ``` The config file say that credentialStore are optional but actually it`s mandatory. I'm confused, I found previous questions asking for the same issue, but they were not resolved. Can someone help me? please

Yambe (Tue, 21 Jul 2020 18:07:39 GMT):
Hello, Im having troubles to setting up a basic connection between fabric-sdk-go and my hyperledger network, I tried to figured out what's happen and I found the cause, but Im stuck with that. First I create my crypto-material using CA-Server and test it using commands so thats part works well. The problem comes from the sdk itself, As I see, when I try to connect a new user, the sdk at first look for a cert file in the credentialStore path and later it's suppose to look in the crypto-config folder for a embedded cert, but actually the sdk gets stuck in this method:``` `func (fkvs *FileKeyValueStore) Load(key interface{}) (interface{}, error) { file, err := fkvs.keySerializer(key) if err != nil { return nil, err } if _, err1 := os.Stat(file); os.IsNotExist(err1) { return nil, core.ErrKeyValueNotFound }```` Returning the core.ErrKeyValueNotFound exception :``` `getting private key from cert failed: Failed getting key for SKI [[132 154 22 16 193 9 32 107 139 123 4 135 29 214 161 230 157 250 154 159 16 115 245 96 129 86 92 189 101 59 235 174]]: Key with SKI 849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae not found in /etc/fabric-network/tmp/msp/keystore` ``` My config.yml ``` client: # Which organization does this application instance belong to? The value must be the name of an org # defined under "organizations" in configtx organization: OrdererOrg logging: level: info # Root of the MSP directories with keys and certs. cryptoconfig: path: /etc/fabric-network/crypto-config # Some SDKs support pluggable KV stores, the properties under "credentialStore" # are implementation specific credentialStore: # [Optional]. Used by user store. Not needed if all credentials are embedded in configuration # and enrollments are performed elswhere. path: /etc/fabric-network/tmp/store # [Optional]. Specific to the CryptoSuite implementation used by GO SDK. Software-based implementations # requiring a key store. PKCS#11 based implementations does not. cryptoStore: # Specific to the underlying KeyValueStore that backs the crypto key store. path: /etc/fabric-network/tmp/msp ``` The config file say that credentialStore are optional but actually it`s mandatory. I'm confused, I found previous questions asking for the same issue, but they were not resolved. Can someone help me? please

Yambe (Tue, 21 Jul 2020 18:07:39 GMT):
Hello, Im having troubles to setting up a basic connection between fabric-sdk-go and my hyperledger network, I tried to figured out what's happen and I found the cause, but Im stuck with that. First I create my crypto-material using CA-Server and test it using commands so thats part works well. The problem comes from the sdk itself, As I see, when I try to connect a new user, the sdk at first look for a cert file in the credentialStore path and later it's suppose to look in the crypto-config folder for a embedded cert, but actually the sdk gets stuck in this method:``` `func (fkvs *FileKeyValueStore) Load(key interface{}) (interface{}, error) { file, err := fkvs.keySerializer(key) if err != nil { return nil, err } if _, err1 := os.Stat(file); os.IsNotExist(err1) { return nil, core.ErrKeyValueNotFound }```` Returning the core.ErrKeyValueNotFound exception :``` `getting private key from cert failed: Failed getting key for SKI [[132 154 22 16 193 9 32 107 139 123 4 135 29 214 161 230 157 250 154 159 16 115 245 96 129 86 92 189 101 59 235 174]]: Key with SKI 849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae not found in /etc/fabric-network/tmp/msp/keystore` ``` My config.yml ``` client: organization: OrdererOrg logging: level: info # Root of the MSP directories with keys and certs. cryptoconfig: path: /etc/fabric-network/crypto-config # Some SDKs support pluggable KV stores, the properties under "credentialStore" # are implementation specific credentialStore: # [Optional]. Used by user store. Not needed if all credentials are embedded in configuration # and enrollments are performed elswhere. path: /etc/fabric-network/tmp/store # [Optional]. Specific to the CryptoSuite implementation used by GO SDK. Software-based implementations # requiring a key store. PKCS#11 based implementations does not. cryptoStore: # Specific to the underlying KeyValueStore that backs the crypto key store. path: /etc/fabric-network/tmp/msp ``` The config file say that credentialStore are optional but actually it`s mandatory. I'm confused, I found previous questions asking for the same issue, but they were not resolved. Can someone help me? please

mahoney1 (Thu, 23 Jul 2020 08:21:31 GMT):
Reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

Taaanos (Thu, 23 Jul 2020 12:17:24 GMT):
I want to verify if my understanding is correct about the limitations of go sdk with Fabric 2.x. The only thing that is not supported yet is the new lifecycle right? I guess when the SDK is ready, the old lifecycle will be deprecated and we will transition since all sdks will support it.

Yambe (Thu, 23 Jul 2020 22:34:05 GMT):
Hello everybody, Im using fabric sdk go with cryptogen v2. Im trying to register as an existing user on the network, when I do that the sdk try to find the private key of the certificate in "*getPrivateKeyPemFromKeyStore*" method and It looks like functions, doing some operations, ending up finding something like this ``` "/etc/test-network/crypto-config/peerOrganizations/test.com/users/Admin@test.com/msp/keystore/849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae_sk"``` ``` ``` When instead it should find "priv_sk"``` This could be a bug? Someone can report it?``` Thanks for your help ``` ```

Yambe (Thu, 23 Jul 2020 22:34:05 GMT):
Hello everybody, Im using fabric sdk go with cryptogen v2. Im trying to register as an existing user on the network, when I do that the sdk try to find the private key of the certificate in "*getPrivateKeyPemFromKeyStore*" method and It looks like functions, doing some operations, ending up finding something like this ``` "/etc/test-network/crypto-config/peerOrganizations/test.com/users/Admin@test.com/msp/keystore/849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae_sk"``` ``` ``` When instead it should find "priv_sk"``` This could be a bug? Someone can report it?``` Thanks for your help ```

Yambe (Thu, 23 Jul 2020 22:34:05 GMT):
Hello everybody, Im using fabric sdk go with cryptogen v2. Im trying to register as an existing user on the network, when I do that the sdk try to find the private key of the certificate in "*getPrivateKeyPemFromKeyStore*" method and It looks like functions, doing some operations, ending up finding something like this ``` "/etc/test-network/crypto-config/peerOrganizations/test.com/users/Admin@test.com/msp/keystore/849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae_sk"``` ``` When instead it should find "priv_sk"``` This could be a bug? Someone can report it?``` Thanks for your help

Yambe (Thu, 23 Jul 2020 22:34:05 GMT):
Hello everybody, Im using fabric sdk go with cryptogen v2. Im trying to register as an existing user on the network, when I do that the sdk try to find the private key of the certificate in "*getPrivateKeyPemFromKeyStore*" method and It looks like functions, doing some operations, ending up finding something like this "/etc/test-network/crypto-config/peerOrganizations/test.com/users/Admin@test.com/msp/keystore/849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae_sk"``` ``` When instead it should find "priv_sk"``` This could be a bug? Someone can report it?``` Thanks for your help

Yambe (Thu, 23 Jul 2020 22:34:05 GMT):
Hello everybody, Im using fabric sdk go with cryptogen v2. Im trying to register as an existing user on the network, when I do that the sdk try to find the private key of the certificate in "*getPrivateKeyPemFromKeyStore*" method and It looks like functions, doing some operations, ending up finding something like this "/etc/test-network/crypto-config/peerOrganizations/test.com/users/Admin@test.com/msp/keystore/849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae_sk"``` When instead it should find "priv_sk" This could be a bug? Someone can report it?``` Thanks for your help

Yambe (Thu, 23 Jul 2020 22:34:05 GMT):
Hello everybody, Im using fabric sdk go with cryptogen v2. Im trying to register as an existing user on the network, when I do that the sdk try to find the private key of the certificate in "*getPrivateKeyPemFromKeyStore*" method and It looks like functions, doing some operations, ending up finding something like this "/etc/test-network/crypto-config/peerOrganizations/test.com/users/Admin@test.com/msp/keystore/849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae_sk" When instead it should find "priv_sk" This could be a bug? Someone can report it? Thanks for your help

Yambe (Thu, 23 Jul 2020 22:34:05 GMT):
Hello everybody, Im using fabric sdk go with cryptogen v2. Im trying to register as an existing user on the network, when I do that the sdk try to find the private key of the certificate in "*getPrivateKeyPemFromKeyStore*" method and It looks like this function, doing some operations, ending up finding something like this "/etc/test-network/crypto-config/peerOrganizations/test.com/users/Admin@test.com/msp/keystore/849a1610c109206b8b7b04871dd6a1e69dfa9a9f1073f56081565cbd653bebae_sk" When instead it should find "priv_sk" This could be a bug? Someone can report it? Thanks for your help

troyronda (Fri, 24 Jul 2020 17:24:26 GMT):
@Yambe The latest code (on master) looks for priv_sk ... (the latest tag does not have this functionality.)

troyronda (Fri, 24 Jul 2020 17:25:21 GMT):
See https://github.com/hyperledger/fabric-sdk-go/commit/a7b00f76390e69a5a0b3447bc6cc5fd557b4129c

duwenhui (Thu, 30 Jul 2020 01:26:06 GMT):
Hi, a error I met when i invoked by fabric-sdk-go. ```` ```

duwenhui (Thu, 30 Jul 2020 01:26:06 GMT):
Hi, a error I met when i invoked by fabric-sdk-go. ```` {"code":500,"msg":"fail","data":"Event Server Status Code: (10) ENDORSEMENT_POLICY_FAILURE. Description: received invalid transaction" ``` but when i invoked by CLI. it was totally correct. can anyone help me fix this error?

sergeikus (Fri, 31 Jul 2020 09:06:05 GMT):
Hello! I am having an issue with querying private data from ledger. I have a setup with 2 organization and some collections are available only for one org, so in order to query the private data I must target only one organization peers (in my case it is peer0.ea.., and peer1.ea ....) and i specifically do so in the fabric-go-sdk by adding WithEndorsingPeers(....), but for some reason transaction is still endorsed from other organization peer (localhost:9051 which is peer0.auditor..) and receives and error that public hash version is not available. Here is the log first one is the log.Print(*Transaction) and other is response from ledger ``` 2020/07/31 11:53:24 failed to get data from ledger: Failed to evaluate: Transaction processing for endorser [localhost:9051]: Chaincode status Code: (500) UNKNOWN. Description: failed to get private data: GET_STATE failed: transaction ID: c45e4f058bc426c29bc6538be05d96055ac97c1f86ac99c621a215937e88b540: private data matching public hash version is not available. Public hash version = {BlockNum: 8, TxNum: 0}, Private data version = ``` Maybe I am missing something ?

sergeikus (Fri, 31 Jul 2020 09:06:05 GMT):
Hello! I am having an issue with querying private data from ledger. I have a setup with 2 organization and some collections are available only for one org, so in order to query the private data I must target only one organization peers (in my case it is peer0.ea.., and peer1.ea ....) and i specifically do so in the fabric-go-sdk by adding WithEndorsingPeers(....), but for some reason transaction is still endorsed from other organization peer (localhost:9051 which is peer0.auditor..) and receives and error that public hash version is not available. Here is the log first one is the log.Print(*Transaction) and other is response from ledger ``` 2020/07/31 11:53:24 &{0xc0004eee70 0xc00044dc20 [peer0.ea.tiviledge.io:7051 peer1.ea.tiviledge.io:8051] } 2020/07/31 11:53:24 failed to get data from ledger: Failed to evaluate: Transaction processing for endorser [localhost:9051]: Chaincode status Code: (500) UNKNOWN. Description: failed to get private data: GET_STATE failed: transaction ID: c45e4f058bc426c29bc6538be05d96055ac97c1f86ac99c621a215937e88b540: private data matching public hash version is not available. Public hash version = {BlockNum: 8, TxNum: 0}, Private data version = ``` Maybe I am missing something ?

tittuvarghese (Fri, 31 Jul 2020 13:43:54 GMT):
Team, Any good fabric-go-sdk reference implementation available (something similar to balance transfer / magento corp for fabric node sdk)?

atul.agrawal (Sat, 01 Aug 2020 09:56:30 GMT):
Has joined the channel.

basilky (Sat, 01 Aug 2020 12:38:04 GMT):
Fabcar on GoSDK https://github.com/basilky/gosdk-example

volchok60 (Sat, 01 Aug 2020 16:30:11 GMT):
Has joined the channel.

volchok60 (Sat, 01 Aug 2020 16:30:11 GMT):
Hello! What's the difference between Fabric Gateway programming model and the second one (I guess it's Client programming model)?

sergeikus (Sat, 01 Aug 2020 17:46:28 GMT):
Hello! I found the problem with my issue (July 31, 2020) private data issue). The problem is that *Transaction.Evaluate() cant target specific peers, as *Transaction.Submit(). *Transaction.Evaluate() does not have a if condition to add endorsing peers (hyperledger/fabric-sdk-go/pkg/gateway/transaction.go): ``` if txn.endorsingPeers != nil { options = append(options, channel.WithTargetEndpoints(txn.endorsingPeers...)) } ``` This may restrict query of private data as non-authorized organization peer can receive Request transaction and try to read private data from ledger. By adding if clause to *Transaction.Evaluate() everything works as expected. Should I make a pull request to repository or some authorized person will do a commit to fix this ?

sergeikus (Sat, 01 Aug 2020 17:46:28 GMT):
Hello! I found the problem with my issue (July 31, 2020) private data issue). The problem is that \*Transaction.Evaluate() cant target specific peers, as \*Transaction.Submit(). \*Transaction.Evaluate() does not have a if condition to add endorsing peers (hyperledger/fabric-sdk-go/pkg/gateway/transaction.go): ``` if txn.endorsingPeers != nil { options = append(options, channel.WithTargetEndpoints(txn.endorsingPeers...)) } ``` This may restrict query of private data as non-authorized organization peer can receive Request transaction and try to read private data from ledger. By adding if clause to \*Transaction.Evaluate() everything works as expected. Should I make a pull request to repository or some authorized person will do a commit to fix this ?

sergeikus (Sat, 01 Aug 2020 17:46:28 GMT):
Hello! I found the problem with my issue (July 31, 2020) private data issue). The problem is that *Transaction.Evaluate()* cant target specific peers, as *Transaction.Submit()*. *Transaction.Evaluate()* does not have a if condition to add endorsing peers (hyperledger/fabric-sdk-go/pkg/gateway/transaction.go): ``` if txn.endorsingPeers != nil { options = append(options, channel.WithTargetEndpoints(txn.endorsingPeers...)) } ``` This may restrict query of private data as non-authorized organization peer can receive Request transaction and try to read private data from ledger. By adding if clause to *Transaction.Evaluate()* everything works as expected. Should I make a pull request to repository or some authorized person will do a commit to fix this ?

sergeikus (Sat, 01 Aug 2020 17:46:28 GMT):
Hello! I found the problem with my issue (July 31, 2020) private data issue). The problem is that *Transaction.Evaluate()* cant target specific peers, as *Transaction.Submit()*. *Transaction.Evaluate()* does not have a if condition to add endorsing peers (hyperledger/fabric-sdk-go/pkg/gateway/transaction.go): ``` if txn.endorsingPeers != nil { options = append(options, channel.WithTargetEndpoints(txn.endorsingPeers...)) } ``` This may restrict query of private data as non-authorized organization peer can receive Request transaction and try to read private data from ledger. By adding if clause to *Transaction.Evaluate()* everything works as expected. Should I make a merge request to repository or some authorized person will do a commit to fix this ?

sergeikus (Sat, 01 Aug 2020 17:46:28 GMT):
Hello! I found the problem with my issue (July 31, 2020) private data issue). The problem is that *Transaction.Evaluate()* cant target specific peers, as *Transaction.Submit()*. *Transaction.Evaluate()* does not have a if condition to add endorsing peers (hyperledger/fabric-sdk-go/pkg/gateway/transaction.go): ``` if txn.endorsingPeers != nil { options = append(options, channel.WithTargetEndpoints(txn.endorsingPeers...)) } ``` This may restrict query of private data as non-authorized organization peer can receive Request transaction and try to read private data from ledger. By adding if clause to *Transaction.Evaluate()* everything works as expected. Should I make a pull request to repository or some authorized person will do a commit to fix this ?

metadata (Sun, 02 Aug 2020 05:46:55 GMT):
hello All, I guess v2 LSCC support is available now in sdk-go? https://github.com/hyperledger/fabric-sdk-go/commit/7b97fdf0b97a2d0f2086565936a5d6e60df04233

Yambe (Mon, 03 Aug 2020 19:32:21 GMT):
@Yambe The latest code (on master) looks for priv_sk ... (the latest tag does not have this functionality.)

metadata (Wed, 05 Aug 2020 14:53:37 GMT):
hello all, I have few questions related to `gateway/wallet` and `fabric-sdk-go`. 1. If using wallet then Is it mandatory to use `.json` file for connection profile? 2. Can I use `gateway` package with `fabric:v2.2.0`?

metadata (Wed, 05 Aug 2020 14:53:37 GMT):
hello all, I have few questions related to `gateway/wallet` and `fabric-sdk-go`. 1. If using wallet then Is it mandatory to use `.json` file for connection profile? 2. Can I use `gateway` package with `fabric:v2.2.0`? 3. How to use `gateway` package? Can I use `gateway` package to create channel, install and invoke CC? Things are little confusing here because of lack of documentation.

troyronda (Wed, 05 Aug 2020 15:33:49 GMT):
@andrew-coleman

davidkel (Wed, 05 Aug 2020 17:02:10 GMT):
1. Not sure why using a wallet would mandate the connection profile be in json format 2. gateway uses the capabilities of the existing go sdk, so if the go sdk works with fabric 2.2 then I guess it should also work with fabric 2.2 3. The gateway pattern should be similar in it's use to how node and javascript would use them. The gateway api doesn't provide any sort of operational capabilities such as channel creation, chaincode install. It is purely a business level api to make it easier to interact with chaincode transactions, so it can invoke transactions (submit/evaluate) and submit the responses to the orderer (submit)

metadata (Wed, 05 Aug 2020 17:56:05 GMT):
yes it's not mandatory to use `.json` with wallet. found here: https://github.com/hyperledger/fabric-sdk-go/blob/f34cc66b8c69f9b0db8d2b9fdaf513a82945459e/pkg/gateway/example_test.go#L29

metadata (Wed, 05 Aug 2020 17:58:46 GMT):
Thanks @davidkel for answering third question. It's a great insight. Actually I was confuse about the term `New programming Model` that is associated with `gateway` package. I thought that it is different way of using sdk-go from the scratch like creating channel and install/invoke CC.

metadata (Thu, 06 Aug 2020 15:15:08 GMT):
Hello @troyronda , Can I use `{username}.orange.com` instead of `{username}@orange.com` in `connection.yaml`? Is it valid? ``` organizations: Orange: mspid: OrangeMSP # This org's MSP store (absolute path or relative to client.cryptoconfig) cryptoPath: peerOrganizations/orange.com/users/{username}.orange.com/msp ```

metadata (Thu, 06 Aug 2020 15:15:08 GMT):
Hello @troyronda , Can I use `{username}.orange.com` instead of `{username}@orange.com` in `connection.yaml`? Is there any specific naming convention it is looking for? ``` organizations: Orange: mspid: OrangeMSP # This org's MSP store (absolute path or relative to client.cryptoconfig) cryptoPath: peerOrganizations/orange.com/users/{username}.orange.com/msp ``` **tree structure** ``` crypto-config/ordererOrganizations/orange.com/users/Admin.orange.com/ └── msp ├── IssuerPublicKey ├── IssuerRevocationPublicKey ├── cacerts │   └── ca.orange.com-cert.pem ├── config.yaml ├── keystore │   └── 84db7a04c15f0dfa99b676f7580d7e2c64e123028e93eeb85a0a60da8416245b_sk ├── signcerts │   └── cert.pem └── user ```

metadata (Fri, 07 Aug 2020 05:14:28 GMT):
I'm using `fabric-sdk-go:master` branch and when I'm trying to add the dependencies then getting below error. ``` go: finding module for package github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/common/cauthdsl go: github.com/biolink-blockchain/sdkconnector imports github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/common/cauthdsl: package provided by github.com/hyperledger/fabric-sdk-go at latest version v1.0.0-beta2 but not at required version v1.0.0-beta2.0.20200804191816-f34cc66b8c69 ``` package `cauthdsl` is missing? Is it moved to somewhere else?

metadata (Fri, 07 Aug 2020 05:14:28 GMT):
I'm using `fabric-sdk-go:master` branch and when I'm trying to add the dependencies then getting below error. ``` go: finding module for package github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/common/cauthdsl github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/common/cauthdsl: package provided by github.com/hyperledger/fabric-sdk-go at latest version v1.0.0-beta2 but not at required version v1.0.0-beta2.0.20200804191816-f34cc66b8c69 ``` package `cauthdsl` is missing? Is it moved to somewhere else?

metadata (Fri, 07 Aug 2020 07:46:50 GMT):
it has been renamed to `policydsl` from `cauthdsl`.

Rajatsharma (Fri, 07 Aug 2020 13:59:25 GMT):
Has anyone tried using the common/flogging package in user chaincode. We had written a system chaincode and a part of that was shifter to a user chaincode, now we're facing issues with logging. Can anyone suggest me a way to make common/flogging package work in go user chaincode ??

troyronda (Fri, 07 Aug 2020 14:55:27 GMT):
yes

troyronda (Fri, 07 Aug 2020 14:57:41 GMT):
yes. (upstream fabric moved the code into the new policydsl package).

metadata (Sun, 09 Aug 2020 17:15:32 GMT):
Hello @troyronda I'm using 2 peers but static discovery unable to discover both the peers. peers are `peer1.myorg.com` and `peer2.myorg.com` ``` [fabsdk/client] 2020/08/09 16:58:20 UTC - staticdiscovery.(*LocalProvider).CreateLocalDiscoveryService -> DEBU Found 2 peers [fabsdk/client] 2020/08/09 16:58:20 UTC - staticdiscovery.(*LocalProvider).CreateLocalDiscoveryService -> DEBU Adding local peer [peer1.myorg.com:7051] for MSP [MyorgMSP] [fabsdk/client] 2020/08/09 16:58:20 UTC - staticdiscovery.(*LocalProvider).CreateLocalDiscoveryService -> DEBU Adding local peer [peer1.myorg.com:7051] for MSP [MyorgMSP] ``` I'm using `fabric-sdk-go:master`. I'm using `DiscoverLocalPeers` function to get the peers before joining the channel. Is there any alternative to `DiscoverLocalPeer` function?

metadata (Sun, 09 Aug 2020 17:15:32 GMT):
Hello @troyronda I'm using 2 peers but static discovery unable to discover both the peers. peers are `peer1.myorg.com` and `peer2.myorg.com` ``` [fabsdk/client] 2020/08/09 16:58:20 UTC - staticdiscovery.(*LocalProvider).CreateLocalDiscoveryService -> DEBU Found 2 peers [fabsdk/client] 2020/08/09 16:58:20 UTC - staticdiscovery.(*LocalProvider).CreateLocalDiscoveryService -> DEBU Adding local peer [peer1.myorg.com:7051] for MSP [MyorgMSP] [fabsdk/client] 2020/08/09 16:58:20 UTC - staticdiscovery.(*LocalProvider).CreateLocalDiscoveryService -> DEBU Adding local peer [peer1.myorg.com:7051] for MSP [MyorgMSP] ``` I'm using `fabric-sdk-go:master`. I'm using `DiscoverLocalPeers` function to get the peers before joining the channel. Is there any alternative to `DiscoverLocalPeer` function? url: https://github.com/hyperledger/fabric-sdk-go/blob/92e563b577756ea8b64e5b2f60305cfdbfff23af/test/integration/base_test_setup.go#L462

Rajatsharma (Sun, 09 Aug 2020 21:45:18 GMT):
I've tried adding log in v1.4.2 using ``` var logger = flogging.MustGetLogger("my_pvt") logger.Debug("This is Debug Message !!")logger.Info("This is Ienfo Message !!") logger.Critical("This is Critical Message !!") logger.Error("This is Error Message !!") logger.Warning("This is Warning Message !!") ``` I got the output as - ``` 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> INFO 001 This is Ienfo Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 002 This is Critical Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> ERRO 003 This is Error Message !! 2020-08-07 17:55:56.880 UTC [my_pvt] Init -> WARN 004 This is Warning Message !! ``` Is there anyway to get the debug message too. I've tried using "CORE_CHAINCODE_LOGGING_LEVEL=DEBUG", but that's not working for me.

andrew-coleman (Mon, 10 Aug 2020 06:41:42 GMT):
1. Can use JSON or YAML formats 2. Yes, it works 3. No, the gateway package is only for invoking transactions. It is not an admin API

metadata (Mon, 10 Aug 2020 07:05:23 GMT):
thanks @andrew-coleman

jtonline (Mon, 10 Aug 2020 14:21:46 GMT):
Has joined the channel.

metadata (Mon, 10 Aug 2020 14:36:31 GMT):
hello all, I have few questions regarding new lscc. 1. What's the role of `Sequence` in new lscc? 2. Is there any relation between `ccVersion` and `sequence`? 3. Do I have to increase the `Sequence` number if I'm upgrading the chaincode by updating ccVersion ? link: https://github.com/hyperledger/fabric-sdk-go/blob/92e563b577756ea8b64e5b2f60305cfdbfff23af/test/integration/e2e/orgs/multiple_orgs_test.go#L827 @troyronda @andrew-coleman

BrettLogan (Mon, 10 Aug 2020 15:25:37 GMT):
ccVersion allows you to properly version your chaincode, the sequence is used to version the configuration against that chaincode version. So you may want to do something like, update the endorsement policy of a chaincode. Previously you needed to update the version of your chaincode to submit a config update on the chaincode (even if the chaincode hadn't changed). Now you can increment the sequence to change configuration parameters rather than having to update the chaincode version. So it decouple the chaincode from the config

metadata (Mon, 10 Aug 2020 15:28:29 GMT):
ok. So If I made any changes to chaincode then I have to increase the ccVersion and as you mentioned in case of endorsement policies I can update the sequence. Right?

BrettLogan (Mon, 10 Aug 2020 15:28:30 GMT):
So sequence is really the `lifecycle` versioning

BrettLogan (Mon, 10 Aug 2020 15:28:35 GMT):
Correct

metadata (Mon, 10 Aug 2020 15:30:50 GMT):
Thanks @BrettLogan :)

metadata (Mon, 10 Aug 2020 15:31:24 GMT):
@BrettLogan Can you please help with this one too?

BrettLogan (Mon, 10 Aug 2020 15:32:56 GMT):
Are you using the low-level, or the new high-level SDK (using the Gateway) available in master

metadata (Mon, 10 Aug 2020 15:33:19 GMT):
I'm not using gateway package.

metadata (Tue, 11 Aug 2020 06:01:02 GMT):
hello @andrew-coleman Whats the difference between `contract.CreateTransaction` and `contract.SubmitTransaction` in gateway package ? If I say `CreateTransaction` is like `Instatiation` and `SubmitTransaction` is like `Invoke` ? hence `createTransaction` is one time operation and we can use `SubmitTransaction` to store the data to the ledger? Please help

metadata (Tue, 11 Aug 2020 06:01:02 GMT):
hello @andrew-coleman Whats the difference between `contract.CreateTransaction` and `contract.SubmitTransaction` in gateway package ? If I say `CreateTransaction` is like `Instatiation` and `SubmitTransaction` is like `Invoke` ? Am I correct here? hence `createTransaction` is one time operation and we can use `SubmitTransaction` to store the data to the ledger? Please help

BrettLogan (Tue, 11 Aug 2020 20:54:10 GMT):
createTransaction forms and returns a transaction object, it does not submit it. You can then do things like add even listeners to the transaction. You then call Submit on the transaction object. So it looks like this `transaction := contract.CreateTransaction("createCar")` and then you can do `transaction.Submit("arg1","arg2","arg3")` to actually submit the transaction. Whereas `contract.SubmitTransaction` immediately submits the transaction

donnie.stewart (Wed, 12 Aug 2020 00:41:10 GMT):
Has joined the channel.

donnie.stewart (Wed, 12 Aug 2020 00:41:10 GMT):
Hello all, In fabric-samples while running fabcar.go I get an error "Failed to submit transaction: Failed to submit: CreateAndSendTransaction failed: SendTransaction failed: orderers is nil exit status 1" when trying to submit transactions. Tried adding orderers to the connection-org1.yaml file, and wondering if anyone else encountered this issue and found a solution. https://github.com/hyperledger/fabric-samples/blob/master/fabcar/go/fabcar.go

metadata (Wed, 12 Aug 2020 04:55:07 GMT):
thanks @BrettLogan

salmanbaset (Wed, 12 Aug 2020 11:11:15 GMT):
Has joined the channel.

metadata (Wed, 12 Aug 2020 17:50:27 GMT):
Hello all, If anyone tried building a multi-stage docker image of your project which uses latest sdk then please let me know. I'm trying but it's not working. I'm able to create an image using `golang:1.14.6-alpine3.12` and its working fine but still the size is 851MB.

metadata (Wed, 12 Aug 2020 17:50:27 GMT):
Hello all, If anyone tried building a multi-stage docker image of your project which uses latest go-sdk then please let me know. I'm trying but it's not working. I'm able to create an image using `golang:1.14.6-alpine3.12` and its working fine but still the size is 851MB.

metadata (Sun, 16 Aug 2020 09:27:37 GMT):
@BrettLogan @troyronda Could you please help with this issue?

Ferrymania (Mon, 24 Aug 2020 08:49:27 GMT):
Hello,is there a direct method to calculate the total number of transactions on channel by gosdk?

troyronda (Wed, 26 Aug 2020 13:35:57 GMT):
@all We have pushed a new tag for fabric-sdk-go. This version includes the updated v2 chaincode lifecycle functionality.

troyronda (Wed, 26 Aug 2020 13:36:56 GMT):
https://github.com/hyperledger/fabric-sdk-go/releases/tag/v1.0.0-beta3

troyronda (Wed, 26 Aug 2020 13:57:32 GMT):
We would like to followup with the v1.0.0 release. Please try out the above tag.

troyronda (Wed, 26 Aug 2020 13:58:40 GMT):
Also - if you are working on any issues or PRs, please wrap them up :).

tongli (Wed, 26 Aug 2020 15:18:59 GMT):
@troyronda when do you think the 1.0.0 will be out?

tongli (Wed, 26 Aug 2020 15:19:25 GMT):
Thanks for adding the lifecycle functions in.

tongli (Wed, 26 Aug 2020 15:20:21 GMT):
Are all the lifecycle functions in or only a subset of functions in?

fasmat (Wed, 26 Aug 2020 15:53:56 GMT):
Hi everyone! I have a use case where I would like to sign a fabric transaction with the users key offline and send it to the endorser. I know this is possible with the Node SDK: https://github.com/hyperledger/fabric-sdk-node/blob/master/docs/tutorials/sign-transaction-offline.md but can something like this also be done using the fabric-sdk-go?

fasmat (Wed, 26 Aug 2020 16:31:50 GMT):
hey @root10: I'm trying to do the same thing. Have you managed to do an offline transaction with the fabric-go-sdk?

fasmat (Wed, 26 Aug 2020 16:33:51 GMT):
Hi @MHBauer ! I'm also trying to create a transaction offline and forward it to a node similar to how the node sdk is able to do that. Did you figure out how to achiev this with the go sdk?

troyronda (Wed, 26 Aug 2020 17:27:18 GMT):
AFAIK, all of them.

tongli (Wed, 26 Aug 2020 18:04:53 GMT):
@troyronda that is nice, I will try them soon.

BrettLogan (Wed, 26 Aug 2020 18:40:49 GMT):
Very excited to take the 2.0 lifecycle for a spin thanks Troy and team!

garunkumar450 (Fri, 28 Aug 2020 09:55:18 GMT):
how to consume block-events for hlf.2.2 version

garunkumar450 (Fri, 28 Aug 2020 09:57:49 GMT):
@troyronda Hi , how to consume block-events fro hlf.2.2 version conitnuosuly but we are able to consume blocks when evner any block i created but we from specific block .....

garunkumar450 (Fri, 28 Aug 2020 09:57:49 GMT):
@troyronda Hi , how to consume block-events fro hlf.2.2 version conitnuosuly but we are able to consume blocks when evner any block i created but we are also able consume specific block ..... but one issue is we are getting is if 20 blocks are there but need to consume from 10 the block to 11,12,30,,,,,,upto max but we are getting 10 the block remaining blocks are not able to come but when ever block is triggrered we are getting from 21 blocks middle blocks 11-20 BLOCKS are not come

garunkumar450 (Fri, 28 Aug 2020 10:00:41 GMT):
can u please help me on this

pd93 (Fri, 28 Aug 2020 12:06:01 GMT):
@troyronda Any chance you would consider having a look at this? https://jira.hyperledger.org/projects/FABG/issues/FABG-974 Maybe we're missing something, but none of my team can see how it's possible to handle errors gracefully without this

troyronda (Fri, 28 Aug 2020 12:16:39 GMT):
AFAIK, this is a peer and shim behavior rather than a Go SDK behavior.

pd93 (Fri, 28 Aug 2020 12:26:01 GMT):
Ok, no problem. Are you able to point me at someone who works on the peer who might know the answer to this?

tongli (Fri, 28 Aug 2020 15:05:23 GMT):
@troyronda When I tried to get a clientChannelContext, I am getting user not found error. I am using the cryptogen generate the certs for my network and all certs layout is the typical cert structure. but this piece of code fails.

tongli (Fri, 28 Aug 2020 15:05:28 GMT):
``` cert, ok := s.store[id.ID+"@"+id.MSPID] if !ok { return nil, msp.ErrUserNotFound }```

tongli (Fri, 28 Aug 2020 15:06:23 GMT):
I am not quite sure how that works. org name is 'org1.example.com1 and orgAdmin is 'Admin'

tongli (Fri, 28 Aug 2020 15:06:23 GMT):
I am not quite sure how that works. org name is `org1.example.com` and user is `Admin`

tongli (Fri, 28 Aug 2020 15:07:33 GMT):
connection profile (config) file has this

tongli (Fri, 28 Aug 2020 15:07:37 GMT):
```"client": "organization": "org1.example.com" "cryptoconfig": "path": "/home/ubuntu/mywork/vars/keyfiles" ```

tongli (Fri, 28 Aug 2020 15:08:57 GMT):
I think I am missing something minor here. Can you @troyronda @BrettLogan take a look what I am missing here?

tongli (Fri, 28 Aug 2020 15:09:56 GMT):
this is where the code failed.

tongli (Fri, 28 Aug 2020 15:10:03 GMT):
``` clientChannelContext := sdk.ChannelContext(channelID, fabsdk.WithUser(orgAdmin), fabsdk.WithOrg(orgName)) client, err := channel.New(clientChannelContext) ```

tongli (Fri, 28 Aug 2020 15:21:19 GMT):
@BrettLogan @troyronda solved the issue.

tongli (Fri, 28 Aug 2020 15:21:30 GMT):
it was due to a path problem.

tongli (Sun, 30 Aug 2020 15:49:08 GMT):
@troyronda invoked chaincode worked ok but client.Execute wont return until the tx commited to the ledger. Is there any way to do submit the txs but not to wait for it to be committed? Thanks.

metadata (Mon, 31 Aug 2020 07:19:50 GMT):
@tongli try gateway package. `gateway` package is an alternative to invoke and querry the CC. https://github.com/hyperledger/fabric-samples/blob/master/asset-transfer-basic/application-go/assetTransfer.go

tongli (Mon, 31 Aug 2020 12:41:02 GMT):
@metadata that is what I also found after read the source code. Have not tried it yet though.

garunkumar450 (Mon, 31 Aug 2020 14:45:10 GMT):
@troyronda client, err := event.New(clientChannelContext, event.WithBlockEvents(), event.WithSeekType(seek.FromBlock), event.WithBlockNum(260)) This method returns only 260 blocks

garunkumar450 (Mon, 31 Aug 2020 14:45:46 GMT):
but i need remaining blocks continuously up to maximum

garunkumar450 (Mon, 31 Aug 2020 14:46:39 GMT):
we are getting 260 block and when ever block is created it is getting triggered but we have total 500 blocks

metadata (Mon, 31 Aug 2020 15:38:58 GMT):
@tongli I'm using it and you gonna like it. It's more clean and clear.

tongli (Mon, 31 Aug 2020 15:58:54 GMT):
@metadata great. thanks for the info.

tongli (Mon, 31 Aug 2020 16:33:38 GMT):
@metadata, any chance you can share some of code using gateway as examples?

tongli (Mon, 31 Aug 2020 16:33:56 GMT):
will be very much appreciated.

tongli (Mon, 31 Aug 2020 20:07:07 GMT):
@metadata @troyronda tried to gateway to submit transactions , the submitTransaction method wont return until the tx gets committed on the ledger, the behavior is the same in client.Execute, what could be done to simply submit without waiting for it to be committed to the ledger? For a server application, this wait will not work really well.

tongli (Mon, 31 Aug 2020 20:07:07 GMT):
@metadata @troyronda tried to use gateway to submit transactions , the submitTransaction method wont return until the tx gets committed on the ledger, the behavior is the same in client.Execute, what could be done to simply submit without waiting for it to be committed to the ledger? For a server application, this wait will not work really well.

BrettLogan (Tue, 01 Sep 2020 18:19:07 GMT):
Put `go` in front of it to spin off a `goroutine` and make it a non-blocking call

BrettLogan (Tue, 01 Sep 2020 18:20:23 GMT):
You can create functions out of `goroutines` and use waitgroups to manage the size of the `goroutine` pool to limit the maximium number of goroutines executing at once as well

BrettLogan (Tue, 01 Sep 2020 18:20:23 GMT):
You can create functions out of `goroutines` and use `waitgroups` to manage the size of the `goroutine` pool to limit the maximium number of goroutines executing at once as well

tongli (Tue, 01 Sep 2020 18:57:06 GMT):
@BrettLogan I was look for gosdk function which is similar to what nodesdk did like strategy will be blocking or non blocking based on setting.

BrettLogan (Thu, 03 Sep 2020 01:28:32 GMT):
Ah, you are referring to Event strategies...

BrettLogan (Thu, 03 Sep 2020 01:28:32 GMT):
Ah, you are referring to EventHandlerStrategies...

mahoney1 (Thu, 03 Sep 2020 13:54:09 GMT):
Reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community

Jakeeyturner (Mon, 07 Sep 2020 10:13:46 GMT):
Has joined the channel.

schinivision (Tue, 08 Sep 2020 12:03:11 GMT):
Has joined the channel.

schinivision (Tue, 08 Sep 2020 12:06:21 GMT):
Hi Guys. I hope someone can point me in the correct direction. In Particular... is there a limit on how large a history (number of entries) of a key can get? I am kind of irritated of a "magic" number (100k entries in history).. I am somehow stuck on where to look for or in what kind of limitation I am running into? stub.GetHistoryForKey will only return 100k of entries within the iterator.. Am I doing something wrong or am I hitting any sort of limit that I am not aware of?

schinivision (Tue, 08 Sep 2020 12:06:21 GMT):
Hi Guys. I hope someone can point me in the correct direction. In Particular... is there a limit on how large a history (number of entries) of a key can get? I am kind of irritated of a "magic" number (100k entries in history).. I am somehow stuck on where to look for or in what kind of limitation I am running into? stub.GetHistoryForKey will only return 100k of entries within the iterator.. Am I doing something wrong or am I hitting any sort of limit that I am not aware of? Btw. I am on Hyperledger 1.3

krabradosty (Thu, 10 Sep 2020 18:56:04 GMT):
Hi! I'm trying to implement a stateless microservice using go-sdk version 1.0.0-beta3. Microservice gets a private key and certificate via TCP during initialization on startup. So the idea is to not use the local file system at all. It is possible to set up MSP key like this: ``` signIdentity, err := mspClient.CreateSigningIdentity(mspctx.WithPrivateKey(privateKey), mspctx.WithCert(certificate)) ``` But I can't find the interface for doing the same for TLS keys. Is it possible? Maybe some workaround?

krabradosty (Thu, 10 Sep 2020 18:56:04 GMT):
Hi! I'm trying to implement a stateless microservice using go-sdk version 1.0.0-beta3. Microservice gets a private key and certificate via TCP during initialization on startup. So the idea is not to use the local file system at all. It is possible to set up MSP key like this: ``` signIdentity, err := mspClient.CreateSigningIdentity(mspctx.WithPrivateKey(privateKey), mspctx.WithCert(certificate)) ``` But I can't find the interface for doing the same for TLS keys. Is it possible? Maybe some workaround?

kopaygorodsky (Thu, 10 Sep 2020 21:37:37 GMT):
Check Endpoint config, it’s an interface you can override

ascatox (Fri, 11 Sep 2020 12:26:00 GMT):
Hi All! Someone knows if it's possible to develop some kind of interceptors, in order to execute some logic in a a transparent way in each chaincode method, importing a go lib or something of similar?

krabradosty (Fri, 11 Sep 2020 14:57:45 GMT):
@kopaygorodsky I took a look at EndpointConfig interface. It doesn't seem like it has to be used for setting client TLS key. Too much stuff there. Maybe you have a code snippet?

krabradosty (Fri, 11 Sep 2020 16:13:09 GMT):
I found configless test in sdk repo. Looks like it contains everything I need.

lquintai (Mon, 14 Sep 2020 08:23:19 GMT):
Has joined the channel.

nasermirzaei89 (Mon, 14 Sep 2020 18:59:42 GMT):
How can I list certificates (like `fabric-ca-client certificate list`) with go sdk?

tongli (Tue, 15 Sep 2020 01:28:53 GMT):
@BrettLogan that is right Brett.

mahoney1 (Thu, 17 Sep 2020 11:15:07 GMT):
Reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) Agenda: https://wiki.hyperledger.org/display/fabric/Agendas%3A+Fabric+Application+Developer+Community+Call+Meetings - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community

lihuawei (Thu, 17 Sep 2020 16:36:43 GMT):
Has joined the channel.

VadimInshakov (Sat, 19 Sep 2020 14:01:36 GMT):
Hi guys! Firstly, thanks for your work on new lifecycle support. It's big deal. But I have also some questions for you :) Tell me please, can we select separate peers to listen for blocks through the event service? *event.New()* has no such func options. I investigated SDK code and found that event service initialized when we create *FabricSDK instance with peers from channel config, and later (when we do *event.New()*) the cache is used. My case allows for a local patch, but I think this will require rewriting a significant part of SDK. Can you explain if I'm right or if I am missing something?

VadimInshakov (Sat, 19 Sep 2020 14:01:36 GMT):
Hi guys! Firstly, thanks for your work on new lifecycle support. It's big deal. But I have also some questions for you :) Tell me please, can we select separate peers to listen for blocks through the event service? *event.New()* has no such func options. I investigated SDK code and found that event service initialized when we create *FabricSDK* instance with peers from channel config, and later (when we do *event.New()*) the cache is used. My case allows for a local patch, but I think this will require rewriting a significant part of SDK. Can you explain if I'm right or if I am missing something?

VadimInshakov (Sat, 19 Sep 2020 14:01:36 GMT):
Hi guys! Firstly, thanks for your work on new lifecycle support. It's big deal. But I have also some questions for you :) Tell me please, can we select separate peers to listen for blocks through the event service? *event.New()* has no such func options. I investigated SDK code and found that event service client initialized when we create *FabricSDK* instance with peers from channel config, and later (when we do *event.New()*) the cache is used. My case allows for a local patch, but I think this will require rewriting a significant part of SDK. Can you explain if I'm right or if I am missing something?

VadimInshakov (Sat, 19 Sep 2020 14:01:36 GMT):
Hi guys! Firstly, thanks for your work on new lifecycle support. It's big deal. But I have also some questions for you :) Tell me please, can we select separate peers to listen for blocks from the event service? *event.New()* has no such func options. I investigated SDK code and found that event service client initialized when we create *FabricSDK* instance with peers from channel config, and later (when we do *event.New()*) the cache is used. My case allows for a local patch, but I think this will require rewriting a significant part of SDK. Can you explain if I'm right or if I am missing something?

erin-hughes (Mon, 21 Sep 2020 07:59:06 GMT):
Has joined the channel.

nikolas (Mon, 21 Sep 2020 11:26:12 GMT):
Hi, i see the shim.NewLogger is out, is there a doc on how to get a logger on latest golang chaincode?

liuxuancheng412 (Mon, 21 Sep 2020 12:27:19 GMT):
Has joined the channel.

liuxuancheng412 (Mon, 21 Sep 2020 12:41:58 GMT):
#### Title: When I used msp in fabric-sdk-go to register users with CA, an error occurred fabric release-1.4 The error is as follows: ``` Register return error: failed to register user: failed to register user: Response from server: Error Code: 20 - Authentication failure ``` The relevant part of the code is as follows: ```go import ( [...] mspclient "github.com/hyperledger/fabric-sdk-go/pkg/client/msp" [...] ) [...] func RegisterUser(sdk *fabsdk.FabricSDK, info *InitInfo, r *RegistrationRequest) (string, error) { clientContext := sdk.Context(fabsdk.WithUser(info.OrgAdmin), fabsdk.WithOrg(info.OrgName)) if clientContext == nil { return "", fmt.Errorf("根据指定的组织名称与管理员创建资源管理客户端Context失败") } // 创建一个新的msp客户端实例,并返回 c, err := mspclient.New(sdk.Context(), mspclient.WithOrg(info.OrgName)) if err != nil { return "", fmt.Errorf("根据指定的 OrgName 创建 Org MSP 客户端实例失败: %v", err) } request := mspclient.RegistrationRequest{ Name: r.Name, Type: r.Type, MaxEnrollments: r.MaxEnrollments, Affiliation: r.Affiliation, //Attributes: , CAName: r.CAName, Secret: r.Secret, } _, err = c.Register(&request) if err != nil { return "", fmt.Errorf("Register return error:\n %s\n", err) } return "enroll user is completed", nil } ``` In the stack overflow Forum, I also found that someone reported the same error, and some people answered that the user name and password do not match, but my code is a registered user, this reason should not appear. I hope someone can tell me what went wrong. Thank you very much

chanioxaris (Mon, 21 Sep 2020 15:25:54 GMT):
Hello everyone. A quick question. The gateway API is working for both v1.4 and v2 versions, or is only limited to v2?

andrew-coleman (Tue, 22 Sep 2020 09:49:09 GMT):
It should work against both versions of fabric

HarisC (Tue, 22 Sep 2020 13:30:13 GMT):
I am using the gateway package and i am trying to submit a transaction (invoke a contract). Even though the endorsers response are correct (status:200 and expected payload) the whole process fails, with an error that couldn't register a TxStatus event. Any idea on what's wrong and how to fix?

HarisC (Tue, 22 Sep 2020 13:31:36 GMT):
The above fails if the contract status code is correct (200), even on a error contract response works fine

chanioxaris (Tue, 22 Sep 2020 21:12:01 GMT):
Thanks for the reply

paleozogt (Tue, 22 Sep 2020 22:22:25 GMT):
Has joined the channel.

paleozogt (Tue, 22 Sep 2020 22:22:25 GMT):
How can I disable the discovery service? With the node.js sdk, I can do ```await gateway.connect(connectionProfile, { identity: userName, wallet: wallet, discovery: { enabled: false, asLocalhost: false } });```, but I can't see how to turn it off with the golang sdk.

paleozogt (Tue, 22 Sep 2020 22:22:25 GMT):
How can I disable the discovery service? With the node.js sdk, I can do ```await gateway.connect(connectionProfile, { identity: userName, wallet: wallet, discovery: { enabled: false, asLocalhost: false } });``` But I can't see how to turn it off with the golang sdk.

HarisC (Wed, 23 Sep 2020 13:06:12 GMT):
Just a follow up with my issue. It had to do with the connection file for the gateway package. The peer url on connection file was "localhost:7051" and also on peer environmental variables the "CORE_PEER_ADDRESS" was peer0.example.com. So i had to add on my /etc/hosts file, the following line 127.0.0.1 peer0.example.com

andrew-coleman (Thu, 24 Sep 2020 08:40:45 GMT):
You can't turn it off. The Go gateway implementation always uses discovery

andrew-coleman (Thu, 24 Sep 2020 08:42:26 GMT):
do you have the `DISCOVERY_AS_LOCALHOST` environment variable set to `TRUE`? That should avoid the need to change your /etc/hosts file

HarisC (Fri, 25 Sep 2020 14:08:20 GMT):
It didn't fully work, as can't connect to orderer

lihuawei (Sat, 26 Sep 2020 08:06:09 GMT):
hi,when use ledger.QueryBlock, i got error:

lihuawei (Sat, 26 Sep 2020 08:07:41 GMT):
hi,when use ledger.QueryBlock, i got error:``` QueryBlock failed: Transaction processing for endorser [peer2-org1:8051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer2-org1:8051]: connection is in TRANSIENT_FAILURE ``` someone knows why?

lihuawei (Sat, 26 Sep 2020 08:07:41 GMT):

lihuawei (Sat, 26 Sep 2020 08:54:39 GMT):
it is solved with entityMatchers.

lihuawei (Sat, 26 Sep 2020 08:56:43 GMT):
thanks

randyshu (Sun, 27 Sep 2020 08:57:13 GMT):
fabric And fabric-sdk-go are use different version of viper v0.0.0-20150908122457-1967d93db724 & v1.1.1 , and the latter is case insensitive... this can cause some issue when verifying policy

HarisC (Mon, 28 Sep 2020 10:11:06 GMT):
On gateway package, there is a key certificateAuthorities.httpOptions.verify. Is this used anywhere during the gateway operations?

andrew-coleman (Mon, 28 Sep 2020 10:38:43 GMT):
no, the gateway package only deals with submitting transactions. It doesn't interact with the CA

HarisC (Mon, 28 Sep 2020 10:40:49 GMT):
Thats what i thought, thanks for the reply

lihuawei (Tue, 29 Sep 2020 06:44:00 GMT):
in pkg "github.com/hyperledger/fabric-sdk-go/pkg/client/msp",does CreateIdentity overlaps Register?the structs they use are similar,as follows:``` // RegistrationRequest defines the attributes required to register a user with the CA type RegistrationRequest struct { // Name is the unique name of the identity Name string // Type of identity being registered (e.g. "peer, app, user") Type string // MaxEnrollments is the number of times the secret can be reused to enroll. // if omitted, this defaults to max_enrollments configured on the server MaxEnrollments int // The identity's affiliation e.g. org1.department1 Affiliation string // Optional attributes associated with this identity Attributes []Attribute // CAName is the name of the CA to connect to CAName string // Secret is an optional password. If not specified, // a random secret is generated. In both cases, the secret // is returned from registration. Secret string } // IdentityRequest represents the request to add/update identity to the fabric-ca-server type IdentityRequest struct { // The enrollment ID which uniquely identifies an identity (required) ID string // The identity's affiliation (required) Affiliation string // Array of attributes to assign to the user Attributes []Attribute // Type of identity being registered (e.g. 'peer, app, user'). Default is 'user'. Type string // The maximum number of times the secret can be reused to enroll (default CA's Max Enrollment) MaxEnrollments int // The enrollment secret. If not provided, a random secret is generated. Secret string // Name of the CA to send the request to within the Fabric CA server (optional) CAName string } ```

harryheng (Tue, 29 Sep 2020 09:47:16 GMT):
Has joined the channel.

harryheng (Tue, 29 Sep 2020 09:47:17 GMT):
Error: failed to create deliver client for orderer: orderer client failed to connect to orderer0.example.com:7050: failed to create new connection: context deadline exceeded

liuxuancheng412 (Wed, 30 Sep 2020 02:45:58 GMT):
How to use the fabric-sdk-go for user register and enroll, can anyone share the relevant code?

rany (Wed, 30 Sep 2020 06:02:41 GMT):
Has joined the channel.

lihuawei (Wed, 30 Sep 2020 06:21:41 GMT):
there are examples in msp

lihuawei (Wed, 30 Sep 2020 06:22:31 GMT):
there are examples in msp pkg:``` func Example() { ctx := mockClientProvider() // Create msp client c, err := New(ctx) if err != nil { fmt.Println("failed to create msp client") return } username := randomUsername() enrollmentSecret, err := c.Register(&RegistrationRequest{Name: username}) if err != nil { fmt.Printf("Register return error %s\n", err) return } err = c.Enroll(username, WithSecret(enrollmentSecret)) if err != nil { fmt.Printf("failed to enroll user: %s\n", err) return } fmt.Println("enroll user is completed") // Output: enroll user is completed } ```

liuxuancheng412 (Wed, 30 Sep 2020 12:04:08 GMT):
I have seen this example, but I cannot register on my project.So I want to see other people’s registration codes.

VadimInshakov (Tue, 06 Oct 2020 19:31:16 GMT):
Can I get endorsement policy definition for specific chaincode using SDK?

VadimInshakov (Tue, 06 Oct 2020 19:39:06 GMT):
I don't want to use random selection from service discovery client. So I want to retrieve endorsement policy and select peers myself. Is it really impossible?

wunderbarb (Tue, 06 Oct 2020 20:34:11 GMT):
Validate -> WARN ade access denied: channel the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com")

wunderbarb (Wed, 07 Oct 2020 22:27:38 GMT):
I try to use the new gateway package on an existing project that already uses fabric-sdk-go. I struggle to transfer the identity of users that I created using a msp.Client with Register and Enroll and a Fabric CA. Which receiver in pkg/client/msp (or elsewhere) would allow to retrieve the user's cert and private key with calling parameters user ID and the enrollment secret? The fabcar example looks for the cert and private key directly in the local folders. I would like to have a less static solution.

wunderbarb (Thu, 08 Oct 2020 17:02:14 GMT):
THis is a receiver of my own encapsulation

wunderbarb (Thu, 08 Oct 2020 17:02:14 GMT):
THis is a receiver of my own encapsulation `// CreateUser registers and enrolls a new user if it is not yet known by // fabric-ca. name is the public ID of the new user. roleName defines // the expected role in the blockchain ecosystem func (fs *FabricSetup) CreateUser(name string, roleName string) error { var req msp.RegistrationRequest // Creates the context ctxProvider2 := fs.sdk.Context(fabsdk.WithOrg(fs.OrgName)) mspClient, err := msp.New(ctxProvider2) if err != nil { Logr.Fatalf("CreateNewUser: Failed to create new signing client: %v", err) return ErrCreateUser } Logr.Debug("CreateNewUser: created signing client") // checks whether the user is not already known _, err = mspClient.GetIdentity(name) if err == nil { Logr.Infof("%s already exist. Skip the creation.", name) return nil } req.Name = name req.Type = "client" // to be aceptable with OU, it should be client (not user as said in doc) req.Attributes = addAttributes(req.Attributes, "Cert", name) req.Attributes = addAttributes(req.Attributes, "Role", roleName) secret, err := mspClient.Register(&req) if err != nil { Logr.Errorf("could not register %s due to %v", name, err) return ErrCreateUser } Logr.Debugf("createUser %s with %s", name, secret) err = storeSecret(name, secret) if err != nil { Logr.Fatalf("could not store secret in vault: %v", err) return ErrCreateUser } err = mspClient.Enroll(name, msp.WithSecret(secret)) if err != nil { Logr.Errorf("could not enroll %s due to %v", name, err) return ErrCreateUser } Logr.Infof("Created User %s", name) return nil }`

wunderbarb (Thu, 08 Oct 2020 17:02:14 GMT):
This example may perhaps help you. It is is a receiver of my pkg that wraps fabric-sdk-go with my own programming logic. `// CreateUser registers and enrolls a new user if it is not yet known by // fabric-ca. name is the public ID of the new user. roleName defines // the expected role in the blockchain ecosystem func (fs *FabricSetup) CreateUser(name string, roleName string) error { var req msp.RegistrationRequest // Creates the context ctxProvider2 := fs.sdk.Context(fabsdk.WithOrg(fs.OrgName)) mspClient, err := msp.New(ctxProvider2) if err != nil { Logr.Fatalf("CreateNewUser: Failed to create new signing client: %v", err) return ErrCreateUser } Logr.Debug("CreateNewUser: created signing client") // checks whether the user is not already known _, err = mspClient.GetIdentity(name) if err == nil { Logr.Infof("%s already exist. Skip the creation.", name) return nil } req.Name = name req.Type = "client" // to be aceptable with OU, it should be client (not user as said in doc) req.Attributes = addAttributes(req.Attributes, "Cert", name) req.Attributes = addAttributes(req.Attributes, "Role", roleName) secret, err := mspClient.Register(&req) if err != nil { Logr.Errorf("could not register %s due to %v", name, err) return ErrCreateUser } Logr.Debugf("createUser %s with %s", name, secret) err = storeSecret(name, secret) if err != nil { Logr.Fatalf("could not store secret in vault: %v", err) return ErrCreateUser } err = mspClient.Enroll(name, msp.WithSecret(secret)) if err != nil { Logr.Errorf("could not enroll %s due to %v", name, err) return ErrCreateUser } Logr.Infof("Created User %s", name) return nil }` You may forget about roleName as I am using ABAC roles in my chaincodes. The tricky part that took me time to find out was to set Type as "client". The storeSecret is my own vault that securely stores the enrolmentSecret. This secure vault allows to initialize the user by providing the secret in other sessions or and other computers.

wunderbarb (Thu, 08 Oct 2020 17:12:49 GMT):
``` This may perhaps help you. It is a receiver of my pkg that wraps fabric-sdk-go to follow my programming style. ``` ``

wunderbarb (Thu, 08 Oct 2020 17:19:49 GMT):
This example from my pkg wrapping fabric-sdk-go in my own style may help. `// CreateUser registers and enrolls a new user if it is not yet known by // fabric-ca. name is the public ID of the new user. roleName defines // the expected role in the blockchain ecosystem func (fs *FabricSetup) CreateUser(name string, roleName string) error { var req msp.RegistrationRequest // Creates the context ctxProvider2 := fs.sdk.Context(fabsdk.WithOrg(fs.OrgName)) mspClient, err := msp.New(ctxProvider2) if err != nil { Logr.Fatalf("CreateNewUser: Failed to create new signing client: %v", err) return ErrCreateUser } Logr.Debug("CreateNewUser: created signing client") // checks whether the user is not already known _, err = mspClient.GetIdentity(name) if err == nil { Logr.Infof("%s already exist. Skip the creation.", name) return nil } req.Name = name req.Type = "client" // to be aceptable with OU, it should be client (not user as said in doc) req.Attributes = addAttributes(req.Attributes, "Cert", name) req.Attributes = addAttributes(req.Attributes, "Role", roleName) secret, err := mspClient.Register(&req) if err != nil { Logr.Errorf("could not register %s due to %v", name, err) return ErrCreateUser } Logr.Debugf("createUser %s with %s", name, secret) err = storeSecret(name, secret) if err != nil { Logr.Fatalf("could not store secret in vault: %v", err) return ErrCreateUser } err = mspClient.Enroll(name, msp.WithSecret(secret)) if err != nil { Logr.Errorf("could not enroll %s due to %v", name, err) return ErrCreateUser } Logr.Infof("Created User %s", name) return nil }` Forget about roleName. I use ABAC in my chaincodes. The tricky point that took me time to find is to set Type to "client". I store the enrolment secret in a secure persistent vault (storeSecret). When I want to create a new session, I can retrieve the identity, if not available, by enrolling with the secret retrieved from the vault.

wunderbarb (Thu, 08 Oct 2020 17:19:49 GMT):
This example from my pkg wrapping fabric-sdk-go in my own style may help. `// CreateUser registers and enrolls a new user if it is not yet known by // fabric-ca. name is the public ID of the new user. roleName defines // the expected role in the blockchain ecosystem func (fs *FabricSetup) CreateUser(name string, roleName string) error { var req msp.RegistrationRequest // Creates the context ctxProvider2 := fs.sdk.Context(fabsdk.WithOrg(fs.OrgName)) mspClient, err := msp.New(ctxProvider2) if err != nil { Logr.Fatalf("CreateNewUser: Failed to create new signing client: %v", err) return ErrCreateUser } Logr.Debug("CreateNewUser: created signing client") // checks whether the user is not already known _, err = mspClient.GetIdentity(name) if err == nil { Logr.Infof("%s already exist. Skip the creation.", name) return nil } req.Name = name req.Type = "client" // to be aceptable with OU, it should be client (not user as said in doc) req.Attributes = addAttributes(req.Attributes, "Cert", name) req.Attributes = addAttributes(req.Attributes, "Role", roleName) secret, err := mspClient.Register(&req) if err != nil { Logr.Errorf("could not register %s due to %v", name, err) return ErrCreateUser } Logr.Debugf("createUser %s with %s", name, secret) err = storeSecret(name, secret) if err != nil { Logr.Fatalf("could not store secret in vault: %v", err) return ErrCreateUser } err = mspClient.Enroll(name, msp.WithSecret(secret)) if err != nil { Logr.Errorf("could not enroll %s due to %v", name, err) return ErrCreateUser } Logr.Infof("Created User %s", name) return nil }` Forget about roleName. I use ABAC in my chaincodes. The tricky point that took me time to find is to set Type to "client". I store the enrollment secret in a secure persistent vault (storeSecret). When I want to create a new session, I can retrieve the identity, if not available, by enrolling with the secret retrieved from the vault.

wunderbarb (Thu, 08 Oct 2020 17:19:49 GMT):
This example from my pkg wrapping fabric-sdk-go in my own style may help. `// CreateUser registers and enrolls a new user if it is not yet known by // fabric-ca. name is the public ID of the new user. roleName defines // the expected role in the blockchain ecosystem func (fs *FabricSetup) CreateUser(name string, roleName string) error { var req msp.RegistrationRequest` // Creates the context ctxProvider2 := fs.sdk.Context(fabsdk.WithOrg(fs.OrgName)) mspClient, err := msp.New(ctxProvider2) if err != nil { Logr.Fatalf("CreateNewUser: Failed to create new signing client: %v", err) return ErrCreateUser } Logr.Debug("CreateNewUser: created signing client") // checks whether the user is not already known _, err = mspClient.GetIdentity(name) if err == nil { Logr.Infof("%s already exist. Skip the creation.", name) return nil } req.Name = name req.Type = "client" // to be aceptable with OU, it should be client (not user as said in doc) req.Attributes = addAttributes(req.Attributes, "Cert", name) req.Attributes = addAttributes(req.Attributes, "Role", roleName) secret, err := mspClient.Register(&req) if err != nil { Logr.Errorf("could not register %s due to %v", name, err) return ErrCreateUser } Logr.Debugf("createUser %s with %s", name, secret) err = storeSecret(name, secret) if err != nil { Logr.Fatalf("could not store secret in vault: %v", err) return ErrCreateUser } err = mspClient.Enroll(name, msp.WithSecret(secret)) if err != nil { Logr.Errorf("could not enroll %s due to %v", name, err) return ErrCreateUser } Logr.Infof("Created User %s", name) return nil }` Forget about roleName. I use ABAC in my chaincodes. The tricky point that took me time to find is to set Type to "client". I store the enrollment secret in a secure persistent vault (storeSecret). When I want to create a new session, I can retrieve the identity, if not available, by enrolling with the secret retrieved from the vault.

wunderbarb (Thu, 08 Oct 2020 17:19:49 GMT):
This example from my pkg wrapping fabric-sdk-go in my own style may help. // CreateUser registers and enrolls a new user if it is not yet known by // fabric-ca. name is the public ID of the new user. roleName defines // the expected role in the blockchain ecosystem func (fs *FabricSetup) CreateUser(name string, roleName string) error { var req msp.RegistrationRequest // Creates the context ctxProvider2 := fs.sdk.Context(fabsdk.WithOrg(fs.OrgName)) mspClient, err := msp.New(ctxProvider2) if err != nil { Logr.Fatalf("CreateNewUser: Failed to create new signing client: %v", err) return ErrCreateUser } Logr.Debug("CreateNewUser: created signing client") // checks whether the user is not already known _, err = mspClient.GetIdentity(name) if err == nil { Logr.Infof("%s already exist. Skip the creation.", name) return nil } req.Name = name req.Type = "client" // to be aceptable with OU, it should be client (not user as said in doc) req.Attributes = addAttributes(req.Attributes, "Cert", name) req.Attributes = addAttributes(req.Attributes, "Role", roleName) secret, err := mspClient.Register(&req) if err != nil { Logr.Errorf("could not register %s due to %v", name, err) return ErrCreateUser } Logr.Debugf("createUser %s with %s", name, secret) err = storeSecret(name, secret) if err != nil { Logr.Fatalf("could not store secret in vault: %v", err) return ErrCreateUser } err = mspClient.Enroll(name, msp.WithSecret(secret)) if err != nil { Logr.Errorf("could not enroll %s due to %v", name, err) return ErrCreateUser } Logr.Infof("Created User %s", name) return nil }` Forget about roleName. I use ABAC in my chaincodes. The tricky point that took me time to find is to set Type to "client". I store the enrollment secret in a secure persistent vault (storeSecret). When I want to create a new session, I can retrieve the identity, if not available, by enrolling with the secret retrieved from the vault.

kopaygorodsky (Thu, 08 Oct 2020 19:53:42 GMT):
use WithTargetEndpoints()

kopaygorodsky (Thu, 08 Oct 2020 19:53:42 GMT):
WithTargetEndpoints allows overriding of the target peers for the request

kingaj (Thu, 08 Oct 2020 21:21:28 GMT):
Has joined the channel.

kingaj (Thu, 08 Oct 2020 21:22:31 GMT):
having the same issue reported in https://stackoverflow.com/questions/55811937/getting-error-not-enough-arguments-in-call-to-s-statsd-sendloop-when-running .. any progress on that?

wunderbarb (Fri, 09 Oct 2020 01:16:18 GMT):
I have written code that extracts the cert and private key from the user keystore (credentialStore:Path in the config.yaml). I was not able to find a deterministic way to find the private key xxxxxx_sk associated to a given cert user@Org1MSP-cert.pem. Currently, I select the xxxx_sk that has been created the nearest from the creation time of the cert. It seems to work. Nevertheless, is there a deterministic method to find the _sk associated to a given user cert while in the keystore?

wunderbarb (Fri, 09 Oct 2020 01:19:06 GMT):
The private keys in the gateway.Wallet are in the clear, am I right? The PEM seems to indicate that ---BEGIN PRIVATE KEY--- and not the PEM header of a private key. If it is the case, is theer any plan to write a version of the wallet that would encrypt the

wunderbarb (Fri, 09 Oct 2020 01:19:06 GMT):
The private keys in the gateway.Wallet are in the clear, am I right? The PEM seems to indicate that ---BEGIN PRIVATE KEY--- and not the PEM header of a private key. If it is the case, is there any plan to write a version of the wallet that would encrypt the private key? Or, do I have to write my own version? In that case, should I employ the WalletStore interface?

kopaygorodsky (Sat, 10 Oct 2020 23:29:39 GMT):
right after you enrolled a user, you can get it's SigningIdentity by id, in that SingingIdentity there is SKI() which you can use to build filename and look for a key SKI()_sk in keystore. There is no way right now to encode private key from SigningIdentity.

lzev (Sun, 11 Oct 2020 01:50:55 GMT):
Has joined the channel.

Fuzzy-sh (Sun, 11 Oct 2020 10:28:49 GMT):
Has joined the channel.

Fuzzy-sh (Sun, 11 Oct 2020 10:28:49 GMT):
Hello, currently I could build a network through hyperledger fabric. I used to work by node.js transactions. however, I wanna use GO Lang. I don't know how to config the network to use the GO lang. I am totally new in this field. really appreciate it if you can help me where to start.

skulos (Mon, 12 Oct 2020 13:14:09 GMT):
Has joined the channel.

wunderbarb (Tue, 13 Oct 2020 00:44:17 GMT):
Thanks PrivateKey().SKI() does perfectly the job. I can now populate automatically the wallet for any user that was enrolled with the CA, as long as I have the enrollment secret. I wrote a "secure" vault that stores these secrets in an encrypted form. I am worried to have the private key of a user in the clear in a persistent "wallet". This would be an easy target for any attacker. _It is also true for th keys in key store. _

bestbeforetoday (Tue, 13 Oct 2020 09:34:24 GMT):
The file-system wallet does store its data in cleartext. You could provide your own WalletStore implementation that encrypts data going into the wallet and decrypts it on the way out, but you'll need to consider how you secure the secrets used to do this decryption

bestbeforetoday (Tue, 13 Oct 2020 09:35:59 GMT):
If the WalletStore approach is not convenient for you then you have the option of managing the credential storage yourself and then inserting them into an in-memory wallet at the point you connect the Gateway to avoid having a wallet persist your credentials

negupta (Tue, 13 Oct 2020 12:51:58 GMT):
Has joined the channel.

negupta (Tue, 13 Oct 2020 12:51:58 GMT):
Running the go application in the asset-transfer-basic sample.

negupta (Tue, 13 Oct 2020 12:52:13 GMT):
However, the app fails with the following error:

negupta (Tue, 13 Oct 2020 12:52:22 GMT):
`2020/10/13 08:50:04 --> Submit Transaction: InitLedger, function creates the initial set of assets on the ledger 2020/10/13 08:50:04 Failed to Submit transaction: Failed to submit: CreateAndSendTransaction failed: SendTransaction failed: calling orderer 'localhost:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [localhost:7050]: connection is in TRANSIENT_FAILURE exit status 1`

andrew-coleman (Tue, 13 Oct 2020 15:39:47 GMT):
@negupta that has hopefully been fixed by this PR: https://github.com/hyperledger/fabric-sdk-go/pull/150

negupta (Tue, 13 Oct 2020 17:32:25 GMT):
@andrew-coleman Thanks. Can I pick that up now, or do I need to wait for a new tag?

wunderbarb (Tue, 13 Oct 2020 21:08:19 GMT):
Thanks. The second option seems to be a variant of the first, excepted that it can use any "proprietary" format for the persistent storage and "feed" the decrypted data in the Wallet format for in memory. In both cases, the encryption/decryption key needs protection. I foresee to use a passphrase that is then KDFed as this key. The passphrase may then be either user-provided, or even provided by a Yubikey-like solution. Is there any plan by the fabric-sdk-go team to offer such securization?

andrew-coleman (Wed, 14 Oct 2020 08:45:57 GMT):
@negupta you can pick up the latest commit, use: `go get github.com/hyperledger/fabric-sdk-go@9c426dc`

negupta (Wed, 14 Oct 2020 18:30:04 GMT):
Thanks, everthing works now

skulos (Thu, 15 Oct 2020 06:21:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fmWyBk7oGvfdjjAas) I'm new to the Hyperledger "Greenhouse" too, but ... if I'm not mistaken the Fabric Peers have the means to process Go Chaincodes. You don't need tore configure the network. That's a architectural redesign that's not gonna fix your problem. You should just use the Go SDK to submit transactions. Or just submit Go code via the peer binary. Check out this quote: ``` The SDK serves as a shim to package the transaction proposal into the properly architected format (protocol buffer over gRPC) and takes the user’s cryptographic credentials to produce a unique signature for this transaction proposal. ``` ( https://hyperledger-fabric.readthedocs.io/en/latest/txflow.html )

skulos (Thu, 15 Oct 2020 06:21:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fmWyBk7oGvfdjjAas) I'm new to the Hyperledger "Greenhouse" too, but ... if I'm not mistaken the Fabric Peers have the means to process Go Chaincodes. You don't need to reconfigure the network. That's a architectural redesign that's not gonna fix your problem. You should just use the Go SDK to submit transactions. Or just submit Go code via the peer binary. Check out this quote: ``` The SDK serves as a shim to package the transaction proposal into the properly architected format (protocol buffer over gRPC) and takes the user’s cryptographic credentials to produce a unique signature for this transaction proposal. ``` ( https://hyperledger-fabric.readthedocs.io/en/latest/txflow.html )

skulos (Thu, 15 Oct 2020 06:21:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fmWyBk7oGvfdjjAas) I'm new to the Hyperledger "Greenhouse" too, but @Fuzzy-sh ... if I'm not mistaken the Fabric Peers have the means to process Go Chaincodes. You don't need to reconfigure the network. That's a architectural redesign that's not gonna fix your problem. You should just use the Go SDK to submit transactions. Or just submit Go code via the peer binary. Check out this quote: ``` The SDK serves as a shim to package the transaction proposal into the properly architected format (protocol buffer over gRPC) and takes the user’s cryptographic credentials to produce a unique signature for this transaction proposal. ``` ( https://hyperledger-fabric.readthedocs.io/en/latest/txflow.html )

sergeikus (Thu, 15 Oct 2020 10:03:36 GMT):
Hello! I have almost the same problem as negupta, but with minor caviat. I have whole ledger network on one instance (orderers, peers, CAs) and trying to submit transaction from other instance (client application), but unfortunately receive same resposne: ``` Failed to submit: CreateAndSendTransaction failed: SendTransaction failed: calling orderer '127.0.0.1:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [127.0.0.1:7050]: connection is in TRANSIENT_FAILURE ``` I assume that the problem is that my client is trying to send transaction to localhost (maybe) and I need to specify orderer(s) url in ccp.yaml (connection profile) does my theory makes any sense or it's a different issue. This is with latest commit on "hyperledger/fabric-sdk-go@master". PS: EvaluateTransaction works as expected and I am able to receive data from peers.

sergeikus (Fri, 16 Oct 2020 07:43:21 GMT):
Oke, so I noticed that even if I provide orderers to `entityMatchers:` url is still ignored and defaults to 127.0.0.1, and looks like only solution for now (and for me) is to use `channels:` field with specified orderers.

BrettLogan (Tue, 20 Oct 2020 04:12:52 GMT):
Is this with the high level gateway model? Or the low level SDK? If the former, have you set `export DISCOVERY_AS_LOCALHOST=false`

BrettLogan (Tue, 20 Oct 2020 04:13:06 GMT):
On the system, or done it in code `err := os.Setenv("DISCOVERY_AS_LOCALHOST", "false")`

sergeikus (Tue, 20 Oct 2020 11:30:52 GMT):
This is with high level gateway, and no, I have not set `export DISCOVERY_AS_LOCALHOST=false`, but looks like this would solve my problem.

SivaramKannan (Tue, 27 Oct 2020 06:51:07 GMT):
Has joined the channel.

zhenbing (Wed, 04 Nov 2020 06:18:51 GMT):
Has joined the channel.

guihongyuinb (Mon, 09 Nov 2020 08:54:05 GMT):
Has joined the channel.

guihongyuinb (Mon, 09 Nov 2020 08:55:37 GMT):
fabric v2.2v1.0.0-beta3

guihongyuinb (Mon, 09 Nov 2020 08:58:27 GMT):
fabric : v2.2 fabric-sdk-go:v1.0.0-beta3 I have a problem in use fabric-sdk-go to invoke chaincode ,problem is :Failed to invoke: orderers is nil but i can query chaincode ,and in confi.yaml ,orderers is exist help me please, thank you

nkl199 (Mon, 09 Nov 2020 14:47:00 GMT):
Has joined the channel.

nkl199 (Mon, 09 Nov 2020 14:49:25 GMT):
A query does not require the orderer, so it appears that you are able to connect to the peer. If the network does *not* use discovery, then the orderer may be incorrect or missing in the connection profile, if using discovery there might be an issue in the anchor peer

nkl199 (Mon, 09 Nov 2020 14:55:50 GMT):
Are you using a "gateway" connection?

andrew-coleman (Mon, 09 Nov 2020 15:00:38 GMT):
Are you using the gateway package to submit the transaction? If so, there has been a recent bug fix and you need to pick up the latest commit from master branch

czl1378 (Thu, 12 Nov 2020 12:25:53 GMT):
Has joined the channel.

czl1378 (Thu, 12 Nov 2020 12:25:53 GMT):
Hello, guys.

czl1378 (Thu, 12 Nov 2020 12:26:39 GMT):
I'm always get this: ` [fabsdk/fab] 2020/11/12 12:21:08 UTC - connection.(*DeliverConnection).Receive -> WARN Received error from stream: [rpc error: code = Unavailable desc = transport is closing]. Sending disconnected event. [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: rpc error: code = Unavailable desc = transport is closing [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).monitorConnection -> WARN Event: &{%!s(bool=false) rpc error: code = Unavailable desc = transport is closing} [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).monitorConnection -> WARN Attempting to reconnect... [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).reconnect -> INFO Event client has reconnected [fabsdk/fab] 2020/11/12 12:22:28 UTC - connection.(*DeliverConnection).Receive -> WARN Received error from stream: [rpc error: code = Unavailable desc = transport is closing]. Sending disconnected event. [fabsdk/fab] 2020/11/12 12:22:28 UTC - client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: rpc error: code = Unavailable desc = transport is closing [fabsdk/fab] 2020/11/12 12:22:28 UTC - client.(*Client).monitorConnection -> WARN Event: &{%!s(bool=false) rpc error: code = Unavailable desc = transport is closing} `

czl1378 (Thu, 12 Nov 2020 12:26:39 GMT):
*I'm always getting this warning, but it doesn't affect use. I don't know why?* ``` : ` [fabsdk/fab] 2020/11/12 12:21:08 UTC - connection.(*DeliverConnection).Receive -> WARN Received error from stream: [rpc error: code = Unavailable desc = transport is closing]. Sending disconnected event. [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: rpc error: code = Unavailable desc = transport is closing [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).monitorConnection -> WARN Event: &{%!s(bool=false) rpc error: code = Unavailable desc = transport is closing} [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).monitorConnection -> WARN Attempting to reconnect... [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).reconnect -> INFO Event client has reconnected [fabsdk/fab] 2020/11/12 12:22:28 UTC - connection.(*DeliverConnection).Receive -> WARN Received error from stream: [rpc error: code = Unavailable desc = transport is closing]. Sending disconnected event. [fabsdk/fab] 2020/11/12 12:22:28 UTC - client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: rpc error: code = Unavailable desc = transport is closing [fabsdk/fab] 2020/11/12 12:22:28 UTC - client.(*Client).monitorConnection -> WARN Event: &{%!s(bool=false) rpc error: code = Unavailable desc = transport is closing} `

czl1378 (Thu, 12 Nov 2020 12:26:39 GMT):
*I'm always getting this warning, but it doesn't affect use. I don't know why?* ``` [fabsdk/fab] 2020/11/12 12:21:08 UTC - connection.(*DeliverConnection).Receive -> WARN Received error from stream: [rpc error: code = Unavailable desc = transport is closing]. Sending disconnected event. [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: rpc error: code = Unavailable desc = transport is closing [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).monitorConnection -> WARN Event: &{%!s(bool=false) rpc error: code = Unavailable desc = transport is closing} [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).monitorConnection -> WARN Attempting to reconnect... [fabsdk/fab] 2020/11/12 12:21:08 UTC - client.(*Client).reconnect -> INFO Event client has reconnected [fabsdk/fab] 2020/11/12 12:22:28 UTC - connection.(*DeliverConnection).Receive -> WARN Received error from stream: [rpc error: code = Unavailable desc = transport is closing]. Sending disconnected event. [fabsdk/fab] 2020/11/12 12:22:28 UTC - client.(*Client).monitorConnection -> WARN Event client has disconnected. Details: rpc error: code = Unavailable desc = transport is closing [fabsdk/fab] 2020/11/12 12:22:28 UTC - client.(*Client).monitorConnection -> WARN Event: &{%!s(bool=false) rpc error: code = Unavailable desc = transport is closing} `

lihuawei (Sun, 15 Nov 2020 01:23:23 GMT):
我猜测,可能是你的sdk所使用的连接配置文件缺失orderer的信息导致。

lihuawei (Sun, 15 Nov 2020 01:26:00 GMT):
maybe the connection.yaml you use lack ordere's info, I think. hope this hepls you

lihuawei (Sun, 15 Nov 2020 01:26:40 GMT):
maybe the connection.yaml you use lack ordere's info, I think. hope this helps you

lihuawei (Sun, 15 Nov 2020 01:32:29 GMT):
f1、遇到错误: Failed to submit transaction: Failed to submit: CreateAndSendTransaction failed: SendTransaction failed: orderers is nil 解决方法:向"connection-org1.yaml"中增加: # # [Optional]. A logical description of each network channel; its peer and # orderer names and their roles within the channel. The physical details of # these components (e.g. peer IP addresses) will be specified later in the # profile; we focus first on the logical, and then the physical. # channels: # # [Optional]. papernet is the only channel in this connection profile # mychannel: # # [Optional]. Channel orderers for PaperNet. Details of how to connect to # them is specified later, under the physical "orderers:" section # orderers: # # [Required]. Orderer logical name # - orderer.example.com # # [Optional]. Peers and their roles # peers: # # [Required]. Peer logical name # peer0.org1.example.com: # # [Optional]. Is this an endorsing peer? (It must have chaincode # installed.) Default: true # endorsingPeer: true # # [Optional]. Is this peer used for query? (It must have chaincode # installed.) Default: true # chaincodeQuery: true # # [Optional]. Is this peer used for non-chaincode queries? All peers # support these types of queries, which include queryBlock(), # queryTransaction(), etc. Default: true # ledgerQuery: true # # [Optional]. Is this peer used as an event hub? All peers can produce # events. Default: true # eventSource: true client: organization: Org1 connection: timeout: peer: endorser: '300' organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com certificateAuthorities: - ca.org1.example.com # # [Optional]. Orderer physical information, by orderer name # orderers: # # [Required]. Name of MagnetoCorp orderer # orderer.example.com: # # [Required]. This orderer's IP address # url: grpc://localhost:7050 #tlsCACerts: # # [Optional]. gRPC connection properties used for communication # grpcOptions: ssl-target-name-override: orderer.example.com

decatluther (Tue, 17 Nov 2020 10:31:15 GMT):
Has joined the channel.

sergeikus (Tue, 17 Nov 2020 12:26:57 GMT):
so I tried to set `DISCOVERY_AS_LOCALHOST=false` and it won't help :( Currently only solution for me is still specifying `channels:` and `orderers:` inside connection-profile

wunderbarb (Tue, 17 Nov 2020 22:13:53 GMT):
Migrating a gateway test from local-docker network to a cloud-based docker network. When calling a query with traditional SDK interface (typical connection.yaml), it works. The same query via the gateway (connection-org1.yaml) fails with the message `Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE` I use the same parameters for the peer0 and CA in both SDK connection file and gateway connection file. In the gateway configuration, the DISCOVERY_AS_LOCALHOST is false. The description of peer0 and ca in connection.yaml is `peers: peer0.org1.example.com: # this URL is used to send endorsement and query requests # url: grpcs://peer0.org1.example.com:7051 url: xx.xxx.xx.xx:7051 grpcOptions: ssl-target-name-override: peer0.org1.example.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: false tlsCACerts: pem: | -----BEGIN CERTIFICATE----- MIICSzCCAfGgAwIBAgIUGRQX3jATQA1qXy5Oqsy9f7AhTbQwCgYIKoZIzj0EAwIw gYExCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMSQwIgYDVQQHExtT b255IFBpY3R1cmVzIEVudGVydGFpbm1lbnQxGTAXBgNVBAoTEG9yZzEuZXhhbXBs ZS5jb20xHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjAxMTE3MjEx NzAwWhcNMzUxMTE0MjExNzAwWjCBgTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh bGlmb3JuaWExJDAiBgNVBAcTG1NvbnkgUGljdHVyZXMgRW50ZXJ0YWlubWVudDEZ MBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3JnMS5leGFt cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFPUC3xfETntlbQaByo2 ClBAH0ZTVdMDkPMCmaWsdNVknmwlQgimbFRLvoAkM8+cpQy884CB5Uhi8gB+g3RP 3u2jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1Ud DgQWBBSTy2BP0mwb22BdW9p3G+grv5XOLDAKBggqhkjOPQQDAgNIADBFAiEA3HOX 4KHm0zSDmhNw0PrSA/WSCKtbYgTF8J5JUvKrxiICIH1a7IW+8K9Z1en1wtUBpczH Iewu6cXzVuW1ykdkCU5Y -----END CERTIFICATE----- certificateAuthorities: ca.org1.example.com: url: https://xx.xxx.xx.xxx:7054 grpcOptions: ssl-target-name-override: ca.org1.example.com httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw # [Optional] The optional name of the CA. # caName: ca-org1 tlsCACerts: pem: - | -----BEGIN CERTIFICATE----- MIICSzCCAfGgAwIBAgIUGRQX3jATQA1qXy5Oqsy9f7AhTbQwCgYIKoZIzj0EAwIw gYExCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMSQwIgYDVQQHExtT b255IFBpY3R1cmVzIEVudGVydGFpbm1lbnQxGTAXBgNVBAoTEG9yZzEuZXhhbXBs ZS5jb20xHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjAxMTE3MjEx NzAwWhcNMzUxMTE0MjExNzAwWjCBgTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh bGlmb3JuaWExJDAiBgNVBAcTG1NvbnkgUGljdHVyZXMgRW50ZXJ0YWlubWVudDEZ MBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3JnMS5leGFt cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFPUC3xfETntlbQaByo2 ClBAH0ZTVdMDkPMCmaWsdNVknmwlQgimbFRLvoAkM8+cpQy884CB5Uhi8gB+g3RP 3u2jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1Ud DgQWBBSTy2BP0mwb22BdW9p3G+grv5XOLDAKBggqhkjOPQQDAgNIADBFAiEA3HOX 4KHm0zSDmhNw0PrSA/WSCKtbYgTF8J5JUvKrxiICIH1a7IW+8K9Z1en1wtUBpczH Iewu6cXzVuW1ykdkCU5Y -----END CERTIFICATE-----`

wunderbarb (Tue, 17 Nov 2020 22:13:53 GMT):
Migrating a gateway test from local-docker network to a cloud-based docker network. When calling a query with traditional SDK interface (typical connection.yaml), it works. The same query via the gateway (connection-org1.yaml) fails with the message `Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE` I use the same parameters for the peer0 and CA in both SDK connection file and gateway connection file. In the gateway configuration, the DISCOVERY_AS_LOCALHOST is false. The description of peer0 and ca in connection.yaml is ``peers: peer0.org1.example.com: # this URL is used to send endorsement and query requests # url: grpcs://peer0.org1.example.com:7051 url: xx.xxx.xx.xx:7051 grpcOptions: ssl-target-name-override: peer0.org1.example.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: false tlsCACerts: pem: | -----BEGIN CERTIFICATE----- MIICSzCCAfGgAwIBAgIUGRQX3jATQA1qXy5Oqsy9f7AhTbQwCgYIKoZIzj0EAwIw gYExCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMSQwIgYDVQQHExtT b255IFBpY3R1cmVzIEVudGVydGFpbm1lbnQxGTAXBgNVBAoTEG9yZzEuZXhhbXBs ZS5jb20xHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjAxMTE3MjEx NzAwWhcNMzUxMTE0MjExNzAwWjCBgTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh bGlmb3JuaWExJDAiBgNVBAcTG1NvbnkgUGljdHVyZXMgRW50ZXJ0YWlubWVudDEZ MBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3JnMS5leGFt cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFPUC3xfETntlbQaByo2 ClBAH0ZTVdMDkPMCmaWsdNVknmwlQgimbFRLvoAkM8+cpQy884CB5Uhi8gB+g3RP 3u2jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1Ud DgQWBBSTy2BP0mwb22BdW9p3G+grv5XOLDAKBggqhkjOPQQDAgNIADBFAiEA3HOX 4KHm0zSDmhNw0PrSA/WSCKtbYgTF8J5JUvKrxiICIH1a7IW+8K9Z1en1wtUBpczH Iewu6cXzVuW1ykdkCU5Y -----END CERTIFICATE----- certificateAuthorities: ca.org1.example.com: url: https://xx.xxx.xx.xxx:7054 grpcOptions: ssl-target-name-override: ca.org1.example.com httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw # [Optional] The optional name of the CA. # caName: ca-org1 tlsCACerts: pem: - | -----BEGIN CERTIFICATE----- MIICSzCCAfGgAwIBAgIUGRQX3jATQA1qXy5Oqsy9f7AhTbQwCgYIKoZIzj0EAwIw gYExCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMSQwIgYDVQQHExtT b255IFBpY3R1cmVzIEVudGVydGFpbm1lbnQxGTAXBgNVBAoTEG9yZzEuZXhhbXBs ZS5jb20xHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjAxMTE3MjEx NzAwWhcNMzUxMTE0MjExNzAwWjCBgTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh bGlmb3JuaWExJDAiBgNVBAcTG1NvbnkgUGljdHVyZXMgRW50ZXJ0YWlubWVudDEZ MBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3JnMS5leGFt cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFPUC3xfETntlbQaByo2 ClBAH0ZTVdMDkPMCmaWsdNVknmwlQgimbFRLvoAkM8+cpQy884CB5Uhi8gB+g3RP 3u2jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1Ud DgQWBBSTy2BP0mwb22BdW9p3G+grv5XOLDAKBggqhkjOPQQDAgNIADBFAiEA3HOX 4KHm0zSDmhNw0PrSA/WSCKtbYgTF8J5JUvKrxiICIH1a7IW+8K9Z1en1wtUBpczH Iewu6cXzVuW1ykdkCU5Y -----END CERTIFICATE-----`` The same elements in the connection-org1.yaml:``

wunderbarb (Tue, 17 Nov 2020 22:13:53 GMT):
Migrating a gateway test from local-docker network to a cloud-based docker network. When calling a query with traditional SDK interface (typical connection.yaml), it works. The same query via the gateway (connection-org1.yaml) fails with the message `Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE` I use the same parameters for the peer0 and CA in both SDK connection file and gateway connection file. In the gateway configuration, the DISCOVERY_AS_LOCALHOST is false. The description of peer0 and ca in connection.yaml is `peers: peer0.org1.example.com: # this URL is used to send endorsement and query requests` # url: grpcs://peer0.org1.example.com:7051 url: xx.xxx.xx.xx:7051 grpcOptions: ssl-target-name-override: peer0.org1.example.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: false tlsCACerts: pem: | -----BEGIN CERTIFICATE----- MIICSzCCAfGgAwIBAgIUGRQX3jATQA1qXy5Oqsy9f7AhTbQwCgYIKoZIzj0EAwIw gYExCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMSQwIgYDVQQHExtT b255IFBpY3R1cmVzIEVudGVydGFpbm1lbnQxGTAXBgNVBAoTEG9yZzEuZXhhbXBs ZS5jb20xHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjAxMTE3MjEx NzAwWhcNMzUxMTE0MjExNzAwWjCBgTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh bGlmb3JuaWExJDAiBgNVBAcTG1NvbnkgUGljdHVyZXMgRW50ZXJ0YWlubWVudDEZ MBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3JnMS5leGFt cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFPUC3xfETntlbQaByo2 ClBAH0ZTVdMDkPMCmaWsdNVknmwlQgimbFRLvoAkM8+cpQy884CB5Uhi8gB+g3RP 3u2jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1Ud DgQWBBSTy2BP0mwb22BdW9p3G+grv5XOLDAKBggqhkjOPQQDAgNIADBFAiEA3HOX 4KHm0zSDmhNw0PrSA/WSCKtbYgTF8J5JUvKrxiICIH1a7IW+8K9Z1en1wtUBpczH Iewu6cXzVuW1ykdkCU5Y -----END CERTIFICATE----- certificateAuthorities: ca.org1.example.com: url: https://xx.xxx.xx.xxx:7054 grpcOptions: ssl-target-name-override: ca.org1.example.com httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw # [Optional] The optional name of the CA. # caName: ca-org1 tlsCACerts: pem: - | -----BEGIN CERTIFICATE----- MIICSzCCAfGgAwIBAgIUGRQX3jATQA1qXy5Oqsy9f7AhTbQwCgYIKoZIzj0EAwIw gYExCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMSQwIgYDVQQHExtT b255IFBpY3R1cmVzIEVudGVydGFpbm1lbnQxGTAXBgNVBAoTEG9yZzEuZXhhbXBs ZS5jb20xHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjAxMTE3MjEx NzAwWhcNMzUxMTE0MjExNzAwWjCBgTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh bGlmb3JuaWExJDAiBgNVBAcTG1NvbnkgUGljdHVyZXMgRW50ZXJ0YWlubWVudDEZ MBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3JnMS5leGFt cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFPUC3xfETntlbQaByo2 ClBAH0ZTVdMDkPMCmaWsdNVknmwlQgimbFRLvoAkM8+cpQy884CB5Uhi8gB+g3RP 3u2jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1Ud DgQWBBSTy2BP0mwb22BdW9p3G+grv5XOLDAKBggqhkjOPQQDAgNIADBFAiEA3HOX 4KHm0zSDmhNw0PrSA/WSCKtbYgTF8J5JUvKrxiICIH1a7IW+8K9Z1en1wtUBpczH Iewu6cXzVuW1ykdkCU5Y -----END CERTIFICATE-----`` The same elements in the connection-org1.yaml:``

wunderbarb (Tue, 17 Nov 2020 22:13:53 GMT):
Migrating a gateway test from local-docker network to a cloud-based docker network. When calling a query with traditional SDK interface (typical connection.yaml), it works. The same query via the gateway (connection-org1.yaml) fails with the message `Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE` I use the same parameters for the peer0 and CA in both SDK connection file and gateway connection file. In the gateway configuration, the DISCOVERY_AS_LOCALHOST is false. The description of peer0 and ca in connection.yaml is `peers: peer0.org1.example.com: # this URL is used to send endorsement and query requests` # url: grpcs://peer0.org1.example.com:7051 url: xx.xxx.xx.xx:7051 grpcOptions: ssl-target-name-override: peer0.org1.example.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: false tlsCACerts: pem: | -----BEGIN CERTIFICATE----- MIICSzCCAfGgAwIBAgIUGRQX3jATQA1qXy5Oqsy9f7AhTbQwCgYIKoZIzj0EAwIw gYExCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMSQwIgYDVQQHExtT b255IFBpY3R1cmVzIEVudGVydGFpbm1lbnQxGTAXBgNVBAoTEG9yZzEuZXhhbXBs ZS5jb20xHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjAxMTE3MjEx NzAwWhcNMzUxMTE0MjExNzAwWjCBgTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh bGlmb3JuaWExJDAiBgNVBAcTG1NvbnkgUGljdHVyZXMgRW50ZXJ0YWlubWVudDEZ MBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3JnMS5leGFt cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFPUC3xfETntlbQaByo2 ClBAH0ZTVdMDkPMCmaWsdNVknmwlQgimbFRLvoAkM8+cpQy884CB5Uhi8gB+g3RP 3u2jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1Ud DgQWBBSTy2BP0mwb22BdW9p3G+grv5XOLDAKBggqhkjOPQQDAgNIADBFAiEA3HOX 4KHm0zSDmhNw0PrSA/WSCKtbYgTF8J5JUvKrxiICIH1a7IW+8K9Z1en1wtUBpczH Iewu6cXzVuW1ykdkCU5Y -----END CERTIFICATE----- certificateAuthorities: ca.org1.example.com: url: https://xx.xxx.xx.xxx:7054 grpcOptions: ssl-target-name-override: ca.org1.example.com httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw # [Optional] The optional name of the CA. # caName: ca-org1 tlsCACerts: pem: - | -----BEGIN CERTIFICATE----- MIICSzCCAfGgAwIBAgIUGRQX3jATQA1qXy5Oqsy9f7AhTbQwCgYIKoZIzj0EAwIw gYExCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMSQwIgYDVQQHExtT b255IFBpY3R1cmVzIEVudGVydGFpbm1lbnQxGTAXBgNVBAoTEG9yZzEuZXhhbXBs ZS5jb20xHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjAxMTE3MjEx NzAwWhcNMzUxMTE0MjExNzAwWjCBgTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh bGlmb3JuaWExJDAiBgNVBAcTG1NvbnkgUGljdHVyZXMgRW50ZXJ0YWlubWVudDEZ MBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3JnMS5leGFt cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFPUC3xfETntlbQaByo2 ClBAH0ZTVdMDkPMCmaWsdNVknmwlQgimbFRLvoAkM8+cpQy884CB5Uhi8gB+g3RP 3u2jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1Ud DgQWBBSTy2BP0mwb22BdW9p3G+grv5XOLDAKBggqhkjOPQQDAgNIADBFAiEA3HOX 4KHm0zSDmhNw0PrSA/WSCKtbYgTF8J5JUvKrxiICIH1a7IW+8K9Z1en1wtUBpczH Iewu6cXzVuW1ykdkCU5Y -----END CERTIFICATE-----`` The same elements in the connection-org1.yaml:

wunderbarb (Tue, 17 Nov 2020 22:13:53 GMT):
Migrating a gateway test from local-docker network to a cloud-based docker network. When calling a query with traditional SDK interface (typical connection.yaml), it works. The same query via the gateway (connection-org1.yaml) fails with the message `Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE` I use the same parameters for the peer0 and CA in both SDK connection file and gateway connection file. In the gateway configuration, the DISCOVERY_AS_LOCALHOST is false.

wunderbarb (Tue, 17 Nov 2020 22:13:53 GMT):
Migrating a gateway test from local-docker network to a cloud-based docker network. When calling a query with traditional SDK interface (typical connection.yaml), it works. The same query via the gateway (connection-org1.yaml) fails with the message `Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE` I use the same parameters for the peer0 and CA in both SDK connection file and gateway connection file. In the gateway configuration, the DISCOVERY_AS_LOCALHOST is false. THe connection-org1.yaml is ```` peers: peer0.org1.example.com: url: grpcs://54.184.79.225:7051 tlsCACerts: path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/tlsca.org1.example.com-cert.pem grpcOptions: ssl-target-name-override: peer0.org1.example.com hostnameOverride: peer0.org1.example.com certificateAuthorities: ca.org1.example.com: url: https://54.184.79.225:7054 caName: ca-Org1 tlsCACerts: pem: # Certificate location absolute path path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/ca.org1.example.com-cert.pem httpOptions: verify: false ``` `

wunderbarb (Tue, 17 Nov 2020 22:13:53 GMT):
Migrating a gateway test from local-docker network to a cloud-based docker network. When calling a query with traditional SDK interface (typical connection.yaml), it works. The same query via the gateway (connection-org1.yaml) fails with the message `Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE` I use the same parameters for the peer0 and CA in both SDK connection file and gateway connection file. In the gateway configuration, the DISCOVERY_AS_LOCALHOST is false. THe connection-org1.yaml is ```` peers: peer0.org1.example.com: url: grpcs://xxx.xxx.xxx.xxx:7051 tlsCACerts: path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/tlsca.org1.example.com-cert.pem grpcOptions: ssl-target-name-override: peer0.org1.example.com hostnameOverride: peer0.org1.example.com certificateAuthorities: ca.org1.example.com: url: https://54.184.79.225:7054 caName: ca-Org1 tlsCACerts: pem: # Certificate location absolute path path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/ca.org1.example.com-cert.pem httpOptions: verify: false ``` ` and for the connection.yaml it is quasi the same:```` peers: peer0.org1.example.com: url: xxx.xxx.xxx.xxx:7051 grpcOptions: ssl-target-name-override: peer0.org1.example.com # These parameters should be set in coordination with the keepalive policy on the server, # as incompatible settings can result in closing of connection. # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs allow-insecure: false tlsCACerts: # # Certificate location absolute path path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/tlsca.org1.example.com-cert.pem # # # Fabric-CA is a special kind of Certificate Authority provided by Hyperledger Fabric which allows # certificate management to be done via REST APIs. Application may choose to use a standard # Certificate Authority instead of Fabric-CA, in which case this section would not be specified. # certificateAuthorities: ca.org1.example.com: url: https://54.184.79.225:7054 grpcOptions: ssl-target-name-override: ca.org1.example.com httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw tlsCACerts: path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/ca.org1.example.com-cert.pem ``` ` The xxx.xxx.xxx.xxx represents the IP address. The TLS certificates have the IP address in the SAN. What am I missing?

wunderbarb (Tue, 17 Nov 2020 22:13:53 GMT):
Migrating a gateway test from local-docker network to a cloud-based docker network. When calling a query with traditional SDK interface (typical connection.yaml), it works. The same query via the gateway (connection-org1.yaml) fails with the message `Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE` I use the same parameters for the peer0 and CA in both SDK connection file and gateway connection file. In the gateway configuration, the DISCOVERY_AS_LOCALHOST is false. THe connection-org1.yaml is ```` peers: peer0.org1.example.com: url: grpcs://xxx.xxx.xxx.xxx:7051 tlsCACerts: path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/tlsca.org1.example.com-cert.pem grpcOptions: ssl-target-name-override: peer0.org1.example.com hostnameOverride: peer0.org1.example.com certificateAuthorities: ca.org1.example.com: url: https://xxx.xxx.xxx.xxx:7054 caName: ca-Org1 tlsCACerts: path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/ca.org1.example.com-cert.pem httpOptions: verify: false ``` ` and for the connection.yaml it is quasi the same:```` peers: peer0.org1.example.com: url: xxx.xxx.xxx.xxx:7051 grpcOptions: ssl-target-name-override: peer0.org1.example.com keep-alive-time: 0s keep-alive-timeout: 20s keep-alive-permit: false fail-fast: false allow-insecure: false tlsCACerts: path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/tlsca.org1.example.com-cert.pem certificateAuthorities: ca.org1.example.com: url: https://xxx.xxx.xxx.xxx:7054 grpcOptions: ssl-target-name-override: ca.org1.example.com httpOptions: verify: false registrar: enrollId: admin enrollSecret: adminpw tlsCACerts: path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/ca.org1.example.com-cert.pem ``` ` The xxx.xxx.xxx.xxx represents the IP address. The TLS certificates have the IP address in the SAN. What am I missing?

tatsu-sato (Tue, 17 Nov 2020 22:43:00 GMT):
Has joined the channel.

andrew-coleman (Wed, 18 Nov 2020 07:19:53 GMT):
This has been fixed recently, but is not yet in the latest tagged release. Use `go get github.com/hyperledger/fabric-sdk-go@9c426dc`

tongli (Wed, 18 Nov 2020 16:39:37 GMT):
node sdk will load connection profile with embedded certs specified in pem. But go sdk does not seem to support that. Can any one confirm if that is the case?

andrew-coleman (Thu, 19 Nov 2020 09:42:08 GMT):
It does. Take a look at the fabcar sample in go https://github.com/hyperledger/fabric-samples/tree/master/fabcar/go That uses the same ccp as the node and Java samples with embedded certs

tongli (Thu, 19 Nov 2020 12:14:57 GMT):
@andrew-coleman will take a look. Thanks

tongli (Thu, 19 Nov 2020 17:02:37 GMT):
@andrew-coleman thanks for the pointer. The issue was that the ca certs were not an array in other format, that was the cause of the error. Once it was changed to array, things started working.

wunderbarb (Fri, 20 Nov 2020 17:29:56 GMT):
Andrew, I tried with this version. I still have the issue. If I perform the same query using the "usual" query transaction and it works. When using the gateway's `EvaluateTransaction` for the same contract and same remote network, it fails. If it may help, the corresponding test trace.``` `blockchain test suite v1.50b-11-17 === RUN Test_Remote1_Query Test 1: Remote1_Query [fabsdk/core] 2020/11/20 17:21:41 UTC - cryptosuite.GetDefault -> INFO No default cryptosuite found, using default SW implementation client_test.go:66: Error Trace: client_test.go:66 Error: Received unexpected error: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE Transaction processing for endorser [peer0.org1.example.com:7051] github.com/hyperledger/fabric-sdk-go/pkg/fab/peer.(*peerEndorser).ProcessTransactionProposal /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-beta3.0.20201006151309-9c426dcc5096/pkg/fab/peer/peerendorser.go:108 github.com/hyperledger/fabric-sdk-go/pkg/fab/peer.(*Peer).ProcessTransactionProposal /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-beta3.0.20201006151309-9c426dcc5096/pkg/fab/peer/peer.go:216 github.com/hyperledger/fabric-sdk-go/pkg/fab/txn.SendProposal.func1 /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-beta3.0.20201006151309-9c426dcc5096/pkg/fab/txn/proposal.go:122 runtime.goexit /usr/lib/go-1.15/src/runtime/asm_amd64.s:1374 Failed to evaluate github.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Transaction).Evaluate /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-beta3.0.20201006151309-9c426dcc5096/pkg/gateway/transaction.go:96 github.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Contract).EvaluateTransaction /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-beta3.0.20201006151309-9c426dcc5096/pkg/gateway/contract.go:54 github.com/wunderbarb/blockchain.(*Client).Query /home/eric/Dev/github.com/blockchain/client.go:101 github.com/wunderbarb/blockchain.Test_Remote1_Query /home/eric/Dev/github.com/blockchain/client_test.go:65 testing.tRunner /usr/lib/go-1.15/src/testing/testing.go:1127 runtime.goexit /usr/lib/go-1.15/src/runtime/asm_amd64.s:1374 Test: Test_Remote1_Query --- FAIL: Test_Remote1_Query (0.50s) FAIL` ``` What do I do wrongly?

wunderbarb (Fri, 20 Nov 2020 17:38:16 GMT):
Interestingly, when using `SubmitTransaction`, it works. Would the bug corrected in `SubmitTransaction `still be present in `EvaluateTransaction`?

sidoussou (Mon, 23 Nov 2020 23:26:45 GMT):
Has joined the channel.

randyshu (Fri, 27 Nov 2020 02:26:53 GMT):

Clipboard - 2020年11月27日上午10点26分

randyshu (Fri, 27 Nov 2020 02:28:11 GMT):
Hi,everyone I'm looking for a good way to beauty the output of go-sdk,any suggestion will be appreciate .

randyshu (Mon, 30 Nov 2020 09:49:14 GMT):
Hi, everyone: when I approve chaincode definition,it need a peer info, but I didn't find api to get org peers, Any suggestion ?

sxguan (Tue, 01 Dec 2020 03:39:56 GMT):
Has joined the channel.

sxguan (Tue, 01 Dec 2020 03:39:57 GMT):
`func approveCC(packageID string, ccName, ccVersion string, sequence int64, channelID string, orgs []*OrgInfo, ordererEndpoint string) error { ccPolicy := policydsl.SignedByAnyMember([]string{"Org1MSP"}) approveCCReq := resmgmt.LifecycleApproveCCRequest{ Name: ccName, Version: ccVersion, PackageID: packageID, Sequence: sequence, EndorsementPlugin: "escc", ValidationPlugin: "vscc", SignaturePolicy: ccPolicy, InitRequired: true, } for _, org := range orgs{ if _, err := org.OrgResMgmt.LifecycleApproveCC(channelID, approveCCReq, resmgmt.WithTargets(org.Peers ...), resmgmt.WithOrdererEndpoint(ordererEndpoint), resmgmt.WithRetry(retry.DefaultResMgmtOpts));err != nil { fmt.Errorf("LifecycleApproveCC error: %v", err) } } return nil }`

sxguan (Tue, 01 Dec 2020 03:40:30 GMT):
LifecycleCheckCCCommitReadiness cc = mycc, = {map[Org1MSP:false Org2MSP:false]}

sxguan (Tue, 01 Dec 2020 03:40:48 GMT):
approve failed

sxguan (Tue, 01 Dec 2020 03:41:17 GMT):
what's wrong with my code?

arner (Tue, 01 Dec 2020 13:16:27 GMT):
Has joined the channel.

arner (Tue, 01 Dec 2020 13:16:28 GMT):
Hi all, now that the Node SDK does not maintain features for administrating a network, I'm looking for alternatives. The Go SDK seems to have everything I need, especially when combined with the fabric-config packages. But it's in beta. So I have 2 questions: 1. when is the SDK scheduled for GA? 2. Are the admin features (create and join channels, update config tx) planned to stay and continue to be updated?

randyshu (Wed, 02 Dec 2020 09:27:22 GMT):
hi, I use chaincoelifecycle and when commit cc I got this error "panic: error registering for TxStatus event: no peers to connect to" environment : version : fabric2.3.0 operation: commit chaincode definition

randyshu (Wed, 02 Dec 2020 09:28:27 GMT):

Clipboard - 2020年12月2日下午5点28分

randyshu (Wed, 02 Dec 2020 09:28:27 GMT):

Clipboard - 2020年12月2日下午5点28分

randyshu (Wed, 02 Dec 2020 09:34:18 GMT):
just ignore above issue , i fix it by call defer sdk.close().

randyshu (Wed, 02 Dec 2020 09:54:41 GMT):
Hi all, i usually get this error "panic: error registering for TxStatus event: no peers to connect to" environment: fabric version: v2.3.0 operation: one of "queryCommitedCCDifinition,approveCCDefinition,checkCommitCCReadiness,commitCC" can cause above error.

troyronda (Wed, 02 Dec 2020 14:18:01 GMT):
@arner We plan to retain the admin features. In terms of a 1.0 release, I would expect the SDK to be fairly close. Currently we are mainly monitoring for stability and any remaining bug fixes.

troyronda (Wed, 02 Dec 2020 14:18:39 GMT):
@andrew-coleman do you also consider the gateway features complete?

andrew-coleman (Wed, 02 Dec 2020 14:20:06 GMT):
yes

andrew-coleman (Thu, 03 Dec 2020 14:11:19 GMT):
Release Candidate 1 is now available https://github.com/hyperledger/fabric-sdk-go/releases/tag/v1.0.0-rc1

tongli (Thu, 03 Dec 2020 14:25:25 GMT):
@andrew-coleman thanks very much for working on the sdk.

tongli (Thu, 03 Dec 2020 14:25:48 GMT):
Especially the gateway piece is easy to use.

tongli (Thu, 03 Dec 2020 14:26:46 GMT):
Tip my hat to all the contributors of this sdk. Really appreciate all your effort and support.

tongli (Thu, 03 Dec 2020 14:27:32 GMT):
Looking forward to the release of the 1.0.0

wunderbarb (Fri, 04 Dec 2020 00:38:19 GMT):
Hi, I still struggle with using the gateway API with a remote server. I ahve implemented the same invoke and query with the gateway SDK and the traditional SDK. When working with a local blockchain, they all work. When using the "traditional" API, both invoke and query work with the remote server. But the gateway invoke (SubmitTRansaction) and query (EvaluateTransaction) fail. For the invoke, I get the following error message ```` [fabsdk/client] 2020/12/04 00:32:30 UTC - greylist.(*Filter).Greylist -> INFO Greylisting peer peer0.org1.example.com:7051 [fabsdk/client] 2020/12/04 00:32:30 UTC - greylist.(*Filter).Accept -> INFO Rejecting peer peer0.org1.example.com:7051 client_test.go:65: Error Trace: client_test.go:65 Error: Received unexpected error: Discovery status Code: (11) UNKNOWN. Description: error getting endorsers: no endorsement combination can be satisfied Failed to submit github.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Transaction).Submit /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/transaction.go:128 github.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Contract).SubmitTransaction /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/contract.go:73 ``` `

wunderbarb (Fri, 04 Dec 2020 00:38:19 GMT):
Hi, I still struggle with using the gateway API with a remote server. I ahve implemented the same invoke and query with the gateway SDK and the traditional SDK. When working with a local blockchain, they all work. When using the "traditional" API, both invoke and query work with the remote server. But the gateway invoke (SubmitTRansaction) and query (EvaluateTransaction) fail. For the invoke, I get the following error message ```` [fabsdk/client] 2020/12/04 00:32:30 UTC - greylist.(*Filter).Greylist -> INFO Greylisting peer peer0.org1.example.com:7051 [fabsdk/client] 2020/12/04 00:32:30 UTC - greylist.(*Filter).Accept -> INFO Rejecting peer peer0.org1.example.com:7051 client_test.go:65: Error Trace: client_test.go:65 Error: Received unexpected error: Discovery status Code: (11) UNKNOWN. Description: error getting endorsers: no endorsement combination can be satisfied Failed to submit github.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Transaction).Submit /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/transaction.go:128 github.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Contract).SubmitTransaction /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/contract.go:73 ``` ` I am using the v1.0.0-rc1. The DISCOVERY_AS_LOCALHOST is false. Where is my mistake?

andrew-coleman (Fri, 04 Dec 2020 09:09:10 GMT):
Is `peer0.org1.example.com` the address of your remote peer? Is there anything relevant in the peer logs? Can you share your client code?

wunderbarb (Fri, 04 Dec 2020 17:18:43 GMT):
The blockchain is running on an AWS instance. The address of peer0.org1.example.com is an actual raw IP address (_I know it is bad, but for dev it is convenient_). Thus, the config file holds the IP address as ```` peers: peer0.org1.example.com: url: grpcs://xx.xxx.xx.xxx:7051 tlsCACerts: path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/tlsca.org1.example.com-cert.pem grpcOptions: ssl-target-name-override: peer0.org1.example.com hostnameOverride: peer0.org1.example.com ``` ` When initiating the invoke, the peer log shows the following: ```` 2020-12-04 17:10:27.139 UTC [endorser] callChaincode -> INFO 12a finished chaincode: cscc duration: 0ms channel=mychannel txID=8583c8bb 2020-12-04 17:10:27.140 UTC [comm.grpc.server] 1 -> INFO 12b unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.request_deadline=2020-12-04T17:13:26.983Z grpc.peer_address=45.19.166.193:12620 grpc.code=OK grpc.call_duration=1.549283ms 2020-12-04 17:10:36.258 UTC [comm.grpc.server] 1 -> INFO 12c unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2020-12-04T17:10:51.257Z grpc.peer_address=45.19.166.193:12620 grpc.code=OK grpc.call_duration=589.818µs 2020-12-04 17:10:36.311 UTC [comm.grpc.server] 1 -> INFO 12d unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2020-12-04T17:10:51.31Z grpc.peer_address=45.19.166.193:12620 grpc.code=OK grpc.call_duration=430.221µs ``` `

wunderbarb (Fri, 04 Dec 2020 17:18:43 GMT):
The blockchain is running on an AWS instance. The address of peer0.org1.example.com is an actual raw IP address (_I know it is bad, but for dev it is convenient_). May that be the issue? It works fine with the traditional SDK. Thus, the config file holds the IP address as ```` peers: peer0.org1.example.com: url: grpcs://xx.xxx.xx.xxx:7051 tlsCACerts: path: ${HOME}/Dev/github.com/blockchain/testdata/confRemote/tlsca.org1.example.com-cert.pem grpcOptions: ssl-target-name-override: peer0.org1.example.com hostnameOverride: peer0.org1.example.com ``` ` When initiating the invoke, the peer log shows the following: ```` 2020-12-04 17:10:27.139 UTC [endorser] callChaincode -> INFO 12a finished chaincode: cscc duration: 0ms channel=mychannel txID=8583c8bb 2020-12-04 17:10:27.140 UTC [comm.grpc.server] 1 -> INFO 12b unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.request_deadline=2020-12-04T17:13:26.983Z grpc.peer_address=45.19.166.193:12620 grpc.code=OK grpc.call_duration=1.549283ms 2020-12-04 17:10:36.258 UTC [comm.grpc.server] 1 -> INFO 12c unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2020-12-04T17:10:51.257Z grpc.peer_address=45.19.166.193:12620 grpc.code=OK grpc.call_duration=589.818µs 2020-12-04 17:10:36.311 UTC [comm.grpc.server] 1 -> INFO 12d unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2020-12-04T17:10:51.31Z grpc.peer_address=45.19.166.193:12620 grpc.code=OK grpc.call_duration=430.221µs ``` ` For the Query, it claims that the peer is in TRANSIENT_FAILURE. For the source code of the client, it is part of a larger pkg that wraps both the traditional SDK (with admin) and gateway SDK with my own configuration handling. I will extract the minimal set to make it is easier to examine as I guess that you may need the gateway client establishment code also. If complexity is not an issue, I can give access to the full pkg source. Thanks for the help.

troyronda (Fri, 04 Dec 2020 18:15:17 GMT):
@here Cross-posted from mailing list: https://lists.hyperledger.org/g/fabric/message/9367 With a release candidate available, we are now entering a “last call” phase for fabric-sdk-go v1.0.0. We would kindly request that any further changes or fixes for v1.0.0 to be contributed by the end of the year (Dec 31, 2020).

HansrajRami (Fri, 04 Dec 2020 21:57:21 GMT):
Has joined the channel.

james-wallis (Mon, 07 Dec 2020 10:44:46 GMT):
Has joined the channel.

randyshu (Tue, 08 Dec 2020 03:04:36 GMT):

Clipboard - 2020年12月8日上午11点04分

randyshu (Tue, 08 Dec 2020 03:05:32 GMT):
hi,all : I use fabric-sdk-go@v1.0.0-rc1 ,but the package is not what i really want. the ccpackager is not complete.

randyshu (Tue, 08 Dec 2020 03:06:27 GMT):

Clipboard - 2020年12月8日上午11点06分

randyshu (Tue, 08 Dec 2020 03:06:44 GMT):
and this is go.mod

gabrielodi (Thu, 10 Dec 2020 15:30:04 GMT):
Has joined the channel.

gabrielodi (Fri, 11 Dec 2020 19:21:22 GMT):
Hello all I am finding difficulties to understand how to implement the sdk-go. Trying to read the documentation was a little complicated for me. Do we have anything alike a tutorial, walkthrough, explaining how functions behave?

gabrielodi (Mon, 14 Dec 2020 02:31:54 GMT):
hey guys, I am trying the tutorials, but I am really not finding my way throug... glad if anyone could help me, please?

gen_el (Mon, 14 Dec 2020 09:12:38 GMT):
Hi guys. Anyone integrated the go sdk based middleware to Vault key management service?

Teaaa (Wed, 16 Dec 2020 09:05:11 GMT):
Has joined the channel.

Teaaa (Wed, 16 Dec 2020 09:05:18 GMT):
Hi everyone. Currently, I'm working with Fabric SDK Go. I have some questions: 1. To work together with SDK we need a configuration file and I feel so concerned how we can generate the config file, I couldn't find documents anywhere. 2. I planned to save channel information to database. So that, Is it possible to use Fabric SDK Go without config file ? Can anyone help me? Thank you

msteiner (Sat, 19 Dec 2020 06:36:06 GMT):
Has joined the channel.

RazaDen (Sat, 19 Dec 2020 10:51:13 GMT):
Has joined the channel.

meng950511 (Thu, 24 Dec 2020 02:31:16 GMT):
Has joined the channel.

meng950511 (Thu, 24 Dec 2020 02:31:17 GMT):
Hello all. Does anybody know how to invoke system chaincodes with gateway?

kopaygorodsky (Fri, 08 Jan 2021 12:09:35 GMT):
Yes. You can configure sdk with different providers, check opts in New function.

bdierberger (Fri, 08 Jan 2021 12:15:28 GMT):
Has joined the channel.

HarryEPFL (Sat, 09 Jan 2021 12:52:10 GMT):
Has joined the channel.

HarryEPFL (Sat, 09 Jan 2021 12:52:11 GMT):
Dear all and Andrew, I've used the fabric-sdk-go to contact and send transactions in the context of a benchmark application. It looks like I am suffering of the same issue of wunderbarb. I am using v1.0.0-rc1, the gateway API works very well in a localhost environment but it stops working when going remote. The network layout is 4 peers in 2 different orgs in 4 different machines on an OpenStack infrastructure. The network is functional by itself and can do an entire transaction lifecycle if I use the CLI. The client code in summary : the gateway is instantiated : ` f.Gateway, err = gateway.Connect( gateway.WithConfig(config.FromFile(filepath.Clean(ccpPath))), gateway.WithIdentity(wallet, user.Label)) ` The wallet has the identity of User1 of org1.example.com. Transactions are sent like this : ` _, err := f.Contract.SubmitTransaction(transaction.FunctionName, transaction.Args...) ` The connection-profile used by the gateway in the client code is : ` name: test-network-org1 version: 1.0.0 client: organization: Org1 connection: timeout: peer: endorser: '300' organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com - peer1.org1.example.com peers: peer0.org1.example.com: url: grpcs://${HOST1_IP}:7051 tlsCACerts: pem: grpcOptions: ssl-target-name-override: peer0.org1.example.com hostnameOverride: peer0.org1.example.com request-timeout: 120001 peer1.org1.example.com: url: grpcs://${HOST2_IP}:8051 tlsCACerts: pem: grpcOptions: ssl-target-name-override: peer1.org1.example.com hostnameOverride: peer1.org1.example.com request-timeout: 120001 ` The error message when submitting transactions is : ` "error": "Failed to submit: Multiple errors occurred: - Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE - Transaction processing for endorser [peer1.org2.example.com:10051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer1.org2.example.com:10051]: connection is in TRANSIENT_FAILURE", "errorVerbose": "Multiple errors occurred: - Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE - Transaction processing for endorser [peer1.org2.example.com:10051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer1.org2.example.com:10051]: connection is in TRANSIENT_FAILURE\nFailed to submit\ngithub.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Transaction).Submit\n\t/home/ubuntu/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/transaction.go:128\ngithub.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Contract).SubmitTransaction\n\t/home/ubuntu/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/contract.go:73 ` The logs on peer0.org1.example indicate that the peer discovery service is functional and can exchange with the SDK since the SDK has discovered org2 peers not listed in the connection-profile. The logs when submitTransaction() is called are : `2021-01-09 11:56:57.396 UTC [comm.grpc.server] 1 -> INFO 113 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2021-01-09T11:57:12.391Z grpc.pe er_address=192.168.1.162:47080 grpc.code=OK grpc.call_duration=2.804763ms 2021-01-09 11:56:57.396 UTC [comm.grpc.server] 1 -> INFO 114 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2021-01-09T11:57:12.391Z grpc.pe er_address=192.168.1.205:45124 grpc.code=OK grpc.call_duration=3.405435ms` The discover addresses are my two hosts using my client code. The problem remains even with a single host. The logs don't go further, the peer doesn't indicate any error concerning a TRANSIENT_FAILURE or CONNECTION_FAILED. I know this is a fairly long post but I think this issue might be a major obstacle towards commercial use of the SDK-go. Please tell me if you need any more details or If I can contribute in any help. Thank you for reading

HarryEPFL (Sat, 09 Jan 2021 12:52:11 GMT):
Dear all and Andrew, I've used the fabric-sdk-go to contact and send transactions in the context of a benchmark application. It looks like I am suffering of the same issue of wunderbarb. I am using v1.0.0-rc1, the gateway API works very well in a localhost environment but it stops working when going remote. The network layout is 4 peers in 2 different orgs in 4 different machines on an OpenStack infrastructure. The network is functional by itself and can do an entire transaction lifecycle if I use the CLI. The client code in summary : the gateway is instantiated : ` f.Gateway, err = gateway.Connect( gateway.WithConfig(config.FromFile(filepath.Clean(ccpPath))), gateway.WithIdentity(wallet, user.Label)) ` The wallet has the identity of User1 of org1.example.com. Transactions are sent like this : ` _, err := f.Contract.SubmitTransaction(transaction.FunctionName, transaction.Args...) ` The connection-profile used by the gateway in the client code is : ` name: test-network-org1 version: 1.0.0 client: organization: Org1 connection: timeout: peer: endorser: '300' organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com - peer1.org1.example.com peers: peer0.org1.example.com: url: grpcs://${HOST1_IP}:7051 tlsCACerts: pem: grpcOptions: ssl-target-name-override: peer0.org1.example.com hostnameOverride: peer0.org1.example.com request-timeout: 120001 peer1.org1.example.com: url: grpcs://${HOST2_IP}:8051 tlsCACerts: pem: grpcOptions: ssl-target-name-override: peer1.org1.example.com hostnameOverride: peer1.org1.example.com request-timeout: 120001 ` The error message when submitting transactions is : ` "error": "Failed to submit: Multiple errors occurred: - Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE - Transaction processing for endorser [peer1.org2.example.com:10051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer1.org2.example.com:10051]: connection is in TRANSIENT_FAILURE", "errorVerbose": "Multiple errors occurred: - Transaction processing for endorser [peer0.org1.example.com:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE - Transaction processing for endorser [peer1.org2.example.com:10051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer1.org2.example.com:10051]: connection is in TRANSIENT_FAILURE\nFailed to submit\ngithub.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Transaction).Submit\n\t/home/ubuntu/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/transaction.go:128\ngithub.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Contract).SubmitTransaction\n\t/home/ubuntu/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/contract.go:73 ` The logs on peer0.org1.example indicate that the peer discovery service is functional and can exchange with the SDK since the SDK has discovered org2 peers not listed in the connection-profile. The logs of peer0.org1 when submitTransaction() is called are : `2021-01-09 11:56:57.396 UTC [comm.grpc.server] 1 -> INFO 113 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2021-01-09T11:57:12.391Z grpc.pe er_address=192.168.1.162:47080 grpc.code=OK grpc.call_duration=2.804763ms 2021-01-09 11:56:57.396 UTC [comm.grpc.server] 1 -> INFO 114 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2021-01-09T11:57:12.391Z grpc.pe er_address=192.168.1.205:45124 grpc.code=OK grpc.call_duration=3.405435ms` The discover addresses are my two hosts using my client code. The problem remains even with a single host. The logs don't go further, the peer doesn't indicate any error concerning a TRANSIENT_FAILURE or CONNECTION_FAILED. I know this is a fairly long post but I think this issue might be a major obstacle towards commercial use of the SDK-go. Please tell me if you need any more details or If I can contribute in any help. Thank you for reading

andrew-coleman (Mon, 11 Jan 2021 13:48:41 GMT):
To make this work locally, you would have set the env-var DISCOVERY_AS_LOCALHOST to TRUE. Did you set it to false (or unset it) for the remote case?

Kestutis_Gudynas (Tue, 12 Jan 2021 10:25:46 GMT):
Has joined the channel.

HarryEPFL (Tue, 12 Jan 2021 15:13:36 GMT):
Dear Andew, thank you for your response. I did set it to false. I think the peer logs indicating correct usage of the discovery service confirm that if I'm not mistaken

HarryEPFL (Tue, 12 Jan 2021 15:13:36 GMT):
Dear Andew, thank you for your response. I did set it to false. I think the peer logs indicating correct usage of the discovery service confirm that, please correct me if I'm wrong

horsefall (Thu, 14 Jan 2021 09:06:41 GMT):
Has joined the channel.

horsefall (Thu, 14 Jan 2021 09:06:43 GMT):
The error message is `failed to create resmgmt client due to context error: user not found`, what caused this problem?

troyronda (Thu, 14 Jan 2021 17:51:35 GMT):
@andrew-coleman

troyronda (Thu, 14 Jan 2021 18:04:17 GMT):
@here PR for fabric-sdk-go 1.0.0: https://github.com/hyperledger/fabric-sdk-go/pull/160 Following up from the announcement on the mailing list: https://lists.hyperledger.org/g/fabric/message/9367

AurelienGasser1 (Thu, 14 Jan 2021 21:09:20 GMT):
Has joined the channel.

AurelienGasser1 (Thu, 14 Jan 2021 21:09:21 GMT):
Hey guys, I'm using fabric-sdk-go in kubernetes. - I use an in-memory wallet for the MSP credentials - I mount the TLS credentials in /var/hyperledger, then I refer to them in the config like so: ``` client: tlsCerts: systemCertPool: false client: key: path: /var/hyperledger/tls/client/pair/tls.key cert: path: /var/hyperledger/tls/client/pair/tls.crt server: key: path: /var/hyperledger/tls/server/pair/tls.key cert: path: /var/hyperledger/tls/server/pair/tls.crt ``` When calling `gateway.Connect()` I'm getting the following error ``` Failed to apply config option: failed to initialize configuration: unable to initialize cryptosuite using crypto suite config: failed to initialize crypto suite: Could not initialize BCCSP SW: Failed to initialize software key store: mkdir keystore: permission denied ``` Why is the SDK trying to create a keystore directory, and how can I either prevent it or point it to a folder it has write permissions to?

AurelienGasser1 (Thu, 14 Jan 2021 21:39:39 GMT):
I found the solution. I had to specify in the config: ``` client: credentialStore: cryptoStore: path: /tmp ```

Teaaa (Fri, 15 Jan 2021 08:20:00 GMT):
Thank kopaygorodsky :kissing_heart: Could you answer me the first question?

wunderbarb (Sat, 16 Jan 2021 01:26:31 GMT):
Hi, I come back with my unsolved issue. My gateway code works perfectly when running locally. When calling a remote blockchain, it fails

wunderbarb (Sat, 16 Jan 2021 01:26:31 GMT):
Hi, I come back with my unsolved issue. My gateway code works perfectly when running locally. When calling a remote blockchain, it fails. For Invoke, it generates the following error. ```

wunderbarb (Sat, 16 Jan 2021 01:26:31 GMT):
Hi, I come back with my unsolved issue. My gateway code works perfectly when running locally. When calling a remote blockchain, it fails. For Invoke, it generates the following error. ``` [fabsdk/core] 2021/01/16 01:20:00 UTC - cryptosuite.GetDefault -> INFO No default cryptosuite found, using default SW implementation [fabsdk/client] 2021/01/16 01:20:01 UTC - greylist.(*Filter).Greylist -> INFO Greylisting peer peer0.org1.example.com:7051 [fabsdk/client] 2021/01/16 01:20:01 UTC - greylist.(*Filter).Accept -> INFO Rejecting peer peer0.org1.example.com:7051 --- FAIL: Test_Remote_Client_Invoke (0.98s) client_test.go:22: Error Trace: client_test.go:22 Error: Received unexpected error: Discovery status Code: (11) UNKNOWN. Description: error getting endorsers: no endorsement combination can be satisfied Failed to submit github.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Transaction).Submit /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/transaction.go:128 github.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Contract).SubmitTransaction /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/contract.go:73 blockchain.(*Client).Invoke /home/eric/Dev/github.com/blockchain1/client.go:84 ``` For Query, ``` Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE Transaction processing for endorser [peer0.org1.example.com:7051] github.com/hyperledger/fabric-sdk-go/pkg/fab/peer.(*peerEndorser).ProcessTransactionProposal /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/fab/peer/peerendorser.go:108

wunderbarb (Sat, 16 Jan 2021 01:26:31 GMT):
Hi, I come back with my unsolved issue. My gateway code works perfectly when running locally. When calling a remote blockchain, it fails. For Invoke, it generates the following error. ``` [fabsdk/core] 2021/01/16 01:20:00 UTC - cryptosuite.GetDefault -> INFO No default cryptosuite found, using default SW implementation [fabsdk/client] 2021/01/16 01:20:01 UTC - greylist.(*Filter).Greylist -> INFO Greylisting peer peer0.org1.example.com:7051 [fabsdk/client] 2021/01/16 01:20:01 UTC - greylist.(*Filter).Accept -> INFO Rejecting peer peer0.org1.example.com:7051 --- FAIL: Test_Remote_Client_Invoke (0.98s) client_test.go:22: Error Trace: client_test.go:22 Error: Received unexpected error: Discovery status Code: (11) UNKNOWN. Description: error getting endorsers: no endorsement combination can be satisfied Failed to submit github.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Transaction).Submit /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/transaction.go:128 github.com/hyperledger/fabric-sdk-go/pkg/gateway.(*Contract).SubmitTransaction /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/gateway/contract.go:73 blockchain.(*Client).Invoke /home/eric/Dev/github.com/blockchain1/client.go:84 ``` For Query, ``` Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer0.org1.example.com:7051]: connection is in TRANSIENT_FAILURE Transaction processing for endorser [peer0.org1.example.com:7051] github.com/hyperledger/fabric-sdk-go/pkg/fab/peer.(*peerEndorser).ProcessTransactionProposal /home/eric/go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-rc1/pkg/fab/peer/peerendorser.go:108 ``` The remote blockchain works perfectly with non-gateway calls. The `DISCOVERY_AS_LOCALHOST` is false. The code is available at https:// github.com/wunderbarb/fabric. It holds all the credentials to connect to the remote blockchain which is running permanently. THanks in advance for your help.

horsefall (Sat, 16 Jan 2021 08:00:51 GMT):
Don't you have any API document or useage?

horsefall (Sat, 16 Jan 2021 08:00:51 GMT):
Don't you have any API document or usage

horsefall (Sat, 16 Jan 2021 08:00:51 GMT):
Don't you have any API document or usage?

greg2git (Sat, 16 Jan 2021 14:11:01 GMT):
"If you followed the instructions above and set use_couchdb to true" sounds pretty vague to me and is one big assumption from here: https://github.com/hyperledger/fabric-samples/blob/master/off_chain_data/README.md, is this an issue?

horsefall (Tue, 19 Jan 2021 06:37:33 GMT):
How to embedded list of users in config file?

andrew-coleman (Tue, 19 Jan 2021 09:49:49 GMT):
@wunderbarb @HarryEPFL In your network-config yaml, you have the grpc option `ssl-target-name-override: peer0.org1.example.com`. Does that match the actual hostname of your remote server? If not, then you'll get TLS errors (seen in the peer logs) which might explain the TRANSIENT_FAILURE

wunderbarb (Tue, 19 Jan 2021 19:21:48 GMT):
@andrew-coleman The peer0.org1.example.com certificate has `CN=peer0` but `SAN DNS=peer0.org1.example.com`. I had a look in the peer logs, and no TLS issue. BTW, if you replace with `ssl-target-name-override: peer0`, then SDK fails. This seems normal in go 1.15 has the SAN is the important factor rather than CN. Interestingly, when examining the logs after the test `go test -v -run Test_Remote_Client_Query`, it displays `INFO 13b finished chaincode: cscc duration: 0ms channel=mychannel txID=fc7ca7ab`. When launching again, you get a similar record but with a different transaction ID. It may seem that the transaction occurred, but something failed downstream. Similar log output for `go test -v -run Test_Remote_Client_Query`

wunderbarb (Tue, 19 Jan 2021 19:21:48 GMT):
@andrew-coleman The peer0.org1.example.com certificate has `CN=peer0` but `SAN DNS=peer0.org1.example.com`. I had a look in the peer logs, and no TLS issue. BTW, if you replace with `ssl-target-name-override: peer0`, then SDK fails. This seems normal in go 1.15 as SAN is the important factor rather than CN. Interestingly, when examining the logs after the test `go test -v -run Test_Remote_Client_Query`, it displays `INFO 13b finished chaincode: cscc duration: 0ms channel=mychannel txID=fc7ca7ab`. When launching again, you get a similar record but with a different transaction ID. It may seem that the transaction occurred, but something failed downstream. Similar log output for `go test -v -run Test_Remote_Client_Query`

wunderbarb (Tue, 19 Jan 2021 21:25:33 GMT):
@andrew-coleman I posted on github.com in directory `logs` extract from the log of peer0 node for normal invoke, gateway invoke, normal query, and gateway query.

greg2git (Tue, 19 Jan 2021 21:37:56 GMT):
here https://github.com/hyperledger/fabric-samples/blob/master/off_chain_data/README.md it says: "blockEventListener.js uses nextblock.txt" but the txt file never changes its only contents of '0', any tips?

ohryan (Wed, 20 Jan 2021 03:25:40 GMT):
Has joined the channel.

kopaygorodsky (Sat, 30 Jan 2021 13:20:20 GMT):
Is first question still relevant?

kopaygorodsky (Sat, 30 Jan 2021 14:26:18 GMT):
@troyronda @bstasyszyn hey guys, I have a question regarding CryptoSuite. It's available to a user, but no methods can be called because all the available opts are internal. If I implement Opts interface it's getting rejected because in KeyGen and all other methods there are verifications against strict list of internal types using reflection. https://github.com/hyperledger/fabric-sdk-go/blob/master/internal/github.com/hyperledger/fabric/bccsp/sw/impl.go#L81 https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/common/providers/core/cryptosuite.go#L113 Are there any existing plans regarding this issue? Is it ok if I implement constructors for all of those options and make them available to a user?

kopaygorodsky (Sat, 30 Jan 2021 14:26:18 GMT):
@troyronda @bstasyszyn hey guys, I have a question regarding CryptoSuite. It's available to a user, but no methods can be called because all the available opts are internal. If I implement Opts interface it's getting rejected because in KeyGen and all other methods there are verifications against strict list of internal types using reflection. https://github.com/hyperledger/fabric-sdk-go/blob/master/internal/github.com/hyperledger/fabric/bccsp/sw/impl.go#L81 https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/common/providers/core/cryptosuite.go#L113 Are there any existing plans regarding this issue? Is it ok if I make a PR and implement constructors for all of those options and make them available to a user?

Teaaa (Mon, 01 Feb 2021 02:16:18 GMT):
Yes, It is

Teaaa (Mon, 01 Feb 2021 02:17:15 GMT):
Even we load configuration from stream or database or file. It's better to know did you make it, right ?

Teaaa (Mon, 01 Feb 2021 02:17:15 GMT):
Even we load configuration from stream or database or file. It's better to know how did you make it, right ?

Teaaa (Mon, 01 Feb 2021 02:20:03 GMT):
Let's say I generate a dynamic configuration. I should know the structure to parse configure to go lang struct writer -> config (file)-> struct reader

randyshu (Mon, 01 Feb 2021 03:15:17 GMT):
I have a question about gateway.connect(), I think the identity should init after config is done because the factory.GetDefault() should call after cryptoSuite initialized...but when I changed the code position still some error.

randyshu (Mon, 01 Feb 2021 03:15:38 GMT):

Clipboard - 2021年2月1日上午11点15分

randyshu (Mon, 01 Feb 2021 03:16:22 GMT):

Clipboard - 2021年2月1日上午11点16分

troyronda (Mon, 01 Feb 2021 21:23:02 GMT):
@here we have tagged v1.0.0 - this contains a couple minor fixes on top of rc1.

troyronda (Mon, 01 Feb 2021 21:23:02 GMT):
@here we have tagged v1.0.0 - this release contains a couple minor fixes on top of v1.0.0-rc1.

troyronda (Mon, 01 Feb 2021 21:23:11 GMT):
https://github.com/hyperledger/fabric-sdk-go/releases/tag/v1.0.0

cmhacker (Tue, 02 Feb 2021 08:51:07 GMT):
Has joined the channel.

troyronda (Tue, 02 Feb 2021 15:14:53 GMT):
The fabric-sdk-go master branch has been renamed to main.

AnuragSomani (Tue, 02 Feb 2021 17:07:36 GMT):
Has joined the channel.

VadimInshakov (Sun, 07 Feb 2021 13:12:51 GMT):
Hi community! I created an a bccsp/sdk patch for using Vault as storage for users' keys. Vault can be used just as storage, not cryptoprovider (BCCSP is still doing this). Backward compatibility doesn't break, it's _very easy_ to use. Does it make sense to send a pull request to fabric-go-sdk or is it obviously not needed in SDK?

VadimInshakov (Sun, 07 Feb 2021 13:12:51 GMT):
Hi community! @here I made a patch for using Vault as storage for users' keys. Vault can be used just as storage, not cryptoprovider (BCCSP is still doing this). Backward compatibility doesn't break, it's _very easy_ to use. Does it make sense to send a pull request to fabric-go-sdk or is it obviously not needed in SDK?

kopaygorodsky (Sun, 07 Feb 2021 13:45:41 GMT):
could you send a link, I would like to take a look on it

VadimInshakov (Sun, 07 Feb 2021 13:46:14 GMT):
https://github.com/vadimInshakov/fabric-sdk-go-vault

kopaygorodsky (Sun, 07 Feb 2021 13:47:16 GMT):
but you don't need to generate config file, you can pass config file as nil :) Here is just an example

kopaygorodsky (Sun, 07 Feb 2021 13:47:18 GMT):

Clipboard - February 7, 2021 3:47 PM

kopaygorodsky (Sun, 07 Feb 2021 13:48:12 GMT):
you can implement your own interfaces, load data inside from anywhere.

kopaygorodsky (Sun, 07 Feb 2021 13:49:48 GMT):
hm, personally I'm not a fan of any patches

VadimInshakov (Sun, 07 Feb 2021 15:25:48 GMT):
The repository contains a patch, because it is easier to keep all changes in one file and apply them to new versions of upstream. If the functionality itself seems interesting to maintainers, I will send a normal pull request without this patch.

VadimInshakov (Sun, 07 Feb 2021 15:25:48 GMT):
This repository contains a patch, because it is easier to keep all changes in one file and apply them to new versions of upstream. If the functionality itself seems interesting to maintainers, I will send a normal pull request without this patch.

mohamadkh (Mon, 08 Feb 2021 04:11:07 GMT):
Has joined the channel.

mohamadkh (Mon, 08 Feb 2021 04:23:56 GMT):
Hello team, Is there an extensive documentation for the v1.0.0 release? if not, when should we expect one? Thanks

BrettLogan (Mon, 08 Feb 2021 05:10:14 GMT):
The GoDoc is quite extensive (and by its nature lists all exported functions and their respective doc) and has many function-level example: https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go#section-documentation

VadimInshakov (Mon, 08 Feb 2021 08:18:58 GMT):
@troyronda what do you think about it?

chenyouyou (Tue, 09 Feb 2021 01:07:50 GMT):
Has joined the channel.

VadimInshakov (Wed, 10 Feb 2021 17:35:22 GMT):
@troyronda it is worth doing this?

RodrigoAlejandroMelo (Wed, 17 Feb 2021 15:42:20 GMT):
Has joined the channel.

RodrigoAlejandroMelo (Wed, 17 Feb 2021 15:42:21 GMT):
Hi. Are there a a user guide about how to use the fabric-sdk-go? I saw the examples at fabric-samples, but I need exaplantions :P not only copy & paste

RodrigoAlejandroMelo (Wed, 17 Feb 2021 15:43:42 GMT):
The application-go examples is different to the javascript or java versions. I don't find the `enrollAdmin` equivalence in Go.

RodrigoAlejandroMelo (Wed, 17 Feb 2021 15:44:50 GMT):
At https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go, there are several packages and in a separated section pkg/gateway... Which is used in fabric-samples. I don't understand, it is an alternative or the way to go?

sunaaaooo (Thu, 18 Feb 2021 02:43:38 GMT):
Has joined the channel.

sunaaaooo (Thu, 18 Feb 2021 02:43:39 GMT):
Hi,I write a web server for invoke chaincode, should I create a Channel client(channel.New()) for each request?

kopaygorodsky (Fri, 19 Feb 2021 18:19:43 GMT):
you can reuse channel client between requests

GangZhao (Fri, 26 Feb 2021 03:24:40 GMT):
Has joined the channel.

GangZhao (Fri, 26 Feb 2021 03:24:41 GMT):
Hi, Is there any example to add org to an existing channel using fabric-sdk-go?

GangZhao (Fri, 26 Feb 2021 03:31:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=copiEhpktN27H9sfN) My channel consits of 1peer (org1) and 1orderer, my step is : 1.fetch channel config 2.update channel config adding org2 3.serialize config update and sign with org1 4.send tx to the orderer But i received an error "signature for identity 0 is invalid: The signature is invalid" "error applying config update to existing channel 'ccc': error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied"

sj1 4 (Sun, 28 Feb 2021 15:43:45 GMT):
Has joined the channel.

nalapon (Mon, 01 Mar 2021 19:26:59 GMT):
Has joined the channel.

suosuidewenqing (Tue, 02 Mar 2021 08:34:15 GMT):
Has joined the channel.

nikolas (Tue, 02 Mar 2021 10:20:16 GMT):
hi, it seems my blockevent subscription "dies" after some hours - my client is in gosdk obviuosly. I am noticing this behavior after switching to fabric 2.2.* - i didn't have the issue in fabric 1.4 peers, with the same configuration. Do you have any hints? Thanks!

paleozogt (Wed, 03 Mar 2021 22:16:15 GMT):
I'm seeing ```# github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations ../../../go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0/internal/github.com/hyperledger/fabric/core/operations/system.go:225:23: not enough arguments in call to s.statsd.SendLoop have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string) ```

paleozogt (Wed, 03 Mar 2021 22:17:40 GMT):
I'm using fabric-sdk-go `v1.0.0`

paleozogt (Wed, 03 Mar 2021 22:17:42 GMT):
I can see some PRs that try to fix it that got rejected (https://jira.hyperledger.org/browse/FABG-958) and a ticket that's open (https://jira.hyperledger.org/browse/FABG-958). What's going on with this problem?

paleozogt (Wed, 03 Mar 2021 22:17:42 GMT):
I can see some PRs that try to fix it that got rejected (https://jira.hyperledger.org/browse/FABG-958) and a ticket that's open (https://jira.hyperledger.org/browse/FABG-958).

paleozogt (Wed, 03 Mar 2021 22:17:42 GMT):
I can see some PRs that try to fix it that got rejected (https://github.com/hyperledger/fabric-sdk-go/pull/65) and a ticket that's open (https://jira.hyperledger.org/browse/FABG-958).

paleozogt (Wed, 03 Mar 2021 22:18:12 GMT):
Does anyone know what the status of this issue is?

metadata (Thu, 04 Mar 2021 06:47:39 GMT):
https://stackoverflow.com/questions/55811937/getting-error-not-enough-arguments-in-call-to-s-statsd-sendloop-when-running

nikolas (Thu, 04 Mar 2021 12:34:56 GMT):
are there any ideas why the event client is disconnecting after some time? there is nothing I have noticed in the logs, it just stops receiving blockevents. Any hints?

nikolas (Fri, 05 Mar 2021 08:55:29 GMT):
Issue was apparently the following: the client was trying to subscribe, but if the connection would fail, it would not try again. the sdk client was not retrying to connect. To my understanding, it only tries to reconnect as long as the initial connection was successful. Currently I implemented an own retry on error mechanism for the initial connection. If you have a hint on making the connection to retry to connect via sdk config, please let me know.

sunaaaooo (Mon, 08 Mar 2021 13:48:35 GMT):
my server maybe get some request concurrent,so the channel.Request.Execute() is thread-safe? then I can reuse the client. many thankes

sunaaaooo (Mon, 08 Mar 2021 13:49:54 GMT):
hello I'm learing fabric and I have some questions for use fabric-go-sdk now, I am writing a server for invoke/query chaincode(I just have one channel), if I have to new a channel(function:channel.New()) for every request? or I can new a channel once and use it my server maybe get some request concurrent,I want to know if the channel.Request.Execute() is thread-safe? so I don't need to new a channel for every request and reuse the channel client many thanks

coutinhotauan (Wed, 10 Mar 2021 00:48:14 GMT):
Has joined the channel.

coutinhotauan (Wed, 10 Mar 2021 00:48:15 GMT):
I have deployed my hyperledger fabric network and my client application (using fabric-sdk-go) in a single machine (with docker compose) and all have worked fine, but i'm trying to deploy my network with containers on different hosts (using a overlay network with docker swarm). This step has worked, but my client app isn't working because it can't communicate with containers on a different host. I think that the problem is related to entity matchers section on my config.yaml file. For my original solution (single host) entity matchers is set like this: entityMatchers: peer: - pattern: (\w*)peer0.org1.app.com(\w*) urlSubstitutionExp: localhost:7051 eventUrlSubstitutionExp: localhost:7053 sslTargetOverrideUrlSubstitutionExp: peer0.org1.app.com mappedHost: peer0.org1.app.com - pattern: (\w*)peer1.org1.app.com(\w*) urlSubstitutionExp: localhost:8051 eventUrlSubstitutionExp: localhost:8053 sslTargetOverrideUrlSubstitutionExp: peer1.org1.app.com mappedHost: peer1.org1.app.com orderer: - pattern: (\w*)orderer.app.com(\w*) urlSubstitutionExp: grpc://localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.app.com mappedHost: orderer.app.com certificateAuthorities: - pattern: (\w*)ca.org1.app.com(\w*) urlSubstitutionExp: http://localhost:7054 mappedHost: ca.org1.app.com For my solution on multiple hosts i've ca and orderer on a host and peer0 and peer 1 on other host. My question is: How can i substitute localhost for the url of the corresponding container on a different host? (if the problem is really that) note: i've tried to change localhost for the name of the docker container, but it didn't work

coutinhotauan (Wed, 10 Mar 2021 00:48:49 GMT):
I have deployed my hyperledger fabric network and my client application (using fabric-sdk-go) in a single machine (with docker compose) and all have worked fine, but i'm trying to deploy my network with containers on different hosts (using a overlay network with docker swarm). This step has worked, but my client app isn't working because it can't communicate with containers on a different host. I think that the problem is related to entity matchers section on my config.yaml file. For my original solution (single host) entity matchers is set like this: entityMatchers: peer: - pattern: (\w*)peer0.org1.app.com(\w*) urlSubstitutionExp: localhost:7051 eventUrlSubstitutionExp: localhost:7053 sslTargetOverrideUrlSubstitutionExp: peer0.org1.app.com mappedHost: peer0.org1.app.com - pattern: (\w*)peer1.org1.app.com(\w*) urlSubstitutionExp: localhost:8051 eventUrlSubstitutionExp: localhost:8053 sslTargetOverrideUrlSubstitutionExp: peer1.org1.app.com mappedHost: peer1.org1.app.com orderer: - pattern: (\w*)orderer.app.com(\w*) urlSubstitutionExp: grpc://localhost:7050 sslTargetOverrideUrlSubstitutionExp: orderer.app.com mappedHost: orderer.app.com certificateAuthorities: - pattern: (\w*)ca.org1.app.com(\w*) urlSubstitutionExp: http://localhost:7054 mappedHost: ca.org1.app.com For my solution on multiple hosts i've ca and orderer on a host and peer0 and peer 1 on other host. My question is: How can i substitute localhost for the url of the corresponding container on a different host? (if the problem is really that) note: i've tried to change localhost for the name of the docker container, but it didn't work

tongli (Wed, 10 Mar 2021 16:59:51 GMT):
Is there a way in sdk dynamically find all the participating orgs?

tongli (Wed, 10 Mar 2021 17:01:12 GMT):
@troyronda ^^^ thanks

tongli (Wed, 10 Mar 2021 17:01:39 GMT):
In a channel i meant.

haardikkk (Thu, 11 Mar 2021 22:08:36 GMT):
Has left the channel.

pritam_01 (Sat, 13 Mar 2021 19:40:17 GMT):

Screenshot from 2021-03-14 01-08-00.png

anonsachin (Tue, 16 Mar 2021 12:47:10 GMT):
Has joined the channel.

anonsachin (Tue, 16 Mar 2021 12:47:11 GMT):
Hey guys i would like to implement a new wallet backend with hashicorp vault as the backend, I am unable to do it using the walletstore and then trying to create a wallet outside the gateway package,

anonsachin (Tue, 16 Mar 2021 12:48:12 GMT):
should i create a new wallet in the gateway package, and if so what all tests and considerations should i take for it to be accepted??

vieiramanoel (Fri, 19 Mar 2021 20:25:32 GMT):
https://jira.hyperledger.org/browse/FAB-18443 Hey guys, I intend to make a PR to this problem but idk how is the best way to do this as the reenroll uses the same old private key already revoked. Calling only enroll over a revoked identity will throw that the operation is not allowed as the identity has been revoked

vieiramanoel (Fri, 19 Mar 2021 20:25:32 GMT):
https://jira.hyperledger.org/browse/FAB-18443 Hey guys, I intend to make a PR to this problem but idk which is the best way to do this as the reenroll uses the same old private key already revoked. Calling only enroll over a revoked identity will throw that the operation is not allowed as the identity has been revoked

vieiramanoel (Fri, 19 Mar 2021 20:27:27 GMT):
I was thinking of implementing a new func at adapter for the case where `GetSigningIdentity` fails (pkg/msp/caclient.go:L297) any thoughts?

vieiramanoel (Fri, 19 Mar 2021 20:51:39 GMT):
rn I'm removing identity from CA before enrolling it again, which is not the best practice :(

nikolas (Mon, 22 Mar 2021 10:41:29 GMT):
HI guys, question: is there a way to decode the peer.ProcessedTransaction returned by the ledger client into readable data? if I marshal into json, I get base64 envelop that contains a lot of artifacts

VadimInshakov (Tue, 23 Mar 2021 13:02:50 GMT):
Hi! Why `client.LifecycleQueryCommittedCC()` returns LifecycleChaincodeDefinition slice, where items have all fields filled except of `SignaturePolicy` field, which is always nil?

braduf (Tue, 23 Mar 2021 16:05:54 GMT):
Hi all, I want to migrate my applications from Node.js to Go, I have some event services with checkpointers keeping track of the latest processed block and I am not finding this functionality in the Go SDK. Does it exist or should I take care of keeping track myself in the event handlers? Thanks in advance.

braduf (Tue, 23 Mar 2021 16:05:54 GMT):
Hi all, I want to migrate my applications from Node.js to Go, I have some event listeners with checkpointers keeping track of the latest processed block and I am not finding this functionality in the Go SDK. Does it exist or should I take care of keeping track myself in the event handlers? Thanks in advance.

VadimInshakov (Tue, 23 Mar 2021 18:11:44 GMT):
Yes, look it here: https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go/pkg/client/event#New

VadimInshakov (Tue, 23 Mar 2021 18:13:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=SFSKE6W9MGp7cCkLE) maybe @troyronda know, how to get `SignaturePolicy` in 2.0?

braduf (Tue, 23 Mar 2021 18:13:44 GMT):
Hi, thanks, but I had already seen that, I just don't see anything mentioned about checkpointers...?

braduf (Tue, 23 Mar 2021 18:15:14 GMT):
https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Checkpointer.html

VadimInshakov (Tue, 23 Mar 2021 18:17:43 GMT):
Ок, look at this too: https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go/pkg/client/event#ClientOption You can specify "give only new blocks". This is closest to what you want.

braduf (Tue, 23 Mar 2021 18:20:03 GMT):
but give only new blocks is that it just processes the new blocks that come in from the moment the listener is running I assume, it are not unprocessed blocks that came in during down-time I guess?

braduf (Tue, 23 Mar 2021 18:23:09 GMT):
and so the answer is that with the Go SDK you should keep track of the last processed block in some persistent storage from withing the event handler one implements itself, right?

braduf (Tue, 23 Mar 2021 18:23:09 GMT):
and so the answer is that with the Go SDK you should keep track of the last processed block in some persistent storage from within the event handler one implements itself, right?

troyronda (Tue, 23 Mar 2021 18:53:57 GMT):
@bstasyszyn is more familiar with the lifecycle code.

braduf (Tue, 23 Mar 2021 19:56:35 GMT):
Hi all, are there any examples available that use an HSM with the Go SDK and without Fabric CA, please? So the keys will be created in the HSM and certs will also already exist. I just need to know how to configure the Go SDK exactly to use the HSM cryptoprovider. I have looked into CryptoSuite, but it is not clear on how to use it exactly. Can anybody point me in a good direction, please? Thanks a lot!

VadimInshakov (Tue, 23 Mar 2021 21:07:38 GMT):
yes, right

braduf (Tue, 23 Mar 2021 21:25:59 GMT):
Good to know, thank you!

braduf (Thu, 25 Mar 2021 19:31:02 GMT):
I am also looking on how to obtain available endorser peers from an organization in the network, how can this be done, please?

braduf (Thu, 25 Mar 2021 19:31:02 GMT):
I am also looking on how to obtain available endorser peers from an organization in the network, how can this be done, please? Or is there a way to set endorsement policies for a transaction by MSP instead of by specific peer endpoints?

yixinhuo (Fri, 26 Mar 2021 02:01:38 GMT):
Has joined the channel.

braduf (Fri, 26 Mar 2021 14:53:07 GMT):
Does the LocalDiscoveryService gets the information from the local connection profile or does it gets its info dynamically from the network?

dalaomai (Wed, 31 Mar 2021 10:08:53 GMT):
Has joined the channel.

dalaomai (Wed, 31 Mar 2021 10:08:53 GMT):
why not have set endorsingOrgs?

jsms01 (Wed, 31 Mar 2021 14:14:46 GMT):
Has joined the channel.

braduf (Wed, 31 Mar 2021 16:29:48 GMT):
Hi @dalaomai, is this a new question of you or a response to my previous question about how to get the endorsing peers?

dalaomai (Thu, 01 Apr 2021 01:24:21 GMT):
I think my question is the same as yours.

braduf (Thu, 01 Apr 2021 01:25:21 GMT):
Yes, I was also looking for this functionality to specify it at an Org level and not by specific peers.

braduf (Thu, 01 Apr 2021 01:27:48 GMT):
Are you using the gateway programming model or the lower level packages of the SDK?

braduf (Thu, 01 Apr 2021 01:28:51 GMT):
I know a workaround that might work for you, you can specifiy the implicit private data collection of the orgs you want endorsement from. And normally only peers of those orgs will be selected.

braduf (Thu, 01 Apr 2021 01:28:51 GMT):
I know a workaround that might work for you, you can specifiy the implicit private data collection of the orgs you want endorsement from in the transaction request. And normally only peers of those orgs will be selected.

braduf (Thu, 01 Apr 2021 01:29:10 GMT):
I can tell you how to do it both with the gateway or without

dalaomai (Thu, 01 Apr 2021 01:30:44 GMT):
i am learning fabriI just started to learn this framework and don't quite understand what you mean. I am practicing this example: https://github.com/hyperledger/fabric-samples/tree/main/auction I plan to rewrite the application with go, but I am stuck with this problem.c-samples

dalaomai (Thu, 01 Apr 2021 01:31:19 GMT):
also,my English is very bad

braduf (Thu, 01 Apr 2021 01:31:35 GMT):
Nah, your english is good man haha

braduf (Thu, 01 Apr 2021 01:32:00 GMT):
Can you show the code snippet in Go where you invoke the transaction?

braduf (Thu, 01 Apr 2021 01:32:10 GMT):
I can tell you what to add then

dalaomai (Thu, 01 Apr 2021 01:33:36 GMT):
`func SubmitBid(contract *gateway.Contract, id string, txID string) (string, error) { transaction, err := contract.CreateTransaction("SubmitBid", gateway.WithEndorsingPeers("Org1MSP")) if err != nil { return "", fmt.Errorf("CreateTransaction(SubmitBid err:%v", err) }`

dalaomai (Thu, 01 Apr 2021 01:33:36 GMT):
I think I know what you mean, it’s a good idea, I’ll try it now

braduf (Thu, 01 Apr 2021 01:36:48 GMT):
Instead of doing WithEndorsingPeers, you should use WithCollections("_implicit_org_Org1MSP")

dalaomai (Thu, 01 Apr 2021 01:37:19 GMT):
thank you very much

braduf (Thu, 01 Apr 2021 01:37:24 GMT):
and you should use the version on the main branch

braduf (Thu, 01 Apr 2021 01:37:34 GMT):
because it is not in v1.0.0 yet

braduf (Thu, 01 Apr 2021 01:38:01 GMT):
I just did the pull request yesterday and it got merged into main today

braduf (Thu, 01 Apr 2021 01:38:13 GMT):
https://github.com/hyperledger/fabric-sdk-go/pull/170

dalaomai (Thu, 01 Apr 2021 01:39:39 GMT):
!!!!I will try now, thank you very much

braduf (Thu, 01 Apr 2021 01:40:04 GMT):
My pleasure, let me know if it works or if you encounter any problems!

dalaomai (Thu, 01 Apr 2021 02:28:13 GMT):
There is a question here, do I need to create this collection: _implicit_org_Org1MSP when deploying the chaincode. Because now I have an error like this: 'peer0.org2.example.com|2021-04-01 02:14:48.561 UTC [discovery.endorsement] loadMetadataAndFilters -> WARN 0d5 Failed computing collection principal sets for chaincode auction due to collection _implicit_org_Org1MSP doesn't exist in collection config for chaincode auction channel=auction peer0.org2.example.com|2021-04-01 02:14:48.561 UTC [discovery] chaincodeQuery -> ERRO 0d6 Failed constructing descriptor for chaincode chaincodes: ,: collection _implicit_org_Org1MSP doesn't exist in collection config for chaincode auction'

dalaomai (Thu, 01 Apr 2021 02:28:13 GMT):
Here is a question, do I need to create this collection: _implicit_org_Org1MSP? , When deploying the chain code. Because now I have an error like this: 'peer0.org2.example.com|2021-04-01 02:14:48.561 UTC [discovery.endorsement] loadMetadataAndFilters -> WARN 0d5 Failed computing collection principal sets for chaincode auction due to collection _implicit_org_Org1MSP doesn't exist in collection config for chaincode auction channel=auction peer0.org2.example.com|2021-04-01 02:14:48.561 UTC [discovery] chaincodeQuery -> ERRO 0d6 Failed constructing descriptor for chaincode chaincodes: ,: collection _implicit_org_Org1MSP doesn't exist in collection config for chaincode auction'

dalaomai (Thu, 01 Apr 2021 02:28:13 GMT):
Here is a question, do I need to create this collection: _implicit_org_Org1MSP? , When deploying the Chaincode. Because now I have an error like this: 'peer0.org2.example.com|2021-04-01 02:14:48.561 UTC [discovery.endorsement] loadMetadataAndFilters -> WARN 0d5 Failed computing collection principal sets for chaincode auction due to collection _implicit_org_Org1MSP doesn't exist in collection config for chaincode auction channel=auction peer0.org2.example.com|2021-04-01 02:14:48.561 UTC [discovery] chaincodeQuery -> ERRO 0d6 Failed constructing descriptor for chaincode chaincodes: ,: collection _implicit_org_Org1MSP doesn't exist in collection config for chaincode auction'

dalaomai (Thu, 01 Apr 2021 02:33:52 GMT):
But i found this:https://hyperledger-fabric.readthedocs.io/en/release-2.2/private-data-arch.html#referencing-implicit-collections-from-chaincode

dalaomai (Thu, 01 Apr 2021 02:33:52 GMT):
But i found this:https://hyperledger-fabric.readthedocs.io/en/release-2.2/private-data-arch.html#referencing-implicit-collections-from-chaincode my Fabric version: `[root@localhost bin]# ./peer version peer: Version: 2.3.1 Commit SHA: 2f69b4222 Go version: go1.14.12 OS/Arch: linux/amd64 Chaincode: Base Docker Label: org.hyperledger.fabric Docker Namespace: hyperledger `

braduf (Thu, 01 Apr 2021 03:35:54 GMT):
No, an implicit collection should not be created

braduf (Thu, 01 Apr 2021 03:37:58 GMT):
But maybe it doesn't work for implicit collections, maybe we should do a Pull Request, so that it doesn't look up the collection in the collection config of the chaincode if it is an implicit collection

braduf (Thu, 01 Apr 2021 03:37:58 GMT):
But maybe it doesn't work for implicit collections yet, maybe we should do a Pull Request, so that it doesn't look up the collection in the collection config of the chaincode if it is an implicit collection

dalaomai (Tue, 06 Apr 2021 10:32:05 GMT):
I have a problem, can someone help me? https://stackoverflow.com/questions/66966891

agustincharry (Tue, 06 Apr 2021 15:39:40 GMT):
Has joined the channel.

agustincharry (Tue, 06 Apr 2021 20:13:58 GMT):
Hi! Do you know if exist an "HsmX509Provider" and "HsmX509Identity" in the GO SDK, i found that classes in NodeJS SDK. Or better... do you know how to populate a wallet in GO SDK using an HSM to store the private key?

nkl199 (Thu, 08 Apr 2021 16:17:58 GMT):
Has left the channel.

PanzvorHong (Sun, 11 Apr 2021 10:21:47 GMT):
Has joined the channel.

PanzvorHong (Sun, 11 Apr 2021 10:21:48 GMT):
Hi, I have set up my fabric network with 3 orderers in one organization and a consortium with 5 organizaitons successfully. Each organization has only one peer node and join in the same channel. And I have installed and instantiated two chaincodes in this channel. However, when I invoke chaincode by `*channel.Client`, sometimes it work correctly, and sometimes I get such an error:

PanzvorHong (Sun, 11 Apr 2021 11:10:24 GMT):
HI! I have a problem when I invoke chaincode by `fabric-sdk-go`. Can someone help me? https://stackoverflow.com/questions/67044235/fabric-invoke-chaincode-error-failed-to-get-endorsing-peers-no-endorsement-com

PanzvorHong (Mon, 12 Apr 2021 03:58:08 GMT):
I have found the reason for this problem. That's because endorsers got from channel should be contained in the peers list which got by `discovery`, or it will be filtered. And there has always been only one endorser peer got from channel or `discovery`. So, unless the two are equal, the endorsement is not satisfied. The relevant source code in `fabric-sdk-go` is as follows. fabricselection.go ```go func (s *Service) getEndorsers(chaincodes []*fab.ChaincodeCall, chResponse discclient.ChannelResponse, peerFilter soptions.PeerFilter, sorter soptions.PeerSorter) (discclient.Endorsers, error) { peers, err := s.discovery.GetPeers() if err != nil { return nil, errors.Wrapf(err, "error getting peers from discovery service for channel [%s]", s.channelID) } // `chResponse.Endorsers()` will use `newFilter(s.ctx, peers, peerFilter, sorter)` to filter endorsers. endpoints, err := chResponse.Endorsers(asInvocationChain(chaincodes), newFilter(s.ctx, peers, peerFilter, sorter)) if err != nil && newDiscoveryError(err).IsTransient() { return nil, status.New(status.DiscoveryServerStatus, int32(status.QueryEndorsers), fmt.Sprintf("error getting endorsers: %s", err), []interface{}{}) } return endpoints, err } ``` Now the question is, why can only one endorser be obtained from the channel or found by `discovery`? I tried to fix it by modifying some possible configurations in yaml, but they all failed.

PanzvorHong (Mon, 12 Apr 2021 03:59:09 GMT):
I have found the reason for my problem above. That's because endorsers got from channel should be contained in the peers list which got by `discovery`, or it will be filtered. And there has always been only one endorser peer got from channel or `discovery`. So, unless the two are equal, the endorsement is not satisfied. The relevant source code in `fabric-sdk-go` is as follows. fabricselection.go ```go func (s *Service) getEndorsers(chaincodes []*fab.ChaincodeCall, chResponse discclient.ChannelResponse, peerFilter soptions.PeerFilter, sorter soptions.PeerSorter) (discclient.Endorsers, error) { peers, err := s.discovery.GetPeers() if err != nil { return nil, errors.Wrapf(err, "error getting peers from discovery service for channel [%s]", s.channelID) } // `chResponse.Endorsers()` will use `newFilter(s.ctx, peers, peerFilter, sorter)` to filter endorsers. endpoints, err := chResponse.Endorsers(asInvocationChain(chaincodes), newFilter(s.ctx, peers, peerFilter, sorter)) if err != nil && newDiscoveryError(err).IsTransient() { return nil, status.New(status.DiscoveryServerStatus, int32(status.QueryEndorsers), fmt.Sprintf("error getting endorsers: %s", err), []interface{}{}) } return endpoints, err } ``` Now the question is, why can only one endorser be obtained from the channel or found by `discovery`? I tried to fix it by modifying some possible configurations in yaml, but they all failed.

PanzvorHong (Mon, 12 Apr 2021 03:59:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Saz2txpu4nNznPvc5) I have found the reason for my problem above. That's because endorsers got from channel should be contained in the peers list which got by `discovery`, or it will be filtered. And there has always been only one endorser peer got from channel or `discovery`. So, unless the two are equal, the endorsement is not satisfied. The relevant source code in `fabric-sdk-go` is as follows. fabricselection.go ```go func (s *Service) getEndorsers(chaincodes []*fab.ChaincodeCall, chResponse discclient.ChannelResponse, peerFilter soptions.PeerFilter, sorter soptions.PeerSorter) (discclient.Endorsers, error) { peers, err := s.discovery.GetPeers() if err != nil { return nil, errors.Wrapf(err, "error getting peers from discovery service for channel [%s]", s.channelID) } // `chResponse.Endorsers()` will use `newFilter(s.ctx, peers, peerFilter, sorter)` to filter endorsers. endpoints, err := chResponse.Endorsers(asInvocationChain(chaincodes), newFilter(s.ctx, peers, peerFilter, sorter)) if err != nil && newDiscoveryError(err).IsTransient() { return nil, status.New(status.DiscoveryServerStatus, int32(status.QueryEndorsers), fmt.Sprintf("error getting endorsers: %s", err), []interface{}{}) } return endpoints, err } ``` Now the question is, why can only one endorser be obtained from the channel or found by `discovery`? I tried to fix it by modifying some possible configurations in yaml, but they all failed.

PanzvorHong (Mon, 12 Apr 2021 03:59:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Saz2txpu4nNznPvc5) I have found the reason for my problem above. That's because endorsers got from channel should be contained in the peers list which got by `discovery`, or it will be filtered. And there has always been only one endorser peer got from channel or `discovery`. So, unless the two are equal, the endorsement is not satisfied. The relevant source code in `fabric-sdk-go` is as follows. fabricselection.go ```go func (s *Service) getEndorsers(chaincodes []*fab.ChaincodeCall, chResponse discclient.ChannelResponse, peerFilter soptions.PeerFilter, sorter soptions.PeerSorter) (discclient.Endorsers, error) { peers, err := s.discovery.GetPeers() if err != nil { return nil, errors.Wrapf(err, "error getting peers from discovery service for channel [%s]", s.channelID) } // `chResponse.Endorsers()` will use `newFilter(s.ctx, peers, peerFilter, sorter)` to filter endorsers. endpoints, err := chResponse.Endorsers(asInvocationChain(chaincodes), newFilter(s.ctx, peers, peerFilter, sorter)) if err != nil && newDiscoveryError(err).IsTransient() { return nil, status.New(status.DiscoveryServerStatus, int32(status.QueryEndorsers), fmt.Sprintf("error getting endorsers: %s", err), []interface{}{}) } return endpoints, err } ``` Now the question is, why can only one endorser be obtained from the channel or found by `discovery`? I tried to fix it by modifying some possible configurations in yaml, but they all failed.

PanzvorHong (Mon, 12 Apr 2021 03:59:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=Saz2txpu4nNznPvc5) I have found the reason for my problem above. That's because endorsers got from channel should be contained in the peers list which got by `discovery`, or it will be filtered. And there has always been only one endorser peer got from channel or `discovery`. So, unless the two are equal, the endorsement is not satisfied. As a result, it may take several retries to succeed, or an error will be returned when the `channel.policies.discovery.retryOpts.attempts` or `channel.policies.discovery.retryOpts.maxBackoff` is reached. The relevant source code in `fabric-sdk-go` is as follows. fabricselection.go ```go func (s *Service) getEndorsers(chaincodes []*fab.ChaincodeCall, chResponse discclient.ChannelResponse, peerFilter soptions.PeerFilter, sorter soptions.PeerSorter) (discclient.Endorsers, error) { peers, err := s.discovery.GetPeers() if err != nil { return nil, errors.Wrapf(err, "error getting peers from discovery service for channel [%s]", s.channelID) } // `chResponse.Endorsers()` will use `newFilter(s.ctx, peers, peerFilter, sorter)` to filter endorsers. endpoints, err := chResponse.Endorsers(asInvocationChain(chaincodes), newFilter(s.ctx, peers, peerFilter, sorter)) if err != nil && newDiscoveryError(err).IsTransient() { return nil, status.New(status.DiscoveryServerStatus, int32(status.QueryEndorsers), fmt.Sprintf("error getting endorsers: %s", err), []interface{}{}) } return endpoints, err } ``` Now the question is, why can only one endorser be obtained from the channel or found by `discovery`? I tried to fix it by modifying some possible configurations in yaml, but they all failed.

gauravgiri (Tue, 13 Apr 2021 06:16:52 GMT):
Has joined the channel.

gauravgiri (Tue, 13 Apr 2021 06:18:02 GMT):
I am getting the same error, any resolution for this?

gauravgiri (Tue, 13 Apr 2021 06:40:35 GMT):
Hi All, I have a go client application using fabric-sdk-go, which i upgraded to v1.0.0, on go build, getting this error, any resolution for this?: go build # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:225:23: *not enough arguments in call to s.statsd.SendLoop* have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string) The dependencies in go.mod are as below: github.com/hyperledger/fabric-lib-go v1.0.0 // indirect github.com/hyperledger/fabric-protos-go v0.0.0-20210318103044-13fdee960194 github.com/hyperledger/fabric-sdk-go v1.0.0

gauravgiri (Tue, 13 Apr 2021 06:40:35 GMT):
Hi All, I have a go client application using fabric-sdk-go, which i upgraded to v1.0.0, on go build, getting this error, any resolution for this?: *go build* # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:225:23: *not enough arguments in call to s.statsd.SendLoop* have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string) The dependencies in go.mod are as below: github.com/hyperledger/fabric-lib-go v1.0.0 // indirect github.com/hyperledger/fabric-protos-go v0.0.0-20210318103044-13fdee960194 github.com/hyperledger/fabric-sdk-go v1.0.0

gauravgiri (Tue, 13 Apr 2021 06:40:35 GMT):
Hi All, I have a go client application using fabric-sdk-go, which i upgraded to v1.0.0, on go build, getting this error, any resolution for this?: *go build* # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:225:23: *not enough arguments in call to s.statsd.SendLoop* have (<-chan time.Time, string, string) want (context.Context, <-chan time.Time, string, string) The dependencies in go.mod for fabric are as below: github.com/hyperledger/fabric-lib-go v1.0.0 // indirect github.com/hyperledger/fabric-protos-go v0.0.0-20210318103044-13fdee960194 github.com/hyperledger/fabric-sdk-go v1.0.0

AurelienGasser1 (Wed, 14 Apr 2021 19:04:47 GMT):
Hello, how can I configure my application so that only a specific peer responds to "Evaluate" (query) calls? Currently, it looks like queries are sent to one peer in the channel, chosen in a round-robin manner. What I want is queries being served only from one specific peer.

AurelienGasser1 (Wed, 14 Apr 2021 19:04:47 GMT):
Hello, how can I configure my application so that only a specific peer responds to "Evaluate" (query) calls? Currently, it looks like queries are sent to one peer in the channel, chosen in a round-robin manner. What I want is queries being served only from one specific peer belonging to the org issuing the query.

AurelienGasser1 (Wed, 14 Apr 2021 19:05:56 GMT):
Note that I don't know the details of the other peers in the channel at configuration time: only the details of the local peer

AurelienGasser1 (Wed, 14 Apr 2021 19:06:23 GMT):
My config looks like this ``` peers: {{ $.Values.fabric.peer.host }}:{{ $.Values.fabric.peer.port }}: endorsingPeer: true eventSource: true chaincodeQuery: true ledgerQuery: true ``` ^ only one peer configured

AurelienGasser1 (Sun, 18 Apr 2021 14:23:53 GMT):
Hello, How can I configure my application so that only a specific peer responds to "Evaluate" (query) calls? Currently, it looks like queries are sent to one peer in the channel (can belong to a different org), chosen in a round-robin manner. What I want is queries being served only from one specific peer belonging to the org issuing the query. Note that I don't know the details of the other peers in the channel at configuration time: only the details of the local peer My config looks like this: ``` peers: :: endorsingPeer: true eventSource: true chaincodeQuery: true ledgerQuery: true ``` ^ only one peer configured

YoussefAlaa (Mon, 19 Apr 2021 15:51:25 GMT):
Has joined the channel.

YoussefAlaa (Mon, 19 Apr 2021 15:51:26 GMT):
Hello everyone, I have been developing with js for some time but I have been learning Go and want to begin developing hyperledger-Fabric using Go, is there any tutorial or Example out there to start with for Fabric 2.0+ ?

YoussefAlaa (Mon, 19 Apr 2021 15:51:26 GMT):
Hello everyone, I have been developing with js for some time but I have been learning Go and want to begin developing hyperledger-Fabric using Go, is there any tutorial or Example out there to start with for Fabric 2.0+ with Golang?

japidei (Fri, 23 Apr 2021 09:14:21 GMT):
Has joined the channel.

bur (Fri, 23 Apr 2021 13:06:09 GMT):
you specify the endorsing peers using a option on `contract.CreateTransaction`. For instance: ``` txn, err := c.contract.CreateTransaction( "__invoke", gateway.WithEndorsingPeers(peers...), ) if err != nil { return nil, err } logger.Debugf("calling __invoke!") return txn.Evaluate(args...) ``` But with this code I also had the issue that this requires the peers you are specifying here must be part of your connections profil. :/

bur (Fri, 23 Apr 2021 13:06:48 GMT):
would be really nice to let discovery here jump in and get all relevant data to connect to that target peer

bur (Fri, 23 Apr 2021 13:08:58 GMT):
@troyronda is this the expected behavoir?

HansrajRami (Mon, 26 Apr 2021 04:33:04 GMT):
Hi all !!! I am using fabric SDK go v1.0.0 For enrolling user from fabric ca I'm using Enroll method of client/msp pkg This method is not returning identity after calling Enroll function.(like it is returning in nodejs SDK) It is directly storing it in crypto store. Is there any way in SDK we can get the identity of enrolled user and return it to the user in response of rest API

andrew-coleman (Mon, 26 Apr 2021 13:02:29 GMT):
The `gateway.WithEndorsingPeers()` method is a wrapper for the underlying `channel.WithTargetEndpoints()` method. I'm not sure whether that uses the discovery results. @troyronda?

troyronda (Mon, 26 Apr 2021 13:04:18 GMT):
@bstasyszyn would know about discovery topics.

randyshu (Thu, 29 Apr 2021 09:48:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=1tSWmnprxgBpzgBFz) you can use GetSigningIdentity("xx") to get certificate and keypair

randyshu (Thu, 29 Apr 2021 09:52:08 GMT):
hi, in general reenroll() will change the privateKey and in my scene i don't want to change it .any way can achieve this?

Ren-HK (Fri, 30 Apr 2021 16:13:50 GMT):
Has joined the channel.

Ren-HK (Fri, 30 Apr 2021 16:13:51 GMT):
I want to user this api:https://github.com/hyperledger/fabric-contract-api-go, but how to set the ccenv, I tried some, but can't build and install it

HansrajRami (Sun, 02 May 2021 17:24:59 GMT):
I didn't found any way for this So hitting directly fabric-ca api with http client Maybe this works for you as well

HansrajRami (Mon, 03 May 2021 04:28:45 GMT):
How to configure null event strategy while submitting transaction with gateway ?? I mean I don't want to wait for transaction to be committed.

wunderbarb (Thu, 06 May 2021 21:51:37 GMT):
I have an annoying issue when using `mspClient.Enroll`, some information is displayed on the console/terminal. For instance,``` ```

wunderbarb (Thu, 06 May 2021 21:51:37 GMT):
I have an annoying issue when using `mspClient.Enroll`, some information is displayed on the console/terminal. For instance,``` [fabsdk/fab] 2021/05/06 21:26:25 UTC - n/a -> INFO TLS Enabled [fabsdk/fab] 2021/05/06 21:26:25 UTC - n/a -> INFO TLS Enabled [fabsdk/fab] 2021/05/06 21:26:25 UTC - n/a -> INFO TLS Enabled [fabsdk/fab] 2021/05/06 21:26:25 UTC - n/a -> INFO generating key: &{A:ecdsa S:256} [fabsdk/fab] 2021/05/06 21:26:25 UTC - logbridge.(*cLogger).Info -> INFO encoded CSR ```. I tried to add `logging.SetLevel("fabsdk/fab", logging.ERROR)`, but no effect. I am using fabric-sdk-go v1.0.0 Did somebody have the same issue and solved it?

kopaygorodsky (Fri, 07 May 2021 15:09:25 GMT):
Did you specify all peers (from other orgs too) in EndpointConfig?

kopaygorodsky (Fri, 07 May 2021 15:09:39 GMT):
or in config.yaml in peers section

kopaygorodsky (Fri, 07 May 2021 15:10:25 GMT):
each peer that you got from discovery service must be contained in that list, otherwise fabricselection will ignore it.

kopaygorodsky (Fri, 07 May 2021 15:10:25 GMT):
every peer that you got from the discovery service must be contained in that list, otherwise, fabricselection will ignore it.

kopaygorodsky (Fri, 07 May 2021 15:12:14 GMT):
@troyronda @bstasyszyn I think we need to fix that approach, with dynamic discovery it should be possible to define a single peer in EndpointConfi from which you can get list of all peers in the network and work with them. If you agree I could do a PR

kopaygorodsky (Fri, 07 May 2021 15:12:14 GMT):
@troyronda @bstasyszyn I think we need to fix that approach, with dynamic discovery it should be possible to define a single peer in EndpointConfi from which you can get list of all peers in the network and work with them.

kopaygorodsky (Fri, 07 May 2021 19:24:59 GMT):
https://github.com/hyperledger/fabric-sdk-go/pull/175

kopaygorodsky (Fri, 07 May 2021 19:34:54 GMT):
Heh, I was trying to fight fabric ca client for a long time and did end up writing my own, covering only stuff I need. Regarding your case idk, I’ll check it in a few hours.

wunderbarb (Thu, 13 May 2021 00:11:45 GMT):
I have investigated a little. If I replaced log.Info (resp log.Infof) with log.Debug (resp log.Debugf) in the files `internal/github.com/hyperledger/fabric-ca/lib/client.go` and `internal/github.com/hyperledger/fabric-ca/util/csp.go` in `fabric-sdk-go` and `github.com/cloudflare/cfssl/csr/csr.go/Generate`, it obviously fixed the issue.

jimthematrix (Mon, 24 May 2021 17:22:22 GMT):
Has joined the channel.

jsms01 (Tue, 25 May 2021 14:39:41 GMT):
Hello everyone, im trying to use HSM with the GO SDK, my objective is to use it with a wallet, some kind of identityprovider, im creating a PR to create this interaction but i have some doubts: - Is this the right approach for this project? - Using Cryptosuite with PKCS11 interface is not as clear as i wanted it to be. - Using identitymanager or using the mspwallet to create a manager is not explained thoroughly I want to do something like this: https://github.com/hyperledger/fabric-sdk-node/blob/main/fabric-network/src/impl/wallet/hsmx509identity.ts i have my interfaces and some of the functions, but when i think how to link everything with a wallet, i just don't know if the path im following is correct

kopaygorodsky (Thu, 27 May 2021 13:45:17 GMT):
@troyronda @bstasyszyn Hello guys. I’ve stumbled on an issue with lifecycleprocessor. When I query for commited chaincodes I get error that “responses from endorsers do not match”. The problem is in the function that validates those responses. https://github.com/hyperledger/fabric-sdk-go/blob/main/pkg/client/resmgmt/lifecycleprocessor.go#L540 It uses proto.Equal which fails to compare slices values that are in different order.

 Two peers return the same list of chaincodes, but in different order because a slice structure is used instead of a map. Here https://github.com/hyperledger/fabric/blob/main/core/chaincode/lifecycle/scc.go#L620. I suppose namespaces can’t guarantee a specific order on all peers every time. I could provide a PR in order to fix that issue if you agree

kopaygorodsky (Thu, 27 May 2021 13:45:17 GMT):
@troyronda @bstasyszyn Hello guys. I’ve stumbled on an issue with lifecycleprocessor. When I query for committed chaincodes I get an error that “responses from endorsers do not match”. The problem is in the function that validates those responses. https://github.com/hyperledger/fabric-sdk-go/blob/main/pkg/client/resmgmt/lifecycleprocessor.go#L540 It uses `proto.Equal` which fails to compare slices values that are in a different order.

 Two peers return the same list of chaincodes, but in a different order because a slice structure is used instead of a map. Here https://github.com/hyperledger/fabric/blob/main/core/chaincode/lifecycle/scc.go#L620. I suppose namespaces can’t guarantee a specific order on all peers every time. I could provide a PR in order to fix that issue if you agree

bstasyszyn (Thu, 27 May 2021 14:21:57 GMT):
@kopaygorodsky Yes, please go ahead with the PR. I've seen this issue before but never knew the cause.

kopaygorodsky (Thu, 27 May 2021 17:50:58 GMT):
@bstasyszyn https://github.com/hyperledger/fabric-sdk-go/pull/177 is ready to be reviewed.

Chem (Fri, 28 May 2021 03:59:13 GMT):
Hi Team, Is there any sample application which using fabric-sdk-go? Please send me the links

byron1st (Mon, 31 May 2021 09:01:56 GMT):
Hello, is there any way to disable logs from SDK? For example, something like `[fabsdk/core] 2021/05/31 08:46:50 UTC - cryptosuite.GetDefault -> INFO No default cryptosuite found, using default SW implementation`. My app already has its own logging system based on JSON format, and I don't want to see logs from fabric SDK, which I cannot control.

kopaygorodsky (Mon, 31 May 2021 20:53:55 GMT):
you can create sdk instance with this option fabsdk.WithLoggerPkg(),

kopaygorodsky (Mon, 31 May 2021 20:54:33 GMT):
you can create sdk instance with this option fabsdk.WithLoggerPkg()

byron1st (Tue, 01 Jun 2021 00:57:05 GMT):
Thanks, I will try it. At this point, I'm using `Gateway` model and it doesn't has `WithLoggerPkg` or some like it. So, perhaps I try to use both `fabsdk` and `Gateway` using `gateway.WithSDK` function.

byron1st (Tue, 01 Jun 2021 06:13:58 GMT):
Hi, I ran into the error "TRANSIENT_FAILURE", when I tried to send a transaction using `Gateway.Submit` method. In summary, to use my custom logging system, I initialized `FabricSDK` object using `fabsdk.New()` method then injected it to my `Gateway` object using `WithSDK` option. However, the transaction submission fails and encounters TRANSIENT_FAILURE. When I'm using only `Gateway` with `WithConfig`, the submission works fine. At that time, the only problem was logging messages printed by `fabric-sdk-go`. So, my question is one of them: How can I disable `fabric-sdk-go`'s default logging system only using `Gateway` package, or How can I handle `TRANSIENT_FAILURE` error. The full message of this error is: `Failed to submit: error registering for TxStatus event: could not create client conn: could not connect to peer1.test.bpl:7051: dialing connection on target [peer1.test.bpl:7051]: connection is in TRANSIENT_FAILURE`. I posted my question in detail on Stackoverflow. Please check it and help me. Thanks. https://stackoverflow.com/questions/67783438/transient-failure-occurs-when-a-transaction-is-sent-using-gateway-that-is-config

kopaygorodsky (Tue, 01 Jun 2021 08:28:43 GMT):
You can pass the same option to the sdk instance WithMspPkg, though I’m not sure that it’s a correct flow, looks like a bug in gateway

kopaygorodsky (Tue, 01 Jun 2021 08:28:43 GMT):
You can pass the same option to the sdk instance WithMspPkg, though I’m not sure that it’s a correct flow, looks like a bug in Gateway pkg.

sunaaaooo (Thu, 03 Jun 2021 07:12:15 GMT):
Hello everyone, I meet a problem for invoke chaincode I make a channel with two peers (peer1-org1,peer2-org2) then I install chaincode to peers, and set the endorsement policy to "AND ('Org1MSP.member','Org2MSP.member')" when I invoke the chaincode, I just send to peer1, so I get a error but when I query the blocks, I found it produce four blocks, each block have only one transaction why????

troyronda (Thu, 03 Jun 2021 12:56:07 GMT):
@andrew-coleman ^^^

kopaygorodsky (Thu, 03 Jun 2021 14:46:32 GMT):
I suppose those transactions are invalid

kopaygorodsky (Thu, 03 Jun 2021 15:43:30 GMT):
hm, I see MSPProviderFactory was overriden, but it shouldn't be a problem as long as it's nil implementation. Some logs from the peer would be nice to see, I bet it's TLS error, but need to know for sure. @byron1st

kopaygorodsky (Thu, 03 Jun 2021 15:43:30 GMT):
hm, I see MSPProviderFactory was overriden, but it shouldn't be a problem as long as it's nil implementation. Some logs from the peer would be nice to see, I bet it's a TLS error, but need to know for sure. @byron1st

kopaygorodsky (Thu, 03 Jun 2021 15:43:30 GMT):
hm, I see MSPProviderFactory was overriden, but it shouldn't be a problem as long as it's nil implementation. Some logs from the peer at error time would be nice to see, I bet it's a TLS error, but need to know for sure. @byron1st

jimthematrix (Mon, 07 Jun 2021 15:58:33 GMT):
Has left the channel.

jmorakuebler (Wed, 09 Jun 2021 21:22:27 GMT):
Has joined the channel.

jmorakuebler (Wed, 09 Jun 2021 21:34:20 GMT):
Hello everyone, I'm new to Hyperledger Fabric, I checked the official docs and followed the *test-network* tutorial.I modified so I can launch 5 organizations and created a smart contract in *Go*. Now I'm looking to implement a *REST API* also using *Go*. I know I have to use the `fabric-sdk-go`, but can't find any examples for the current version (2.2), and `fabric-samples` have applications mainly for *javascript*. Does anyone knows a site or somewhere I can look for examples or guides? I would really appreciate that.

jmorakuebler (Wed, 09 Jun 2021 21:34:20 GMT):
Hello everyone, I'm new to Hyperledger Fabric, I checked the official docs and followed the *test-network* tutorial. I modified it so I can launch 5 organizations and created a smart contract in *Go*. Now I'm looking to implement a *REST API* also using *Go*. I know I have to use the `fabric-sdk-go`, but can't find any examples for the current version (2.2), and `fabric-samples` have applications mainly for *javascript*. Does anyone knows a site or somewhere I can look for examples or guides? I would really appreciate that.

jmorakuebler (Wed, 09 Jun 2021 21:34:20 GMT):
Hello everyone, I'm new to Hyperledger Fabric, I checked the official docs and followed the *test-network* tutorial. I modified it so I can launch 5 organizations and created a smart contract in *Go*. Now I'm looking to implement a *REST API* also using *Go*. I know I have to use the `fabric-sdk-go` package, but can't find any examples for the current version (2.2), and `fabric-samples` have applications mainly for *javascript*. Does anyone knows a site or somewhere I can look for examples or guides? I would really appreciate that.

jimthematrix (Thu, 10 Jun 2021 18:05:04 GMT):
Has joined the channel.

ankitm123 (Sun, 04 Jul 2021 13:31:35 GMT):
Has joined the channel.

SachinGowda (Thu, 15 Jul 2021 10:57:20 GMT):
Has joined the channel.

SachinGowda (Thu, 15 Jul 2021 11:04:37 GMT):
The gateway model has examples in the go docs itself

SachinGowda (Thu, 15 Jul 2021 11:04:37 GMT):
The gateway model has examples in the go docs itself this is the main page - https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go example - https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go/pkg/gateway?utm_source=godoc#example-package

VadimInshakov (Tue, 20 Jul 2021 05:53:02 GMT):
Please check this PR guys: https://github.com/hyperledger/fabric-sdk-go/pull/182

nikolas (Tue, 20 Jul 2021 21:37:55 GMT):
Hi guys, how can the "CurrentBLockHash" & "PreviousBlockHash" of BlockchainInfo be decoded to a readable string?

indirajith (Tue, 20 Jul 2021 23:11:08 GMT):
Hi all, I am using the contract api and like to add timestamp. Is there a method provided for it in contract api or if I have to use the older stub how to invoke it when using contract api. Can anyone help?

Maginaro (Wed, 21 Jul 2021 10:03:47 GMT):
Has joined the channel.

VadimInshakov (Tue, 27 Jul 2021 10:54:36 GMT):
@troyronda @bstasyszyn

VadimInshakov (Tue, 27 Jul 2021 10:55:15 GMT):
@troyronda @bstasyszyn

matthieublottiere (Wed, 28 Jul 2021 12:06:02 GMT):
Has joined the channel.

matthieublottiere (Wed, 28 Jul 2021 12:09:01 GMT):
your smartcontracts will receive a TransactionContextInterface which exposes a GetStub() method. Once you have the underlying stub, you can call stub.GetTxTimestamp()

indirajith (Thu, 29 Jul 2021 22:07:17 GMT):
Thank you @matthieublottiere It works with my requirement.

oreg (Mon, 02 Aug 2021 12:08:55 GMT):
Has left the channel.

DanielHaren (Mon, 02 Aug 2021 14:22:34 GMT):
Has joined the channel.

jimthematrix (Fri, 06 Aug 2021 13:10:04 GMT):
hey guys, as part of working on the FireFly connector for Fabric (https://github.com/hyperledger-labs/firefly-fabconnect), using fabric-sdk-go, I came across a "limitation": the cache for the event services generates lookup keys that only takes into account the channel ID. this means if I specify different parameters such as `fromBlock` which is supposed to result in a different event stream, I could get the same event service that existed before. I started the following PR to get around this and would appreciate any input on whether this is going in the right direction or I have missed something with my understanding: https://github.com/hyperledger/fabric-sdk-go/pull/184

jimthematrix (Fri, 06 Aug 2021 18:12:11 GMT):
are all of the containers needed for a basic kafka setup? I think the examples, ksqldb-cli and datagen are optional?

jimthematrix (Fri, 06 Aug 2021 19:47:01 GMT):
I tried to use the docker cluster to test the kafka handler inside fabconnect, the broker container keeps crashing after processing one message with `broker exited with code 137`, googling shows that this is OOME. checking the message consumption it looks like the confluent platform requires ~8GB memory in idle state. that's pretty difficult to sustain on a developer's laptop.

jimthematrix (Fri, 06 Aug 2021 19:47:01 GMT):
I tried to use the docker cluster to test the kafka handler inside fabconnect, the broker container keeps crashing after processing one message with `broker exited with code 137`, googling shows that this is OOME. checking the message consumption it looks like the confluent platform requires ~8GB memory in idle state (this is after eliminating the cli and demo containers from docker-compose.yaml). that's pretty difficult to sustain on a developer's laptop.

jimthematrix (Fri, 06 Aug 2021 19:50:23 GMT):
do you mind looking into switching to a leaner setup, maybe `solsson/kafka` based?

jimthematrix (Fri, 06 Aug 2021 20:29:06 GMT):
I managed to pare down the docker-compose.yaml to just the zookeeper and broker, and use the GUI tool https://kafkatool.com/download.html to manage, this seems to be going OK so far (still using the Confluent images)

Djoust (Tue, 10 Aug 2021 08:21:07 GMT):
Has joined the channel.

anonsachin (Fri, 13 Aug 2021 09:07:46 GMT):
Hi Guys created a pull request for creating custom wallets for gateway package. Tried to create a simple way of doing it like in the node package. This is the request https://github.com/hyperledger/fabric-sdk-go/pull/185

DiAnh (Fri, 20 Aug 2021 13:15:22 GMT):
hi everyone, how to use commithandler in go sdk ? thank for any suggests.

kopaygorodsky (Thu, 26 Aug 2021 01:12:07 GMT):
Could you describe your problem in more details ? Why do you need to use commit handler separately from all handlers ?

root10 (Thu, 02 Sep 2021 09:14:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-go?msg=fBt8ZxupHRyqEJX8X) Hi guys. I have the same problem, but I don't get how to query system chaincode. I need to retrieve BlockID and TxID, so my idea is to get TxId from invoke response, and then query "GetBlockByTxID"

root10 (Thu, 02 Sep 2021 09:18:09 GMT):
Unfortunately I didn't do it

Fabricuser (Wed, 08 Sep 2021 17:21:49 GMT):
Has joined the channel.

dengjiali (Sun, 12 Sep 2021 12:24:24 GMT):
Has joined the channel.

lifeg0eson (Sun, 12 Sep 2021 13:10:16 GMT):
Has joined the channel.

lifeg0eson (Sun, 12 Sep 2021 13:10:16 GMT):
Hi,every,anyone konws how to commit an jira,I cant choose fbaric-sdk-go

vlaca (Mon, 13 Sep 2021 09:00:18 GMT):
Has joined the channel.

vlaca (Mon, 13 Sep 2021 13:47:42 GMT):
here is a tutorial that explains how to link git commit to Jira if that's is what you are asking

vlaca (Mon, 13 Sep 2021 13:47:47 GMT):
https://bigbrassband.wistia.com/medias/7kj43knu4m

vlaca (Mon, 13 Sep 2021 13:49:38 GMT):
just include the Jira Issue Key at the beginning of the commit message

lifeg0eson (Mon, 13 Sep 2021 13:51:58 GMT):
thanks a lot

lifeg0eson (Mon, 13 Sep 2021 13:54:26 GMT):

Clipboard - 2021年9月13日晚上9点54分

vlaca (Mon, 13 Sep 2021 14:06:34 GMT):
it seems we offically moved off of Jira and onto github now for issues. I'll investigate...

lifeg0eson (Mon, 13 Sep 2021 14:07:47 GMT):
thanks a lot, I want to commit an issue.

vlaca (Mon, 13 Sep 2021 14:28:30 GMT):
you need to create an issue in in the fabric-sdk-go repo

vlaca (Mon, 13 Sep 2021 14:28:32 GMT):
https://github.com/hyperledger/fabric-sdk-go/issues

vlaca (Mon, 13 Sep 2021 14:29:56 GMT):
we will not be using Jira anymore as far as I understood

vlaca (Mon, 13 Sep 2021 14:30:41 GMT):
at least only for issues which were already created there

lifeg0eson (Tue, 14 Sep 2021 01:35:31 GMT):
thanks for your reply,I have commit an issue in the git repo

fmy1993 (Tue, 14 Sep 2021 07:35:52 GMT):
Has joined the channel.

dengjiali (Tue, 14 Sep 2021 14:53:49 GMT):

Clipboard - September 14, 2021 10:52 PM

justiny (Thu, 16 Sep 2021 05:58:18 GMT):
Has joined the channel.

haniavis (Mon, 27 Sep 2021 07:18:01 GMT):
Hey, I want to query the ledger for a value without creating a new transaction. Something equivalent to [peer chaincode query](https://hyperledger-fabric.readthedocs.io/en/release-2.2/commands/peerchaincode.html#peer-chaincode-query) . Is there such a function in the Fabric SDK Go?

jtonline (Mon, 27 Sep 2021 10:07:21 GMT):
To query the ledger without committing a transaction to the ledger, you can use EvaluateTransaction in the Go SDK, which is documented here... https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go/pkg/gateway#Contract.EvaluateTransaction

jtonline (Mon, 27 Sep 2021 10:07:21 GMT):
To query the ledger without committing a transaction to the blockchain, you can use EvaluateTransaction in the Go SDK, which is documented here... https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go/pkg/gateway#Contract.EvaluateTransaction

vanitas92 (Mon, 27 Sep 2021 10:54:46 GMT):
Hi everyone, has anybody got any successful attempt to connect the new slim sdks for version `2.4.0-beta` from a client to the peer? The samples provided here, https://github.com/hyperledger/fabric-gateway/blob/main/samples/go/sample.go, i always get the `transport is closing` error while performing a transaction in the network, but the 'old' sdk as we know it, it works perfectly well. Any help would be appreciated. Thanks!

davidkel (Mon, 27 Sep 2021 11:00:37 GMT):
I've not had a problem making it work, can you provide more details about your setup and code ?

haniavis (Mon, 27 Sep 2021 12:23:06 GMT):
thanks @jtonline ! This is what I was looking for

vanitas92 (Mon, 27 Sep 2021 14:02:24 GMT):
I copy some code snippets, it is part of a larger API being developed now, so here is the gateway connection: ``` package fabric import ( "crypto/x509" zap "erc721-api/logger" "io/ioutil" // "github.com/hyperledger/fabric-sdk-go/pkg/core/config" // "github.com/hyperledger/fabric-sdk-go/pkg/gateway" "github.com/hyperledger/fabric-gateway/pkg/client" "github.com/hyperledger/fabric-gateway/pkg/identity" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ) const ( mspID = "org1MSP" cryptoPath = "/crypto-config/peerOrganizations/org1" certPath = cryptoPath + "/users/User1@org1/msp/signcerts/User1@org1-cert.pem" keyPath = cryptoPath + "/users/User1@org1/msp/keystore/priv_sk" tlsCertPath = cryptoPath + "/peers/peer0-org1/tls/ca.crt" peerEndpoint = "peer0-org1:7051" ) // type Gateway struct { // grpcClientConn *grpc.ClientConn // gwClient *client.Gateway // } var Gateway *client.Gateway func Connect() { // The gRPC client connection should be shared by all Gateway connections to this endpoint clientConnection := newGrpcConnection() defer clientConnection.Close() id := newIdentity() sign := newSign() // Wallet supported in old sdk // wallet := gateway.NewInMemoryWallet() // if !wallet.Exists("appUser") { // err := populateWallet(wallet) // if err != nil { // zap.Logger.Panicf("Failed to populate wallet contents: %s", err) // } // } // Create a Gateway connection for a specific client identity gateway, err := client.Connect(id, client.WithSign(sign), client.WithClientConnection(clientConnection)) // gateway, err := gateway.Connect(gateway.WithConfig(config.FromFile("/config.yaml")), gateway.WithIdentity(wallet, "appUser")) defer gateway.Close() if err != nil { zap.Logger.Panicf("failed to connect to gateway peer: %s", err) } Gateway = gateway } // newGrpcConnection creates a gRPC connection to the Gateway server. func newGrpcConnection() *grpc.ClientConn { certificate, err := loadCertificate(tlsCertPath) if err != nil { zap.Logger.Panicf("failed to obtain commit status: %w", err) } certPool := x509.NewCertPool() certPool.AddCert(certificate) transportCredentials := credentials.NewClientTLSFromCert(certPool, "") connection, err := grpc.Dial(peerEndpoint, grpc.WithTransportCredentials(transportCredentials)) if err != nil { zap.Logger.Panicf("failed toevaluate transaction: %w", err) } return connection } // newIdentity creates a client identity for this Gateway connection using an X.509 certificate. func newIdentity() *identity.X509Identity { certificate, err := loadCertificate(certPath) if err != nil { zap.Logger.Panic(err) } id, err := identity.NewX509Identity(mspID, certificate) if err != nil { zap.Logger.Panic(err) } return id } // newSign creates a function that generates a digital signature from a message digest using a private key. func newSign() identity.Sign { privateKeyPEM, err := ioutil.ReadFile(keyPath) if err != nil { zap.Logger.Panic(err) } privateKey, err := identity.PrivateKeyFromPEM(privateKeyPEM) if err != nil { zap.Logger.Panic(err) } sign, err := identity.NewPrivateKeySign(privateKey) if err != nil { zap.Logger.Panic(err) } return sign } func loadCertificate(filename string) (*x509.Certificate, error) { certificatePEM, err := ioutil.ReadFile(filename) if err != nil { return nil, err } return identity.CertificateFromPEM(certificatePEM) } // func populateWallet(wallet *gateway.Wallet) error { // certPath := "/crypto-config/peerOrganizations/org1/users/User1@org1/msp/signcerts/User1@org1-cert.pem" // // certPath := filepath.Join(credPath, "signcerts", "cert.pem") // // read the certificate pem // cert, err := ioutil.ReadFile(filepath.Clean(certPath)) // if err != nil { // return err // } // keyDir := "/crypto-config/peerOrganizations/org1/users/User1@org1/msp/keystore" // // keyDir := filepath.Join(credPath, "keystore") // // there's a single file in this dir containing the private key // files, err := ioutil.ReadDir(keyDir) // if err != nil { // return err // } // if len(files) != 1 { // return errors.New("keystore folder should have contain one file") // } // keyPath := filepath.Join(keyDir, files[0].Name()) // key, err := ioutil.ReadFile(filepath.Clean(keyPath)) // if err != nil { // return err // } // identity := gateway.NewX509Identity("org1MSP", string(cert), string(key)) // err = wallet.Put("appUser", identity) // if err != nil { // return err // } // return nil // } ```

vanitas92 (Mon, 27 Sep 2021 14:03:12 GMT):
And this code is when calling the function via the gateway: ``` func QueryNFT(id string) ([]byte, error) { network := Gateway.GetNetwork("mychannel") contract := network.GetContract("erc721") evaluateResult, err := contract.EvaluateTransaction("ReadNFT", id) if err != nil { zap.Logger.Errorf("failed to query the ledger for NFT %s: %s", id, err.Error()) return []byte{}, err } zap.Logger.Debugf("submitResult of reading NFT %s: %s", id, string(evaluateResult)) return evaluateResult, nil } ```

vanitas92 (Mon, 27 Sep 2021 14:04:23 GMT):
Take note that `Gateway` is the object shared between the initialization and the chaincode being called.

davidkel (Mon, 27 Sep 2021 14:06:31 GMT):
The problem is in your Connect method. When Connect finishes and returns control back to the caller, the defers run which close the grpc client and the gateway making the gateway unusable

vanitas92 (Mon, 27 Sep 2021 14:07:39 GMT):
Ah good spot! So the defer should be done outside the connect function right?

davidkel (Mon, 27 Sep 2021 14:10:12 GMT):
you should keep a copy of the Gateway and client connection. Once you are finished with them you close them. You may be able to make use of the `defer` golang to achieve that but you don't have to

davidkel (Mon, 27 Sep 2021 14:10:12 GMT):
you should keep a copy of the Gateway and client connection. Once you are finished with them you close them. You may be able to make use of the `defer` golang statement to achieve that but you don't have to

vanitas92 (Mon, 27 Sep 2021 14:11:28 GMT):
Understood, this is part of an API that will be listening to incomming connections, so actually defer would only makes sense if the container is killed or having a shutdown signal

vanitas92 (Mon, 27 Sep 2021 15:08:07 GMT):
Thanks for the quick solving, that helped solve the problem! :thanks:

davidkel (Mon, 27 Sep 2021 16:12:30 GMT):
:thumbsup:

Param-S (Tue, 05 Oct 2021 06:06:53 GMT):
Has joined the channel.

mauricio (Fri, 08 Oct 2021 14:46:16 GMT):
Hi, we've a network from 3 orgs and 3 peers each. I want to know to get the chaincode's endorsers peers from fabric-sdk-go? In the past we implemented this function https://github.com/hyperledger/fabric-sdk-go/pull/169/files, but it only works for local peers. I really appreciate any help you can provide.

matthieublottiere (Thu, 14 Oct 2021 13:15:18 GMT):
Hello there, I've had the need to disable threshold filtering of peers for the event service. It turns out the configuration is a bit too tight when validating input values, so -1 is not accepted. I opened a pull request to address that: https://github.com/hyperledger/fabric-sdk-go/pull/195

jkneubuhl (Mon, 18 Oct 2021 16:44:07 GMT):
Has joined the channel.

Chem (Tue, 26 Oct 2021 07:31:15 GMT):
Hi team, How create channels using go SDK? Is there any refference documents available? Looking for your responses?

matijasipek (Mon, 15 Nov 2021 12:23:03 GMT):
Has joined the channel.

vieiramanoel (Wed, 17 Nov 2021 05:35:26 GMT):
Hello, is there anyway to listen for the sys-channel events? Both eventhub and channel based services can't reach it since it only belong to the orderer. I'd like to know if a new Channel was created :v

vieiramanoel (Wed, 17 Nov 2021 05:35:26 GMT):
Hello, is there any way to listen for the sys-channel events? Both eventhub and channel based services can't reach it since it only belong to the orderer. I'd like to know if a new Channel was created :v

kopaygorodsky (Sat, 20 Nov 2021 23:42:08 GMT):
I don’t think it’s possible for security reasons. Even if you participate on system channel it does not mean that you know about all channels.

kopaygorodsky (Sat, 20 Nov 2021 23:42:08 GMT):
I don’t think it’s possible. It’s forbidden for security reasons. Even if you participate on system channel it does not mean that you know about all channels.

kopaygorodsky (Sat, 20 Nov 2021 23:42:08 GMT):
It’s forbidden for security reasons. Even if you participate on system channel it does not mean that you know about all channels.

matijasipek (Wed, 24 Nov 2021 10:03:46 GMT):
Hello, I have a problem with understanding the role of GO SDK in HLF and with Kubernetes. Here is the story. First, I have managed to setup three test networks provided by fabric samples. My next step was trying to add an organization to test-network-k8s, and TBH it was quite complex to add and reconfigure data via bash/config files to manage such an action. Then, I found out that the way to do it is via GO SDK by creating an operator. So, I tried a few k8s operators, but I cannot say they enhanced my understanding. 1) When building initial HLF infrastructure, do you build it programmatically with SDK? If no, which are the base components I need to setup (binaries, configs, other software)? 2) How to connect HLF with the SDK? If I create go project and add SDK, how will the SDK recognize the HLF network, which configuration do I need to setup? Any help would be appreciated

bestbeforetoday (Thu, 25 Nov 2021 16:48:02 GMT):
A v0.2.0 pre-release version of the new *fabric-gateway* client API for use with Fabric v2.4 has been published/tagged. This makes use of the new Fabric Gateway service in v2.4 peers, and provides completely consistent functionality to applications written in Go, Node and Java. Provided no stop-ship issues are identified, this is what we are planning to release alongside Fabric v2.4 as a supplement to the existing SDKs so please feel free to try it out and provide feedback. - https://github.com/hyperledger/fabric-gateway

bestbeforetoday (Thu, 25 Nov 2021 17:38:24 GMT):
Just a note that a current (development) build of the Fabric peer is required. This will not work with the v2.4 beta release. There is a `make pull-latest-peer` Makefile target in the fabric-gateway repository that will pull down and tag the latest peer images

anil8753 (Sun, 05 Dec 2021 10:26:17 GMT):
Has joined the channel.

anil8753 (Sun, 05 Dec 2021 10:26:18 GMT):
Tried it and it is working perfectly. I see the only great advantage is WithEndorsingOrganizations() API. It is very useful in case of private data collection

anil8753 (Sun, 05 Dec 2021 10:47:39 GMT):
Even today I am struggling to enroll and register Admin/users using go sdk. Can someone please share or refer a code snippet to register/enroll users. Basically I am stuck at creating msp client using sdk context.

anil8753 (Sun, 05 Dec 2021 13:42:59 GMT):
Looks like fabric-gateway is not compatible with the fabric-sdk-go.``` # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/api.go:47:28: undefined: discovery.ChaincodeCall vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:83:53: undefined: discovery.ChaincodeInterest vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:120:55: undefined: discovery.ChaincodeCall vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:124:13: undefined: discovery.ChaincodeInterest vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:229:95: undefined: discovery.ChaincodeCall vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:247:54: undefined: discovery.ChaincodeCall vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:604:38: undefined: discovery.ChaincodeInterest vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:620:25: undefined: discovery.ChaincodeCall ```

anil8753 (Sun, 05 Dec 2021 13:42:59 GMT):
Looks like fabric-gateway is not compatible with the fabric-sdk-go. go build outputs the following errors ``` # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/api.go:47:28: undefined: discovery.ChaincodeCall vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:83:53: undefined: discovery.ChaincodeInterest vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:120:55: undefined: discovery.ChaincodeCall vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:124:13: undefined: discovery.ChaincodeInterest vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:229:95: undefined: discovery.ChaincodeCall vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:247:54: undefined: discovery.ChaincodeCall vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:604:38: undefined: discovery.ChaincodeInterest vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client/client.go:620:25: undefined: discovery.ChaincodeCall ```

bestbeforetoday (Tue, 07 Dec 2021 11:15:54 GMT):
I know this has been discussion in a GitHub issue, but the issue appears to be that the package of one of the protobufs was changed to avoid a circular dependency. So there is a difference between the older generated Go protobuf bindings used by fabric-sdk-go and the newer ones used by fabric-gateway

bestbeforetoday (Tue, 07 Dec 2021 11:18:24 GMT):
Also worth pointing out that in many cases you won't even need to use the WithEndorsingOrganizations option since the Gateway will dynamically detect the runtime endorsement requirements of a transaction and obtain endorsements from required organizations. But it is very useful to ensure that private data transmitted in transient data is not sent for endorsement to any organization that should not should not see the data

MisiakoulisGeorge (Wed, 22 Dec 2021 14:19:41 GMT):
Has joined the channel.

MisiakoulisGeorge (Wed, 22 Dec 2021 14:19:42 GMT):
Hello all, I am trying to implement using the fabric-sdk-go a function that queries QSCC chaincode from peers. I found out that there are some test units that have been published in the fabric-sdk-go core files but I do not know how to create channelContext. It seems that in order to be able to create a sdk instance, firstly I need to load a configuration file. When I do that the following error appears: `*Failed to create fabric sdk: failed to initialize configuration: unable to load endpoint config: failed to initialize endpoint config from config backend: network configuration load failed: failed to parse 'organizations' config item to endpointConfigurationEntity.Organizations type: '' expected a map, got 'slice'*`. The code snippet that I have used is the following: `currentPath, err := os.Getwd() if err != nil { currentPathError := []byte(fmt.Sprintf("Failed to retrive current path: %s", err)) w.Write([]byte(currentPathError)) return } configPath := filepath.Join( currentPath, "..", "..", "..", "first-network", "configtx.yaml", ) sdk, err := fabsdk.New(config.FromFile(configPath)) if err != nil { sdkError := []byte(fmt.Sprintf("Failed to create fabric sdk: %s", err)) w.Write([]byte(sdkError)) return } ccp := sdk.ChannelContext("mychannel", fabsdk.WithUser("admin"), fabsdk.WithOrg("Org1MSP")) cc, err := channel.New(ccp) spew.Dump(cc) if err != nil { channelContectError := []byte(fmt.Sprintf("Failed to create channel client: %s", err)) w.Write([]byte(channelContectError)) return }` What is the correct config file that sdk instance is waiting?

MisiakoulisGeorge (Thu, 23 Dec 2021 12:56:12 GMT):
Any ideas?

kopaygorodsky (Thu, 06 Jan 2022 12:00:37 GMT):
You have error in your file, read the error message

jje (Thu, 13 Jan 2022 17:07:21 GMT):

jje - Thu Jan 13 2022 18:06:44 GMT+0100 (Central European Standard Time).txt

jje (Thu, 13 Jan 2022 17:07:21 GMT):

jje - Thu Jan 13 2022 18:06:44 GMT+0100 (Central European Standard Time).txt

jje (Thu, 13 Jan 2022 17:07:21 GMT):

jje - Thu Jan 13 2022 18:06:44 GMT+0100 (Central European Standard Time).txt

Baha-sk (Fri, 14 Jan 2022 20:16:14 GMT):
this is the Fabric SDK Go channel, you might wanna try the #aries-go channel for Aries Framework Go related questions.. but to quickly answer your question: ``` The response is: { "did": { "@context": [ "https://w3id.org/did/v1" ], "id": "did:key:zUC72SKgSTFkUidWbXEw8P7FVb4T2yJ7WfvUjXLPS9RZRogQBYdadtnuMsshcPFeynEVC9AVQVPGanhY22ygrKSiTaCqzYjjZVu5ubjZvA4wkrzjdSucxCBDMCtr3TJ1D27MKBz", "verificationMethod": [ { "controller": "did:key:zUC72SKgSTFkUidWbXEw8P7FVb4T2yJ7WfvUjXLPS9RZRogQBYdadtnuMsshcPFeynEVC9AVQVPGanhY22ygrKSiTaCqzYjjZVu5ubjZvA4wkrzjdSucxCBDMCtr3TJ1D27MKBz", "id": "did:key:zUC72SKgSTFkUidWbXEw8P7FVb4T2yJ7WfvUjXLPS9RZRogQBYdadtnuMsshcPFeynEVC9AVQVPGanhY22ygrKSiTaCqzYjjZVu5ubjZvA4wkrzjdSucxCBDMCtr3TJ1D27MKBz#zUC72SKgSTFkUidWbXEw8P7FVb4T2yJ7WfvUjXLPS9RZRogQBYdadtnuMsshcPFeynEVC9AVQVPGanhY22ygrKSiTaCqzYjjZVu5ubjZvA4wkrzjdSucxCBDMCtr3TJ1D27MKBz", "publicKeyBase58": "nbmoNmbX86mJBaa5xSR3CHhXngyuUhNYs8kZxHxkgvKbmwfwwEPkZRv2TPuQTUgr3vkcN5XTCu9a5AFZh46zdcg8CCqdbrmbdx3B1wS5GursGYa1sG17BQUsaGZ7dTxUpag", "type": "Bls12381G2Key2020" } ], ``` the `verificationMethod.id` is not a KMS ID, it's the verification method ID, you can't treat it like a KMS ID

Rizary (Sat, 05 Feb 2022 03:27:16 GMT):
Has joined the channel.

bestbeforetoday (Tue, 08 Feb 2022 10:19:22 GMT):
v1.0.1 of the Fabric Gateway client API (Go, Node and Java) for use with Fabric v2.4+ is released: https://github.com/hyperledger/fabric-gateway/releases/tag/v1.0.1

bestbeforetoday (Tue, 15 Feb 2022 10:33:21 GMT):
Hyperledger chat is migrating from Rocket.Chat to Discord. There is a *fabric-client-apis* channel in Discord that can be used in place of this one: https://discord.com/channels/905194001349627914/943089887589048350 To sign up for the Hyperledger Discord server, use this link: https://discord.gg/hyperledger

fishMao (Tue, 22 Feb 2022 10:51:43 GMT):
Has joined the channel.

sunaaaooo (Fri, 11 Mar 2022 09:43:12 GMT):
Hello all, I want to know if I can use lscc in fabric 2.2, I useinstall my chaincode like fabric 1.4, but get a error like

sunaaaooo (Fri, 11 Mar 2022 09:43:12 GMT):
Hello all, I want to know if I can use lscc in fabric 2.2, I use go sdk install my chaincode like fabric 1.4, but get a error like docker build failed: Error returned from build: 1 "can't load package: package cc: cannot find package "cc" in any of: /usr/local/go/src/cc (from $GOROOT) /chaincode/input/src/cc (from $GOPATH) /go/src/cc for fabric 2.2

rjones (Tue, 22 Mar 2022 19:53:30 GMT):

rjones (Tue, 22 Mar 2022 19:53:30 GMT):

rjones (Tue, 22 Mar 2022 19:53:30 GMT):